From ca811f03cbe6bf54fbf81f33af9198aeb5f03913 Mon Sep 17 00:00:00 2001 From: Earlopain <14981592+Earlopain@users.noreply.github.com> Date: Thu, 10 Oct 2024 22:41:17 +0200 Subject: [PATCH] Manually bump tapioca / regenerate rbi (#1514) Dependabot does not do this because it resolves with Ruby 3.0 from the gemspec and tapioca now only supports 3.1 This unblocks prism 1.0 which is required for the ruby-lsp to update to the latest version. Currently it runs into https://github.com/Shopify/ruby-lsp/issues/2630, causing a restart loop. To make sure this does the right thing on older rubies, I added a step to print the resolved lockfile on CI --- .github/workflows/test.yml | 2 + Gemfile.lock | 34 +- ...able@7.1.3.rbi => actioncable@7.1.3.4.rbi} | 99 +- ...ox@7.1.3.rbi => actionmailbox@7.1.3.4.rbi} | 233 +- ...ler@7.1.3.rbi => actionmailer@7.1.3.4.rbi} | 199 +- ...npack@7.1.3.rbi => actionpack@7.1.3.4.rbi} | 390 +- ...ntext@7.1.3.rbi => actiontext@7.1.3.4.rbi} | 431 +- ...nview@7.1.3.rbi => actionview@7.1.3.4.rbi} | 375 +- ...ivejob@7.1.3.rbi => activejob@7.1.3.4.rbi} | 51 +- ...odel@7.1.3.rbi => activemodel@7.1.3.4.rbi} | 3 +- ...ord@7.1.3.rbi => activerecord@7.1.3.4.rbi} | 323 +- ...ge@7.1.3.rbi => activestorage@7.1.3.4.rbi} | 863 +- ...rt@7.1.3.rbi => activesupport@7.1.3.4.rbi} | 89 +- ...ssable@2.8.6.rbi => addressable@2.8.7.rbi} | 3 +- sorbet/rbi/gems/appraisal@2.5.0.rbi | 621 - ...12.0.rbi => async-http-faraday@0.14.0.rbi} | 39 +- ...-http@0.61.0.rbi => async-http@0.69.0.rbi} | 357 +- sorbet/rbi/gems/async-io@1.36.1.rbi | 1089 - ...nc-pool@0.4.0.rbi => async-pool@0.7.0.rbi} | 75 +- .../{async@2.6.5.rbi => async@2.14.2.rbi} | 575 +- sorbet/rbi/gems/better_html@2.0.2.rbi | 471 - sorbet/rbi/gems/better_html@2.1.1.rbi | 9 + ...decimal@3.1.6.rbi => bigdecimal@3.1.8.rbi} | 1 + sorbet/rbi/gems/brakeman@6.2.1.rbi | 222 + .../{builder@3.2.4.rbi => builder@3.3.0.rbi} | 1 + ...utils@18.3.0.rbi => chef-utils@18.5.0.rbi} | 1 + ...by@1.2.3.rbi => concurrent-ruby@1.3.4.rbi} | 73 +- ...{console@1.23.2.rbi => console@1.26.0.rbi} | 630 +- ...{diff-lcs@1.5.0.rbi => diff-lcs@1.5.1.rbi} | 142 +- ...rails@3.0.0.rbi => dotenv-rails@3.1.2.rbi} | 1 + .../{dotenv@3.0.0.rbi => dotenv@3.1.2.rbi} | 97 +- .../rbi/gems/{drb@2.2.0.rbi => drb@2.2.1.rbi} | 385 +- ...{erb_lint@0.5.0.rbi => erb_lint@0.6.0.rbi} | 1 + .../{erubi@1.12.0.rbi => erubi@1.13.0.rbi} | 35 +- .../{et-orbi@1.2.7.rbi => et-orbi@1.2.11.rbi} | 127 +- ...2.5.0.rbi => faraday-http-cache@2.5.1.rbi} | 35 +- ...p@3.0.2.rbi => faraday-net_http@3.1.0.rbi} | 63 +- ...{faraday@2.7.11.rbi => faraday@2.10.0.rbi} | 312 +- .../gems/{ffi@1.16.3.rbi => ffi@1.17.0.rbi} | 1 + ...-local@1.0.0.rbi => fiber-local@1.1.0.rbi} | 18 +- sorbet/rbi/gems/fiber-storage@0.1.2.rbi | 33 + ...{foreman@0.87.2.rbi => foreman@0.88.1.rbi} | 1 + .../{fugit@1.9.0.rbi => fugit@1.11.1.rbi} | 648 +- ...{highline@2.1.0.rbi => highline@3.1.0.rbi} | 1 + ...tasks@1.0.13.rbi => i18n-tasks@1.0.14.rbi} | 383 +- .../gems/{i18n@1.14.1.rbi => i18n@1.14.6.rbi} | 238 +- sorbet/rbi/gems/io-endpoint@0.13.0.rbi | 649 + ...{io-event@1.3.3.rbi => io-event@1.6.5.rbi} | 265 +- sorbet/rbi/gems/io-stream@0.4.0.rbi | 441 + .../gems/{json@2.6.3.rbi => json@2.7.2.rbi} | 167 +- sorbet/rbi/gems/logger@1.6.0.rbi | 912 + .../{marcel@1.0.2.rbi => marcel@1.0.4.rbi} | 97 +- ...er@1.0.1.rbi => memory_profiler@1.0.2.rbi} | 31 +- ...initest@5.22.2.rbi => minitest@5.25.1.rbi} | 495 +- ...ut@3.2.7.rbi => mixlib-shellout@3.2.8.rbi} | 1 + sorbet/rbi/gems/net-http@0.4.1.rbi | 4039 +++ ...et-imap@0.4.10.rbi => net-imap@0.4.14.rbi} | 1292 +- ...et-smtp@0.4.0.1.rbi => net-smtp@0.5.0.rbi} | 385 +- .../gems/{nio4r@2.7.0.rbi => nio4r@2.7.3.rbi} | 1 + ...okogiri@1.16.2.rbi => nokogiri@1.16.6.rbi} | 1 + ...arallel@1.24.0.rbi => parallel@1.26.3.rbi} | 53 +- ...{parser@3.3.0.5.rbi => parser@3.3.5.0.rbi} | 2476 +- .../rbi/gems/{pg@1.5.4.rbi => pg@1.5.6.rbi} | 94 +- sorbet/rbi/gems/prettier_print@1.2.1.rbi | 951 - .../{prism@0.30.0.rbi => prism@1.2.0.rbi} | 19060 +++++++------ ...ack@1.4.2.rbi => protocol-hpack@1.4.3.rbi} | 174 +- ...1@0.16.0.rbi => protocol-http1@0.19.1.rbi} | 182 +- ...2@0.15.1.rbi => protocol-http2@0.18.0.rbi} | 140 +- ...tp@0.25.0.rbi => protocol-http@0.27.0.rbi} | 439 +- ...ffix@5.0.4.rbi => public_suffix@6.0.0.rbi} | 7 +- .../gems/{puma@6.4.2.rbi => puma@6.4.3.rbi} | 36 +- .../gems/{racc@1.7.3.rbi => racc@1.8.1.rbi} | 71 +- ...3.1.1.rbi => rack-mini-profiler@3.3.1.rbi} | 819 +- .../gems/{rack@2.2.8.1.rbi => rack@2.2.9.rbi} | 33 +- ...ls-i18n@7.0.8.rbi => rails-i18n@7.0.9.rbi} | 1 + .../{rails@7.1.3.rbi => rails@7.1.3.4.rbi} | 1 + ...ailties@7.1.3.rbi => railties@7.1.3.4.rbi} | 83 +- .../gems/{rake@13.1.0.rbi => rake@13.2.1.rbi} | 111 +- sorbet/rbi/gems/rbi@0.1.13.rbi | 3054 -- sorbet/rbi/gems/rbi@0.2.1.rbi | 4535 +++ .../gems/{rdoc@6.6.2.rbi => rdoc@6.7.0.rbi} | 4429 +-- ...rser@2.9.0.rbi => regexp_parser@2.9.2.rbi} | 5 +- sorbet/rbi/gems/reline@0.4.2.rbi | 2338 -- sorbet/rbi/gems/reline@0.5.9.rbi | 9 + .../gems/{rexml@3.2.6.rbi => rexml@3.3.8.rbi} | 628 +- ...-core@3.12.2.rbi => rspec-core@3.13.0.rbi} | 679 +- ...12.3.rbi => rspec-expectations@3.13.1.rbi} | 324 +- ...ocks@3.12.6.rbi => rspec-mocks@3.13.1.rbi} | 185 +- ...-rails@6.1.0.rbi => rspec-rails@6.1.3.rbi} | 106 +- ...rt@3.12.1.rbi => rspec-support@3.13.1.rbi} | 637 +- ...-ast@1.30.0.rbi => rubocop-ast@1.32.3.rbi} | 1613 +- ...2.19.0.rbi => rubocop-capybara@2.21.0.rbi} | 283 +- .../rbi/gems/rubocop-factory_bot@2.24.0.rbi | 878 - ...9.1.rbi => rubocop-performance@1.22.1.rbi} | 351 +- ...ls@2.22.1.rbi => rubocop-rails@2.26.2.rbi} | 1335 +- ...pec@2.25.0.rbi => rubocop-rspec@3.1.0.rbi} | 2241 +- .../rbi/gems/rubocop-rspec_rails@2.30.0.rbi | 911 + ...{rubocop@1.57.2.rbi => rubocop@1.65.0.rbi} | 5523 ++-- sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi | 8 - ...15.0.rbi => selenium-webdriver@4.22.0.rbi} | 952 +- ...{skylight@6.0.1.rbi => skylight@6.0.4.rbi} | 313 +- .../gems/{spoom@1.2.4.rbi => spoom@1.5.0.rbi} | 2863 +- ...ckprof@0.2.25.rbi => stackprof@0.2.26.rbi} | 5 +- ...{stringio@3.1.0.rbi => stringio@3.1.1.rbi} | 1 + sorbet/rbi/gems/syntax_tree@6.2.0.rbi | 23133 ---------------- ...{tapioca@0.12.0.rbi => tapioca@0.16.3.rbi} | 617 +- .../gems/{thor@1.3.1.rbi => thor@1.3.2.rbi} | 89 +- .../{timecop@0.9.8.rbi => timecop@0.9.10.rbi} | 162 +- sorbet/rbi/gems/timers@4.3.5.rbi | 403 - ....0.rbi => unicode-display_width@2.6.0.rbi} | 1 + sorbet/rbi/gems/uri@0.13.0.rbi | 2429 ++ .../{webrick@1.8.1.rbi => webrick@1.8.2.rbi} | 160 +- ...socket@1.2.10.rbi => websocket@1.2.11.rbi} | 33 +- ...sorbet@0.8.1.rbi => yard-sorbet@0.9.0.rbi} | 65 +- .../gems/{yard@0.9.36.rbi => yard@0.9.37.rbi} | 685 +- ...eitwerk@2.6.13.rbi => zeitwerk@2.6.16.rbi} | 230 +- 116 files changed, 46721 insertions(+), 58779 deletions(-) rename sorbet/rbi/gems/{actioncable@7.1.3.rbi => actioncable@7.1.3.4.rbi} (96%) rename sorbet/rbi/gems/{actionmailbox@7.1.3.rbi => actionmailbox@7.1.3.4.rbi} (85%) rename sorbet/rbi/gems/{actionmailer@7.1.3.rbi => actionmailer@7.1.3.4.rbi} (92%) rename sorbet/rbi/gems/{actionpack@7.1.3.rbi => actionpack@7.1.3.4.rbi} (98%) rename sorbet/rbi/gems/{actiontext@7.1.3.rbi => actiontext@7.1.3.4.rbi} (75%) rename sorbet/rbi/gems/{actionview@7.1.3.rbi => actionview@7.1.3.4.rbi} (97%) rename sorbet/rbi/gems/{activejob@7.1.3.rbi => activejob@7.1.3.4.rbi} (98%) rename sorbet/rbi/gems/{activemodel@7.1.3.rbi => activemodel@7.1.3.4.rbi} (99%) rename sorbet/rbi/gems/{activerecord@7.1.3.rbi => activerecord@7.1.3.4.rbi} (99%) rename sorbet/rbi/gems/{activestorage@7.1.3.rbi => activestorage@7.1.3.4.rbi} (71%) rename sorbet/rbi/gems/{activesupport@7.1.3.rbi => activesupport@7.1.3.4.rbi} (99%) rename sorbet/rbi/gems/{addressable@2.8.6.rbi => addressable@2.8.7.rbi} (99%) delete mode 100644 sorbet/rbi/gems/appraisal@2.5.0.rbi rename sorbet/rbi/gems/{async-http-faraday@0.12.0.rbi => async-http-faraday@0.14.0.rbi} (76%) rename sorbet/rbi/gems/{async-http@0.61.0.rbi => async-http@0.69.0.rbi} (82%) delete mode 100644 sorbet/rbi/gems/async-io@1.36.1.rbi rename sorbet/rbi/gems/{async-pool@0.4.0.rbi => async-pool@0.7.0.rbi} (60%) rename sorbet/rbi/gems/{async@2.6.5.rbi => async@2.14.2.rbi} (67%) delete mode 100644 sorbet/rbi/gems/better_html@2.0.2.rbi create mode 100644 sorbet/rbi/gems/better_html@2.1.1.rbi rename sorbet/rbi/gems/{bigdecimal@3.1.6.rbi => bigdecimal@3.1.8.rbi} (99%) create mode 100644 sorbet/rbi/gems/brakeman@6.2.1.rbi rename sorbet/rbi/gems/{builder@3.2.4.rbi => builder@3.3.0.rbi} (99%) rename sorbet/rbi/gems/{chef-utils@18.3.0.rbi => chef-utils@18.5.0.rbi} (99%) rename sorbet/rbi/gems/{concurrent-ruby@1.2.3.rbi => concurrent-ruby@1.3.4.rbi} (99%) rename sorbet/rbi/gems/{console@1.23.2.rbi => console@1.26.0.rbi} (54%) rename sorbet/rbi/gems/{diff-lcs@1.5.0.rbi => diff-lcs@1.5.1.rbi} (91%) rename sorbet/rbi/gems/{dotenv-rails@3.0.0.rbi => dotenv-rails@3.1.2.rbi} (99%) rename sorbet/rbi/gems/{dotenv@3.0.0.rbi => dotenv@3.1.2.rbi} (85%) rename sorbet/rbi/gems/{drb@2.2.0.rbi => drb@2.2.1.rbi} (80%) rename sorbet/rbi/gems/{erb_lint@0.5.0.rbi => erb_lint@0.6.0.rbi} (99%) rename sorbet/rbi/gems/{erubi@1.12.0.rbi => erubi@1.13.0.rbi} (91%) rename sorbet/rbi/gems/{et-orbi@1.2.7.rbi => et-orbi@1.2.11.rbi} (77%) rename sorbet/rbi/gems/{faraday-http-cache@2.5.0.rbi => faraday-http-cache@2.5.1.rbi} (97%) rename sorbet/rbi/gems/{faraday-net_http@3.0.2.rbi => faraday-net_http@3.1.0.rbi} (72%) rename sorbet/rbi/gems/{faraday@2.7.11.rbi => faraday@2.10.0.rbi} (91%) rename sorbet/rbi/gems/{ffi@1.16.3.rbi => ffi@1.17.0.rbi} (99%) rename sorbet/rbi/gems/{fiber-local@1.0.0.rbi => fiber-local@1.1.0.rbi} (59%) create mode 100644 sorbet/rbi/gems/fiber-storage@0.1.2.rbi rename sorbet/rbi/gems/{foreman@0.87.2.rbi => foreman@0.88.1.rbi} (99%) rename sorbet/rbi/gems/{fugit@1.9.0.rbi => fugit@1.11.1.rbi} (66%) rename sorbet/rbi/gems/{highline@2.1.0.rbi => highline@3.1.0.rbi} (99%) rename sorbet/rbi/gems/{i18n-tasks@1.0.13.rbi => i18n-tasks@1.0.14.rbi} (93%) rename sorbet/rbi/gems/{i18n@1.14.1.rbi => i18n@1.14.6.rbi} (92%) create mode 100644 sorbet/rbi/gems/io-endpoint@0.13.0.rbi rename sorbet/rbi/gems/{io-event@1.3.3.rbi => io-event@1.6.5.rbi} (58%) create mode 100644 sorbet/rbi/gems/io-stream@0.4.0.rbi rename sorbet/rbi/gems/{json@2.6.3.rbi => json@2.7.2.rbi} (92%) create mode 100644 sorbet/rbi/gems/logger@1.6.0.rbi rename sorbet/rbi/gems/{marcel@1.0.2.rbi => marcel@1.0.4.rbi} (66%) rename sorbet/rbi/gems/{memory_profiler@1.0.1.rbi => memory_profiler@1.0.2.rbi} (95%) rename sorbet/rbi/gems/{minitest@5.22.2.rbi => minitest@5.25.1.rbi} (75%) rename sorbet/rbi/gems/{mixlib-shellout@3.2.7.rbi => mixlib-shellout@3.2.8.rbi} (99%) create mode 100644 sorbet/rbi/gems/net-http@0.4.1.rbi rename sorbet/rbi/gems/{net-imap@0.4.10.rbi => net-imap@0.4.14.rbi} (91%) rename sorbet/rbi/gems/{net-smtp@0.4.0.1.rbi => net-smtp@0.5.0.rbi} (76%) rename sorbet/rbi/gems/{nio4r@2.7.0.rbi => nio4r@2.7.3.rbi} (99%) rename sorbet/rbi/gems/{nokogiri@1.16.2.rbi => nokogiri@1.16.6.rbi} (99%) rename sorbet/rbi/gems/{parallel@1.24.0.rbi => parallel@1.26.3.rbi} (84%) rename sorbet/rbi/gems/{parser@3.3.0.5.rbi => parser@3.3.5.0.rbi} (76%) rename sorbet/rbi/gems/{pg@1.5.4.rbi => pg@1.5.6.rbi} (97%) delete mode 100644 sorbet/rbi/gems/prettier_print@1.2.1.rbi rename sorbet/rbi/gems/{prism@0.30.0.rbi => prism@1.2.0.rbi} (61%) rename sorbet/rbi/gems/{protocol-hpack@1.4.2.rbi => protocol-hpack@1.4.3.rbi} (73%) rename sorbet/rbi/gems/{protocol-http1@0.16.0.rbi => protocol-http1@0.19.1.rbi} (72%) rename sorbet/rbi/gems/{protocol-http2@0.15.1.rbi => protocol-http2@0.18.0.rbi} (96%) rename sorbet/rbi/gems/{protocol-http@0.25.0.rbi => protocol-http@0.27.0.rbi} (75%) rename sorbet/rbi/gems/{public_suffix@5.0.4.rbi => public_suffix@6.0.0.rbi} (99%) rename sorbet/rbi/gems/{puma@6.4.2.rbi => puma@6.4.3.rbi} (99%) rename sorbet/rbi/gems/{racc@1.7.3.rbi => racc@1.8.1.rbi} (66%) rename sorbet/rbi/gems/{rack-mini-profiler@3.1.1.rbi => rack-mini-profiler@3.3.1.rbi} (78%) rename sorbet/rbi/gems/{rack@2.2.8.1.rbi => rack@2.2.9.rbi} (99%) rename sorbet/rbi/gems/{rails-i18n@7.0.8.rbi => rails-i18n@7.0.9.rbi} (99%) rename sorbet/rbi/gems/{rails@7.1.3.rbi => rails@7.1.3.4.rbi} (99%) rename sorbet/rbi/gems/{railties@7.1.3.rbi => railties@7.1.3.4.rbi} (98%) rename sorbet/rbi/gems/{rake@13.1.0.rbi => rake@13.2.1.rbi} (97%) delete mode 100644 sorbet/rbi/gems/rbi@0.1.13.rbi create mode 100644 sorbet/rbi/gems/rbi@0.2.1.rbi rename sorbet/rbi/gems/{rdoc@6.6.2.rbi => rdoc@6.7.0.rbi} (71%) rename sorbet/rbi/gems/{regexp_parser@2.9.0.rbi => regexp_parser@2.9.2.rbi} (99%) delete mode 100644 sorbet/rbi/gems/reline@0.4.2.rbi create mode 100644 sorbet/rbi/gems/reline@0.5.9.rbi rename sorbet/rbi/gems/{rexml@3.2.6.rbi => rexml@3.3.8.rbi} (90%) rename sorbet/rbi/gems/{rspec-core@3.12.2.rbi => rspec-core@3.13.0.rbi} (95%) rename sorbet/rbi/gems/{rspec-expectations@3.12.3.rbi => rspec-expectations@3.13.1.rbi} (97%) rename sorbet/rbi/gems/{rspec-mocks@3.12.6.rbi => rspec-mocks@3.13.1.rbi} (74%) rename sorbet/rbi/gems/{rspec-rails@6.1.0.rbi => rspec-rails@6.1.3.rbi} (98%) rename sorbet/rbi/gems/{rspec-support@3.12.1.rbi => rspec-support@3.13.1.rbi} (84%) rename sorbet/rbi/gems/{rubocop-ast@1.30.0.rbi => rubocop-ast@1.32.3.rbi} (83%) rename sorbet/rbi/gems/{rubocop-capybara@2.19.0.rbi => rubocop-capybara@2.21.0.rbi} (88%) delete mode 100644 sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi rename sorbet/rbi/gems/{rubocop-performance@1.19.1.rbi => rubocop-performance@1.22.1.rbi} (94%) rename sorbet/rbi/gems/{rubocop-rails@2.22.1.rbi => rubocop-rails@2.26.2.rbi} (91%) rename sorbet/rbi/gems/{rubocop-rspec@2.25.0.rbi => rubocop-rspec@3.1.0.rbi} (84%) create mode 100644 sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi rename sorbet/rbi/gems/{rubocop@1.57.2.rbi => rubocop@1.65.0.rbi} (94%) delete mode 100644 sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi rename sorbet/rbi/gems/{selenium-webdriver@4.15.0.rbi => selenium-webdriver@4.22.0.rbi} (95%) rename sorbet/rbi/gems/{skylight@6.0.1.rbi => skylight@6.0.4.rbi} (96%) rename sorbet/rbi/gems/{spoom@1.2.4.rbi => spoom@1.5.0.rbi} (59%) rename sorbet/rbi/gems/{stackprof@0.2.25.rbi => stackprof@0.2.26.rbi} (98%) rename sorbet/rbi/gems/{stringio@3.1.0.rbi => stringio@3.1.1.rbi} (99%) delete mode 100644 sorbet/rbi/gems/syntax_tree@6.2.0.rbi rename sorbet/rbi/gems/{tapioca@0.12.0.rbi => tapioca@0.16.3.rbi} (87%) rename sorbet/rbi/gems/{thor@1.3.1.rbi => thor@1.3.2.rbi} (98%) rename sorbet/rbi/gems/{timecop@0.9.8.rbi => timecop@0.9.10.rbi} (66%) delete mode 100644 sorbet/rbi/gems/timers@4.3.5.rbi rename sorbet/rbi/gems/{unicode-display_width@2.5.0.rbi => unicode-display_width@2.6.0.rbi} (99%) create mode 100644 sorbet/rbi/gems/uri@0.13.0.rbi rename sorbet/rbi/gems/{webrick@1.8.1.rbi => webrick@1.8.2.rbi} (94%) rename sorbet/rbi/gems/{websocket@1.2.10.rbi => websocket@1.2.11.rbi} (99%) rename sorbet/rbi/gems/{yard-sorbet@0.8.1.rbi => yard-sorbet@0.9.0.rbi} (90%) rename sorbet/rbi/gems/{yard@0.9.36.rbi => yard@0.9.37.rbi} (97%) rename sorbet/rbi/gems/{zeitwerk@2.6.13.rbi => zeitwerk@2.6.16.rbi} (83%) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d7404ba45..dc78988b6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -148,6 +148,8 @@ jobs: with: bundler-cache: true rubygems: latest + - name: Print Lockfile + run: cat ${{ env.BUNDLE_GEMFILE }}.lock # Test - name: Set up test database diff --git a/Gemfile.lock b/Gemfile.lock index 8d22abd67..b9d422815 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -295,7 +295,7 @@ GEM ast (~> 2.4.1) racc pg (1.5.6) - prism (0.30.0) + prism (1.2.0) protocol-hpack (1.4.3) protocol-http (0.27.0) protocol-http1 (0.19.1) @@ -359,8 +359,8 @@ GEM zeitwerk (~> 2.6) rainbow (3.1.1) rake (13.2.1) - rbi (0.1.14) - prism (>= 0.18.0, < 1.0.0) + rbi (0.2.1) + prism (~> 1.0) sorbet-runtime (>= 0.5.9204) rbtrace (0.5.1) ffi (>= 1.0.6) @@ -431,34 +431,34 @@ GEM skylight (6.0.4) activesupport (>= 5.2.0) smart_properties (1.17.0) - sorbet (0.5.11485) - sorbet-static (= 0.5.11485) - sorbet-runtime (0.5.11485) - sorbet-static (0.5.11485-java) - sorbet-static (0.5.11485-universal-darwin) - sorbet-static (0.5.11485-x86_64-linux) - sorbet-static-and-runtime (0.5.11485) - sorbet (= 0.5.11485) - sorbet-runtime (= 0.5.11485) - spoom (1.3.3) + sorbet (0.5.11600) + sorbet-static (= 0.5.11600) + sorbet-runtime (0.5.11600) + sorbet-static (0.5.11600-java) + sorbet-static (0.5.11600-universal-darwin) + sorbet-static (0.5.11600-x86_64-linux) + sorbet-static-and-runtime (0.5.11600) + sorbet (= 0.5.11600) + sorbet-runtime (= 0.5.11600) + spoom (1.5.0) erubi (>= 1.10.0) prism (>= 0.28.0) sorbet-static-and-runtime (>= 0.5.10187) thor (>= 0.19.2) stackprof (0.2.26) stringio (3.1.1) - tapioca (0.15.1) + tapioca (0.16.3) bundler (>= 2.2.25) netrc (>= 0.11.0) parallel (>= 1.21.0) - rbi (>= 0.1.4, < 0.2) + rbi (~> 0.2) sorbet-static-and-runtime (>= 0.5.11087) spoom (>= 1.2.0) thor (>= 1.2.0) yard-sorbet terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) - thor (1.3.1) + thor (1.3.2) thread (0.2.2) thread_safe (0.3.6) thread_safe (0.3.6-java) @@ -479,7 +479,7 @@ GEM websocket-extensions (0.1.5) xpath (3.2.0) nokogiri (~> 1.8) - yard (0.9.36) + yard (0.9.37) yard-activesupport-concern (0.0.1) yard (>= 0.8) yard-sorbet (0.9.0) diff --git a/sorbet/rbi/gems/actioncable@7.1.3.rbi b/sorbet/rbi/gems/actioncable@7.1.3.4.rbi similarity index 96% rename from sorbet/rbi/gems/actioncable@7.1.3.rbi rename to sorbet/rbi/gems/actioncable@7.1.3.4.rbi index 9ae601163..68f4212c9 100644 --- a/sorbet/rbi/gems/actioncable@7.1.3.rbi +++ b/sorbet/rbi/gems/actioncable@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `actioncable` gem. # Please instead update this file by running `bin/tapioca gem actioncable`. + # :markup: markdown # :include: actioncable/README.md # @@ -154,22 +155,22 @@ class ActionCable::Channel::Base # source://actioncable//lib/action_cable/channel/base.rb#147 def initialize(connection, identifier, params = T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_subscribe_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_unsubscribe_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _subscribe_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _unsubscribe_callbacks; end # source://actioncable//lib/action_cable/channel/broadcasting.rb#11 @@ -209,13 +210,13 @@ class ActionCable::Channel::Base # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 def periodic_timers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # This method is called after subscription has been added to the connection @@ -304,25 +305,25 @@ class ActionCable::Channel::Base def unsubscribed; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _subscribe_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _subscribe_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _unsubscribe_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _unsubscribe_callbacks=(value); end # A list of method names that should be considered actions. This @@ -346,13 +347,13 @@ class ActionCable::Channel::Base # source://actioncable//lib/action_cable/channel/periodic_timers.rb#9 def periodic_timers?; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end private @@ -1153,16 +1154,16 @@ class ActionCable::Connection::Base # source://actioncable//lib/action_cable/connection/base.rb#58 def initialize(server, env, coder: T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _command_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_command_callbacks(&block); end # source://actioncable//lib/action_cable/connection/base.rb#134 @@ -1239,13 +1240,13 @@ class ActionCable::Connection::Base # source://actioncable//lib/action_cable/connection/base.rb#86 def receive(websocket_message); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # Invoke a method on the connection asynchronously through the pool of thread workers. @@ -1343,19 +1344,19 @@ class ActionCable::Connection::Base def websocket; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _command_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _command_callbacks=(value); end # source://actioncable//lib/action_cable/connection/identification.rb#11 @@ -1367,13 +1368,13 @@ class ActionCable::Connection::Base # source://actioncable//lib/action_cable/connection/identification.rb#11 def identifiers?; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end end end @@ -2086,7 +2087,7 @@ end # source://actioncable//lib/action_cable/engine.rb#8 class ActionCable::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -2618,16 +2619,16 @@ class ActionCable::Server::Worker # source://actioncable//lib/action_cable/server/worker.rb#19 def initialize(max_size: T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_work_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _work_callbacks; end # source://actioncable//lib/action_cable/server/worker.rb#46 @@ -2636,10 +2637,10 @@ class ActionCable::Server::Worker # source://actioncable//lib/action_cable/server/worker.rb#50 def async_invoke(receiver, method, *args, connection: T.unsafe(nil), &block); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 def connection; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 def connection=(obj); end # Returns the value of attribute executor. @@ -2670,25 +2671,25 @@ class ActionCable::Server::Worker def logger; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _work_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _work_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def connection; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def connection=(obj); end end end @@ -3059,7 +3060,7 @@ ActionCable::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActionCable::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://actioncable//lib/action_cable/gem_version.rb#13 -ActionCable::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActionCable::VERSION::PRE = T.let(T.unsafe(nil), String) # source://actioncable//lib/action_cable/gem_version.rb#15 ActionCable::VERSION::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/actionmailbox@7.1.3.rbi b/sorbet/rbi/gems/actionmailbox@7.1.3.4.rbi similarity index 85% rename from sorbet/rbi/gems/actionmailbox@7.1.3.rbi rename to sorbet/rbi/gems/actionmailbox@7.1.3.4.rbi index 9ba4a56eb..b5b556f66 100644 --- a/sorbet/rbi/gems/actionmailbox@7.1.3.rbi +++ b/sorbet/rbi/gems/actionmailbox@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `actionmailbox` gem. # Please instead update this file by running `bin/tapioca gem actionmailbox`. + # :markup: markdown # :include: actionmailbox/README.md # @@ -86,13 +87,13 @@ module ActionMailbox # source://actionmailbox//lib/action_mailbox.rb#24 def queues=(val); end - # source://railties/7.1.3/lib/rails/engine.rb#412 + # source://railties/7.1.3.4/lib/rails/engine.rb#412 def railtie_helpers_paths; end - # source://railties/7.1.3/lib/rails/engine.rb#395 + # source://railties/7.1.3.4/lib/rails/engine.rb#395 def railtie_namespace; end - # source://railties/7.1.3/lib/rails/engine.rb#416 + # source://railties/7.1.3.4/lib/rails/engine.rb#416 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end # source://actionmailbox//lib/action_mailbox.rb#25 @@ -101,10 +102,10 @@ module ActionMailbox # source://actionmailbox//lib/action_mailbox.rb#25 def storage_service=(val); end - # source://railties/7.1.3/lib/rails/engine.rb#401 + # source://railties/7.1.3.4/lib/rails/engine.rb#401 def table_name_prefix; end - # source://railties/7.1.3/lib/rails/engine.rb#408 + # source://railties/7.1.3.4/lib/rails/engine.rb#408 def use_relative_model_naming?; end # Returns the currently loaded version of Action Mailbox as a +Gem::Version+. @@ -189,16 +190,16 @@ class ActionMailbox::Base # source://actionmailbox//lib/action_mailbox/base.rb#79 def initialize(inbound_email); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _process_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_process_callbacks(&block); end # Immediately sends the given +message+ and changes the inbound email's status to +:bounced+. @@ -239,13 +240,13 @@ class ActionMailbox::Base # source://actionmailbox//lib/action_mailbox/base.rb#96 def process; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailbox//lib/action_mailbox/routing.rb#9 @@ -263,31 +264,31 @@ class ActionMailbox::Base def track_status_of_inbound_email; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _process_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _process_callbacks=(value); end # source://actionmailbox//lib/action_mailbox/base.rb#75 def receive(inbound_email); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailbox//lib/action_mailbox/routing.rb#9 @@ -301,7 +302,7 @@ end class ActionMailbox::BaseController < ::ActionController::Base private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def authenticate_by_password; end @@ -310,10 +311,10 @@ class ActionMailbox::BaseController < ::ActionController::Base def password; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -363,7 +364,7 @@ ActionMailbox::Callbacks::TERMINATOR = T.let(T.unsafe(nil), Proc) # source://actionmailbox//lib/action_mailbox/engine.rb#12 class ActionMailbox::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -376,10 +377,10 @@ class ActionMailbox::InboundEmail < ::ActionMailbox::Record include ::ActionMailbox::InboundEmail::Incineratable extend ::ActionMailbox::InboundEmail::MessageId::ClassMethods - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_raw_email_attachment(*args); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_raw_email_blob(*args); end def instrumentation_payload; end @@ -388,109 +389,109 @@ class ActionMailbox::InboundEmail < ::ActionMailbox::Record def source; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activerecord/7.1.3/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def bounced(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def delivered(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def failed(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def not_bounced(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def not_delivered(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def not_failed(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def not_pending(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def not_processing(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def pending(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def processing(*args, **_arg1); end - # source://activerecord/7.1.3/lib/active_record/enum.rb#242 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#242 def statuses; end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def with_attached_raw_email(*args, **_arg1); end end end module ActionMailbox::InboundEmail::GeneratedAssociationMethods - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#32 def build_raw_email_attachment(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#32 def build_raw_email_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#36 def create_raw_email_attachment(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#40 def create_raw_email_attachment!(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#36 def create_raw_email_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#40 def create_raw_email_blob!(*args, &block); end - # source://activestorage/7.1.3/lib/active_storage/attached/model.rb#99 + # source://activestorage/7.1.3.4/lib/active_storage/attached/model.rb#99 def raw_email; end - # source://activestorage/7.1.3/lib/active_storage/attached/model.rb#104 + # source://activestorage/7.1.3.4/lib/active_storage/attached/model.rb#104 def raw_email=(attachable); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def raw_email_attachment; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def raw_email_attachment=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def raw_email_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def raw_email_blob=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_raw_email_attachment; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_raw_email_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_raw_email_attachment; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_raw_email_blob; end end @@ -541,10 +542,10 @@ class ActionMailbox::IncinerationJob < ::ActiveJob::Base def perform(inbound_email); end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end def schedule(inbound_email); end @@ -559,7 +560,7 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ::ActionMailb private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def authenticate; end @@ -568,10 +569,10 @@ class ActionMailbox::Ingresses::Mailgun::InboundEmailsController < ::ActionMailb def mail; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -600,7 +601,7 @@ class ActionMailbox::Ingresses::Mandrill::InboundEmailsController < ::ActionMail private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def authenticate; end @@ -610,10 +611,10 @@ class ActionMailbox::Ingresses::Mandrill::InboundEmailsController < ::ActionMail def raw_emails; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -639,14 +640,14 @@ class ActionMailbox::Ingresses::Postmark::InboundEmailsController < ::ActionMail private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -658,16 +659,16 @@ class ActionMailbox::Ingresses::Relay::InboundEmailsController < ::ActionMailbox private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def require_valid_rfc822_message; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -679,17 +680,17 @@ class ActionMailbox::Ingresses::Sendgrid::InboundEmailsController < ::ActionMail private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def envelope; end def mail; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -699,10 +700,10 @@ class ActionMailbox::Record < ::ActiveRecord::Base include ::ActionMailbox::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end end end @@ -793,7 +794,7 @@ class ActionMailbox::RoutingJob < ::ActiveJob::Base def perform(inbound_email); end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end end end @@ -899,7 +900,7 @@ ActionMailbox::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActionMailbox::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://actionmailbox//lib/action_mailbox/gem_version.rb#13 -ActionMailbox::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActionMailbox::VERSION::PRE = T.let(T.unsafe(nil), String) # source://actionmailbox//lib/action_mailbox/gem_version.rb#15 ActionMailbox::VERSION::STRING = T.let(T.unsafe(nil), String) @@ -1672,70 +1673,70 @@ end module Rails class << self - # source://railties/7.1.3/lib/rails.rb#42 + # source://railties/7.1.3.4/lib/rails.rb#42 def app_class; end - # source://railties/7.1.3/lib/rails.rb#42 + # source://railties/7.1.3.4/lib/rails.rb#42 def app_class=(_arg0); end - # source://railties/7.1.3/lib/rails.rb#43 + # source://railties/7.1.3.4/lib/rails.rb#43 def application; end - # source://railties/7.1.3/lib/rails.rb#41 + # source://railties/7.1.3.4/lib/rails.rb#41 def application=(_arg0); end - # source://railties/7.1.3/lib/rails.rb#123 + # source://railties/7.1.3.4/lib/rails.rb#123 def autoloaders; end - # source://railties/7.1.3/lib/rails.rb#54 + # source://railties/7.1.3.4/lib/rails.rb#54 def backtrace_cleaner; end - # source://railties/7.1.3/lib/rails.rb#42 + # source://railties/7.1.3.4/lib/rails.rb#42 def cache; end - # source://railties/7.1.3/lib/rails.rb#42 + # source://railties/7.1.3.4/lib/rails.rb#42 def cache=(_arg0); end - # source://railties/7.1.3/lib/rails.rb#50 + # source://railties/7.1.3.4/lib/rails.rb#50 def configuration; end - # source://railties/7.1.3/lib/rails/deprecator.rb#4 + # source://railties/7.1.3.4/lib/rails/deprecator.rb#4 def deprecator; end - # source://railties/7.1.3/lib/rails.rb#72 + # source://railties/7.1.3.4/lib/rails.rb#72 def env; end - # source://railties/7.1.3/lib/rails.rb#79 + # source://railties/7.1.3.4/lib/rails.rb#79 def env=(environment); end - # source://railties/7.1.3/lib/rails.rb#90 + # source://railties/7.1.3.4/lib/rails.rb#90 def error; end - # source://railties/7.1.3/lib/rails/gem_version.rb#5 + # source://railties/7.1.3.4/lib/rails/gem_version.rb#5 def gem_version; end - # source://railties/7.1.3/lib/rails.rb#103 + # source://railties/7.1.3.4/lib/rails.rb#103 def groups(*groups); end - # source://railties/7.1.3/lib/rails.rb#47 + # source://railties/7.1.3.4/lib/rails.rb#47 def initialize!(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3/lib/rails.rb#47 + # source://railties/7.1.3.4/lib/rails.rb#47 def initialized?(*_arg0, **_arg1, &_arg2); end - # source://railties/7.1.3/lib/rails.rb#42 + # source://railties/7.1.3.4/lib/rails.rb#42 def logger; end - # source://railties/7.1.3/lib/rails.rb#42 + # source://railties/7.1.3.4/lib/rails.rb#42 def logger=(_arg0); end - # source://railties/7.1.3/lib/rails.rb#119 + # source://railties/7.1.3.4/lib/rails.rb#119 def public_path; end - # source://railties/7.1.3/lib/rails.rb#63 + # source://railties/7.1.3.4/lib/rails.rb#63 def root; end - # source://railties/7.1.3/lib/rails/version.rb#7 + # source://railties/7.1.3.4/lib/rails/version.rb#7 def version; end end end @@ -1750,11 +1751,11 @@ class Rails::Conductor::ActionMailbox::InboundEmails::SourcesController < ::Rail private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1767,7 +1768,7 @@ class Rails::Conductor::ActionMailbox::InboundEmailsController < ::Rails::Conduc private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def create_inbound_email(mail); end @@ -1775,7 +1776,7 @@ class Rails::Conductor::ActionMailbox::InboundEmailsController < ::Rails::Conduc def new_mail; end class << self - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1785,11 +1786,11 @@ class Rails::Conductor::ActionMailbox::IncineratesController < ::Rails::Conducto private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1799,13 +1800,13 @@ class Rails::Conductor::ActionMailbox::ReroutesController < ::Rails::Conductor:: private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def reroute(inbound_email); end class << self - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1813,22 +1814,22 @@ end class Rails::Conductor::BaseController < ::ActionController::Base private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def ensure_development_env; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end diff --git a/sorbet/rbi/gems/actionmailer@7.1.3.rbi b/sorbet/rbi/gems/actionmailer@7.1.3.4.rbi similarity index 92% rename from sorbet/rbi/gems/actionmailer@7.1.3.rbi rename to sorbet/rbi/gems/actionmailer@7.1.3.4.rbi index b95d20475..39521a15e 100644 --- a/sorbet/rbi/gems/actionmailer@7.1.3.rbi +++ b/sorbet/rbi/gems/actionmailer@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `actionmailer` gem. # Please instead update this file by running `bin/tapioca gem actionmailer`. + # :include: actionmailer/README.rdoc # # source://actionmailer//lib/action_mailer/gem_version.rb#3 @@ -543,55 +544,55 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#644 def initialize; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _deliver_callbacks; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods=(_arg0); end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#216 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#216 def _layout_conditions(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_deliver_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(_arg0); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def assets_dir=(value); end # Allows you to add attachments to an email, like so: @@ -626,10 +627,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#761 def attachments; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end # source://actionmailer//lib/action_mailer/base.rb#502 @@ -641,10 +642,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#502 def default_params?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_static_extension=(value); end # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 @@ -690,10 +691,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#685 def email_address_with_name(address, name); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 @@ -705,13 +706,13 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings?; end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(_arg0); end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end # Allows you to pass random and unusual headers to the new +Mail::Message+ @@ -752,16 +753,16 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#723 def headers(args = T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end # The main method that creates the message and renders the email templates. There are @@ -861,10 +862,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#678 def mailer_name; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def message; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def message=(_arg0); end # source://actionmailer//lib/action_mailer/parameterized.rb#95 @@ -873,10 +874,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/parameterized.rb#93 def params=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 @@ -900,25 +901,25 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors=(val); end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 @@ -942,10 +943,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 @@ -959,7 +960,7 @@ class ActionMailer::Base < ::AbstractController::Base private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://actionmailer//lib/action_mailer/base.rb#1071 @@ -1030,13 +1031,13 @@ class ActionMailer::Base < ::AbstractController::Base def wrap_inline_attachments(message); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end # source://actionmailer//lib/action_mailer/form_builder.rb#18 @@ -1048,67 +1049,67 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/form_builder.rb#18 def _default_form_builder?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _deliver_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _deliver_callbacks=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#16 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#16 def _helpers; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout=(value); end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions=(value); end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def assets_dir=(value); end # Returns the name of the current mailer. This method is also being used as a path for a view lookup. @@ -1126,10 +1127,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#582 def default(value = T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end # Sets the defaults through app configuration: @@ -1153,10 +1154,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#502 def default_params?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_static_extension=(value); end # source://actionmailer//lib/action_mailer/queued_delivery.rb#9 @@ -1212,10 +1213,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#607 def email_address_with_name(address, name); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 @@ -1227,25 +1228,25 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def file_settings?; end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end # Returns the name of the current mailer. This method is also being used as a path for a view lookup. @@ -1259,10 +1260,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#574 def mailer_name=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionmailer//lib/action_mailer/delivery_methods.rb#16 @@ -1289,10 +1290,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/delivery_methods.rb#15 def raise_delivery_errors=(val); end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end # Register an Interceptor which will be called before mail is sent. @@ -1319,19 +1320,19 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/base.rb#511 def register_observers(*observers); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 @@ -1358,10 +1359,10 @@ class ActionMailer::Base < ::AbstractController::Base # source://actionmailer//lib/action_mailer/delivery_methods.rb#53 def smtp_settings?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end # Emails do not support relative path links. @@ -1426,10 +1427,10 @@ end module ActionMailer::Base::HelperMethods include ::ActionMailer::MailHelper - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#33 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#33 def combined_fragment_cache_key(*args, **_arg1, &block); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#43 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#43 def view_cache_dependencies(*args, **_arg1, &block); end end @@ -1739,7 +1740,7 @@ class ActionMailer::LogSubscriber < ::ActiveSupport::LogSubscriber def process(event); end class << self - # source://activesupport/7.1.3/lib/active_support/log_subscriber.rb#87 + # source://activesupport/7.1.3.4/lib/active_support/log_subscriber.rb#87 def log_levels; end end end @@ -1769,10 +1770,10 @@ class ActionMailer::MailDeliveryJob < ::ActiveJob::Base def mailer_class; end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -2316,7 +2317,7 @@ class ActionMailer::TestCase < ::ActiveSupport::TestCase def _mailer_class?; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end # source://actionmailer//lib/action_mailer/test_case.rb#41 @@ -2659,7 +2660,7 @@ ActionMailer::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActionMailer::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://actionmailer//lib/action_mailer/gem_version.rb#13 -ActionMailer::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActionMailer::VERSION::PRE = T.let(T.unsafe(nil), String) # source://actionmailer//lib/action_mailer/gem_version.rb#15 ActionMailer::VERSION::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/actionpack@7.1.3.rbi b/sorbet/rbi/gems/actionpack@7.1.3.4.rbi similarity index 98% rename from sorbet/rbi/gems/actionpack@7.1.3.rbi rename to sorbet/rbi/gems/actionpack@7.1.3.4.rbi index 970373605..60591c706 100644 --- a/sorbet/rbi/gems/actionpack@7.1.3.rbi +++ b/sorbet/rbi/gems/actionpack@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `actionpack` gem. # Please instead update this file by running `bin/tapioca gem actionpack`. + # source://actionpack//lib/abstract_controller/deprecator.rb#3 module AbstractController extend ::ActiveSupport::Autoload @@ -65,10 +66,10 @@ class AbstractController::Base # Returns the name of the action this controller is processing. # - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def action_name; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def action_name=(_arg0); end # Returns true if a method for the action is available and @@ -94,10 +95,10 @@ class AbstractController::Base # Returns the formats that can be processed by the controller. # - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def formats; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def formats=(_arg0); end # source://actionpack//lib/abstract_controller/base.rb#203 @@ -126,10 +127,10 @@ class AbstractController::Base # Returns the body of the HTTP response sent by the controller. # - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def response_body; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def response_body=(_arg0); end # Actually call the method associated with the action. Override @@ -1052,12 +1053,12 @@ AbstractController::Rendering::DEFAULT_PROTECTED_INSTANCE_VARIABLES = T.let(T.un module AbstractController::Translation # Delegates to I18n.localize. # - # source://actionpack//lib/abstract_controller/translation.rb#29 + # source://actionpack//lib/abstract_controller/translation.rb#36 def l(object, **options); end # Delegates to I18n.localize. # - # source://actionpack//lib/abstract_controller/translation.rb#29 + # source://actionpack//lib/abstract_controller/translation.rb#36 def localize(object, **options); end # Delegates to I18n.translate. @@ -1283,13 +1284,13 @@ class ActionController::API < ::ActionController::Metal extend ::ActionController::Instrumentation::ClassMethods extend ::ActionController::ParamsWrapper::ClassMethods - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -1301,7 +1302,7 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 @@ -1331,10 +1332,10 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end # source://actionpack//lib/abstract_controller/callbacks.rb#36 @@ -1349,29 +1350,29 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -1410,10 +1411,10 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end # source://actionpack//lib/action_controller/metal.rb#262 @@ -1431,13 +1432,13 @@ class ActionController::API < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # Shortcut helper that returns all the ActionController::API modules except @@ -1727,10 +1728,10 @@ class ActionController::Base < ::ActionController::Metal extend ::ActionController::Instrumentation::ClassMethods extend ::ActionController::ParamsWrapper::ClassMethods - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end # source://actionpack//lib/abstract_controller/helpers.rb#12 @@ -1742,10 +1743,10 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#216 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#216 def _layout_conditions(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -1757,7 +1758,7 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end # source://actionpack//lib/abstract_controller/caching.rb#42 @@ -1781,46 +1782,46 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/flash.rb#36 def alert; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_static_extension=(value); end # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 @@ -1832,10 +1833,10 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 @@ -1859,16 +1860,16 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/flash.rb#10 def flash(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 @@ -1898,37 +1899,37 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end # source://actionpack//lib/action_controller/metal/flash.rb#36 def notice; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionpack//lib/abstract_controller/callbacks.rb#36 @@ -1943,49 +1944,49 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://actionpack//lib/action_controller/base.rb#252 def _protected_ivars; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end # source://actionpack//lib/action_controller/form_builder.rb#33 @@ -2018,28 +2019,28 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/abstract_controller/helpers.rb#16 def _helpers; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout=(value); end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout?; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions=(value); end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end # source://actionpack//lib/action_controller/metal/renderers.rb#31 @@ -2069,46 +2070,46 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_static_extension=(value); end # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 @@ -2120,10 +2121,10 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end # source://actionpack//lib/action_controller/metal/etag_with_template_digest.rb#29 @@ -2144,16 +2145,16 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end # source://actionpack//lib/abstract_controller/caching/fragments.rb#25 @@ -2183,37 +2184,37 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end # source://actionpack//lib/action_controller/metal.rb#262 def middleware_stack; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def perform_caching=(value); end # source://actionpack//lib/abstract_controller/callbacks.rb#36 @@ -2228,31 +2229,31 @@ class ActionController::Base < ::ActionController::Metal # source://actionpack//lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end # Shortcut helper that returns all the modules included in @@ -4189,17 +4190,17 @@ ActionController::Live::SSE::PERMITTED_OPTIONS = T.let(T.unsafe(nil), Array) class ActionController::LiveTestResponse < ::ActionController::Live::Response # Was there a server-side error? # - # source://rack/2.2.8.1/lib/rack/response.rb#141 + # source://rack/2.2.9/lib/rack/response.rb#141 def error?; end # Was the URL not found? # - # source://rack/2.2.8.1/lib/rack/response.rb#151 + # source://rack/2.2.9/lib/rack/response.rb#151 def missing?; end # Was the response successful? # - # source://rack/2.2.8.1/lib/rack/response.rb#138 + # source://rack/2.2.9/lib/rack/response.rb#138 def success?; end end @@ -4242,7 +4243,7 @@ class ActionController::LogSubscriber < ::ActiveSupport::LogSubscriber def write_fragment(event); end class << self - # source://activesupport/7.1.3/lib/active_support/log_subscriber.rb#87 + # source://activesupport/7.1.3.4/lib/active_support/log_subscriber.rb#87 def log_levels; end end end @@ -4393,10 +4394,10 @@ class ActionController::Metal < ::AbstractController::Base # # The ActionDispatch::Request instance for the current request. # - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def request; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def request=(_arg0); end # source://actionpack//lib/action_controller/metal.rb#258 @@ -4406,7 +4407,7 @@ class ActionController::Metal < ::AbstractController::Base # # The ActionDispatch::Response instance for the current response. # - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def response; end # Assign the response and mark it as committed. No further processing will occur. @@ -6184,10 +6185,10 @@ class ActionController::ParamsWrapper::Options < ::Struct # source://actionpack//lib/action_controller/metal/params_wrapper.rb#110 def include; end - # source://mutex_m/0.2.0/mutex_m.rb#91 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.2.0/mutex_m.rb#81 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end # Returns the value of attribute model @@ -6204,13 +6205,13 @@ class ActionController::ParamsWrapper::Options < ::Struct # source://actionpack//lib/action_controller/metal/params_wrapper.rb#143 def name; end - # source://mutex_m/0.2.0/mutex_m.rb#76 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.2.0/mutex_m.rb#86 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.2.0/mutex_m.rb#96 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end private @@ -8005,7 +8006,7 @@ class ActionController::TestCase < ::ActiveSupport::TestCase def _controller_class?; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end # source://actionpack//lib/action_controller/test_case.rb#571 @@ -8827,35 +8828,35 @@ class ActionDispatch::Callbacks # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#22 def initialize(app); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _call_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_call_callbacks(&block); end # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#26 def call(env); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _call_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _call_callbacks=(value); end # source://actionpack//lib/action_dispatch/middleware/callbacks.rb#17 @@ -13756,7 +13757,7 @@ class ActionDispatch::LogSubscriber < ::ActiveSupport::LogSubscriber def redirect(event); end class << self - # source://activesupport/7.1.3/lib/active_support/log_subscriber.rb#87 + # source://activesupport/7.1.3.4/lib/active_support/log_subscriber.rb#87 def log_levels; end end end @@ -13952,114 +13953,114 @@ class ActionDispatch::PermissionsPolicy # @yield [_self] # @yieldparam _self [ActionDispatch::PermissionsPolicy] the object that the method was called on # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#116 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#109 def initialize; end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def accelerometer(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def ambient_light_sensor(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def autoplay(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#154 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#147 def build(context = T.unsafe(nil)); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def camera(*sources); end # Returns the value of attribute directives. # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#114 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#107 def directives; end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def encrypted_media(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def fullscreen(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def geolocation(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def gyroscope(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def hid(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def idle_detection(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def magnetometer(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def microphone(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def midi(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def payment(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def picture_in_picture(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def screen_wake_lock(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def serial(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#136 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#129 def speaker(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def sync_xhr(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def usb(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#136 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#129 def vibrate(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#136 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#129 def vr(*sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#126 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#119 def web_share(*sources); end private - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#172 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#165 def apply_mapping(source); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#159 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#152 def apply_mappings(sources); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#190 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#183 def build_directive(sources, context); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#178 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#171 def build_directives(context); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#121 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#114 def initialize_copy(other); end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#194 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#187 def resolve_source(source, context); end end # List of available permissions can be found at # https://github.com/w3c/webappsec-permissions-policy/blob/main/features.md#policy-controlled-features # -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#89 +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#82 ActionDispatch::PermissionsPolicy::DIRECTIVES = T.let(T.unsafe(nil), Hash) -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#82 +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#75 ActionDispatch::PermissionsPolicy::MAPPINGS = T.let(T.unsafe(nil), Hash) # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#30 @@ -14076,30 +14077,25 @@ class ActionDispatch::PermissionsPolicy::Middleware # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#55 - def html_response?(headers); end - - # @return [Boolean] - # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#65 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#58 def policy_empty?(policy); end # @return [Boolean] # - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#61 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#54 def policy_present?(headers); end end -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#70 +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#63 module ActionDispatch::PermissionsPolicy::Request - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#73 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#66 def permissions_policy; end - # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#77 + # source://actionpack//lib/action_dispatch/http/permissions_policy.rb#70 def permissions_policy=(policy); end end -# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#71 +# source://actionpack//lib/action_dispatch/http/permissions_policy.rb#64 ActionDispatch::PermissionsPolicy::Request::POLICY = T.let(T.unsafe(nil), String) # = Action Dispatch \PublicExceptions @@ -14528,7 +14524,7 @@ class ActionDispatch::Request # source://actionpack//lib/action_dispatch/http/request.rb#339 def raw_post; end - # source://rack/2.2.8.1/lib/rack/request.rb#157 + # source://rack/2.2.9/lib/rack/request.rb#157 def raw_request_method; end # source://actionpack//lib/action_dispatch/http/request.rb#50 @@ -15279,10 +15275,10 @@ class ActionDispatch::Response # Aliasing these off because AD::Http::Cache::Response defines them. # - # source://rack/2.2.8.1/lib/rack/response.rb#229 + # source://rack/2.2.9/lib/rack/response.rb#229 def _cache_control; end - # source://rack/2.2.8.1/lib/rack/response.rb#233 + # source://rack/2.2.9/lib/rack/response.rb#233 def _cache_control=(v); end # source://actionpack//lib/action_dispatch/http/response.rb#382 @@ -15449,7 +15445,7 @@ class ActionDispatch::Response # The location header we'll be responding with. # - # source://rack/2.2.8.1/lib/rack/response.rb#204 + # source://rack/2.2.9/lib/rack/response.rb#204 def redirect_url; end # The request that the response is responding to. @@ -20146,7 +20142,7 @@ ActionPack::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActionPack::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://actionpack//lib/action_pack/gem_version.rb#13 -ActionPack::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActionPack::VERSION::PRE = T.let(T.unsafe(nil), String) # source://actionpack//lib/action_pack/gem_version.rb#15 ActionPack::VERSION::STRING = T.let(T.unsafe(nil), String) @@ -20490,10 +20486,10 @@ Mime::Type::MIME_REGEXP = T.let(T.unsafe(nil), Regexp) # source://actionpack//lib/action_dispatch.rb#34 module Rack class << self - # source://rack/2.2.8.1/lib/rack/version.rb#26 + # source://rack/2.2.9/lib/rack/version.rb#26 def release; end - # source://rack/2.2.8.1/lib/rack/version.rb#19 + # source://rack/2.2.9/lib/rack/version.rb#19 def version; end end end diff --git a/sorbet/rbi/gems/actiontext@7.1.3.rbi b/sorbet/rbi/gems/actiontext@7.1.3.4.rbi similarity index 75% rename from sorbet/rbi/gems/actiontext@7.1.3.rbi rename to sorbet/rbi/gems/actiontext@7.1.3.4.rbi index 13ee45bb9..bc14eecb4 100644 --- a/sorbet/rbi/gems/actiontext@7.1.3.rbi +++ b/sorbet/rbi/gems/actiontext@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `actiontext` gem. # Please instead update this file by running `bin/tapioca gem actiontext`. + # :markup: markdown # :include: actiontext/README.md # @@ -26,19 +27,19 @@ module ActionText # source://actiontext//lib/action_text.rb#53 def html_document_fragment_class; end - # source://railties/7.1.3/lib/rails/engine.rb#412 + # source://railties/7.1.3.4/lib/rails/engine.rb#412 def railtie_helpers_paths; end - # source://railties/7.1.3/lib/rails/engine.rb#395 + # source://railties/7.1.3.4/lib/rails/engine.rb#395 def railtie_namespace; end - # source://railties/7.1.3/lib/rails/engine.rb#416 + # source://railties/7.1.3.4/lib/rails/engine.rb#416 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end - # source://railties/7.1.3/lib/rails/engine.rb#401 + # source://railties/7.1.3.4/lib/rails/engine.rb#401 def table_name_prefix; end - # source://railties/7.1.3/lib/rails/engine.rb#408 + # source://railties/7.1.3.4/lib/rails/engine.rb#408 def use_relative_model_naming?; end # Returns the currently loaded version of Action Text as a +Gem::Version+. @@ -188,22 +189,22 @@ class ActionText::Attachables::ContentAttachment extend ::ActiveModel::Validations::HelperMethods extend ::ActiveModel::Conversion::ClassMethods - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end # source://actiontext//lib/action_text/attachables/content_attachment.rb#18 @@ -233,10 +234,10 @@ class ActionText::Attachables::ContentAttachment # source://actiontext//lib/action_text/attachables/content_attachment.rb#13 def content_type=(_arg0); end - # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + # source://activemodel/7.1.3.4/lib/active_model/naming.rb#255 def model_name(&block); end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end # source://actiontext//lib/action_text/attachables/content_attachment.rb#22 @@ -248,7 +249,7 @@ class ActionText::Attachables::ContentAttachment # source://actiontext//lib/action_text/attachables/content_attachment.rb#26 def to_s; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context; end private @@ -256,44 +257,44 @@ class ActionText::Attachables::ContentAttachment # source://actiontext//lib/action_text/attachables/content_attachment.rb#35 def content_instance; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end # source://actiontext//lib/action_text/attachables/content_attachment.rb#8 def from_node(node); end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(value); end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter?; end end end @@ -310,7 +311,7 @@ class ActionText::Attachables::MissingAttachable # source://actiontext//lib/action_text/attachables/missing_attachable.rb#22 def model; end - # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + # source://activemodel/7.1.3.4/lib/active_model/naming.rb#255 def model_name(&block); end # source://actiontext//lib/action_text/attachables/missing_attachable.rb#14 @@ -342,7 +343,7 @@ class ActionText::Attachables::RemoteImage # source://actiontext//lib/action_text/attachables/remote_image.rb#28 def height; end - # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + # source://activemodel/7.1.3.4/lib/active_model/naming.rb#255 def model_name(&block); end # source://actiontext//lib/action_text/attachables/remote_image.rb#41 @@ -413,7 +414,7 @@ class ActionText::Attachment # source://actiontext//lib/action_text/attachment.rb#129 def inspect; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#331 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end # Returns the value of attribute node. @@ -482,7 +483,7 @@ class ActionText::Attachment # source://actiontext//lib/action_text/attachment.rb#134 def node_attributes; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end # source://actiontext//lib/action_text/attachment.rb#142 @@ -548,22 +549,22 @@ class ActionText::AttachmentGallery # source://actiontext//lib/action_text/attachment_gallery.rb#52 def initialize(node); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end # source://actiontext//lib/action_text/attachment_gallery.rb#56 @@ -572,7 +573,7 @@ class ActionText::AttachmentGallery # source://actiontext//lib/action_text/attachment_gallery.rb#66 def inspect; end - # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + # source://activemodel/7.1.3.4/lib/active_model/naming.rb#255 def model_name(&block); end # Returns the value of attribute node. @@ -580,43 +581,43 @@ class ActionText::AttachmentGallery # source://actiontext//lib/action_text/attachment_gallery.rb#50 def node; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end # source://actiontext//lib/action_text/attachment_gallery.rb#62 def size; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context; end private - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end # source://actiontext//lib/action_text/attachment_gallery.rb#41 @@ -634,13 +635,13 @@ class ActionText::AttachmentGallery # source://actiontext//lib/action_text/attachment_gallery.rb#37 def from_node(node); end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(value); end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter?; end # source://actiontext//lib/action_text/attachment_gallery.rb#45 @@ -744,6 +745,7 @@ end # # source://actiontext//lib/action_text/content.rb#22 class ActionText::Content + include ::ActionText::ContentHelper include ::ActionText::Serialization include ::ActionText::Rendering extend ::ActionText::Serialization::ClassMethods @@ -754,13 +756,13 @@ class ActionText::Content # source://actiontext//lib/action_text/content.rb#37 def initialize(content = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actiontext//lib/action_text/content.rb#145 + # source://actiontext//lib/action_text/content.rb#146 def ==(other); end # source://actiontext//lib/action_text/content.rb#90 def append_attachables(attachables); end - # source://actiontext//lib/action_text/content.rb#137 + # source://actiontext//lib/action_text/content.rb#138 def as_json(*_arg0); end # Extracts +ActionText::Attachable+s from the HTML fragment: @@ -803,7 +805,7 @@ class ActionText::Content # source://actiontext//lib/action_text/content.rb#27 def html_safe(*_arg0, **_arg1, &_arg2); end - # source://actiontext//lib/action_text/content.rb#141 + # source://actiontext//lib/action_text/content.rb#142 def inspect; end # Extracts links from the HTML fragment: @@ -821,16 +823,16 @@ class ActionText::Content # source://actiontext//lib/action_text/rendering.rb#12 def render(*_arg0, **_arg1, &_arg2); end - # source://actiontext//lib/action_text/content.rb#102 + # source://actiontext//lib/action_text/content.rb#103 def render_attachment_galleries(&block); end # source://actiontext//lib/action_text/content.rb#95 def render_attachments(**options, &block); end - # source://actiontext//lib/action_text/content.rb#121 + # source://actiontext//lib/action_text/content.rb#122 def to_html; end - # source://actiontext//lib/action_text/content.rb#129 + # source://actiontext//lib/action_text/content.rb#130 def to_partial_path; end # Returns the content as plain text with all HTML tags removed. @@ -838,40 +840,40 @@ class ActionText::Content # content = ActionText::Content.new("

Funny times!

") # content.to_plain_text # => "Funny times!" # - # source://actiontext//lib/action_text/content.rb#113 + # source://actiontext//lib/action_text/content.rb#114 def to_plain_text; end - # source://actiontext//lib/action_text/content.rb#125 + # source://actiontext//lib/action_text/content.rb#126 def to_rendered_html_with_layout; end - # source://actiontext//lib/action_text/content.rb#133 + # source://actiontext//lib/action_text/content.rb#134 def to_s; end - # source://actiontext//lib/action_text/content.rb#117 + # source://actiontext//lib/action_text/content.rb#118 def to_trix_html; end private - # source://actiontext//lib/action_text/content.rb#162 + # source://actiontext//lib/action_text/content.rb#163 def attachment_for_node(node, with_full_attributes: T.unsafe(nil)); end - # source://actiontext//lib/action_text/content.rb#167 + # source://actiontext//lib/action_text/content.rb#168 def attachment_gallery_for_node(node); end - # source://actiontext//lib/action_text/content.rb#158 + # source://actiontext//lib/action_text/content.rb#159 def attachment_gallery_nodes; end - # source://actiontext//lib/action_text/content.rb#154 + # source://actiontext//lib/action_text/content.rb#155 def attachment_nodes; end class << self # source://actiontext//lib/action_text/content.rb#30 def fragment_by_canonicalizing_content(content); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def renderer; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def renderer=(obj); end end end @@ -885,6 +887,7 @@ module ActionText::ContentHelper def render_action_text_attachments(content); end def render_action_text_content(content); end def sanitize_action_text_content(content); end + def sanitize_content_attachment(content_attachment); end def sanitizer; end def sanitizer=(val); end def sanitizer_allowed_attributes; end @@ -909,16 +912,16 @@ class ActionText::EncryptedRichText < ::ActionText::RichText include ::ActionText::EncryptedRichText::GeneratedAssociationMethods class << self - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.1.3/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end end end @@ -954,7 +957,7 @@ end # source://actiontext//lib/action_text/engine.rb#11 class ActionText::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -1162,10 +1165,10 @@ class ActionText::Record < ::ActiveRecord::Base include ::ActionText::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end end end @@ -1196,13 +1199,13 @@ class ActionText::RichText < ::ActionText::Record include ::ActionText::RichText::GeneratedAttributeMethods include ::ActionText::RichText::GeneratedAssociationMethods - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_embeds_attachments(*args); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_embeds_blobs(*args); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_record(*args); end def blank?(*_arg0, **_arg1, &_arg2); end @@ -1213,83 +1216,83 @@ class ActionText::RichText < ::ActionText::Record def to_s(*_arg0, **_arg1, &_arg2); end def to_trix_html; end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def validate_associated_records_for_embeds_attachments(*args); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def validate_associated_records_for_embeds_blobs(*args); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activerecord/7.1.3/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def with_attached_embeds(*args, **_arg1); end end end module ActionText::RichText::GeneratedAssociationMethods - # source://activestorage/7.1.3/lib/active_storage/attached/model.rb#187 + # source://activestorage/7.1.3.4/lib/active_storage/attached/model.rb#187 def embeds; end - # source://activestorage/7.1.3/lib/active_storage/attached/model.rb#192 + # source://activestorage/7.1.3.4/lib/active_storage/attached/model.rb#192 def embeds=(attachables); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/collection_association.rb#62 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/collection_association.rb#62 def embeds_attachment_ids; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/collection_association.rb#72 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/collection_association.rb#72 def embeds_attachment_ids=(ids); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def embeds_attachments; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def embeds_attachments=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/collection_association.rb#62 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/collection_association.rb#62 def embeds_blob_ids; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/collection_association.rb#72 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/collection_association.rb#72 def embeds_blob_ids=(ids); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def embeds_blobs; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def embeds_blobs=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def record; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def record=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#145 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#145 def record_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#149 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#149 def record_previously_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_record; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_record; end end @@ -1437,7 +1440,7 @@ ActionText::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActionText::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://actiontext//lib/action_text/gem_version.rb#13 -ActionText::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActionText::VERSION::PRE = T.let(T.unsafe(nil), String) # source://actiontext//lib/action_text/gem_version.rb#15 ActionText::VERSION::STRING = T.let(T.unsafe(nil), String) @@ -1459,216 +1462,216 @@ module ActionView::Helpers mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods class << self - # source://actionview/7.1.3/lib/action_view/helpers.rb#35 + # source://actionview/7.1.3.4/lib/action_view/helpers.rb#35 def eager_load!; end end end class ActionView::Helpers::FormBuilder - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1715 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1715 def initialize(object_name, object, template, options); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2644 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2644 def button(value = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2468 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2468 def check_box(method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_options_helper.rb#908 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_options_helper.rb#908 def collection_check_boxes(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_options_helper.rb#920 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_options_helper.rb#920 def collection_radio_buttons(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_options_helper.rb#860 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_options_helper.rb#860 def collection_select(method, collection, value_method, text_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def color_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def date_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/date_helper.rb#1237 + # source://actionview/7.1.3.4/lib/action_view/helpers/date_helper.rb#1237 def date_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def datetime_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def datetime_local_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/date_helper.rb#1261 + # source://actionview/7.1.3.4/lib/action_view/helpers/date_helper.rb#1261 def datetime_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def email_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2665 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2665 def emitted_hidden_id?; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1680 def field_helpers; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1680 def field_helpers=(_arg0); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1680 def field_helpers?; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1772 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1772 def field_id(method, *suffixes, namespace: T.unsafe(nil), index: T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1792 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1792 def field_name(method, *methods, multiple: T.unsafe(nil), index: T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2322 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2322 def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2284 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2284 def fields_for(record_name, record_object = T.unsafe(nil), fields_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2551 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2551 def file_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_options_helper.rb#872 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_options_helper.rb#872 def grouped_collection_select(method, collection, group_method, group_label_method, option_key_method, option_value_method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2512 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2512 def hidden_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1752 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1752 def id; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1692 def index; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2399 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2399 def label(method, text = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def month_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1692 def multipart; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1695 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1695 def multipart=(multipart); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1692 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1692 def multipart?; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def number_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1690 def object; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1690 def object=(_arg0); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1690 def object_name; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1690 def object_name=(_arg0); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1690 def options; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1690 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1690 def options=(_arg0); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def password_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def phone_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2490 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2490 def radio_button(method, tag_value, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def range_field(method, options = T.unsafe(nil)); end def rich_text_area(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def search_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_options_helper.rb#848 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_options_helper.rb#848 def select(method, choices = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2583 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2583 def submit(value = T.unsafe(nil), options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def telephone_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def text_area(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def text_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def time_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/date_helper.rb#1249 + # source://actionview/7.1.3.4/lib/action_view/helpers/date_helper.rb#1249 def time_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_options_helper.rb#884 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_options_helper.rb#884 def time_zone_select(method, priority_zones = T.unsafe(nil), options = T.unsafe(nil), html_options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1711 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1711 def to_model; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1707 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1707 def to_partial_path; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def url_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2021 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2021 def week_field(method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_options_helper.rb#896 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_options_helper.rb#896 def weekday_select(method, options = T.unsafe(nil), html_options = T.unsafe(nil)); end private - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2750 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2750 def convert_to_legacy_options(options); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2732 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2732 def fields_for_nested_model(name, object, fields_options, block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2703 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2703 def fields_for_with_nested_attributes(association_name, association, options, block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2699 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2699 def nested_attributes_association?(association_name); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2745 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2745 def nested_child_index(name); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2670 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2670 def objectify_options(options); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#2676 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#2676 def submit_default_value; end class << self - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1703 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1703 def _to_partial_path; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1680 def field_helpers; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1680 def field_helpers=(value); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1680 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1680 def field_helpers?; end end end @@ -1682,141 +1685,141 @@ module ActionView::Helpers::FormHelper mixes_in_class_methods ::ActionView::Helpers::UrlHelper::ClassMethods mixes_in_class_methods ::ActionView::Helpers::SanitizeHelper::ClassMethods - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1586 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1586 def _object_for_form_builder(object); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1343 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1343 def check_box(object_name, method, options = T.unsafe(nil), checked_value = T.unsafe(nil), unchecked_value = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1373 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1373 def color_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1437 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1437 def date_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1510 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1510 def datetime_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1510 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1510 def datetime_local_field(object_name, method, options = T.unsafe(nil)); end def default_form_builder; end def default_form_builder=(_arg0); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1564 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1564 def email_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1077 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1077 def fields(scope = T.unsafe(nil), model: T.unsafe(nil), **options, &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1026 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1026 def fields_for(record_name, record_object = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1245 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1245 def file_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#434 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#434 def form_for(record, options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#755 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#755 def form_with(model: T.unsafe(nil), scope: T.unsafe(nil), url: T.unsafe(nil), format: T.unsafe(nil), **options, &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#480 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#480 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids=(val); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#478 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#478 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms=(val); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1212 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1212 def hidden_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1149 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1149 def label(object_name, method, content_or_options = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1529 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1529 def month_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#482 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#482 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden=(val); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1573 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1573 def number_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1194 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1194 def password_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1405 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1405 def phone_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1365 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1365 def radio_button(object_name, method, tag_value, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1582 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1582 def range_field(object_name, method, options = T.unsafe(nil)); end def rich_text_area(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1396 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1396 def search_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1405 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1405 def telephone_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1275 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1275 def text_area(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1173 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1173 def text_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1475 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1475 def time_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1555 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1555 def url_field(object_name, method, options = T.unsafe(nil)); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1546 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1546 def week_field(object_name, method, options = T.unsafe(nil)); end private - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#464 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#464 def apply_form_for_options!(object, options); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1620 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1620 def default_form_builder_class; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1591 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1591 def html_options_for_form_with(url_for_options = T.unsafe(nil), model = T.unsafe(nil), html: T.unsafe(nil), local: T.unsafe(nil), skip_enforcing_utf8: T.unsafe(nil), **options); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#1606 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#1606 def instantiate_builder(record_name, record_object, options); end class << self - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#480 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#480 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#480 def form_with_generates_ids=(val); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#478 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#478 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#478 def form_with_generates_remote_forms=(val); end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#482 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden; end - # source://actionview/7.1.3/lib/action_view/helpers/form_helper.rb#482 + # source://actionview/7.1.3.4/lib/action_view/helpers/form_helper.rb#482 def multiple_file_field_include_hidden=(val); end end end diff --git a/sorbet/rbi/gems/actionview@7.1.3.rbi b/sorbet/rbi/gems/actionview@7.1.3.4.rbi similarity index 97% rename from sorbet/rbi/gems/actionview@7.1.3.rbi rename to sorbet/rbi/gems/actionview@7.1.3.4.rbi index 09c8c1618..882963e1d 100644 --- a/sorbet/rbi/gems/actionview@7.1.3.rbi +++ b/sorbet/rbi/gems/actionview@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `actionview` gem. # Please instead update this file by running `bin/tapioca gem actionview`. + class ActionController::Base < ::ActionController::Metal include ::ActiveSupport::Deprecation::DeprecatedConstantAccessor include ::ActionDispatch::Routing::PolymorphicRoutes @@ -12,247 +13,247 @@ class ActionController::Base < ::ActionController::Metal include ::ActionController::BasicImplicitRender extend ::AbstractController::Helpers::Resolution - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods=(_arg0); end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end # source://actionview//lib/action_view/layouts.rb#216 def _layout_conditions(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _process_action_callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.4/lib/action_controller/metal/renderers.rb#31 def _renderers; end - # source://actionpack/7.1.3/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.4/lib/action_controller/metal/renderers.rb#31 def _renderers=(_arg0); end - # source://actionpack/7.1.3/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.4/lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_process_action_callbacks(&block); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(_arg0); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://actionpack/7.1.3/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/7.1.3.4/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack/7.1.3/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/7.1.3.4/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(_arg0); end - # source://actionpack/7.1.3/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/7.1.3.4/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://actionpack/7.1.3/lib/action_controller/metal/flash.rb#36 + # source://actionpack/7.1.3.4/lib/action_controller/metal/flash.rb#36 def alert; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(_arg0); end - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/7.1.3.4/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack/7.1.3/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/7.1.3.4/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest=(_arg0); end - # source://actionpack/7.1.3/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/7.1.3.4/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest?; end - # source://actionpack/7.1.3/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.4/lib/action_controller/metal/conditional_get.rb#13 def etaggers; end - # source://actionpack/7.1.3/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.4/lib/action_controller/metal/conditional_get.rb#13 def etaggers=(_arg0); end - # source://actionpack/7.1.3/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.4/lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://actionpack/7.1.3/lib/action_controller/metal/flash.rb#10 + # source://actionpack/7.1.3.4/lib/action_controller/metal/flash.rb#10 def flash(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(_arg0); end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#65 def helpers_path; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#65 def helpers_path=(_arg0); end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#65 def helpers_path?; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#66 def include_all_helpers; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#66 def include_all_helpers=(_arg0); end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/flash.rb#36 + # source://actionpack/7.1.3.4/lib/action_controller/metal/flash.rb#36 def notice; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/7.1.3/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.4/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end - # source://actionpack/7.1.3/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.4/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end private @@ -260,47 +261,47 @@ class ActionController::Base < ::ActionController::Metal # source://actionview//lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end - # source://actionpack/7.1.3/lib/action_controller/base.rb#252 + # source://actionpack/7.1.3.4/lib/action_controller/base.rb#252 def _protected_ivars; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://actionpack/7.1.3/lib/action_controller/form_builder.rb#33 + # source://actionpack/7.1.3.4/lib/action_controller/form_builder.rb#33 def _default_form_builder; end - # source://actionpack/7.1.3/lib/action_controller/form_builder.rb#33 + # source://actionpack/7.1.3.4/lib/action_controller/form_builder.rb#33 def _default_form_builder=(value); end - # source://actionpack/7.1.3/lib/action_controller/form_builder.rb#33 + # source://actionpack/7.1.3.4/lib/action_controller/form_builder.rb#33 def _default_form_builder?; end - # source://actionpack/7.1.3/lib/action_controller/metal/flash.rb#8 + # source://actionpack/7.1.3.4/lib/action_controller/metal/flash.rb#8 def _flash_types; end - # source://actionpack/7.1.3/lib/action_controller/metal/flash.rb#8 + # source://actionpack/7.1.3.4/lib/action_controller/metal/flash.rb#8 def _flash_types=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/flash.rb#8 + # source://actionpack/7.1.3.4/lib/action_controller/metal/flash.rb#8 def _flash_types?; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#16 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#16 def _helpers; end # source://actionview//lib/action_view/layouts.rb#211 @@ -321,226 +322,226 @@ class ActionController::Base < ::ActionController::Metal # source://actionview//lib/action_view/layouts.rb#212 def _layout_conditions?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _process_action_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _process_action_callbacks=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.4/lib/action_controller/metal/renderers.rb#31 def _renderers; end - # source://actionpack/7.1.3/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.4/lib/action_controller/metal/renderers.rb#31 def _renderers=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/renderers.rb#31 + # source://actionpack/7.1.3.4/lib/action_controller/metal/renderers.rb#31 def _renderers?; end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies; end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/caching.rb#42 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching.rb#42 def _view_cache_dependencies?; end - # source://actionpack/7.1.3/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/7.1.3.4/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options; end - # source://actionpack/7.1.3/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/7.1.3.4/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/params_wrapper.rb#187 + # source://actionpack/7.1.3.4/lib/action_controller/metal/params_wrapper.rb#187 def _wrapper_options?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def allow_forgery_protection; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def allow_forgery_protection=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def asset_host; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def asset_host=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def assets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def assets_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def csrf_token_storage_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def csrf_token_storage_strategy=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_asset_host_protocol; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_asset_host_protocol=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_protect_from_forgery; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_protect_from_forgery=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def default_static_extension; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def default_static_extension=(value); end - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#97 def default_url_options; end - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#97 def default_url_options=(value); end - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#97 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#97 def default_url_options?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def enable_fragment_cache_logging; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def enable_fragment_cache_logging=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/7.1.3.4/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack/7.1.3/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/7.1.3.4/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/7.1.3.4/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest?; end - # source://actionpack/7.1.3/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.4/lib/action_controller/metal/conditional_get.rb#13 def etaggers; end - # source://actionpack/7.1.3/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.4/lib/action_controller/metal/conditional_get.rb#13 def etaggers=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/conditional_get.rb#13 + # source://actionpack/7.1.3.4/lib/action_controller/metal/conditional_get.rb#13 def etaggers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_origin_check; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_origin_check=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def forgery_protection_strategy; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def forgery_protection_strategy=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys; end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/caching/fragments.rb#25 + # source://actionpack/7.1.3.4/lib/abstract_controller/caching/fragments.rb#25 def fragment_cache_keys?; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#65 def helpers_path; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#65 def helpers_path=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#65 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#65 def helpers_path?; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#66 def include_all_helpers; end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#66 def include_all_helpers=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal/helpers.rb#66 + # source://actionpack/7.1.3.4/lib/action_controller/metal/helpers.rb#66 def include_all_helpers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def javascripts_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def javascripts_dir=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def log_warning_on_csrf_failure; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def log_warning_on_csrf_failure=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def logger; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def logger=(value); end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def per_form_csrf_tokens; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def per_form_csrf_tokens=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def perform_caching; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def perform_caching=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions; end - # source://actionpack/7.1.3/lib/abstract_controller/callbacks.rb#36 + # source://actionpack/7.1.3.4/lib/abstract_controller/callbacks.rb#36 def raise_on_missing_callback_actions=(val); end - # source://actionpack/7.1.3/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.4/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects; end - # source://actionpack/7.1.3/lib/action_controller/metal/redirecting.rb#15 + # source://actionpack/7.1.3.4/lib/action_controller/metal/redirecting.rb#15 def raise_on_open_redirects=(val); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def relative_url_root; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def relative_url_root=(value); end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def request_forgery_protection_token; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def request_forgery_protection_token=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#115 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#115 def stylesheets_dir; end - # source://activesupport/7.1.3/lib/active_support/configurable.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/configurable.rb#116 def stylesheets_dir=(value); end - # source://actionpack/7.1.3/lib/action_controller/base.rb#184 + # source://actionpack/7.1.3.4/lib/action_controller/base.rb#184 def without_modules(*modules); end end end @@ -934,10 +935,10 @@ class ActionView::Base # source://actionview//lib/action_view/base.rb#207 def assign(new_assigns); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def assigns; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def assigns=(_arg0); end # source://actionview//lib/action_view/base.rb#160 @@ -951,10 +952,10 @@ class ActionView::Base # source://actionview//lib/action_view/base.rb#270 def compiled_method_container; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def config; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attr_internal.rb#33 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attr_internal.rb#33 def config=(_arg0); end # source://actionview//lib/action_view/helpers/translation_helper.rb#18 @@ -12050,7 +12051,7 @@ class ActionView::LogSubscriber < ::ActiveSupport::LogSubscriber # source://actionview//lib/action_view/log_subscriber.rb#101 def attach_to(*_arg0); end - # source://activesupport/7.1.3/lib/active_support/log_subscriber.rb#87 + # source://activesupport/7.1.3.4/lib/active_support/log_subscriber.rb#87 def log_levels; end end end @@ -12959,7 +12960,7 @@ end # source://actionview//lib/action_view/railtie.rb#8 class ActionView::Railtie < ::Rails::Engine class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -14135,7 +14136,7 @@ end module ActionView::RoutingUrlFor include ::ActionDispatch::Routing::PolymorphicRoutes - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#99 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#99 def default_url_options=(val); end # Returns the URL for the set of +options+ provided. This takes the @@ -14237,7 +14238,7 @@ module ActionView::RoutingUrlFor def optimize_routes_generation?; end class << self - # source://actionpack/7.1.3/lib/action_dispatch/routing/url_for.rb#99 + # source://actionpack/7.1.3.4/lib/action_dispatch/routing/url_for.rb#99 def default_url_options=(val); end end end @@ -15326,13 +15327,13 @@ class ActionView::TestCase < ::ActiveSupport::TestCase extend ::ActiveSupport::Testing::ConstantLookup::ClassMethods extend ::ActionView::TestCase::Behavior::ClassMethods - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods=(_arg0); end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end # source://actionview//lib/action_view/helpers/translation_helper.rb#18 @@ -15342,19 +15343,19 @@ class ActionView::TestCase < ::ActiveSupport::TestCase def debug_missing_translation=(val); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods=(value); end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods?; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#16 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#16 def _helpers; end # source://actionview//lib/action_view/test_case.rb#201 @@ -15791,7 +15792,7 @@ class ActionView::TestCase::TestController < ::ActionController::Base def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end # source://actionview//lib/action_view/test_case.rb#30 @@ -15807,7 +15808,7 @@ class ActionView::TestCase::TestController < ::ActionController::Base # source://actionview//lib/action_view/test_case.rb#23 def controller_path=(_arg0); end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -15866,7 +15867,7 @@ ActionView::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActionView::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://actionview//lib/action_view/gem_version.rb#13 -ActionView::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActionView::VERSION::PRE = T.let(T.unsafe(nil), String) # source://actionview//lib/action_view/gem_version.rb#15 ActionView::VERSION::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/activejob@7.1.3.rbi b/sorbet/rbi/gems/activejob@7.1.3.4.rbi similarity index 98% rename from sorbet/rbi/gems/activejob@7.1.3.rbi rename to sorbet/rbi/gems/activejob@7.1.3.4.rbi index 86432f64f..767eb675d 100644 --- a/sorbet/rbi/gems/activejob@7.1.3.rbi +++ b/sorbet/rbi/gems/activejob@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `activejob` gem. # Please instead update this file by running `bin/tapioca gem activejob`. + # :markup: markdown # :include: activejob/README.md # @@ -208,22 +209,22 @@ class ActiveJob::Base extend ::ActiveJob::Exceptions::ClassMethods extend ::ActiveJob::TestHelper::TestQueueAdapter::ClassMethods - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _enqueue_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _perform_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_enqueue_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_perform_callbacks(&block); end # source://activejob//lib/active_job/exceptions.rb#12 @@ -253,35 +254,35 @@ class ActiveJob::Base # source://activejob//lib/active_job/queue_name.rb#57 def queue_name_prefix?; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _enqueue_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _enqueue_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _perform_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _perform_callbacks=(value); end # source://activejob//lib/active_job/queue_adapter.rb#24 @@ -362,13 +363,13 @@ class ActiveJob::Base # source://activejob//lib/active_job/queue_name.rb#57 def queue_name_prefix?; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers=(value); end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers?; end # source://activejob//lib/active_job/exceptions.rb#11 @@ -406,16 +407,16 @@ module ActiveJob::Callbacks mixes_in_class_methods ::ActiveJob::Callbacks::ClassMethods class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _execute_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_execute_callbacks(&block); end end @@ -1221,7 +1222,7 @@ class ActiveJob::LogSubscriber < ::ActiveSupport::LogSubscriber # source://activejob//lib/active_job/log_subscriber.rb#7 def backtrace_cleaner?; end - # source://activesupport/7.1.3/lib/active_support/log_subscriber.rb#87 + # source://activesupport/7.1.3.4/lib/active_support/log_subscriber.rb#87 def log_levels; end end end @@ -2722,7 +2723,7 @@ ActiveJob::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActiveJob::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://activejob//lib/active_job/gem_version.rb#13 -ActiveJob::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActiveJob::VERSION::PRE = T.let(T.unsafe(nil), String) # source://activejob//lib/active_job/gem_version.rb#15 ActiveJob::VERSION::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/activemodel@7.1.3.rbi b/sorbet/rbi/gems/activemodel@7.1.3.4.rbi similarity index 99% rename from sorbet/rbi/gems/activemodel@7.1.3.rbi rename to sorbet/rbi/gems/activemodel@7.1.3.4.rbi index 8c06a4f4e..5b8f23d26 100644 --- a/sorbet/rbi/gems/activemodel@7.1.3.rbi +++ b/sorbet/rbi/gems/activemodel@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `activemodel` gem. # Please instead update this file by running `bin/tapioca gem activemodel`. + # :include: activemodel/README.rdoc # # source://activemodel//lib/active_model/gem_version.rb#3 @@ -4941,7 +4942,7 @@ ActiveModel::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActiveModel::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://activemodel//lib/active_model/gem_version.rb#13 -ActiveModel::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActiveModel::VERSION::PRE = T.let(T.unsafe(nil), String) # source://activemodel//lib/active_model/gem_version.rb#15 ActiveModel::VERSION::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/activerecord@7.1.3.rbi b/sorbet/rbi/gems/activerecord@7.1.3.4.rbi similarity index 99% rename from sorbet/rbi/gems/activerecord@7.1.3.rbi rename to sorbet/rbi/gems/activerecord@7.1.3.4.rbi index a362a980b..fd5e2ca47 100644 --- a/sorbet/rbi/gems/activerecord@7.1.3.rbi +++ b/sorbet/rbi/gems/activerecord@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `activerecord` gem. # Please instead update this file by running `bin/tapioca gem activerecord`. + # :include: activerecord/README.rdoc # # source://activerecord//lib/active_record/gem_version.rb#3 @@ -6791,19 +6792,19 @@ end class ActiveRecord::AttributeMethods::GeneratedAttributeMethods < ::Module include ::Mutex_m - # source://mutex_m/0.2.0/mutex_m.rb#91 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.2.0/mutex_m.rb#81 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end - # source://mutex_m/0.2.0/mutex_m.rb#76 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.2.0/mutex_m.rb#86 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.2.0/mutex_m.rb#96 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end end @@ -8297,28 +8298,28 @@ class ActiveRecord::Base extend ::ActiveStorage::Reflection::ActiveRecordExtensions::ClassMethods extend ::ActionText::Attribute::ClassMethods - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _before_commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _create_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _destroy_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _find_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _initialize_callbacks; end # source://activerecord//lib/active_record/reflection.rb#11 @@ -8327,64 +8328,64 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _rollback_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_before_commit_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_commit_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_create_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_destroy_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_find_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_initialize_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_rollback_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_save_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_touch_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_update_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_validation_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _save_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _touch_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _update_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _validation_callbacks; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end # source://activerecord//lib/active_record/reflection.rb#12 @@ -8393,22 +8394,22 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns?; end # source://activerecord//lib/active_record/reflection.rb#13 @@ -8483,10 +8484,10 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # source://activerecord//lib/active_record/locking/optimistic.rb#56 @@ -8501,7 +8502,7 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/core.rb#22 def logger?; end - # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + # source://activemodel/7.1.3.4/lib/active_model/naming.rb#255 def model_name(&block); end # source://activerecord//lib/active_record/nested_attributes.rb#15 @@ -8519,7 +8520,7 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 @@ -8606,22 +8607,22 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/model_schema.rb#178 def type_for_attribute(attr_name, &block); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context; end private - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end # source://activerecord//lib/active_record/readonly_attributes.rb#11 @@ -8633,16 +8634,16 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/readonly_attributes.rb#11 def _attr_readonly?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _before_commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _before_commit_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _commit_callbacks=(value); end # source://activerecord//lib/active_record/counter_cache.rb#9 @@ -8654,10 +8655,10 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/counter_cache.rb#9 def _counter_cache_columns?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _create_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _create_callbacks=(value); end # source://activerecord//lib/active_record/core.rb#24 @@ -8669,22 +8670,22 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/core.rb#24 def _destroy_association_async_job?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _destroy_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _destroy_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _find_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _find_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _initialize_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _initialize_callbacks=(value); end # source://activerecord//lib/active_record/reflection.rb#11 @@ -8696,70 +8697,70 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _rollback_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _rollback_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _save_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _save_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _touch_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _touch_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _update_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _update_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _validation_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _validation_callbacks=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_create(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_destroy(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_find(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_initialize(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_save(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_touch(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end # source://activerecord//lib/active_record/reflection.rb#12 @@ -8774,16 +8775,16 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/core.rb#105 def application_record_class?; end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_create(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_destroy(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_save(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_update(*args, **options, &block); end # source://activerecord//lib/active_record/core.rb#125 @@ -8792,31 +8793,31 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/core.rb#129 def asynchronous_queries_tracker; end - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#53 def attachment_reflections=(value); end - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#53 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases=(value); end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns=(value); end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns?; end # source://activerecord//lib/active_record/attributes.rb#11 @@ -8837,16 +8838,16 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_create(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_destroy(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_save(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_update(*args, **options, &block); end # source://activerecord//lib/active_record/core.rb#89 @@ -9041,13 +9042,13 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/model_schema.rb#164 def implicit_order_column?; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json=(value); end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end # source://activerecord//lib/active_record/model_schema.rb#167 @@ -9110,13 +9111,13 @@ class ActiveRecord::Base # source://activerecord//lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(value); end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter?; end # source://activerecord//lib/active_record/attribute_methods/dirty.rb#50 @@ -10448,22 +10449,22 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#128 def initialize(config_or_deprecated_connection, deprecated_logger = T.unsafe(nil), deprecated_connection_options = T.unsafe(nil), deprecated_config = T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _checkin_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _checkout_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_checkin_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_checkout_callbacks(&block); end # Checks whether the connection to the database is still active. This includes @@ -10495,7 +10496,7 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter # # @return [Boolean] # - # source://activesupport/7.1.3/lib/active_support/deprecation/method_wrappers.rb#46 + # source://activesupport/7.1.3.4/lib/active_support/deprecation/method_wrappers.rb#46 def all_foreign_keys_valid?(*args, **_arg1, &block); end # @return [Boolean] @@ -11296,25 +11297,25 @@ class ActiveRecord::ConnectionAdapters::AbstractAdapter def without_prepared_statement?(binds); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _checkin_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _checkin_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _checkout_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _checkout_callbacks=(value); end # source://activerecord//lib/active_record/connection_adapters/abstract_adapter.rb#89 @@ -12372,7 +12373,7 @@ class ActiveRecord::ConnectionAdapters::ConnectionPool # source://activerecord//lib/active_record/connection_adapters/abstract/connection_pool.rb#185 def connection_class; end - # source://activesupport/7.1.3/lib/active_support/deprecation/method_wrappers.rb#46 + # source://activesupport/7.1.3.4/lib/active_support/deprecation/method_wrappers.rb#46 def connection_klass(*args, **_arg1, &block); end # Returns an array containing the connections currently in the pool. @@ -13691,10 +13692,10 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#47 def disconnect!(automatic_reconnect: T.unsafe(nil)); end - # source://mutex_m/0.2.0/mutex_m.rb#91 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.2.0/mutex_m.rb#81 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#62 @@ -13720,13 +13721,13 @@ class ActiveRecord::ConnectionAdapters::PoolConfig # source://activerecord//lib/active_record/connection_adapters/pool_config.rb#8 def shard; end - # source://mutex_m/0.2.0/mutex_m.rb#76 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.2.0/mutex_m.rb#86 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.2.0/mutex_m.rb#96 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end class << self @@ -14709,7 +14710,7 @@ class ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Uuid < ::ActiveModel::T # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/uuid.rb#21 def changed_in_place?(raw_old_value, new_value); end - # source://activemodel/7.1.3/lib/active_model/type/value.rb#43 + # source://activemodel/7.1.3.4/lib/active_model/type/value.rb#43 def serialize(value); end # source://activerecord//lib/active_record/connection_adapters/postgresql/oid/uuid.rb#12 @@ -17010,7 +17011,7 @@ class ActiveRecord::ConnectionAdapters::SchemaCache # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#316 def data_source_exists?(connection, name); end - # source://activesupport/7.1.3/lib/active_support/deprecation/method_wrappers.rb#46 + # source://activesupport/7.1.3.4/lib/active_support/deprecation/method_wrappers.rb#46 def data_sources(*args, **_arg1, &block); end # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#373 @@ -17075,10 +17076,10 @@ class ActiveRecord::ConnectionAdapters::SchemaCache # source://activerecord//lib/active_record/connection_adapters/schema_cache.rb#234 def _load_from(filename); end - # source://activesupport/7.1.3/lib/active_support/deprecation/method_wrappers.rb#46 + # source://activesupport/7.1.3.4/lib/active_support/deprecation/method_wrappers.rb#46 def load_from(*args, **_arg1, &block); end - # source://activesupport/7.1.3/lib/active_support/deprecation/method_wrappers.rb#46 + # source://activesupport/7.1.3.4/lib/active_support/deprecation/method_wrappers.rb#46 def new(*args, **_arg1, &block); end private @@ -21669,19 +21670,19 @@ class ActiveRecord::Delegation::GeneratedRelationMethods < ::Module # source://activerecord//lib/active_record/relation/delegation.rb#72 def generate_method(method); end - # source://mutex_m/0.2.0/mutex_m.rb#91 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.2.0/mutex_m.rb#81 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end - # source://mutex_m/0.2.0/mutex_m.rb#76 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.2.0/mutex_m.rb#86 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.2.0/mutex_m.rb#96 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end end @@ -21720,10 +21721,10 @@ class ActiveRecord::DestroyAssociationAsyncJob < ::ActiveJob::Base def owner_destroyed?(owner, ensuring_owner_was_method); end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -21906,10 +21907,10 @@ module ActiveRecord::Encryption # source://activerecord//lib/active_record/encryption/configurable.rb#10 def config; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#74 def custom_contexts; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#116 def custom_contexts=(obj); end # source://activerecord//lib/active_record/encryption/contexts.rb#17 @@ -21928,10 +21929,10 @@ module ActiveRecord::Encryption # source://activerecord//lib/active_record/encryption/configurable.rb#10 def config; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def custom_contexts; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def custom_contexts=(obj); end # source://activerecord//lib/active_record/encryption/contexts.rb#17 @@ -23311,7 +23312,7 @@ class ActiveRecord::Encryption::Properties # source://activerecord//lib/active_record/encryption/properties.rb#20 def key?(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#331 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end # source://activerecord//lib/active_record/encryption/properties.rb#68 @@ -23327,7 +23328,7 @@ class ActiveRecord::Encryption::Properties # source://activerecord//lib/active_record/encryption/properties.rb#73 def data; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -25219,7 +25220,7 @@ class ActiveRecord::FutureResult # source://activerecord//lib/active_record/future_result.rb#53 def lock_wait; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#331 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end # @return [Boolean] @@ -25250,7 +25251,7 @@ class ActiveRecord::FutureResult # source://activerecord//lib/active_record/future_result.rb#144 def execute_query(connection, async: T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -26695,7 +26696,7 @@ class ActiveRecord::LogSubscriber < ::ActiveSupport::LogSubscriber # source://activerecord//lib/active_record/log_subscriber.rb#7 def backtrace_cleaner?; end - # source://activesupport/7.1.3/lib/active_support/log_subscriber.rb#87 + # source://activesupport/7.1.3.4/lib/active_support/log_subscriber.rb#87 def log_levels; end # source://activerecord//lib/active_record/log_subscriber.rb#23 @@ -29817,23 +29818,23 @@ class ActiveRecord::NoDatabaseError < ::ActiveRecord::StatementInvalid # source://activerecord//lib/active_record/errors.rb#314 def initialize(message = T.unsafe(nil), connection_pool: T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions?; end class << self - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions=(value); end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions?; end # source://activerecord//lib/active_record/errors.rb#319 @@ -30119,13 +30120,13 @@ class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError # source://activerecord//lib/active_record/migration.rb#146 def initialize(message = T.unsafe(nil), pending_migrations: T.unsafe(nil)); end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions=(_arg0); end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions?; end private @@ -30137,13 +30138,13 @@ class ActiveRecord::PendingMigrationError < ::ActiveRecord::MigrationError def detailed_migration_message(pending_migrations); end class << self - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions; end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions=(value); end - # source://activesupport/7.1.3/lib/active_support/actionable_error.rb#17 + # source://activesupport/7.1.3.4/lib/active_support/actionable_error.rb#17 def _actions?; end end end @@ -31644,10 +31645,10 @@ module ActiveRecord::QueryLogs # source://activerecord//lib/active_record/query_logs.rb#77 def cache_query_log_tags=(val); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#49 def cached_comment; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/attribute_accessors_per_thread.rb#108 def cached_comment=(obj); end # source://activerecord//lib/active_record/query_logs.rb#82 @@ -33889,7 +33890,7 @@ module ActiveRecord::Reflection private - # source://activestorage/7.1.3/lib/active_storage/reflection.rb#37 + # source://activestorage/7.1.3.4/lib/active_storage/reflection.rb#37 def reflection_class_for(macro); end end @@ -40006,7 +40007,7 @@ ActiveRecord::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActiveRecord::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://activerecord//lib/active_record/gem_version.rb#13 -ActiveRecord::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActiveRecord::VERSION::PRE = T.let(T.unsafe(nil), String) # source://activerecord//lib/active_record/gem_version.rb#15 ActiveRecord::VERSION::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/activestorage@7.1.3.rbi b/sorbet/rbi/gems/activestorage@7.1.3.4.rbi similarity index 71% rename from sorbet/rbi/gems/activestorage@7.1.3.rbi rename to sorbet/rbi/gems/activestorage@7.1.3.4.rbi index 803c8ea59..e689832c1 100644 --- a/sorbet/rbi/gems/activestorage@7.1.3.rbi +++ b/sorbet/rbi/gems/activestorage@7.1.3.4.rbi @@ -4,106 +4,107 @@ # This is an autogenerated file for types exported from the `activestorage` gem. # Please instead update this file by running `bin/tapioca gem activestorage`. + class ActiveRecord::Base include ::ActiveModel::Access include ::ActiveModel::ForbiddenAttributesProtection include ::ActiveModel::AttributeAssignment include ::ActiveModel::Serialization - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _before_commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _create_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _destroy_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _find_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _initialize_callbacks; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _rollback_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_before_commit_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_commit_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_create_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_destroy_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_find_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_initialize_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_rollback_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_save_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_touch_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_update_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_validate_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_validation_callbacks(&block); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _save_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _touch_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _update_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _validate_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _validation_callbacks; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#12 def aggregate_reflections; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#12 def aggregate_reflections?; end # source://activestorage//lib/active_storage/reflection.rb#53 @@ -112,397 +113,397 @@ class ActiveRecord::Base # source://activestorage//lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns?; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#13 def automatic_scope_inversing; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#16 def cache_timestamp_format; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#16 def cache_timestamp_format?; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#24 def cache_versioning; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#24 def cache_versioning?; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#32 def collection_cache_versioning; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#178 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#178 def column_for_attribute(name, &block); end - # source://activerecord/7.1.3/lib/active_record/core.rb#97 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#97 def default_connection_handler; end - # source://activerecord/7.1.3/lib/active_record/core.rb#97 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#97 def default_connection_handler?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#99 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#99 def default_role; end - # source://activerecord/7.1.3/lib/active_record/core.rb#99 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#99 def default_role?; end - # source://activerecord/7.1.3/lib/active_record/scoping/default.rb#20 + # source://activerecord/7.1.3.4/lib/active_record/scoping/default.rb#20 def default_scope_override; end - # source://activerecord/7.1.3/lib/active_record/scoping/default.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/scoping/default.rb#19 def default_scopes; end - # source://activerecord/7.1.3/lib/active_record/core.rb#101 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#101 def default_shard; end - # source://activerecord/7.1.3/lib/active_record/core.rb#101 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#101 def default_shard?; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#47 def destroy_association_async_batch_size; end - # source://activerecord/7.1.3/lib/active_record/core.rb#37 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#37 def destroy_association_async_job(&block); end - # source://activerecord/7.1.3/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end - # source://activerecord/7.1.3/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes=(_arg0); end - # source://activerecord/7.1.3/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord/7.1.3/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.4/lib/active_record/locking/optimistic.rb#56 def lock_optimistically; end - # source://activerecord/7.1.3/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.4/lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#22 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#22 def logger; end - # source://activerecord/7.1.3/lib/active_record/core.rb#22 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#22 def logger?; end - # source://activemodel/7.1.3/lib/active_model/naming.rb#255 + # source://activemodel/7.1.3.4/lib/active_model/naming.rb#255 def model_name(&block); end - # source://activerecord/7.1.3/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.4/lib/active_record/nested_attributes.rb#15 def nested_attributes_options; end - # source://activerecord/7.1.3/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.4/lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord/7.1.3/lib/active_record/normalization.rb#8 + # source://activerecord/7.1.3.4/lib/active_record/normalization.rb#8 def normalized_attributes; end - # source://activerecord/7.1.3/lib/active_record/normalization.rb#8 + # source://activerecord/7.1.3.4/lib/active_record/normalization.rb#8 def normalized_attributes=(_arg0); end - # source://activerecord/7.1.3/lib/active_record/normalization.rb#8 + # source://activerecord/7.1.3.4/lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(_arg0); end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#163 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#163 def pluralize_table_names; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#163 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#163 def pluralize_table_names?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#158 def primary_key_prefix_type; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#158 def primary_key_prefix_type?; end - # source://activerecord/7.1.3/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/timestamp.rb#47 def record_timestamps; end - # source://activerecord/7.1.3/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/timestamp.rb#47 def record_timestamps=(_arg0); end - # source://activerecord/7.1.3/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord/7.1.3/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret; end - # source://activerecord/7.1.3/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#43 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#43 def store_full_class_name; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#43 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#47 def store_full_sti_class; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#159 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#159 def table_name_prefix; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#159 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#159 def table_name_prefix?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#160 def table_name_suffix; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#160 def table_name_suffix?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#178 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#178 def type_for_attribute(attr_name, &block); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context; end private - # source://activemodel/7.1.3/lib/active_model/validations.rb#67 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#67 def validation_context=(_arg0); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activerecord/7.1.3/lib/active_record/readonly_attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/readonly_attributes.rb#11 def _attr_readonly; end - # source://activerecord/7.1.3/lib/active_record/readonly_attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/readonly_attributes.rb#11 def _attr_readonly=(value); end - # source://activerecord/7.1.3/lib/active_record/readonly_attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/readonly_attributes.rb#11 def _attr_readonly?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _before_commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _before_commit_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _commit_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _commit_callbacks=(value); end - # source://activerecord/7.1.3/lib/active_record/counter_cache.rb#9 + # source://activerecord/7.1.3.4/lib/active_record/counter_cache.rb#9 def _counter_cache_columns; end - # source://activerecord/7.1.3/lib/active_record/counter_cache.rb#9 + # source://activerecord/7.1.3.4/lib/active_record/counter_cache.rb#9 def _counter_cache_columns=(value); end - # source://activerecord/7.1.3/lib/active_record/counter_cache.rb#9 + # source://activerecord/7.1.3.4/lib/active_record/counter_cache.rb#9 def _counter_cache_columns?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _create_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _create_callbacks=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#24 def _destroy_association_async_job; end - # source://activerecord/7.1.3/lib/active_record/core.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#24 def _destroy_association_async_job=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#24 def _destroy_association_async_job?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _destroy_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _destroy_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _find_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _find_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _initialize_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _initialize_callbacks=(value); end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections=(value); end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _rollback_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _rollback_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _save_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _save_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _touch_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _touch_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _update_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _update_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _validate_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _validate_callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _validation_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _validation_callbacks=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators=(value); end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators?; end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_create(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_destroy(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_find(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_initialize(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_save(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_touch(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#144 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#144 def after_update(*args, **options, &block); end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#12 def aggregate_reflections; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#12 def aggregate_reflections=(value); end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#12 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#12 def aggregate_reflections?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#105 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#105 def application_record_class?; end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_create(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_destroy(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_save(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#137 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#137 def around_update(*args, **options, &block); end - # source://activerecord/7.1.3/lib/active_record/core.rb#125 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#125 def asynchronous_queries_session; end - # source://activerecord/7.1.3/lib/active_record/core.rb#129 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#129 def asynchronous_queries_tracker; end # source://activestorage//lib/active_storage/reflection.rb#53 @@ -514,489 +515,489 @@ class ActiveRecord::Base # source://activestorage//lib/active_storage/reflection.rb#53 def attachment_reflections?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases=(value); end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#72 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#72 def attribute_aliases?; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns; end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns=(value); end - # source://activemodel/7.1.3/lib/active_model/attribute_methods.rb#73 + # source://activemodel/7.1.3.4/lib/active_model/attribute_methods.rb#73 def attribute_method_patterns?; end - # source://activerecord/7.1.3/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads; end - # source://activerecord/7.1.3/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads=(value); end - # source://activerecord/7.1.3/lib/active_record/attributes.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/attributes.rb#11 def attributes_to_define_after_schema_loads?; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#13 def automatic_scope_inversing; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#13 def automatic_scope_inversing=(value); end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#13 def automatic_scope_inversing?; end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_create(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_destroy(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_save(*args, **options, &block); end - # source://activemodel/7.1.3/lib/active_model/callbacks.rb#130 + # source://activemodel/7.1.3.4/lib/active_model/callbacks.rb#130 def before_update(*args, **options, &block); end - # source://activerecord/7.1.3/lib/active_record/core.rb#89 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#89 def belongs_to_required_by_default; end - # source://activerecord/7.1.3/lib/active_record/core.rb#89 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#89 def belongs_to_required_by_default=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#89 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#89 def belongs_to_required_by_default?; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#16 def cache_timestamp_format; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#16 def cache_timestamp_format=(value); end - # source://activerecord/7.1.3/lib/active_record/integration.rb#16 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#16 def cache_timestamp_format?; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#24 def cache_versioning; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#24 def cache_versioning=(value); end - # source://activerecord/7.1.3/lib/active_record/integration.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#24 def cache_versioning?; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#32 def collection_cache_versioning; end - # source://activerecord/7.1.3/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#32 def collection_cache_versioning=(value); end - # source://activerecord/7.1.3/lib/active_record/integration.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/integration.rb#32 def collection_cache_versioning?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#77 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#77 def configurations; end - # source://activerecord/7.1.3/lib/active_record/core.rb#71 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#71 def configurations=(config); end - # source://activerecord/7.1.3/lib/active_record/core.rb#189 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#189 def connected_to_stack; end - # source://activerecord/7.1.3/lib/active_record/core.rb#203 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#203 def connection_class; end - # source://activerecord/7.1.3/lib/active_record/core.rb#199 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#199 def connection_class=(b); end - # source://activerecord/7.1.3/lib/active_record/core.rb#207 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#207 def connection_class?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#211 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#211 def connection_class_for_self; end - # source://activerecord/7.1.3/lib/active_record/core.rb#117 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#117 def connection_handler; end - # source://activerecord/7.1.3/lib/active_record/core.rb#121 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#121 def connection_handler=(handler); end - # source://activerecord/7.1.3/lib/active_record/core.rb#180 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#180 def current_preventing_writes; end - # source://activerecord/7.1.3/lib/active_record/core.rb#143 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#143 def current_role; end - # source://activerecord/7.1.3/lib/active_record/core.rb#161 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#161 def current_shard; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/serialization.rb#20 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/serialization.rb#20 def default_column_serializer; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/serialization.rb#20 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/serialization.rb#20 def default_column_serializer=(value); end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/serialization.rb#20 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/serialization.rb#20 def default_column_serializer?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#97 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#97 def default_connection_handler; end - # source://activerecord/7.1.3/lib/active_record/core.rb#97 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#97 def default_connection_handler=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#97 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#97 def default_connection_handler?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#99 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#99 def default_role; end - # source://activerecord/7.1.3/lib/active_record/core.rb#99 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#99 def default_role=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#99 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#99 def default_role?; end - # source://activerecord/7.1.3/lib/active_record/scoping/default.rb#20 + # source://activerecord/7.1.3.4/lib/active_record/scoping/default.rb#20 def default_scope_override; end - # source://activerecord/7.1.3/lib/active_record/scoping/default.rb#20 + # source://activerecord/7.1.3.4/lib/active_record/scoping/default.rb#20 def default_scope_override=(value); end - # source://activerecord/7.1.3/lib/active_record/scoping/default.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/scoping/default.rb#19 def default_scopes; end - # source://activerecord/7.1.3/lib/active_record/scoping/default.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/scoping/default.rb#19 def default_scopes=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#101 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#101 def default_shard; end - # source://activerecord/7.1.3/lib/active_record/core.rb#101 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#101 def default_shard=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#101 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#101 def default_shard?; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums=(value); end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#47 def destroy_association_async_batch_size; end - # source://activerecord/7.1.3/lib/active_record/core.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#47 def destroy_association_async_batch_size=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#27 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#27 def destroy_association_async_job; end - # source://activerecord/7.1.3/lib/active_record/core.rb#24 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#24 def destroy_association_async_job=(value); end - # source://activerecord/7.1.3/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes; end - # source://activerecord/7.1.3/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes=(value); end - # source://activerecord/7.1.3/lib/active_record/encryption/encryptable_record.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/encryption/encryptable_record.rb#11 def encrypted_attributes?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#87 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#87 def enumerate_columns_in_select_statements; end - # source://activerecord/7.1.3/lib/active_record/core.rb#87 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#87 def enumerate_columns_in_select_statements=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#87 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#87 def enumerate_columns_in_select_statements?; end - # source://activerecord/7.1.3/lib/active_record/token_for.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/token_for.rb#11 def generated_token_verifier; end - # source://activerecord/7.1.3/lib/active_record/token_for.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/token_for.rb#11 def generated_token_verifier=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#93 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#93 def has_many_inversing; end - # source://activerecord/7.1.3/lib/active_record/core.rb#93 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#93 def has_many_inversing=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#93 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#93 def has_many_inversing?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#165 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#165 def immutable_strings_by_default; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#165 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#165 def immutable_strings_by_default=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#165 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#165 def immutable_strings_by_default?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#164 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#164 def implicit_order_column; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#164 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#164 def implicit_order_column=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#164 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#164 def implicit_order_column?; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json; end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json=(value); end - # source://activemodel/7.1.3/lib/active_model/serializers/json.rb#15 + # source://activemodel/7.1.3.4/lib/active_model/serializers/json.rb#15 def include_root_in_json?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#167 def inheritance_column; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#321 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#321 def inheritance_column=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#167 def inheritance_column?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#162 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#162 def internal_metadata_table_name; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#162 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#162 def internal_metadata_table_name=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#162 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#162 def internal_metadata_table_name?; end - # source://activerecord/7.1.3/lib/active_record/store.rb#101 + # source://activerecord/7.1.3.4/lib/active_record/store.rb#101 def local_stored_attributes; end - # source://activerecord/7.1.3/lib/active_record/store.rb#101 + # source://activerecord/7.1.3.4/lib/active_record/store.rb#101 def local_stored_attributes=(_arg0); end - # source://activerecord/7.1.3/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.4/lib/active_record/locking/optimistic.rb#56 def lock_optimistically; end - # source://activerecord/7.1.3/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.4/lib/active_record/locking/optimistic.rb#56 def lock_optimistically=(value); end - # source://activerecord/7.1.3/lib/active_record/locking/optimistic.rb#56 + # source://activerecord/7.1.3.4/lib/active_record/locking/optimistic.rb#56 def lock_optimistically?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#22 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#22 def logger; end - # source://activerecord/7.1.3/lib/active_record/core.rb#22 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#22 def logger=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#22 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#22 def logger?; end - # source://activerecord/7.1.3/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.4/lib/active_record/nested_attributes.rb#15 def nested_attributes_options; end - # source://activerecord/7.1.3/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.4/lib/active_record/nested_attributes.rb#15 def nested_attributes_options=(value); end - # source://activerecord/7.1.3/lib/active_record/nested_attributes.rb#15 + # source://activerecord/7.1.3.4/lib/active_record/nested_attributes.rb#15 def nested_attributes_options?; end - # source://activerecord/7.1.3/lib/active_record/normalization.rb#8 + # source://activerecord/7.1.3.4/lib/active_record/normalization.rb#8 def normalized_attributes; end - # source://activerecord/7.1.3/lib/active_record/normalization.rb#8 + # source://activerecord/7.1.3.4/lib/active_record/normalization.rb#8 def normalized_attributes=(value); end - # source://activerecord/7.1.3/lib/active_record/normalization.rb#8 + # source://activerecord/7.1.3.4/lib/active_record/normalization.rb#8 def normalized_attributes?; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter; end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter=(value); end - # source://activemodel/7.1.3/lib/active_model/conversion.rb#32 + # source://activemodel/7.1.3.4/lib/active_model/conversion.rb#32 def param_delimiter?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts=(value); end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#50 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#50 def partial_inserts?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates=(value); end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/dirty.rb#49 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/dirty.rb#49 def partial_updates?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#163 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#163 def pluralize_table_names; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#163 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#163 def pluralize_table_names=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#163 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#163 def pluralize_table_names?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#158 def primary_key_prefix_type; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#158 def primary_key_prefix_type=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#158 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#158 def primary_key_prefix_type?; end - # source://activerecord/7.1.3/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/timestamp.rb#47 def record_timestamps; end - # source://activerecord/7.1.3/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/timestamp.rb#47 def record_timestamps=(value); end - # source://activerecord/7.1.3/lib/active_record/timestamp.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/timestamp.rb#47 def record_timestamps?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#95 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#95 def run_commit_callbacks_on_first_saved_instances_in_transaction; end - # source://activerecord/7.1.3/lib/active_record/core.rb#95 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#95 def run_commit_callbacks_on_first_saved_instances_in_transaction=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#95 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#95 def run_commit_callbacks_on_first_saved_instances_in_transaction?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#161 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#161 def schema_migrations_table_name; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#161 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#161 def schema_migrations_table_name=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#161 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#161 def schema_migrations_table_name?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#103 def shard_selector; end - # source://activerecord/7.1.3/lib/active_record/core.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#103 def shard_selector=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#103 def shard_selector?; end - # source://activerecord/7.1.3/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret; end - # source://activerecord/7.1.3/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret=(value); end - # source://activerecord/7.1.3/lib/active_record/signed_id.rb#13 + # source://activerecord/7.1.3.4/lib/active_record/signed_id.rb#13 def signed_id_verifier_secret?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes=(value); end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#67 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#67 def skip_time_zone_conversion_for_attributes?; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#43 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#43 def store_full_class_name; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#43 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#43 def store_full_class_name=(value); end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#43 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#43 def store_full_class_name?; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#47 def store_full_sti_class; end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#47 def store_full_sti_class=(value); end - # source://activerecord/7.1.3/lib/active_record/inheritance.rb#47 + # source://activerecord/7.1.3.4/lib/active_record/inheritance.rb#47 def store_full_sti_class?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#91 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#91 def strict_loading_by_default; end - # source://activerecord/7.1.3/lib/active_record/core.rb#91 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#91 def strict_loading_by_default=(value); end - # source://activerecord/7.1.3/lib/active_record/core.rb#91 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#91 def strict_loading_by_default?; end - # source://activerecord/7.1.3/lib/active_record/core.rb#226 + # source://activerecord/7.1.3.4/lib/active_record/core.rb#226 def strict_loading_violation!(owner:, reflection:); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#159 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#159 def table_name_prefix; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#159 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#159 def table_name_prefix=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#159 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#159 def table_name_prefix?; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#160 def table_name_suffix; end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#160 def table_name_suffix=(value); end - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#160 def table_name_suffix?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes=(value); end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#66 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#66 def time_zone_aware_attributes?; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types; end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types=(value); end - # source://activerecord/7.1.3/lib/active_record/attribute_methods/time_zone_conversion.rb#68 + # source://activerecord/7.1.3.4/lib/active_record/attribute_methods/time_zone_conversion.rb#68 def time_zone_aware_types?; end - # source://activerecord/7.1.3/lib/active_record/token_for.rb#10 + # source://activerecord/7.1.3.4/lib/active_record/token_for.rb#10 def token_definitions; end - # source://activerecord/7.1.3/lib/active_record/token_for.rb#10 + # source://activerecord/7.1.3.4/lib/active_record/token_for.rb#10 def token_definitions=(value); end private - # source://activerecord/7.1.3/lib/active_record/model_schema.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/model_schema.rb#167 def _inheritance_column=(value); end end end @@ -1197,13 +1198,13 @@ module ActiveStorage # source://activestorage//lib/active_storage.rb#52 def queues=(val); end - # source://railties/7.1.3/lib/rails/engine.rb#412 + # source://railties/7.1.3.4/lib/rails/engine.rb#412 def railtie_helpers_paths; end - # source://railties/7.1.3/lib/rails/engine.rb#395 + # source://railties/7.1.3.4/lib/rails/engine.rb#395 def railtie_namespace; end - # source://railties/7.1.3/lib/rails/engine.rb#416 + # source://railties/7.1.3.4/lib/rails/engine.rb#416 def railtie_routes_url_helpers(include_path_helpers = T.unsafe(nil)); end # source://activestorage//lib/active_storage.rb#367 @@ -1242,7 +1243,7 @@ module ActiveStorage # source://activestorage//lib/active_storage.rb#65 def supported_image_processing_methods=(val); end - # source://railties/7.1.3/lib/rails/engine.rb#401 + # source://railties/7.1.3.4/lib/rails/engine.rb#401 def table_name_prefix; end # source://activestorage//lib/active_storage.rb#363 @@ -1263,7 +1264,7 @@ module ActiveStorage # source://activestorage//lib/active_storage.rb#357 def urls_expire_in=(val); end - # source://railties/7.1.3/lib/rails/engine.rb#408 + # source://railties/7.1.3.4/lib/rails/engine.rb#408 def use_relative_model_naming?; end # source://activestorage//lib/active_storage.rb#59 @@ -1307,10 +1308,10 @@ class ActiveStorage::AnalyzeJob < ::ActiveStorage::BaseJob def perform(blob); end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -1840,7 +1841,7 @@ class ActiveStorage::Attached::Many < ::ActiveStorage::Attached # source://activestorage//lib/active_storage/attached/many.rb#25 def detach(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#331 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end # source://activestorage//lib/active_storage/attached/many.rb#13 @@ -1857,7 +1858,7 @@ class ActiveStorage::Attached::Many < ::ActiveStorage::Attached # source://activestorage//lib/active_storage/attached/many.rb#71 def purge_many; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -1916,7 +1917,7 @@ class ActiveStorage::Attached::One < ::ActiveStorage::Attached # source://activestorage//lib/active_storage/attached/one.rb#25 def detach(*_arg0, **_arg1, &_arg2); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#331 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end # source://activestorage//lib/active_storage/attached/one.rb#13 @@ -1933,7 +1934,7 @@ class ActiveStorage::Attached::One < ::ActiveStorage::Attached # source://activestorage//lib/active_storage/attached/one.rb#78 def purge_one; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end end @@ -1941,13 +1942,13 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record include ::ActiveStorage::Attachment::GeneratedAttributeMethods include ::ActiveStorage::Attachment::GeneratedAssociationMethods - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_blob(*args); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_record(*args); end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#331 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#331 def method_missing(method, *args, **_arg2, &block); end def preview(transformations); end @@ -1956,7 +1957,7 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record def representation(transformations); end def signed_id(*_arg0, **_arg1, &_arg2); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def validate_associated_records_for_blob(*args); end def variant(transformations); end @@ -1969,74 +1970,74 @@ class ActiveStorage::Attachment < ::ActiveStorage::Record def named_variants; end def purge_dependent_blob_later; end - # source://activesupport/7.1.3/lib/active_support/core_ext/module/delegation.rb#323 + # source://activesupport/7.1.3.4/lib/active_support/core_ext/module/delegation.rb#323 def respond_to_missing?(name, include_private = T.unsafe(nil)); end def transform_variants_later; end def transformations_by_name(transformations); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def with_all_variant_records(*args, **_arg1); end end end module ActiveStorage::Attachment::GeneratedAssociationMethods - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def blob=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#145 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#145 def blob_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#149 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#149 def blob_previously_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#32 def build_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#36 def create_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#40 def create_blob!(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def record; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def record=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#145 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#145 def record_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#149 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#149 def record_previously_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_record; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_record; end end @@ -2047,17 +2048,17 @@ class ActiveStorage::BaseController < ::ActionController::Base private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal/etag_with_template_digest.rb#29 + # source://actionpack/7.1.3.4/lib/action_controller/metal/etag_with_template_digest.rb#29 def etag_with_template_digest; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2076,14 +2077,14 @@ class ActiveStorage::Blobs::ProxyController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2095,24 +2096,24 @@ class ActiveStorage::Blobs::RedirectController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end class ActiveStorage::Current < ::ActiveSupport::CurrentAttributes class << self - # source://activesupport/7.1.3/lib/active_support/current_attributes.rb#127 + # source://activesupport/7.1.3.4/lib/active_support/current_attributes.rb#127 def url_options; end - # source://activesupport/7.1.3/lib/active_support/current_attributes.rb#127 + # source://activesupport/7.1.3.4/lib/active_support/current_attributes.rb#127 def url_options=(value); end end end @@ -2122,14 +2123,14 @@ class ActiveStorage::DirectUploadsController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def blob_args; end def direct_upload_json(blob); end class << self - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2146,7 +2147,7 @@ class ActiveStorage::DiskController < ::ActiveStorage::BaseController private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def acceptable_content?(token); end @@ -2155,10 +2156,10 @@ class ActiveStorage::DiskController < ::ActiveStorage::BaseController def named_disk_service(name); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2193,7 +2194,7 @@ end # source://activestorage//lib/active_storage/engine.rb#25 class ActiveStorage::Engine < ::Rails::Engine class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end end end @@ -2279,10 +2280,10 @@ class ActiveStorage::FixtureSet include ::ActiveRecord::SecureToken extend ::ActiveRecord::SecureToken::ClassMethods - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end # source://activestorage//lib/active_storage/fixture_set.rb#70 @@ -2310,13 +2311,13 @@ class ActiveStorage::FixtureSet # source://activestorage//lib/active_storage/fixture_set.rb#66 def blob(filename:, **attributes); end - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path=(value); end - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end end end @@ -2380,7 +2381,7 @@ class ActiveStorage::LogSubscriber < ::ActiveSupport::LogSubscriber def log_prefix_for_service(event); end class << self - # source://activesupport/7.1.3/lib/active_support/log_subscriber.rb#87 + # source://activesupport/7.1.3.4/lib/active_support/log_subscriber.rb#87 def log_levels; end end end @@ -2389,10 +2390,10 @@ class ActiveStorage::MirrorJob < ::ActiveStorage::BaseJob def perform(key, checksum:); end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -2561,10 +2562,10 @@ class ActiveStorage::PurgeJob < ::ActiveStorage::BaseJob def perform(blob); end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -2574,10 +2575,10 @@ class ActiveStorage::Record < ::ActiveRecord::Base include ::ActiveStorage::Record::GeneratedAssociationMethods class << self - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end end end @@ -2670,17 +2671,17 @@ class ActiveStorage::Representations::BaseController < ::ActiveStorage::BaseCont private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end def blob_scope; end def set_representation; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2695,14 +2696,14 @@ class ActiveStorage::Representations::ProxyController < ::ActiveStorage::Represe private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2712,11 +2713,11 @@ class ActiveStorage::Representations::RedirectController < ::ActiveStorage::Repr private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -2986,10 +2987,10 @@ class ActiveStorage::TransformJob < ::ActiveStorage::BaseJob def perform(blob, transformations); end class << self - # source://activejob/7.1.3/lib/active_job/queue_name.rb#55 + # source://activejob/7.1.3.4/lib/active_job/queue_name.rb#55 def queue_name; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -3060,7 +3061,7 @@ ActiveStorage::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActiveStorage::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://activestorage//lib/active_storage/gem_version.rb#13 -ActiveStorage::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActiveStorage::VERSION::PRE = T.let(T.unsafe(nil), String) # source://activestorage//lib/active_storage/gem_version.rb#15 ActiveStorage::VERSION::STRING = T.let(T.unsafe(nil), String) @@ -3072,74 +3073,74 @@ class ActiveStorage::VariantRecord < ::ActiveStorage::Record include ::ActiveStorage::VariantRecord::GeneratedAttributeMethods include ::ActiveStorage::VariantRecord::GeneratedAssociationMethods - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_blob(*args); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_image_attachment(*args); end - # source://activerecord/7.1.3/lib/active_record/autosave_association.rb#160 + # source://activerecord/7.1.3.4/lib/active_record/autosave_association.rb#160 def autosave_associated_records_for_image_blob(*args); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activerecord/7.1.3/lib/active_record/reflection.rb#11 + # source://activerecord/7.1.3.4/lib/active_record/reflection.rb#11 def _reflections; end - # source://activemodel/7.1.3/lib/active_model/validations.rb#71 + # source://activemodel/7.1.3.4/lib/active_model/validations.rb#71 def _validators; end # source://activestorage//lib/active_storage/reflection.rb#53 def attachment_reflections; end - # source://activerecord/7.1.3/lib/active_record/enum.rb#167 + # source://activerecord/7.1.3.4/lib/active_record/enum.rb#167 def defined_enums; end - # source://activerecord/7.1.3/lib/active_record/scoping/named.rb#174 + # source://activerecord/7.1.3.4/lib/active_record/scoping/named.rb#174 def with_attached_image(*args, **_arg1); end end end module ActiveStorage::VariantRecord::GeneratedAssociationMethods - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def blob=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#145 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#145 def blob_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/belongs_to.rb#149 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/belongs_to.rb#149 def blob_previously_changed?; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#32 def build_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#32 def build_image_attachment(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#32 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#32 def build_image_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#36 def create_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#40 def create_blob!(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#36 def create_image_attachment(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#40 def create_image_attachment!(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#36 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#36 def create_image_blob(*args, &block); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#40 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#40 def create_image_blob!(*args, &block); end # source://activestorage//lib/active_storage/attached/model.rb#99 @@ -3148,34 +3149,34 @@ module ActiveStorage::VariantRecord::GeneratedAssociationMethods # source://activestorage//lib/active_storage/attached/model.rb#104 def image=(attachable); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def image_attachment; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def image_attachment=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#103 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#103 def image_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/association.rb#111 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/association.rb#111 def image_blob=(value); end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_image_attachment; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#19 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#19 def reload_image_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_blob; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_image_attachment; end - # source://activerecord/7.1.3/lib/active_record/associations/builder/singular_association.rb#23 + # source://activerecord/7.1.3.4/lib/active_record/associations/builder/singular_association.rb#23 def reset_image_blob; end end diff --git a/sorbet/rbi/gems/activesupport@7.1.3.rbi b/sorbet/rbi/gems/activesupport@7.1.3.4.rbi similarity index 99% rename from sorbet/rbi/gems/activesupport@7.1.3.rbi rename to sorbet/rbi/gems/activesupport@7.1.3.4.rbi index f9e7db35c..5a6aec15b 100644 --- a/sorbet/rbi/gems/activesupport@7.1.3.rbi +++ b/sorbet/rbi/gems/activesupport@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `activesupport` gem. # Please instead update this file by running `bin/tapioca gem activesupport`. + # :include: activesupport/README.rdoc # # source://activesupport//lib/active_support/deep_mergeable.rb#3 @@ -3813,6 +3814,15 @@ end # source://activesupport//lib/active_support/current_attributes.rb#95 ActiveSupport::CurrentAttributes::INVALID_ATTRIBUTE_NAMES = T.let(T.unsafe(nil), Array) +# source://activesupport//lib/active_support/current_attributes/test_helper.rb#3 +module ActiveSupport::CurrentAttributes::TestHelper + # source://activesupport//lib/active_support/current_attributes/test_helper.rb#9 + def after_teardown; end + + # source://activesupport//lib/active_support/current_attributes/test_helper.rb#4 + def before_setup; end +end + # Provides +deep_merge+ and +deep_merge!+ methods. Expects the including class # to provide a merge!(other, &block) method. # @@ -6668,20 +6678,20 @@ module ActiveSupport::HtmlSafeTranslation private - # source://activesupport//lib/active_support/html_safe_translation.rb#22 + # source://activesupport//lib/active_support/html_safe_translation.rb#32 def html_escape_translation_options(options); end - # source://activesupport//lib/active_support/html_safe_translation.rb#35 + # source://activesupport//lib/active_support/html_safe_translation.rb#45 def html_safe_translation(translation); end # @return [Boolean] # - # source://activesupport//lib/active_support/html_safe_translation.rb#18 + # source://activesupport//lib/active_support/html_safe_translation.rb#28 def html_safe_translation_key?(key); end # @return [Boolean] # - # source://activesupport//lib/active_support/html_safe_translation.rb#30 + # source://activesupport//lib/active_support/html_safe_translation.rb#40 def i18n_option?(name); end end @@ -9618,10 +9628,10 @@ class ActiveSupport::Notifications::Fanout # source://activesupport//lib/active_support/notifications/fanout.rb#314 def listening?(name); end - # source://mutex_m/0.2.0/mutex_m.rb#91 + # source://mutex_m/0.2.0/lib/mutex_m.rb#91 def lock; end - # source://mutex_m/0.2.0/mutex_m.rb#81 + # source://mutex_m/0.2.0/lib/mutex_m.rb#81 def locked?; end # source://activesupport//lib/active_support/notifications/fanout.rb#293 @@ -9636,13 +9646,13 @@ class ActiveSupport::Notifications::Fanout # source://activesupport//lib/active_support/notifications/fanout.rb#68 def subscribe(pattern = T.unsafe(nil), callable = T.unsafe(nil), monotonic: T.unsafe(nil), &block); end - # source://mutex_m/0.2.0/mutex_m.rb#76 + # source://mutex_m/0.2.0/lib/mutex_m.rb#76 def synchronize(&block); end - # source://mutex_m/0.2.0/mutex_m.rb#86 + # source://mutex_m/0.2.0/lib/mutex_m.rb#86 def try_lock; end - # source://mutex_m/0.2.0/mutex_m.rb#96 + # source://mutex_m/0.2.0/lib/mutex_m.rb#96 def unlock; end # source://activesupport//lib/active_support/notifications/fanout.rb#85 @@ -12143,43 +12153,43 @@ class ActiveSupport::TestCase < ::Minitest::Test # source://activesupport//lib/active_support/callbacks.rb#963 def _teardown_callbacks; end - # source://minitest/5.22.2/lib/minitest/assertions.rb#736 + # source://minitest/5.25.1/lib/minitest/assertions.rb#731 def assert_no_match(matcher, obj, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#665 + # source://minitest/5.25.1/lib/minitest/assertions.rb#660 def assert_not_empty(obj, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#676 + # source://minitest/5.25.1/lib/minitest/assertions.rb#671 def assert_not_equal(exp, act, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#688 + # source://minitest/5.25.1/lib/minitest/assertions.rb#683 def assert_not_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#700 + # source://minitest/5.25.1/lib/minitest/assertions.rb#695 def assert_not_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#707 + # source://minitest/5.25.1/lib/minitest/assertions.rb#702 def assert_not_includes(collection, obj, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#718 + # source://minitest/5.25.1/lib/minitest/assertions.rb#713 def assert_not_instance_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#728 + # source://minitest/5.25.1/lib/minitest/assertions.rb#723 def assert_not_kind_of(cls, obj, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#746 + # source://minitest/5.25.1/lib/minitest/assertions.rb#741 def assert_not_nil(obj, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#781 + # source://minitest/5.25.1/lib/minitest/assertions.rb#776 def assert_not_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#804 + # source://minitest/5.25.1/lib/minitest/assertions.rb#799 def assert_not_predicate(o1, op, msg = T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#813 + # source://minitest/5.25.1/lib/minitest/assertions.rb#808 def assert_not_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end - # source://minitest/5.22.2/lib/minitest/assertions.rb#822 + # source://minitest/5.25.1/lib/minitest/assertions.rb#817 def assert_not_same(exp, act, msg = T.unsafe(nil)); end # source://activesupport//lib/active_support/testing/file_fixtures.rb#20 @@ -12191,7 +12201,7 @@ class ActiveSupport::TestCase < ::Minitest::Test # source://activesupport//lib/active_support/test_case.rb#298 def inspect; end - # source://minitest/5.22.2/lib/minitest.rb#332 + # source://minitest/5.25.1/lib/minitest.rb#375 def method_name; end class << self @@ -14424,7 +14434,7 @@ ActiveSupport::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) ActiveSupport::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://activesupport//lib/active_support/gem_version.rb#13 -ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +ActiveSupport::VERSION::PRE = T.let(T.unsafe(nil), String) # source://activesupport//lib/active_support/gem_version.rb#15 ActiveSupport::VERSION::STRING = T.let(T.unsafe(nil), String) @@ -17459,46 +17469,46 @@ HashWithIndifferentAccess = ActiveSupport::HashWithIndifferentAccess # source://activesupport//lib/active_support/i18n_railtie.rb#8 module I18n class << self - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#64 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#64 def cache_key_digest; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#68 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#68 def cache_key_digest=(key_digest); end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#56 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#56 def cache_namespace; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#60 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#60 def cache_namespace=(namespace); end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#48 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#48 def cache_store; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#52 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#52 def cache_store=(store); end - # source://i18n/1.14.1/lib/i18n/backend/fallbacks.rb#17 + # source://i18n/1.14.6/lib/i18n/backend/fallbacks.rb#17 def fallbacks; end - # source://i18n/1.14.1/lib/i18n/backend/fallbacks.rb#23 + # source://i18n/1.14.6/lib/i18n/backend/fallbacks.rb#23 def fallbacks=(fallbacks); end - # source://i18n/1.14.1/lib/i18n/interpolate/ruby.rb#23 + # source://i18n/1.14.6/lib/i18n/interpolate/ruby.rb#23 def interpolate(string, values); end - # source://i18n/1.14.1/lib/i18n/interpolate/ruby.rb#29 + # source://i18n/1.14.6/lib/i18n/interpolate/ruby.rb#29 def interpolate_hash(string, values); end - # source://i18n/1.14.1/lib/i18n.rb#37 + # source://i18n/1.14.6/lib/i18n.rb#38 def new_double_nested_cache; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#72 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#72 def perform_caching?; end - # source://i18n/1.14.1/lib/i18n.rb#45 + # source://i18n/1.14.6/lib/i18n.rb#46 def reserve_key(key); end - # source://i18n/1.14.1/lib/i18n.rb#50 + # source://i18n/1.14.6/lib/i18n.rb#51 def reserved_keys_pattern; end end end @@ -17689,6 +17699,8 @@ class Integer < ::Numeric def years; end end +Integer::GMP_VERSION = T.let(T.unsafe(nil), String) + # source://activesupport//lib/active_support/core_ext/kernel/reporting.rb#3 module Kernel private @@ -20926,7 +20938,6 @@ end # source://activesupport//lib/active_support/core_ext/object/json.rb#224 class URI::Generic include ::URI::RFC2396_REGEXP - include ::URI # source://activesupport//lib/active_support/core_ext/object/json.rb#225 def as_json(options = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/addressable@2.8.6.rbi b/sorbet/rbi/gems/addressable@2.8.7.rbi similarity index 99% rename from sorbet/rbi/gems/addressable@2.8.6.rbi rename to sorbet/rbi/gems/addressable@2.8.7.rbi index 9b249f24f..eb8dae420 100644 --- a/sorbet/rbi/gems/addressable@2.8.6.rbi +++ b/sorbet/rbi/gems/addressable@2.8.7.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `addressable` gem. # Please instead update this file by running `bin/tapioca gem addressable`. + # Addressable is a library for processing links and URIs. # # source://addressable//lib/addressable/version.rb#22 @@ -637,7 +638,7 @@ class Addressable::Template::MatchData # @param key [String, Symbol, Fixnum] Capture index or name. Note that when accessing by with index # of 0, the full URI will be returned. The intention is to mimic # the ::MatchData#[] behavior. - # @param len [#to_int, nil] If provided, an array of values will be returend with the given + # @param len [#to_int, nil] If provided, an array of values will be returned with the given # parameter used as length. # @return [Array, String, nil] The captured value corresponding to the index or name. If the # value was not provided or the key is unknown, nil will be diff --git a/sorbet/rbi/gems/appraisal@2.5.0.rbi b/sorbet/rbi/gems/appraisal@2.5.0.rbi deleted file mode 100644 index 404ec683d..000000000 --- a/sorbet/rbi/gems/appraisal@2.5.0.rbi +++ /dev/null @@ -1,621 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `appraisal` gem. -# Please instead update this file by running `bin/tapioca gem appraisal`. - -# source://appraisal//lib/appraisal/version.rb#1 -module Appraisal; end - -# Represents one appraisal and its dependencies -# -# source://appraisal//lib/appraisal/appraisal.rb#10 -class Appraisal::Appraisal - # @return [Appraisal] a new instance of Appraisal - # - # source://appraisal//lib/appraisal/appraisal.rb#15 - def initialize(name, source_gemfile); end - - # source://appraisal//lib/appraisal/appraisal.rb#20 - def gem(*args); end - - # Returns the value of attribute gemfile. - # - # source://appraisal//lib/appraisal/appraisal.rb#13 - def gemfile; end - - # source://appraisal//lib/appraisal/appraisal.rb#92 - def gemfile_path; end - - # source://appraisal//lib/appraisal/appraisal.rb#56 - def gemspec(options = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/appraisal.rb#36 - def git(*args, &block); end - - # source://appraisal//lib/appraisal/appraisal.rb#60 - def git_source(*args, &block); end - - # source://appraisal//lib/appraisal/appraisal.rb#44 - def group(*args, &block); end - - # source://appraisal//lib/appraisal/appraisal.rb#71 - def install(options = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/appraisal.rb#48 - def install_if(*args, &block); end - - # Returns the value of attribute name. - # - # source://appraisal//lib/appraisal/appraisal.rb#13 - def name; end - - # source://appraisal//lib/appraisal/appraisal.rb#40 - def path(*args, &block); end - - # source://appraisal//lib/appraisal/appraisal.rb#52 - def platforms(*args, &block); end - - # source://appraisal//lib/appraisal/appraisal.rb#100 - def relative_gemfile_path; end - - # source://appraisal//lib/appraisal/appraisal.rb#104 - def relativize; end - - # source://appraisal//lib/appraisal/appraisal.rb#24 - def remove_gem(*args); end - - # source://appraisal//lib/appraisal/appraisal.rb#32 - def ruby(*args); end - - # source://appraisal//lib/appraisal/appraisal.rb#28 - def source(*args, &block); end - - # source://appraisal//lib/appraisal/appraisal.rb#88 - def update(gems = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/appraisal.rb#64 - def write_gemfile; end - - private - - # source://appraisal//lib/appraisal/appraisal.rb#153 - def bundle_options(options); end - - # source://appraisal//lib/appraisal/appraisal.rb#119 - def check_command; end - - # source://appraisal//lib/appraisal/appraisal.rb#149 - def clean_name; end - - # source://appraisal//lib/appraisal/appraisal.rb#179 - def comment_lines(heading); end - - # source://appraisal//lib/appraisal/appraisal.rb#141 - def gemfile_name; end - - # source://appraisal//lib/appraisal/appraisal.rb#133 - def gemfile_root; end - - # source://appraisal//lib/appraisal/appraisal.rb#124 - def install_command(options = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/appraisal.rb#145 - def lockfile_path; end - - # source://appraisal//lib/appraisal/appraisal.rb#137 - def project_root; end - - # source://appraisal//lib/appraisal/appraisal.rb#189 - def quoted_gemfile; end - - # source://appraisal//lib/appraisal/appraisal.rb#129 - def update_command(gems); end -end - -# source://appraisal//lib/appraisal/appraisal.rb#11 -Appraisal::Appraisal::DEFAULT_INSTALL_OPTIONS = T.let(T.unsafe(nil), Hash) - -# Loads and parses Appraisals file -# -# source://appraisal//lib/appraisal/appraisal_file.rb#8 -class Appraisal::AppraisalFile - # @return [AppraisalFile] a new instance of AppraisalFile - # - # source://appraisal//lib/appraisal/appraisal_file.rb#15 - def initialize; end - - # Returns the value of attribute appraisals. - # - # source://appraisal//lib/appraisal/appraisal_file.rb#9 - def appraisals; end - - # source://appraisal//lib/appraisal/appraisal_file.rb#31 - def appraise(name, &block); end - - # source://appraisal//lib/appraisal/appraisal_file.rb#37 - def customize_gemfiles(&_block); end - - # source://appraisal//lib/appraisal/appraisal_file.rb#27 - def each(&block); end - - # Returns the value of attribute gemfile. - # - # source://appraisal//lib/appraisal/appraisal_file.rb#9 - def gemfile; end - - private - - # source://appraisal//lib/appraisal/appraisal_file.rb#47 - def path; end - - # source://appraisal//lib/appraisal/appraisal_file.rb#43 - def run(definitions); end - - class << self - # source://appraisal//lib/appraisal/appraisal_file.rb#11 - def each(&block); end - end -end - -# Raises when Appraisal is unable to locate Appraisals file in the current directory. -# -# source://appraisal//lib/appraisal/errors.rb#3 -class Appraisal::AppraisalsNotFound < ::StandardError - # source://appraisal//lib/appraisal/errors.rb#4 - def message; end -end - -# source://appraisal//lib/appraisal/bundler_dsl.rb#4 -class Appraisal::BundlerDSL - # @return [BundlerDSL] a new instance of BundlerDSL - # - # source://appraisal//lib/appraisal/bundler_dsl.rb#10 - def initialize; end - - # Returns the value of attribute dependencies. - # - # source://appraisal//lib/appraisal/bundler_dsl.rb#5 - def dependencies; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#86 - def for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#28 - def gem(name, *requirements); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#90 - def gemspec(options = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#70 - def git(source, options = T.unsafe(nil), &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#94 - def git_source(source, &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#36 - def group(*names, &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#42 - def install_if(condition, &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#76 - def path(source, options = T.unsafe(nil), &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#48 - def platform(*names, &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#48 - def platforms(*names, &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#32 - def remove_gem(name); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#66 - def ruby(ruby_version); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#24 - def run(&block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#56 - def source(source, &block); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#82 - def to_s; end - - protected - - # Sets the attribute git_sources - # - # @param value the value to set the attribute git_sources to. - # - # source://appraisal//lib/appraisal/bundler_dsl.rb#100 - def git_sources=(_arg0); end - - private - - # source://appraisal//lib/appraisal/bundler_dsl.rb#126 - def dependencies_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#130 - def dependencies_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#118 - def gemspec_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#122 - def gemspec_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#138 - def gits_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#144 - def gits_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#138 - def groups_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#144 - def groups_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#149 - def indent(string); end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#138 - def install_if_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#144 - def install_if_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#138 - def paths_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#144 - def paths_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#138 - def platforms_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#144 - def platforms_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#110 - def ruby_version_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#110 - def ruby_version_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#138 - def source_blocks_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#144 - def source_blocks_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#104 - def source_entry; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#104 - def source_entry_for_dup; end - - # source://appraisal//lib/appraisal/bundler_dsl.rb#153 - def substitute_git_source(requirements); end -end - -# source://appraisal//lib/appraisal/bundler_dsl.rb#7 -Appraisal::BundlerDSL::PARTS = T.let(T.unsafe(nil), Array) - -# Executes commands with a clean environment -# -# source://appraisal//lib/appraisal/command.rb#5 -class Appraisal::Command - # @return [Command] a new instance of Command - # - # source://appraisal//lib/appraisal/command.rb#8 - def initialize(command, options = T.unsafe(nil)); end - - # Returns the value of attribute command. - # - # source://appraisal//lib/appraisal/command.rb#6 - def command; end - - # Returns the value of attribute env. - # - # source://appraisal//lib/appraisal/command.rb#6 - def env; end - - # Returns the value of attribute gemfile. - # - # source://appraisal//lib/appraisal/command.rb#6 - def gemfile; end - - # source://appraisal//lib/appraisal/command.rb#14 - def run; end - - private - - # source://appraisal//lib/appraisal/command.rb#53 - def announce; end - - # source://appraisal//lib/appraisal/command.rb#77 - def command_as_string; end - - # source://appraisal//lib/appraisal/command.rb#69 - def command_starting_with_bundle(original_command); end - - # @return [Boolean] - # - # source://appraisal//lib/appraisal/command.rb#61 - def command_starts_with_bundle?(original_command); end - - # source://appraisal//lib/appraisal/command.rb#35 - def ensure_bundler_is_available; end - - # source://appraisal//lib/appraisal/command.rb#85 - def test_environment; end -end - -# source://appraisal//lib/appraisal/conditional.rb#5 -class Appraisal::Conditional < ::Appraisal::BundlerDSL - # @return [Conditional] a new instance of Conditional - # - # source://appraisal//lib/appraisal/conditional.rb#6 - def initialize(condition); end - - # source://appraisal//lib/appraisal/conditional.rb#16 - def for_dup; end - - # source://appraisal//lib/appraisal/conditional.rb#11 - def to_s; end -end - -# source://appraisal//lib/appraisal/customize.rb#2 -class Appraisal::Customize - # @return [Customize] a new instance of Customize - # - # source://appraisal//lib/appraisal/customize.rb#3 - def initialize(heading: T.unsafe(nil), single_quotes: T.unsafe(nil)); end - - class << self - # source://appraisal//lib/appraisal/customize.rb#8 - def heading; end - - # source://appraisal//lib/appraisal/customize.rb#12 - def single_quotes; end - end -end - -# Dependency on a gem and optional version requirements -# -# source://appraisal//lib/appraisal/dependency.rb#5 -class Appraisal::Dependency - # @return [Dependency] a new instance of Dependency - # - # source://appraisal//lib/appraisal/dependency.rb#9 - def initialize(name, requirements); end - - # source://appraisal//lib/appraisal/dependency.rb#19 - def for_dup; end - - # Returns the value of attribute name. - # - # source://appraisal//lib/appraisal/dependency.rb#7 - def name; end - - # Returns the value of attribute requirements. - # - # source://appraisal//lib/appraisal/dependency.rb#6 - def requirements; end - - # Sets the attribute requirements - # - # @param value the value to set the attribute requirements to. - # - # source://appraisal//lib/appraisal/dependency.rb#6 - def requirements=(_arg0); end - - # source://appraisal//lib/appraisal/dependency.rb#14 - def to_s; end - - private - - # source://appraisal//lib/appraisal/dependency.rb#41 - def formatted_output(output_requirements); end - - # source://appraisal//lib/appraisal/dependency.rb#45 - def gem_name; end - - # @return [Boolean] - # - # source://appraisal//lib/appraisal/dependency.rb#49 - def no_requirements?; end - - # source://appraisal//lib/appraisal/dependency.rb#25 - def path_prefixed_requirements; end -end - -# source://appraisal//lib/appraisal/dependency_list.rb#5 -class Appraisal::DependencyList - # @return [DependencyList] a new instance of DependencyList - # - # source://appraisal//lib/appraisal/dependency_list.rb#6 - def initialize; end - - # source://appraisal//lib/appraisal/dependency_list.rb#11 - def add(name, requirements); end - - # source://appraisal//lib/appraisal/dependency_list.rb#28 - def for_dup; end - - # source://appraisal//lib/appraisal/dependency_list.rb#17 - def remove(name); end - - # source://appraisal//lib/appraisal/dependency_list.rb#23 - def to_s; end -end - -# Load bundler Gemfiles and merge dependencies -# -# source://appraisal//lib/appraisal/gemfile.rb#13 -class Appraisal::Gemfile < ::Appraisal::BundlerDSL - # source://appraisal//lib/appraisal/gemfile.rb#22 - def dup; end - - # source://appraisal//lib/appraisal/gemfile.rb#14 - def load(path); end - - # source://appraisal//lib/appraisal/gemfile.rb#18 - def run(definitions, path, line = T.unsafe(nil)); end -end - -# source://appraisal//lib/appraisal/gemspec.rb#4 -class Appraisal::Gemspec - # @return [Gemspec] a new instance of Gemspec - # - # source://appraisal//lib/appraisal/gemspec.rb#7 - def initialize(options = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/gemspec.rb#17 - def for_dup; end - - # Returns the value of attribute options. - # - # source://appraisal//lib/appraisal/gemspec.rb#5 - def options; end - - # source://appraisal//lib/appraisal/gemspec.rb#12 - def to_s; end - - private - - # source://appraisal//lib/appraisal/gemspec.rb#23 - def exported_options; end -end - -# source://appraisal//lib/appraisal/git.rb#5 -class Appraisal::Git < ::Appraisal::BundlerDSL - # @return [Git] a new instance of Git - # - # source://appraisal//lib/appraisal/git.rb#6 - def initialize(source, options = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/git.rb#22 - def for_dup; end - - # source://appraisal//lib/appraisal/git.rb#12 - def to_s; end -end - -# source://appraisal//lib/appraisal/group.rb#5 -class Appraisal::Group < ::Appraisal::BundlerDSL - # @return [Group] a new instance of Group - # - # source://appraisal//lib/appraisal/group.rb#6 - def initialize(group_names); end - - # source://appraisal//lib/appraisal/group.rb#16 - def for_dup; end - - # source://appraisal//lib/appraisal/group.rb#11 - def to_s; end - - private - - # source://appraisal//lib/appraisal/group.rb#22 - def formatted_output(output_dependencies); end -end - -# source://appraisal//lib/appraisal/path.rb#5 -class Appraisal::Path < ::Appraisal::BundlerDSL - # @return [Path] a new instance of Path - # - # source://appraisal//lib/appraisal/path.rb#6 - def initialize(source, options = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/path.rb#22 - def for_dup; end - - # source://appraisal//lib/appraisal/path.rb#12 - def to_s; end -end - -# source://appraisal//lib/appraisal/platform.rb#5 -class Appraisal::Platform < ::Appraisal::BundlerDSL - # @return [Platform] a new instance of Platform - # - # source://appraisal//lib/appraisal/platform.rb#6 - def initialize(platform_names); end - - # source://appraisal//lib/appraisal/platform.rb#16 - def for_dup; end - - # source://appraisal//lib/appraisal/platform.rb#11 - def to_s; end - - private - - # source://appraisal//lib/appraisal/platform.rb#22 - def formatted_output(output_dependencies); end -end - -# source://appraisal//lib/appraisal/source.rb#5 -class Appraisal::Source < ::Appraisal::BundlerDSL - # @return [Source] a new instance of Source - # - # source://appraisal//lib/appraisal/source.rb#6 - def initialize(source); end - - # source://appraisal//lib/appraisal/source.rb#16 - def for_dup; end - - # source://appraisal//lib/appraisal/source.rb#11 - def to_s; end - - private - - # source://appraisal//lib/appraisal/source.rb#22 - def formatted_output(output_dependencies); end -end - -# Defines tasks for installing appraisal dependencies and running other tasks -# for a given appraisal. -# -# source://appraisal//lib/appraisal/task.rb#7 -class Appraisal::Task < ::Rake::TaskLib - # @return [Task] a new instance of Task - # - # source://appraisal//lib/appraisal/task.rb#8 - def initialize; end -end - -# Contains methods for various operations -# -# source://appraisal//lib/appraisal/utils.rb#3 -module Appraisal::Utils - class << self - # source://appraisal//lib/appraisal/utils.rb#55 - def bundler_version; end - - # source://appraisal//lib/appraisal/utils.rb#36 - def format_arguments(arguments); end - - # source://appraisal//lib/appraisal/utils.rb#25 - def format_hash_value(key, value); end - - # source://appraisal//lib/appraisal/utils.rb#8 - def format_string(object, enclosing_object = T.unsafe(nil)); end - - # source://appraisal//lib/appraisal/utils.rb#42 - def join_parts(parts); end - - # source://appraisal//lib/appraisal/utils.rb#46 - def prefix_path(path); end - - # @return [Boolean] - # - # source://appraisal//lib/appraisal/utils.rb#4 - def support_parallel_installation?; end - end -end - -# source://appraisal//lib/appraisal/version.rb#2 -Appraisal::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/async-http-faraday@0.12.0.rbi b/sorbet/rbi/gems/async-http-faraday@0.14.0.rbi similarity index 76% rename from sorbet/rbi/gems/async-http-faraday@0.12.0.rbi rename to sorbet/rbi/gems/async-http-faraday@0.14.0.rbi index 86a7e9787..d5954a39b 100644 --- a/sorbet/rbi/gems/async-http-faraday@0.12.0.rbi +++ b/sorbet/rbi/gems/async-http-faraday@0.14.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `async-http-faraday` gem. # Please instead update this file by running `bin/tapioca gem async-http-faraday`. + # source://async-http-faraday//lib/async/http/faraday/version.rb#6 module Async; end @@ -13,45 +14,59 @@ module Async::HTTP; end # source://async-http-faraday//lib/async/http/faraday/version.rb#8 module Async::HTTP::Faraday; end -# source://async-http-faraday//lib/async/http/faraday/adapter.rb#21 +# source://async-http-faraday//lib/async/http/faraday/adapter.rb#38 class Async::HTTP::Faraday::Adapter < ::Faraday::Adapter # @return [Adapter] a new instance of Adapter # - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#35 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#52 def initialize(*arguments, timeout: T.unsafe(nil), **options, &block); end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#85 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#102 def call(env); end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#59 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#76 def client_for(endpoint); end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#76 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#93 def close; end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#49 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#66 def host_key(endpoint); end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#45 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#62 def make_client(endpoint); end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#67 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#84 def proxy_client_for(proxy_endpoint, endpoint); end private - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#138 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#164 def encoded_body(response); end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#153 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#179 def extract_type_parameters(content_type); end - # source://async-http-faraday//lib/async/http/faraday/adapter.rb#128 + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#154 def with_timeout(task: T.unsafe(nil)); end end -# source://async-http-faraday//lib/async/http/faraday/adapter.rb#22 +# source://async-http-faraday//lib/async/http/faraday/adapter.rb#39 Async::HTTP::Faraday::Adapter::CONNECTION_EXCEPTIONS = T.let(T.unsafe(nil), Array) +# source://async-http-faraday//lib/async/http/faraday/adapter.rb#21 +class Async::HTTP::Faraday::BodyReadWrapper < ::Protocol::HTTP::Body::Readable + # @return [BodyReadWrapper] a new instance of BodyReadWrapper + # + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#22 + def initialize(body, block_size: T.unsafe(nil)); end + + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#27 + def close(error = T.unsafe(nil)); end + + # source://async-http-faraday//lib/async/http/faraday/adapter.rb#33 + def read; end +end + # source://async-http-faraday//lib/async/http/faraday/version.rb#9 Async::HTTP::Faraday::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/async-http@0.61.0.rbi b/sorbet/rbi/gems/async-http@0.69.0.rbi similarity index 82% rename from sorbet/rbi/gems/async-http@0.61.0.rbi rename to sorbet/rbi/gems/async-http@0.69.0.rbi index 6d2b8433d..7e5ff66c3 100644 --- a/sorbet/rbi/gems/async-http@0.61.0.rbi +++ b/sorbet/rbi/gems/async-http@0.69.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `async-http` gem. # Please instead update this file by running `bin/tapioca gem async-http`. + # source://async-http//lib/async/http/body/writable.rb#9 module Async; end @@ -15,35 +16,35 @@ module Async::HTTP::Body include ::Protocol::HTTP::Body end -# source://async-http//lib/async/http/body/pipe.rb#15 +# source://async-http//lib/async/http/body/pipe.rb#12 class Async::HTTP::Body::Pipe # If the input stream is closed first, it's likely the output stream will also be closed. # # @return [Pipe] a new instance of Pipe # - # source://async-http//lib/async/http/body/pipe.rb#17 + # source://async-http//lib/async/http/body/pipe.rb#14 def initialize(input, output = T.unsafe(nil), task: T.unsafe(nil)); end - # source://async-http//lib/async/http/body/pipe.rb#37 + # source://async-http//lib/async/http/body/pipe.rb#34 def close; end - # source://async-http//lib/async/http/body/pipe.rb#33 + # source://async-http//lib/async/http/body/pipe.rb#30 def to_io; end private - # source://async-http//lib/async/http/body/pipe.rb#80 + # source://async-http//lib/async/http/body/pipe.rb#77 def close_head; end # Read from the @input stream and write to the head of the pipe. # - # source://async-http//lib/async/http/body/pipe.rb#47 + # source://async-http//lib/async/http/body/pipe.rb#44 def reader(task); end # Read from the head of the pipe and write to the @output stream. # If the @tail is closed, this will cause chunk to be nil, which in turn will call `@output.close` and `@head.close` # - # source://async-http//lib/async/http/body/pipe.rb#66 + # source://async-http//lib/async/http/body/pipe.rb#63 def writer(task); end end @@ -110,7 +111,7 @@ end # source://async-http//lib/async/http/body/writable.rb#16 class Async::HTTP::Body::Writable::Closed < ::StandardError; end -# source://async-http//lib/async/http/client.rb#24 +# source://async-http//lib/async/http/client.rb#23 class Async::HTTP::Client < ::Protocol::HTTP::Methods include ::Async::HTTP::Proxy::Client @@ -126,205 +127,216 @@ class Async::HTTP::Client < ::Protocol::HTTP::Methods # @param authority [String] The default authority to set to requests. # @return [Client] a new instance of Client # - # source://async-http//lib/async/http/client.rb#34 + # source://async-http//lib/async/http/client.rb#33 def initialize(endpoint, protocol: T.unsafe(nil), scheme: T.unsafe(nil), authority: T.unsafe(nil), retries: T.unsafe(nil), connection_limit: T.unsafe(nil)); end + # source://async-http//lib/async/http/client.rb#44 + def as_json(*_arg0, **_arg1, &_arg2); end + # Returns the value of attribute authority. # - # source://async-http//lib/async/http/client.rb#52 + # source://async-http//lib/async/http/client.rb#65 def authority; end - # source://async-http//lib/async/http/client.rb#79 + # source://async-http//lib/async/http/client.rb#92 def call(request); end - # source://async-http//lib/async/http/client.rb#70 + # source://async-http//lib/async/http/client.rb#83 def close; end # Returns the value of attribute endpoint. # - # source://async-http//lib/async/http/client.rb#45 + # source://async-http//lib/async/http/client.rb#58 def endpoint; end - # source://async-http//lib/async/http/client.rb#126 + # source://async-http//lib/async/http/client.rb#140 def inspect; end # Returns the value of attribute pool. # - # source://async-http//lib/async/http/client.rb#49 + # source://async-http//lib/async/http/client.rb#62 def pool; end # Returns the value of attribute protocol. # - # source://async-http//lib/async/http/client.rb#46 + # source://async-http//lib/async/http/client.rb#59 def protocol; end # Returns the value of attribute retries. # - # source://async-http//lib/async/http/client.rb#48 + # source://async-http//lib/async/http/client.rb#61 def retries; end # Returns the value of attribute scheme. # - # source://async-http//lib/async/http/client.rb#51 + # source://async-http//lib/async/http/client.rb#64 def scheme; end # @return [Boolean] # - # source://async-http//lib/async/http/client.rb#54 + # source://async-http//lib/async/http/client.rb#67 def secure?; end + # source://async-http//lib/async/http/client.rb#54 + def to_json(*_arg0, **_arg1, &_arg2); end + protected - # source://async-http//lib/async/http/client.rb#179 + # source://async-http//lib/async/http/client.rb#193 def make_pool(connection_limit); end - # source://async-http//lib/async/http/client.rb#168 + # source://async-http//lib/async/http/client.rb#182 def make_response(request, connection); end class << self - # source://async-http//lib/async/http/client.rb#58 + # source://async-http//lib/async/http/client.rb#71 def open(*arguments, **options, &block); end end end -# source://async-http//lib/async/http/client.rb#22 +# source://async-http//lib/async/http/client.rb#21 Async::HTTP::DEFAULT_CONNECTION_LIMIT = T.let(T.unsafe(nil), T.untyped) -# source://async-http//lib/async/http/client.rb#21 +# source://async-http//lib/async/http/client.rb#20 Async::HTTP::DEFAULT_RETRIES = T.let(T.unsafe(nil), Integer) # Represents a way to connect to a remote HTTP server. # -# source://async-http//lib/async/http/endpoint.rb#17 -class Async::HTTP::Endpoint < ::Async::IO::Endpoint - # @option hostname +# source://async-http//lib/async/http/endpoint.rb#20 +class Async::HTTP::Endpoint < ::IO::Endpoint::Generic # @option scheme + # @option hostname # @option port # @option ssl_context # @option alpn_protocols - # @param hostname [Hash] a customizable set of options # @param scheme [Hash] a customizable set of options + # @param hostname [Hash] a customizable set of options # @param port [Hash] a customizable set of options # @param ssl_context [Hash] a customizable set of options # @param alpn_protocols [Hash] a customizable set of options # @raise [ArgumentError] # @return [Endpoint] a new instance of Endpoint # - # source://async-http//lib/async/http/endpoint.rb#40 + # source://async-http//lib/async/http/endpoint.rb#53 def initialize(url, endpoint = T.unsafe(nil), **options); end - # source://async-http//lib/async/http/endpoint.rb#74 + # source://async-http//lib/async/http/endpoint.rb#87 def address; end - # source://async-http//lib/async/http/endpoint.rb#132 + # source://async-http//lib/async/http/endpoint.rb#145 def alpn_protocols; end - # source://async-http//lib/async/http/endpoint.rb#113 + # source://async-http//lib/async/http/endpoint.rb#126 def authority(ignore_default_port = T.unsafe(nil)); end - # source://async-http//lib/async/http/endpoint.rb#184 + # source://async-http//lib/async/http/endpoint.rb#197 def bind(*arguments, &block); end - # source://async-http//lib/async/http/endpoint.rb#161 + # source://async-http//lib/async/http/endpoint.rb#174 def build_endpoint(endpoint = T.unsafe(nil)); end - # source://async-http//lib/async/http/endpoint.rb#188 + # source://async-http//lib/async/http/endpoint.rb#201 def connect(&block); end - # source://async-http//lib/async/http/endpoint.rb#92 + # source://async-http//lib/async/http/endpoint.rb#105 def default_port; end # @return [Boolean] # - # source://async-http//lib/async/http/endpoint.rb#96 + # source://async-http//lib/async/http/endpoint.rb#109 def default_port?; end - # source://async-http//lib/async/http/endpoint.rb#192 + # source://async-http//lib/async/http/endpoint.rb#205 def each; end - # source://async-http//lib/async/http/endpoint.rb#176 + # source://async-http//lib/async/http/endpoint.rb#189 def endpoint; end - # source://async-http//lib/async/http/endpoint.rb#180 + # source://async-http//lib/async/http/endpoint.rb#193 def endpoint=(endpoint); end # @return [Boolean] # - # source://async-http//lib/async/http/endpoint.rb#204 + # source://async-http//lib/async/http/endpoint.rb#217 def eql?(other); end - # source://async-http//lib/async/http/endpoint.rb#208 + # source://async-http//lib/async/http/endpoint.rb#221 def hash; end # The hostname is the server we are connecting to: # - # source://async-http//lib/async/http/endpoint.rb#105 + # source://async-http//lib/async/http/endpoint.rb#118 def hostname; end - # source://async-http//lib/async/http/endpoint.rb#68 + # source://async-http//lib/async/http/endpoint.rb#81 def inspect; end - # source://async-http//lib/async/http/endpoint.rb#200 + # source://async-http//lib/async/http/endpoint.rb#213 def key; end # @return [Boolean] # - # source://async-http//lib/async/http/endpoint.rb#136 + # source://async-http//lib/async/http/endpoint.rb#149 def localhost?; end # Return the path and query components of the given URL. # - # source://async-http//lib/async/http/endpoint.rb#122 + # source://async-http//lib/async/http/endpoint.rb#135 def path; end - # source://async-http//lib/async/http/endpoint.rb#100 + # source://async-http//lib/async/http/endpoint.rb#113 def port; end - # source://async-http//lib/async/http/endpoint.rb#82 + # source://async-http//lib/async/http/endpoint.rb#95 def protocol; end - # source://async-http//lib/async/http/endpoint.rb#109 + # source://async-http//lib/async/http/endpoint.rb#122 def scheme; end # @return [Boolean] # - # source://async-http//lib/async/http/endpoint.rb#78 + # source://async-http//lib/async/http/endpoint.rb#91 def secure?; end - # source://async-http//lib/async/http/endpoint.rb#149 + # source://async-http//lib/async/http/endpoint.rb#162 def ssl_context; end # We don't try to validate peer certificates when talking to localhost because they would always be self-signed. # - # source://async-http//lib/async/http/endpoint.rb#141 + # source://async-http//lib/async/http/endpoint.rb#154 def ssl_verify_mode; end - # source://async-http//lib/async/http/endpoint.rb#64 + # source://async-http//lib/async/http/endpoint.rb#77 def to_s; end - # source://async-http//lib/async/http/endpoint.rb#54 + # source://async-http//lib/async/http/endpoint.rb#67 def to_url; end # Returns the value of attribute url. # - # source://async-http//lib/async/http/endpoint.rb#72 + # source://async-http//lib/async/http/endpoint.rb#85 def url; end protected - # source://async-http//lib/async/http/endpoint.rb#227 + # source://async-http//lib/async/http/endpoint.rb#240 def tcp_endpoint; end - # source://async-http//lib/async/http/endpoint.rb#214 + # source://async-http//lib/async/http/endpoint.rb#227 def tcp_options; end class << self + # Coerce the given object into an endpoint. + # + # source://async-http//lib/async/http/endpoint.rb#40 + def [](url); end + # Construct an endpoint with a specified scheme, hostname, optional path, and options. # - # source://async-http//lib/async/http/endpoint.rb#25 + # source://async-http//lib/async/http/endpoint.rb#28 def for(scheme, hostname, path = T.unsafe(nil), **options); end - # source://async-http//lib/async/http/endpoint.rb#18 + # source://async-http//lib/async/http/endpoint.rb#21 def parse(string, endpoint = T.unsafe(nil), **options); end end end @@ -334,82 +346,105 @@ end # source://async-http//lib/async/http/protocol/request.rb#13 module Async::HTTP::Protocol; end +# HTTP is an http:// server that auto-selects HTTP/1.1 or HTTP/2 by detecting the HTTP/2 +# connection preface. +# +# source://async-http//lib/async/http/protocol/http.rb#15 +module Async::HTTP::Protocol::HTTP + class << self + # Only inbound connections can detect HTTP1 vs HTTP2 for http://. + # Outbound connections default to HTTP1. + # + # source://async-http//lib/async/http/protocol/http.rb#40 + def client(peer, **options); end + + # source://async-http//lib/async/http/protocol/http.rb#50 + def names; end + + # source://async-http//lib/async/http/protocol/http.rb#19 + def protocol_for(stream); end + + # source://async-http//lib/async/http/protocol/http.rb#44 + def server(peer, **options); end + end +end + # source://async-http//lib/async/http/protocol/http1/request.rb#11 module Async::HTTP::Protocol::HTTP1 class << self # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1.rb#15 + # source://async-http//lib/async/http/protocol/http1.rb#18 def bidirectional?; end - # source://async-http//lib/async/http/protocol/http1.rb#23 + # source://async-http//lib/async/http/protocol/http1.rb#26 def client(peer); end - # source://async-http//lib/async/http/protocol/http1.rb#35 + # source://async-http//lib/async/http/protocol/http1.rb#38 def names; end - # source://async-http//lib/async/http/protocol/http1.rb#29 + # source://async-http//lib/async/http/protocol/http1.rb#32 def server(peer); end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1.rb#19 + # source://async-http//lib/async/http/protocol/http1.rb#22 def trailer?; end end end -# source://async-http//lib/async/http/protocol/http10.rb#11 +# source://async-http//lib/async/http/protocol/http10.rb#12 module Async::HTTP::Protocol::HTTP10 class << self # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http10.rb#14 + # source://async-http//lib/async/http/protocol/http10.rb#15 def bidirectional?; end - # source://async-http//lib/async/http/protocol/http10.rb#22 + # source://async-http//lib/async/http/protocol/http10.rb#23 def client(peer); end - # source://async-http//lib/async/http/protocol/http10.rb#34 + # source://async-http//lib/async/http/protocol/http10.rb#35 def names; end - # source://async-http//lib/async/http/protocol/http10.rb#28 + # source://async-http//lib/async/http/protocol/http10.rb#29 def server(peer); end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http10.rb#18 + # source://async-http//lib/async/http/protocol/http10.rb#19 def trailer?; end end end -# source://async-http//lib/async/http/protocol/http10.rb#12 +# source://async-http//lib/async/http/protocol/http10.rb#13 Async::HTTP::Protocol::HTTP10::VERSION = T.let(T.unsafe(nil), String) -# source://async-http//lib/async/http/protocol/http11.rb#12 +# source://async-http//lib/async/http/protocol/http11.rb#13 module Async::HTTP::Protocol::HTTP11 class << self # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http11.rb#15 + # source://async-http//lib/async/http/protocol/http11.rb#16 def bidirectional?; end - # source://async-http//lib/async/http/protocol/http11.rb#23 + # source://async-http//lib/async/http/protocol/http11.rb#24 def client(peer); end - # source://async-http//lib/async/http/protocol/http11.rb#35 + # source://async-http//lib/async/http/protocol/http11.rb#36 def names; end - # source://async-http//lib/async/http/protocol/http11.rb#29 + # source://async-http//lib/async/http/protocol/http11.rb#30 def server(peer); end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http11.rb#19 + # source://async-http//lib/async/http/protocol/http11.rb#20 def trailer?; end end end -# source://async-http//lib/async/http/protocol/http11.rb#13 +# source://async-http//lib/async/http/protocol/http11.rb#14 Async::HTTP::Protocol::HTTP11::VERSION = T.let(T.unsafe(nil), String) # source://async-http//lib/async/http/protocol/http1/client.rb#12 @@ -427,50 +462,59 @@ class Async::HTTP::Protocol::HTTP1::Connection < ::Protocol::HTTP1::Connection # source://async-http//lib/async/http/protocol/http1/connection.rb#16 def initialize(stream, version); end - # source://async-http//lib/async/http/protocol/http1/connection.rb#47 + # source://async-http//lib/async/http/protocol/http1/connection.rb#27 + def as_json(*_arg0, **_arg1, &_arg2); end + + # source://async-http//lib/async/http/protocol/http1/connection.rb#59 def concurrency; end # Returns the value of attribute count. # - # source://async-http//lib/async/http/protocol/http1/connection.rb#45 + # source://async-http//lib/async/http/protocol/http1/connection.rb#57 def count; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1/connection.rb#25 + # source://async-http//lib/async/http/protocol/http1/connection.rb#37 def http1?; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1/connection.rb#29 + # source://async-http//lib/async/http/protocol/http1/connection.rb#41 def http2?; end - # source://async-http//lib/async/http/protocol/http1/connection.rb#41 + # source://async-http//lib/async/http/protocol/http1/connection.rb#53 def peer; end - # source://async-http//lib/async/http/protocol/http1/connection.rb#37 + # source://async-http//lib/async/http/protocol/http1/connection.rb#49 def read_line; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1/connection.rb#33 + # source://async-http//lib/async/http/protocol/http1/connection.rb#45 def read_line?; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1/connection.rb#56 + # source://async-http//lib/async/http/protocol/http1/connection.rb#68 def reusable?; end + # source://async-http//lib/async/http/protocol/http1/connection.rb#31 + def to_json(*_arg0, **_arg1, &_arg2); end + + # source://async-http//lib/async/http/protocol/http1/connection.rb#23 + def to_s; end + # Returns the value of attribute version. # - # source://async-http//lib/async/http/protocol/http1/connection.rb#23 + # source://async-http//lib/async/http/protocol/http1/connection.rb#35 def version; end # Can we use this connection to make requests? # # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1/connection.rb#52 + # source://async-http//lib/async/http/protocol/http1/connection.rb#64 def viable?; end end @@ -504,53 +548,53 @@ end # source://async-http//lib/async/http/protocol/http1/request.rb#19 Async::HTTP::Protocol::HTTP1::Request::UPGRADE = T.let(T.unsafe(nil), String) -# source://async-http//lib/async/http/protocol/http1/response.rb#12 +# source://async-http//lib/async/http/protocol/http1/response.rb#13 class Async::HTTP::Protocol::HTTP1::Response < ::Async::HTTP::Protocol::Response # @return [Response] a new instance of Response # - # source://async-http//lib/async/http/protocol/http1/response.rb#29 + # source://async-http//lib/async/http/protocol/http1/response.rb#30 def initialize(connection, version, status, reason, headers, body); end - # source://async-http//lib/async/http/protocol/http1/response.rb#38 + # source://async-http//lib/async/http/protocol/http1/response.rb#39 def connection; end - # source://async-http//lib/async/http/protocol/http1/response.rb#46 + # source://async-http//lib/async/http/protocol/http1/response.rb#47 def hijack!; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http1/response.rb#42 + # source://async-http//lib/async/http/protocol/http1/response.rb#43 def hijack?; end # Returns the value of attribute reason. # - # source://async-http//lib/async/http/protocol/http1/response.rb#26 + # source://async-http//lib/async/http/protocol/http1/response.rb#27 def reason; end class << self - # source://async-http//lib/async/http/protocol/http1/response.rb#13 + # source://async-http//lib/async/http/protocol/http1/response.rb#14 def read(connection, request); end end end -# source://async-http//lib/async/http/protocol/http1/response.rb#23 +# source://async-http//lib/async/http/protocol/http1/response.rb#24 Async::HTTP::Protocol::HTTP1::Response::UPGRADE = T.let(T.unsafe(nil), String) -# source://async-http//lib/async/http/protocol/http1/server.rb#14 +# source://async-http//lib/async/http/protocol/http1/server.rb#15 class Async::HTTP::Protocol::HTTP1::Server < ::Async::HTTP::Protocol::HTTP1::Connection # Server loop. # - # source://async-http//lib/async/http/protocol/http1/server.rb#46 + # source://async-http//lib/async/http/protocol/http1/server.rb#47 def each(task: T.unsafe(nil)); end - # source://async-http//lib/async/http/protocol/http1/server.rb#15 + # source://async-http//lib/async/http/protocol/http1/server.rb#16 def fail_request(status); end - # source://async-http//lib/async/http/protocol/http1/server.rb#23 + # source://async-http//lib/async/http/protocol/http1/server.rb#24 def next_request; end end -# source://async-http//lib/async/http/protocol/http1.rb#13 +# source://async-http//lib/async/http/protocol/http1.rb#16 Async::HTTP::Protocol::HTTP1::VERSION = T.let(T.unsafe(nil), String) # source://async-http//lib/async/http/protocol/http2/input.rb#11 @@ -558,21 +602,21 @@ module Async::HTTP::Protocol::HTTP2 class << self # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2.rb#15 + # source://async-http//lib/async/http/protocol/http2.rb#18 def bidirectional?; end - # source://async-http//lib/async/http/protocol/http2.rb#37 + # source://async-http//lib/async/http/protocol/http2.rb#40 def client(peer, settings = T.unsafe(nil)); end - # source://async-http//lib/async/http/protocol/http2.rb#59 + # source://async-http//lib/async/http/protocol/http2.rb#60 def names; end - # source://async-http//lib/async/http/protocol/http2.rb#48 + # source://async-http//lib/async/http/protocol/http2.rb#50 def server(peer, settings = T.unsafe(nil)); end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2.rb#19 + # source://async-http//lib/async/http/protocol/http2.rb#22 def trailer?; end end end @@ -580,7 +624,7 @@ end # source://async-http//lib/async/http/protocol/http2/connection.rb#19 Async::HTTP::Protocol::HTTP2::AUTHORITY = T.let(T.unsafe(nil), String) -# source://async-http//lib/async/http/protocol/http2.rb#23 +# source://async-http//lib/async/http/protocol/http2.rb#26 Async::HTTP::Protocol::HTTP2::CLIENT_SETTINGS = T.let(T.unsafe(nil), Hash) # source://async-http//lib/async/http/protocol/http2/connection.rb#24 @@ -614,71 +658,74 @@ module Async::HTTP::Protocol::HTTP2::Connection # source://async-http//lib/async/http/protocol/http2/connection.rb#28 def initialize(*_arg0); end - # source://async-http//lib/async/http/protocol/http2/connection.rb#56 + # source://async-http//lib/async/http/protocol/http2/connection.rb#46 + def as_json(*_arg0, **_arg1, &_arg2); end + + # source://async-http//lib/async/http/protocol/http2/connection.rb#68 def close(error = T.unsafe(nil)); end - # source://async-http//lib/async/http/protocol/http2/connection.rb#123 + # source://async-http//lib/async/http/protocol/http2/connection.rb#118 def concurrency; end # Returns the value of attribute count. # - # source://async-http//lib/async/http/protocol/http2/connection.rb#121 + # source://async-http//lib/async/http/protocol/http2/connection.rb#116 def count; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2/connection.rb#44 + # source://async-http//lib/async/http/protocol/http2/connection.rb#56 def http1?; end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2/connection.rb#48 + # source://async-http//lib/async/http/protocol/http2/connection.rb#60 def http2?; end - # source://async-http//lib/async/http/protocol/http2/connection.rb#117 + # source://async-http//lib/async/http/protocol/http2/connection.rb#112 def peer; end # Returns the value of attribute promises. # - # source://async-http//lib/async/http/protocol/http2/connection.rb#115 + # source://async-http//lib/async/http/protocol/http2/connection.rb#110 def promises; end # @raise [RuntimeError] # - # source://async-http//lib/async/http/protocol/http2/connection.rb#84 + # source://async-http//lib/async/http/protocol/http2/connection.rb#79 def read_in_background(parent: T.unsafe(nil)); end # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2/connection.rb#132 + # source://async-http//lib/async/http/protocol/http2/connection.rb#127 def reusable?; end - # source://async-http//lib/async/http/protocol/http2/connection.rb#52 + # source://async-http//lib/async/http/protocol/http2/connection.rb#64 def start_connection; end # Returns the value of attribute stream. # - # source://async-http//lib/async/http/protocol/http2/connection.rb#42 + # source://async-http//lib/async/http/protocol/http2/connection.rb#54 def stream; end # source://async-http//lib/async/http/protocol/http2/connection.rb#38 + def synchronize(&block); end + + # source://async-http//lib/async/http/protocol/http2/connection.rb#50 + def to_json(*_arg0, **_arg1, &_arg2); end + + # source://async-http//lib/async/http/protocol/http2/connection.rb#42 def to_s; end - # source://async-http//lib/async/http/protocol/http2/connection.rb#136 + # source://async-http//lib/async/http/protocol/http2/connection.rb#131 def version; end # Can we use this connection to make requests? # # @return [Boolean] # - # source://async-http//lib/async/http/protocol/http2/connection.rb#128 + # source://async-http//lib/async/http/protocol/http2/connection.rb#123 def viable?; end - - # source://async-http//lib/async/http/protocol/http2/connection.rb#67 - def write_frame(frame); end - - # source://async-http//lib/async/http/protocol/http2/connection.rb#76 - def write_frames(&block); end end # source://async-http//lib/async/http/protocol/http2/connection.rb#15 @@ -899,7 +946,7 @@ end # source://async-http//lib/async/http/protocol/http2/connection.rb#16 Async::HTTP::Protocol::HTTP2::SCHEME = T.let(T.unsafe(nil), String) -# source://async-http//lib/async/http/protocol/http2.rb#29 +# source://async-http//lib/async/http/protocol/http2.rb#32 Async::HTTP::Protocol::HTTP2::SERVER_SETTINGS = T.let(T.unsafe(nil), Hash) # source://async-http//lib/async/http/protocol/http2/connection.rb#20 @@ -929,14 +976,14 @@ class Async::HTTP::Protocol::HTTP2::Server < ::Protocol::HTTP2::Server def requests; end end -# source://async-http//lib/async/http/protocol/http2/stream.rb#16 +# source://async-http//lib/async/http/protocol/http2/stream.rb#17 class Async::HTTP::Protocol::HTTP2::Stream < ::Protocol::HTTP2::Stream # @return [Stream] a new instance of Stream # - # source://async-http//lib/async/http/protocol/http2/stream.rb#17 + # source://async-http//lib/async/http/protocol/http2/stream.rb#18 def initialize(*_arg0); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#34 + # source://async-http//lib/async/http/protocol/http2/stream.rb#35 def add_header(key, value); end # When the stream transitions to the closed state, this method is called. There are roughly two ways this can happen: @@ -944,90 +991,96 @@ class Async::HTTP::Protocol::HTTP2::Stream < ::Protocol::HTTP2::Stream # - A frame is sent which causes this stream to enter the closed state. This method will be invoked from that task. # While the input stream is relatively straight forward, the output stream can trigger the second case above # - # source://async-http//lib/async/http/protocol/http2/stream.rb#148 + # source://async-http//lib/async/http/protocol/http2/stream.rb#149 def closed(error); end # Called when the output terminates normally. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#121 + # source://async-http//lib/async/http/protocol/http2/stream.rb#122 def finish_output(error = T.unsafe(nil)); end # Returns the value of attribute headers. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#30 + # source://async-http//lib/async/http/protocol/http2/stream.rb#31 def headers; end # Sets the attribute headers # # @param value the value to set the attribute headers to. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#30 + # source://async-http//lib/async/http/protocol/http2/stream.rb#31 def headers=(_arg0); end # Returns the value of attribute input. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#32 + # source://async-http//lib/async/http/protocol/http2/stream.rb#33 def input; end # Prepare the input stream which will be used for incoming data frames. # # @return [Input] the input body. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#77 + # source://async-http//lib/async/http/protocol/http2/stream.rb#78 def prepare_input(length); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#92 + # source://async-http//lib/async/http/protocol/http2/stream.rb#93 def process_data(frame); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#52 + # source://async-http//lib/async/http/protocol/http2/stream.rb#53 def process_headers(frame); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#46 + # source://async-http//lib/async/http/protocol/http2/stream.rb#47 def receive_trailing_headers(headers, end_stream); end # Set the body and begin sending it. # - # source://async-http//lib/async/http/protocol/http2/stream.rb#114 + # source://async-http//lib/async/http/protocol/http2/stream.rb#115 def send_body(body, trailer = T.unsafe(nil)); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#85 + # source://async-http//lib/async/http/protocol/http2/stream.rb#86 def update_local_window(frame); end - # source://async-http//lib/async/http/protocol/http2/stream.rb#71 + # source://async-http//lib/async/http/protocol/http2/stream.rb#72 def wait_for_input; end - # source://async-http//lib/async/http/protocol/http2/stream.rb#138 + # source://async-http//lib/async/http/protocol/http2/stream.rb#139 def window_updated(size); end end # source://async-http//lib/async/http/protocol/http2/connection.rb#25 Async::HTTP::Protocol::HTTP2::TRAILER = T.let(T.unsafe(nil), String) -# source://async-http//lib/async/http/protocol/http2.rb#13 +# source://async-http//lib/async/http/protocol/http2.rb#16 Async::HTTP::Protocol::HTTP2::VERSION = T.let(T.unsafe(nil), String) +# source://async-http//lib/async/http/protocol/http.rb#16 +Async::HTTP::Protocol::HTTP::HTTP2_PREFACE = T.let(T.unsafe(nil), String) + +# source://async-http//lib/async/http/protocol/http.rb#17 +Async::HTTP::Protocol::HTTP::HTTP2_PREFACE_SIZE = T.let(T.unsafe(nil), Integer) + # A server that supports both HTTP1.0 and HTTP1.1 semantics by detecting the version of the request. # -# source://async-http//lib/async/http/protocol/https.rb#34 +# source://async-http//lib/async/http/protocol/https.rb#16 module Async::HTTP::Protocol::HTTPS class << self - # source://async-http//lib/async/http/protocol/https.rb#55 + # source://async-http//lib/async/http/protocol/https.rb#37 def client(peer); end # Supported Application Layer Protocol Negotiation names: # - # source://async-http//lib/async/http/protocol/https.rb#64 + # source://async-http//lib/async/http/protocol/https.rb#46 def names; end - # source://async-http//lib/async/http/protocol/https.rb#42 + # source://async-http//lib/async/http/protocol/https.rb#24 def protocol_for(peer); end - # source://async-http//lib/async/http/protocol/https.rb#59 + # source://async-http//lib/async/http/protocol/https.rb#41 def server(peer); end end end -# source://async-http//lib/async/http/protocol/https.rb#35 +# source://async-http//lib/async/http/protocol/https.rb#17 Async::HTTP::Protocol::HTTPS::HANDLERS = T.let(T.unsafe(nil), Hash) # This is generated by server protocols. @@ -1133,7 +1186,7 @@ class Async::HTTP::Proxy # @param host [String] the hostname or address to connect to. # @param port [String] the port number to connect to. # @param headers [Array] an optional list of headers to use when establishing the connection. - # @see Async::IO::Endpoint#tcp + # @see IO::Endpoint#tcp # # source://async-http//lib/async/http/proxy.rb#50 def tcp(client, host, port, headers = T.unsafe(nil)); end diff --git a/sorbet/rbi/gems/async-io@1.36.1.rbi b/sorbet/rbi/gems/async-io@1.36.1.rbi deleted file mode 100644 index 78bb0fbab..000000000 --- a/sorbet/rbi/gems/async-io@1.36.1.rbi +++ /dev/null @@ -1,1089 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `async-io` gem. -# Please instead update this file by running `bin/tapioca gem async-io`. - -# source://async-io//lib/async/io/address.rb#8 -module Async; end - -# source://async-io//lib/async/io/address.rb#9 -module Async::IO - class << self - # source://async-io//lib/async/io/generic.rb#27 - def pipe; end - - # Convert a Ruby ::IO object to a wrapped instance: - # - # source://async-io//lib/async/io/generic.rb#19 - def try_convert(io, &block); end - end -end - -# source://async-io//lib/async/io/address.rb#10 -Async::IO::Address = Addrinfo - -# This class will open and close the socket automatically. -# -# source://async-io//lib/async/io/address_endpoint.rb#11 -class Async::IO::AddressEndpoint < ::Async::IO::Endpoint - # @return [AddressEndpoint] a new instance of AddressEndpoint - # - # source://async-io//lib/async/io/address_endpoint.rb#12 - def initialize(address, **options); end - - # Returns the value of attribute address. - # - # source://async-io//lib/async/io/address_endpoint.rb#22 - def address; end - - # Bind a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. - # - # @return [Socket] the bound socket - # @yield [Socket] the bound socket - # - # source://async-io//lib/async/io/address_endpoint.rb#27 - def bind(&block); end - - # Connects a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. - # - # @return [Socket] the connected socket - # - # source://async-io//lib/async/io/address_endpoint.rb#33 - def connect(&block); end - - # source://async-io//lib/async/io/address_endpoint.rb#18 - def to_s; end -end - -# The default block size for IO buffers. Defaults to 64KB (typical pipe buffer size). -# -# source://async-io//lib/async/io/generic.rb#13 -Async::IO::BLOCK_SIZE = T.let(T.unsafe(nil), Integer) - -# source://async-io//lib/async/io/socket.rb#17 -class Async::IO::BasicSocket < ::Async::IO::Generic - include ::Socket::Constants - include ::Async::IO::Peer - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_read(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_write(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def connect_address(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def do_not_reverse_lookup(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def do_not_reverse_lookup=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def getpeereid(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def getpeername(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def getsockname(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def getsockopt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def local_address(*args, **_arg1, &block); end - - # Invokes `recv_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def recv(*args); end - - # source://async-io//lib/async/io/generic.rb#52 - def recv_nonblock(*args, exception: T.unsafe(nil)); end - - # Invokes `recvmsg_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def recvmsg(*args); end - - # source://async-io//lib/async/io/generic.rb#52 - def recvmsg_nonblock(*args, exception: T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def remote_address(*args, **_arg1, &block); end - - # Invokes `sendmsg_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def send(*args); end - - # Invokes `sendmsg_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def sendmsg(*args); end - - # source://async-io//lib/async/io/generic.rb#52 - def sendmsg_nonblock(*args, exception: T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def setsockopt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def shutdown(*args, **_arg1, &block); end -end - -# source://async-io//lib/async/io/buffer.rb#8 -class Async::IO::Buffer < ::String - # @return [Buffer] a new instance of Buffer - # - # source://async-io//lib/async/io/buffer.rb#11 - def initialize; end - - # source://async-io//lib/async/io/buffer.rb#17 - def <<(string); end - - # source://async-io//lib/async/io/buffer.rb#17 - def concat(string); end -end - -# source://async-io//lib/async/io/buffer.rb#9 -Async::IO::Buffer::BINARY = T.let(T.unsafe(nil), Encoding) - -# Endpoints represent a way of connecting or binding to an address. -# -# source://async-io//lib/async/io/endpoint.rb#15 -class Async::IO::Endpoint - # @return [Endpoint] a new instance of Endpoint - # - # source://async-io//lib/async/io/endpoint.rb#16 - def initialize(**options); end - - # Accept connections from the specified endpoint. - # - # @param backlog [Integer] the number of connections to listen for. - # - # source://async-io//lib/async/io/endpoint.rb#73 - def accept(backlog = T.unsafe(nil), &block); end - - # Map all endpoints by invoking `#bind`. - # - # @yield the bound wrapper. - # - # source://async-io//lib/async/io/endpoint.rb#83 - def bound; end - - # Endpoints sometimes have multiple paths. - # - # @yield [Endpoint] Enumerate all discrete paths as endpoints. - # - # source://async-io//lib/async/io/endpoint.rb#65 - def each; end - - # @return [String] The hostname of the bound socket. - # - # source://async-io//lib/async/io/endpoint.rb#31 - def hostname; end - - # Controls SO_LINGER. The amount of time the socket will stay in the `TIME_WAIT` state after being closed. - # - # @return [Integer, nil] The value for SO_LINGER. - # - # source://async-io//lib/async/io/endpoint.rb#49 - def linger; end - - # @return [Address] the address to bind to before connecting. - # - # source://async-io//lib/async/io/endpoint.rb#59 - def local_address; end - - # Returns the value of attribute options. - # - # source://async-io//lib/async/io/endpoint.rb#28 - def options; end - - # Sets the attribute options - # - # @param value the value to set the attribute options to. - # - # source://async-io//lib/async/io/endpoint.rb#28 - def options=(_arg0); end - - # If `SO_REUSEADDR` is enabled on a socket prior to binding it, the socket can be successfully bound unless there is a conflict with another socket bound to exactly the same combination of source address and port. Additionally, when set, binding a socket to the address of an existing socket in `TIME_WAIT` is not an error. - # - # @return [Boolean] The value for `SO_REUSEADDR`. - # - # source://async-io//lib/async/io/endpoint.rb#43 - def reuse_address; end - - # If `SO_REUSEPORT` is enabled on a socket, the socket can be successfully bound even if there are existing sockets bound to the same address, as long as all prior bound sockets also had `SO_REUSEPORT` set before they were bound. - # - # @return [Boolean, nil] The value for `SO_REUSEPORT`. - # - # source://async-io//lib/async/io/endpoint.rb#37 - def reuse_port; end - - # @return [Numeric] The default timeout for socket operations. - # - # source://async-io//lib/async/io/endpoint.rb#54 - def timeout; end - - # source://async-io//lib/async/io/endpoint.rb#20 - def with(**options); end - - class << self - # Create an Endpoint instance by URI scheme. The host and port of the URI will be passed to the Endpoint factory method, along with any options. - # - # @param string [String] URI as string. Scheme will decide implementation used. - # @param options keyword arguments passed through to {#initialize} - # @see Endpoint.ssl ssl - invoked when parsing a URL with the ssl scheme "ssl://127.0.0.1" - # @see Endpoint.tcp tcp - invoked when parsing a URL with the tcp scheme: "tcp://127.0.0.1" - # @see Endpoint.udp udp - invoked when parsing a URL with the udp scheme: "udp://127.0.0.1" - # @see Endpoint.unix unix - invoked when parsing a URL with the unix scheme: "unix://127.0.0.1" - # - # source://async-io//lib/async/io/endpoint.rb#107 - def parse(string, **options); end - - # @param args - # @param ssl_context [OpenSSL::SSL::SSLContext, nil] - # @param hostname [String, nil] - # @param options keyword arguments passed through to {Endpoint.tcp} - # @return [SSLEndpoint] - # - # source://async-io//lib/async/io/ssl_endpoint.rb#98 - def ssl(*args, ssl_context: T.unsafe(nil), hostname: T.unsafe(nil), **options); end - - # @param args nodename, service, family, socktype, protocol, flags. `socktype` will be set to Socket::SOCK_STREAM. - # @param options keyword arguments passed on to {HostEndpoint#initialize} - # @return [HostEndpoint] - # - # source://async-io//lib/async/io/host_endpoint.rb#85 - def tcp(*args, **options); end - - # @param args nodename, service, family, socktype, protocol, flags. `socktype` will be set to Socket::SOCK_DGRAM. - # @param options keyword arguments passed on to {HostEndpoint#initialize} - # @return [HostEndpoint] - # - # source://async-io//lib/async/io/host_endpoint.rb#95 - def udp(*args, **options); end - end -end - -# Represents an asynchronous IO within a reactor. -# -# source://async-io//lib/async/io/generic.rb#32 -class Async::IO::Generic < ::Async::Wrapper - extend ::Forwardable - - # source://async-io//lib/async/io/generic.rb#154 - def <<(buffer); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def advise(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def autoclose=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def autoclose?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def binmode(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def binmode?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_on_exec=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_on_exec?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_read(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_write(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def closed?(*args, **_arg1, &block); end - - # @return [Boolean] - # - # source://async-io//lib/async/io/generic.rb#190 - def connected?; end - - # source://async-io//lib/async/io/generic.rb#159 - def dup; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def eof(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def eof?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def external_encoding(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def fcntl(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def fdatasync(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def fileno(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def flush(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def fsync(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def internal_encoding(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def ioctl(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def isatty(*args, **_arg1, &block); end - - # source://async-io//lib/async/io/generic.rb#178 - def nonblock; end - - # source://async-io//lib/async/io/generic.rb#182 - def nonblock=(value); end - - # @return [Boolean] - # - # source://async-io//lib/async/io/generic.rb#186 - def nonblock?; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def nread(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def path(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pathconf(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pid(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pos(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pos=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pread(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pwrite(*args, **_arg1, &block); end - - # Read `length` bytes of data from the underlying I/O. If length is unspecified, read everything. - # - # source://async-io//lib/async/io/generic.rb#95 - def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - - # source://async-io//lib/async/io/generic.rb#52 - def read_nonblock(*args, exception: T.unsafe(nil)); end - - # source://async-io//lib/async/io/generic.rb#52 - def readpartial(*args, exception: T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def ready?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def reopen(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def rewind(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def seek(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def set_encoding(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def set_encoding_by_bom(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def stat(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def sync(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def sync=(*args, **_arg1, &block); end - - # Read the specified number of bytes from the input stream. This is fast path. - # Invokes `read_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # @example - # data = io.sysread(512) - # - # source://async-io//lib/async/io/generic.rb#45 - def sysread(*args); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def sysseek(*args, **_arg1, &block); end - - # Write entire buffer to output stream. This is fast path. - # Invokes `write_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # @example - # io.syswrite("Hello World") - # - # source://async-io//lib/async/io/generic.rb#45 - def syswrite(*args); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def tell(*args, **_arg1, &block); end - - # Returns the value of attribute timeout. - # - # source://async-io//lib/async/io/generic.rb#194 - def timeout; end - - # Sets the attribute timeout - # - # @param value the value to set the attribute timeout to. - # - # source://async-io//lib/async/io/generic.rb#194 - def timeout=(_arg0); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_i(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_io(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_path(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def tty?(*args, **_arg1, &block); end - - # source://async-io//lib/async/io/generic.rb#165 - def wait(timeout = T.unsafe(nil), mode = T.unsafe(nil)); end - - # source://async-io//lib/async/io/generic.rb#138 - def write(buffer); end - - # source://async-io//lib/async/io/generic.rb#52 - def write_nonblock(*args, exception: T.unsafe(nil)); end - - protected - - # source://async-io//lib/async/io/generic.rb#198 - def async_send(*arguments, timeout: T.unsafe(nil)); end - - class << self - # Instantiate a wrapped instance of the class, and optionally yield it to a given block, closing it afterwards. - # - # source://async-io//lib/async/io/generic.rb#72 - def wrap(*args); end - - # source://async-io//lib/async/io/generic.rb#41 - def wrap_blocking_method(new_name, method_name, invert: T.unsafe(nil), &block); end - - # Returns the value of attribute wrapped_klass. - # - # source://async-io//lib/async/io/generic.rb#58 - def wrapped_klass; end - - # source://async-io//lib/async/io/generic.rb#60 - def wraps(klass, *additional_methods); end - end -end - -# source://async-io//lib/async/io/generic.rb#35 -Async::IO::Generic::WRAPPERS = T.let(T.unsafe(nil), Hash) - -# source://async-io//lib/async/io/host_endpoint.rb#12 -class Async::IO::HostEndpoint < ::Async::IO::Endpoint - # @return [HostEndpoint] a new instance of HostEndpoint - # - # source://async-io//lib/async/io/host_endpoint.rb#13 - def initialize(specification, **options); end - - # source://async-io//lib/async/io/host_endpoint.rb#25 - def address; end - - # Invokes the given block for every address which can be bound to. - # - # @return [Array] an array of bound sockets - # @yield [Socket] the bound socket - # - # source://async-io//lib/async/io/host_endpoint.rb#64 - def bind(&block); end - - # Try to connect to the given host by connecting to each address in sequence until a connection is made. - # - # @raise if no connection could complete successfully - # @return [Socket] the connected socket - # @yield [Socket] the socket which is being connected, may be invoked more than once - # - # source://async-io//lib/async/io/host_endpoint.rb#37 - def connect; end - - # @yield [AddressEndpoint] address endpoints by resolving the given host specification - # - # source://async-io//lib/async/io/host_endpoint.rb#71 - def each; end - - # source://async-io//lib/async/io/host_endpoint.rb#29 - def hostname; end - - # source://async-io//lib/async/io/host_endpoint.rb#19 - def to_s; end -end - -# source://async-io//lib/async/io/socket.rb#177 -class Async::IO::IPSocket < ::Async::IO::BasicSocket - # source://forwardable/1.3.3/forwardable.rb#231 - def addr(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def peeraddr(*args, **_arg1, &block); end - - # Invokes `recvfrom_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def recvfrom(*args); end - - # source://async-io//lib/async/io/generic.rb#52 - def recvfrom_nonblock(*args, exception: T.unsafe(nil)); end -end - -# The maximum read size when appending to IO buffers. Defaults to 8MB. -# -# source://async-io//lib/async/io/generic.rb#16 -Async::IO::MAXIMUM_READ_SIZE = T.let(T.unsafe(nil), Integer) - -# source://async-io//lib/async/io/peer.rb#10 -module Async::IO::Peer - include ::Socket::Constants - - # Is it likely that the socket is still connected? - # May return false positive, but won't return false negative. - # - # @return [Boolean] - # - # source://async-io//lib/async/io/peer.rb#15 - def connected?; end - - # source://async-io//lib/async/io/peer.rb#32 - def eof; end - - # @return [Boolean] - # - # source://async-io//lib/async/io/peer.rb#36 - def eof?; end - - # source://async-io//lib/async/io/peer.rb#70 - def protocol; end - - # source://async-io//lib/async/io/peer.rb#57 - def sync; end - - # Best effort to set *_NODELAY if it makes sense. Swallows errors where possible. - # - # source://async-io//lib/async/io/peer.rb#41 - def sync=(value); end - - # source://async-io//lib/async/io/peer.rb#66 - def type; end -end - -# source://async-io//lib/async/io/ssl_endpoint.rb#12 -class Async::IO::SSLEndpoint < ::Async::IO::Endpoint - # @return [SSLEndpoint] a new instance of SSLEndpoint - # - # source://async-io//lib/async/io/ssl_endpoint.rb#13 - def initialize(endpoint, **options); end - - # source://async-io//lib/async/io/ssl_endpoint.rb#29 - def address; end - - # Connect to the underlying endpoint and establish a SSL connection. - # - # @return [Socket] the connected socket - # @yield [Socket] the socket which is being connected - # - # source://async-io//lib/async/io/ssl_endpoint.rb#62 - def bind; end - - # source://async-io//lib/async/io/ssl_endpoint.rb#44 - def build_context(context = T.unsafe(nil)); end - - # Connect to the underlying endpoint and establish a SSL connection. - # - # @return [Socket] the connected socket - # @yield [Socket] the socket which is being connected - # - # source://async-io//lib/async/io/ssl_endpoint.rb#75 - def connect(&block); end - - # source://async-io//lib/async/io/ssl_endpoint.rb#55 - def context; end - - # source://async-io//lib/async/io/ssl_endpoint.rb#79 - def each; end - - # Returns the value of attribute endpoint. - # - # source://async-io//lib/async/io/ssl_endpoint.rb#37 - def endpoint; end - - # source://async-io//lib/async/io/ssl_endpoint.rb#33 - def hostname; end - - # Returns the value of attribute options. - # - # source://async-io//lib/async/io/ssl_endpoint.rb#38 - def options; end - - # source://async-io//lib/async/io/ssl_endpoint.rb#40 - def params; end - - # source://async-io//lib/async/io/ssl_endpoint.rb#25 - def to_s; end -end - -# source://async-io//lib/async/io/ssl_socket.rb#12 -Async::IO::SSLError = OpenSSL::SSL::SSLError - -# We reimplement this from scratch because the native implementation doesn't expose the underlying server/context that we need to implement non-blocking accept. -# -# source://async-io//lib/async/io/ssl_socket.rb#90 -class Async::IO::SSLServer - include ::Async::IO::Server - extend ::Forwardable - - # @return [SSLServer] a new instance of SSLServer - # - # source://async-io//lib/async/io/ssl_socket.rb#93 - def initialize(server, context); end - - # source://async-io//lib/async/io/ssl_socket.rb#115 - def accept(task: T.unsafe(nil), **options); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def close_on_exec=(*args, **_arg1, &block); end - - # Returns the value of attribute context. - # - # source://async-io//lib/async/io/ssl_socket.rb#109 - def context; end - - # source://async-io//lib/async/io/ssl_socket.rb#102 - def dup; end - - # source://async-io//lib/async/io/ssl_socket.rb#98 - def fileno; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def getsockopt(*args, **_arg1, &block); end - - # source://async-io//lib/async/io/ssl_socket.rb#111 - def listen(*args); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def local_address(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def reactor=(*args, **_arg1, &block); end - - # Returns the value of attribute server. - # - # source://async-io//lib/async/io/ssl_socket.rb#108 - def server; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def setsockopt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def timeout(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def timeout=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def to_io(*args, **_arg1, &block); end -end - -# Asynchronous TCP socket wrapper. -# -# source://async-io//lib/async/io/ssl_socket.rb#15 -class Async::IO::SSLSocket < ::Async::IO::Generic - include ::Socket::Constants - include ::Async::IO::Peer - - # @return [SSLSocket] a new instance of SSLSocket - # - # source://async-io//lib/async/io/ssl_socket.rb#49 - def initialize(socket, context); end - - # Invokes `accept_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def accept(*args); end - - # source://async-io//lib/async/io/generic.rb#52 - def accept_nonblock(*args, exception: T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def alpn_protocol(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def cert(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def cipher(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def client_ca(*args, **_arg1, &block); end - - # source://async-io//lib/async/io/ssl_socket.rb#79 - def close_read; end - - # source://async-io//lib/async/io/ssl_socket.rb#74 - def close_write; end - - # Invokes `connect_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def connect(*args); end - - # source://async-io//lib/async/io/generic.rb#52 - def connect_nonblock(*args, exception: T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def context(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def export_keying_material(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def finished_message(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def getsockopt(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hostname(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def hostname=(*args, **_arg1, &block); end - - # source://async-io//lib/async/io/ssl_socket.rb#66 - def local_address; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def npn_protocol(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def peer_cert(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def peer_cert_chain(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def peer_finished_message(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pending(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def post_connection_check(*args, **_arg1, &block); end - - # source://async-io//lib/async/io/ssl_socket.rb#70 - def remote_address; end - - # source://forwardable/1.3.3/forwardable.rb#231 - def session(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def session=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def session_reused?(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def setsockopt(*args, **_arg1, &block); end - - # source://async-io//lib/async/io/ssl_socket.rb#83 - def shutdown(how); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def ssl_version(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def state(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def sync_close(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def sync_close=(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def sysclose(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def tmp_key(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def verify_result(*args, **_arg1, &block); end - - class << self - # source://async-io//lib/async/io/ssl_socket.rb#21 - def connect(socket, context, hostname = T.unsafe(nil), &block); end - end -end - -# Backwards compatibility. -# -# source://async-io//lib/async/io/ssl_endpoint.rb#89 -Async::IO::SecureEndpoint = Async::IO::SSLEndpoint - -# source://async-io//lib/async/io/server.rb#10 -module Async::IO::Server - # source://async-io//lib/async/io/server.rb#11 - def accept_each(timeout: T.unsafe(nil), task: T.unsafe(nil)); end -end - -# source://async-io//lib/async/io/socket.rb#29 -class Async::IO::Socket < ::Async::IO::BasicSocket - include ::Async::IO::Server - - # @param timeout [Numeric] the maximum time to wait for accepting a connection, if specified. - # - # source://async-io//lib/async/io/socket.rb#46 - def accept(timeout: T.unsafe(nil), task: T.unsafe(nil)); end - - # @param timeout [Numeric] the maximum time to wait for accepting a connection, if specified. - # - # source://async-io//lib/async/io/socket.rb#46 - def accept_nonblock(timeout: T.unsafe(nil), task: T.unsafe(nil)); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def bind(*args, **_arg1, &block); end - - # @raise Errno::EAGAIN the connection failed due to the remote end being overloaded. - # - # source://async-io//lib/async/io/socket.rb#35 - def connect(*args); end - - # @raise Errno::EAGAIN the connection failed due to the remote end being overloaded. - # - # source://async-io//lib/async/io/socket.rb#35 - def connect_nonblock(*args); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def ipv6only!(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def listen(*args, **_arg1, &block); end - - # Invokes `recvfrom_nonblock` on the underlying {io}. If the operation would block, the current task is paused until the operation can succeed, at which point it's resumed and the operation is completed. - # - # source://async-io//lib/async/io/generic.rb#45 - def recvfrom(*args); end - - # source://async-io//lib/async/io/generic.rb#52 - def recvfrom_nonblock(*args, exception: T.unsafe(nil)); end - - # @param timeout [Numeric] the maximum time to wait for accepting a connection, if specified. - # - # source://async-io//lib/async/io/socket.rb#46 - def sysaccept(timeout: T.unsafe(nil), task: T.unsafe(nil)); end - - class << self - # Bind to a local address and accept connections in a loop. - # - # source://async-io//lib/async/io/socket.rb#162 - def accept(*args, backlog: T.unsafe(nil), &block); end - - # Bind to a local address. - # - # @example - # socket = Async::IO::Socket.bind(Async::IO::Address.tcp("0.0.0.0", 9090)) - # @option protocol - # @param local_address [Address] The local address to bind to. - # @param protocol [Hash] a customizable set of options - # - # source://async-io//lib/async/io/socket.rb#141 - def bind(local_address, protocol: T.unsafe(nil), task: T.unsafe(nil), **options, &block); end - - # Build and wrap the underlying io. - # - # @option reuse_port - # @option reuse_address - # @param reuse_port [Hash] a customizable set of options - # @param reuse_address [Hash] a customizable set of options - # - # source://async-io//lib/async/io/socket.rb#71 - def build(*args, timeout: T.unsafe(nil), reuse_address: T.unsafe(nil), reuse_port: T.unsafe(nil), linger: T.unsafe(nil), task: T.unsafe(nil)); end - - # Establish a connection to a given `remote_address`. - # - # @example - # socket = Async::IO::Socket.connect(Async::IO::Address.tcp("8.8.8.8", 53)) - # @option local_address - # @param remote_address [Address] The remote address to connect to. - # @param local_address [Hash] a customizable set of options - # - # source://async-io//lib/async/io/socket.rb#103 - def connect(remote_address, local_address: T.unsafe(nil), task: T.unsafe(nil), **options); end - - # source://async-io//lib/async/io/socket.rb#172 - def pair(*args); end - end -end - -# source://async-io//lib/async/io/stream.rb#15 -class Async::IO::Stream - # @return [Stream] a new instance of Stream - # - # source://async-io//lib/async/io/stream.rb#30 - def initialize(io, block_size: T.unsafe(nil), maximum_read_size: T.unsafe(nil), sync: T.unsafe(nil), deferred: T.unsafe(nil)); end - - # Writes `string` to the stream and returns self. - # - # source://async-io//lib/async/io/stream.rb#170 - def <<(string); end - - # Returns the value of attribute block_size. - # - # source://async-io//lib/async/io/stream.rb#56 - def block_size; end - - # Best effort to flush any unwritten data, and then close the underling IO. - # - # source://async-io//lib/async/io/stream.rb#203 - def close; end - - # source://async-io//lib/async/io/stream.rb#192 - def close_read; end - - # source://async-io//lib/async/io/stream.rb#196 - def close_write; end - - # @return [Boolean] - # - # source://async-io//lib/async/io/stream.rb#188 - def closed?; end - - # @return [Boolean] - # - # source://async-io//lib/async/io/stream.rb#184 - def connected?; end - - # Returns true if the stream is at file which means there is no more data to be read. - # - # @return [Boolean] - # - # source://async-io//lib/async/io/stream.rb#216 - def eof; end - - # @raise [EOFError] - # - # source://async-io//lib/async/io/stream.rb#228 - def eof!; end - - # Returns true if the stream is at file which means there is no more data to be read. - # - # @return [Boolean] - # - # source://async-io//lib/async/io/stream.rb#216 - def eof?; end - - # Flushes buffered data to the stream. - # - # source://async-io//lib/async/io/stream.rb#139 - def flush; end - - # source://async-io//lib/async/io/stream.rb#134 - def gets(separator = T.unsafe(nil), **options); end - - # Returns the value of attribute io. - # - # source://async-io//lib/async/io/stream.rb#54 - def io; end - - # source://async-io//lib/async/io/stream.rb#128 - def peek; end - - # source://async-io//lib/async/io/stream.rb#176 - def puts(*arguments, separator: T.unsafe(nil)); end - - # Reads `size` bytes from the stream. If size is not specified, read until end of file. - # - # source://async-io//lib/async/io/stream.rb#59 - def read(size = T.unsafe(nil)); end - - # @raise [exception] - # - # source://async-io//lib/async/io/stream.rb#90 - def read_exactly(size, exception: T.unsafe(nil)); end - - # Read at most `size` bytes from the stream. Will avoid reading from the underlying stream if possible. - # - # source://async-io//lib/async/io/stream.rb#80 - def read_partial(size = T.unsafe(nil)); end - - # Efficiently read data from the stream until encountering pattern. - # - # @param pattern [String] The pattern to match. - # @return [String] The contents of the stream up until the pattern, which is consumed but not returned. - # - # source://async-io//lib/async/io/stream.rb#109 - def read_until(pattern, offset = T.unsafe(nil), chomp: T.unsafe(nil)); end - - # source://async-io//lib/async/io/stream.rb#102 - def readpartial(size = T.unsafe(nil)); end - - # Writes `string` to the buffer. When the buffer is full or #sync is true the - # buffer is flushed to the underlying `io`. - # - # @param string the string to write to the buffer. - # @return the number of bytes appended to the buffer. - # - # source://async-io//lib/async/io/stream.rb#159 - def write(string); end - - private - - # Consumes at most `size` bytes from the buffer. - # - # @param size [Integer|nil] The amount of data to consume. If nil, consume entire buffer. - # - # source://async-io//lib/async/io/stream.rb#268 - def consume_read_buffer(size = T.unsafe(nil)); end - - # Fills the buffer from the underlying stream. - # - # source://async-io//lib/async/io/stream.rb#238 - def fill_read_buffer(size = T.unsafe(nil)); end - - class << self - # source://async-io//lib/async/io/stream.rb#18 - def open(path, mode = T.unsafe(nil), **options); end - end -end - -# source://async-io//lib/async/io/stream.rb#16 -Async::IO::Stream::BLOCK_SIZE = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/async-pool@0.4.0.rbi b/sorbet/rbi/gems/async-pool@0.7.0.rbi similarity index 60% rename from sorbet/rbi/gems/async-pool@0.4.0.rbi rename to sorbet/rbi/gems/async-pool@0.7.0.rbi index f6c83149a..381b47887 100644 --- a/sorbet/rbi/gems/async-pool@0.4.0.rbi +++ b/sorbet/rbi/gems/async-pool@0.7.0.rbi @@ -4,126 +4,133 @@ # This is an autogenerated file for types exported from the `async-pool` gem. # Please instead update this file by running `bin/tapioca gem async-pool`. -# source://async-pool//lib/async/pool/controller.rb#13 -module Async; end # source://async-pool//lib/async/pool/controller.rb#14 -module Async::Pool; end +module Async; end # source://async-pool//lib/async/pool/controller.rb#15 +module Async::Pool; end + +# source://async-pool//lib/async/pool/controller.rb#16 class Async::Pool::Controller # @return [Controller] a new instance of Controller # - # source://async-pool//lib/async/pool/controller.rb#20 + # source://async-pool//lib/async/pool/controller.rb#21 def initialize(constructor, limit: T.unsafe(nil), concurrency: T.unsafe(nil), policy: T.unsafe(nil)); end - # source://async-pool//lib/async/pool/controller.rb#94 + # source://async-pool//lib/async/pool/controller.rb#116 def acquire; end # Whether the pool has any active resources. # # @return [Boolean] # - # source://async-pool//lib/async/pool/controller.rb#67 + # source://async-pool//lib/async/pool/controller.rb#89 def active?; end + # source://async-pool//lib/async/pool/controller.rb#56 + def as_json(*_arg0, **_arg1, &_arg2); end + # Whether there are available resources, i.e. whether {#acquire} can reuse an existing resource. # # @return [Boolean] # - # source://async-pool//lib/async/pool/controller.rb#81 + # source://async-pool//lib/async/pool/controller.rb#103 def available?; end # Whether there are resources which are currently in use. # # @return [Boolean] # - # source://async-pool//lib/async/pool/controller.rb#72 + # source://async-pool//lib/async/pool/controller.rb#94 def busy?; end - # source://async-pool//lib/async/pool/controller.rb#120 + # source://async-pool//lib/async/pool/controller.rb#142 def close; end - # source://async-pool//lib/async/pool/controller.rb#48 + # source://async-pool//lib/async/pool/controller.rb#70 def concurrency; end - # source://async-pool//lib/async/pool/controller.rb#52 + # source://async-pool//lib/async/pool/controller.rb#74 def concurrency=(value); end # Returns the value of attribute constructor. # - # source://async-pool//lib/async/pool/controller.rb#42 + # source://async-pool//lib/async/pool/controller.rb#43 def constructor; end # @return [Boolean] # - # source://async-pool//lib/async/pool/controller.rb#90 + # source://async-pool//lib/async/pool/controller.rb#112 def empty?; end # Returns the value of attribute limit. # - # source://async-pool//lib/async/pool/controller.rb#45 + # source://async-pool//lib/async/pool/controller.rb#46 def limit; end # Sets the attribute limit # # @param value the value to set the attribute limit to. # - # source://async-pool//lib/async/pool/controller.rb#45 + # source://async-pool//lib/async/pool/controller.rb#46 def limit=(_arg0); end # Returns the value of attribute policy. # - # source://async-pool//lib/async/pool/controller.rb#57 + # source://async-pool//lib/async/pool/controller.rb#79 def policy; end # Sets the attribute policy # # @param value the value to set the attribute policy to. # - # source://async-pool//lib/async/pool/controller.rb#57 + # source://async-pool//lib/async/pool/controller.rb#79 def policy=(_arg0); end # Retire (and close) all unused resources. If a block is provided, it should implement the desired functionality for unused resources. # # @param retain [Integer] the minimum number of resources to retain. # - # source://async-pool//lib/async/pool/controller.rb#147 + # source://async-pool//lib/async/pool/controller.rb#161 def prune(retain = T.unsafe(nil)); end # Make the resource resources and let waiting tasks know that there is something resources. # - # source://async-pool//lib/async/pool/controller.rb#107 + # source://async-pool//lib/async/pool/controller.rb#129 def release(resource); end # Returns the value of attribute resources. # - # source://async-pool//lib/async/pool/controller.rb#60 + # source://async-pool//lib/async/pool/controller.rb#82 def resources; end - # source://async-pool//lib/async/pool/controller.rb#179 + # source://async-pool//lib/async/pool/controller.rb#193 def retire(resource); end - # source://async-pool//lib/async/pool/controller.rb#62 + # source://async-pool//lib/async/pool/controller.rb#84 def size; end - # source://async-pool//lib/async/pool/controller.rb#136 + # source://async-pool//lib/async/pool/controller.rb#65 + def to_json(*_arg0, **_arg1, &_arg2); end + + # source://async-pool//lib/async/pool/controller.rb#48 def to_s; end # Wait until a pool resource has been freed. # - # source://async-pool//lib/async/pool/controller.rb#86 + # source://async-pool//lib/async/pool/controller.rb#108 def wait; end protected - # source://async-pool//lib/async/pool/controller.rb#218 - def availability_string; end + # source://async-pool//lib/async/pool/controller.rb#232 + def availability_summary; end - # source://async-pool//lib/async/pool/controller.rb#287 + # source://async-pool//lib/async/pool/controller.rb#301 def available_resource; end - # source://async-pool//lib/async/pool/controller.rb#268 + # source://async-pool//lib/async/pool/controller.rb#282 def create_resource; end # def usage @@ -134,25 +141,25 @@ class Async::Pool::Controller # @resources.count{|resource, usage| usage == 0} # end # - # source://async-pool//lib/async/pool/controller.rb#232 + # source://async-pool//lib/async/pool/controller.rb#246 def reuse(resource); end - # source://async-pool//lib/async/pool/controller.rb#193 + # source://async-pool//lib/async/pool/controller.rb#207 def start_gardener; end - # source://async-pool//lib/async/pool/controller.rb#214 + # source://async-pool//lib/async/pool/controller.rb#228 def usage_string; end - # source://async-pool//lib/async/pool/controller.rb#252 + # source://async-pool//lib/async/pool/controller.rb#266 def wait_for_resource; end private - # source://async-pool//lib/async/pool/controller.rb#302 + # source://async-pool//lib/async/pool/controller.rb#316 def get_resource; end class << self - # source://async-pool//lib/async/pool/controller.rb#16 + # source://async-pool//lib/async/pool/controller.rb#17 def wrap(**options, &block); end end end diff --git a/sorbet/rbi/gems/async@2.6.5.rbi b/sorbet/rbi/gems/async@2.14.2.rbi similarity index 67% rename from sorbet/rbi/gems/async@2.6.5.rbi rename to sorbet/rbi/gems/async@2.14.2.rbi index aaf9e7572..b6e518d8e 100644 --- a/sorbet/rbi/gems/async@2.6.5.rbi +++ b/sorbet/rbi/gems/async@2.14.2.rbi @@ -4,6 +4,9 @@ # This is an autogenerated file for types exported from the `async` gem. # Please instead update this file by running `bin/tapioca gem async`. + +# Asynchronous programming framework. +# # source://async//lib/async/version.rb#6 module Async; end @@ -68,38 +71,40 @@ end # # source://async//lib/async/node.rb#14 class Async::Children < ::Async::List + # Create an empty list of children tasks. + # # @return [Children] a new instance of Children # - # source://async//lib/async/node.rb#15 + # source://async//lib/async/node.rb#16 def initialize; end # Whether all children are considered finished. Ignores transient children. # # @return [Boolean] # - # source://async//lib/async/node.rb#27 + # source://async//lib/async/node.rb#28 def finished?; end # Whether the children is empty, preserved for compatibility. # # @return [Boolean] # - # source://async//lib/async/node.rb#32 + # source://async//lib/async/node.rb#33 def nil?; end # Some children may be marked as transient. Transient children do not prevent the parent from finishing. # # @return [Boolean] # - # source://async//lib/async/node.rb#22 + # source://async//lib/async/node.rb#23 def transients?; end private - # source://async//lib/async/node.rb#38 + # source://async//lib/async/node.rb#39 def added(node); end - # source://async//lib/async/node.rb#46 + # source://async//lib/async/node.rb#47 def removed(node); end end @@ -151,13 +156,14 @@ end # # source://async//lib/async/condition.rb#13 class Async::Condition + # Create a new condition. + # # @return [Condition] a new instance of Condition # - # source://async//lib/async/condition.rb#14 + # source://async//lib/async/condition.rb#15 def initialize; end - # Is any fiber waiting on this notification? - # + # @deprecated Replaced by {#waiting?} # @return [Boolean] # # source://async//lib/async/condition.rb#44 @@ -165,60 +171,81 @@ class Async::Condition # Signal to a given task that it should resume operations. # - # source://async//lib/async/condition.rb#50 + # source://async//lib/async/condition.rb#55 def signal(value = T.unsafe(nil)); end # Queue up the current fiber and wait on yielding the task. # - # source://async//lib/async/condition.rb#36 + # source://async//lib/async/condition.rb#37 def wait; end + # @return [Boolean] + # + # source://async//lib/async/condition.rb#49 + def waiting?; end + protected - # source://async//lib/async/condition.rb#64 + # source://async//lib/async/condition.rb#69 def exchange; end end -# source://async//lib/async/condition.rb#18 +# source://async//lib/async/condition.rb#19 class Async::Condition::FiberNode < ::Async::List::Node # @return [FiberNode] a new instance of FiberNode # - # source://async//lib/async/condition.rb#19 + # source://async//lib/async/condition.rb#20 def initialize(fiber); end # @return [Boolean] # - # source://async//lib/async/condition.rb#27 + # source://async//lib/async/condition.rb#28 def alive?; end - # source://async//lib/async/condition.rb#23 + # source://async//lib/async/condition.rb#24 def transfer(*arguments); end end -# source://async//lib/async/queue.rb#65 +# A queue which limits the number of items that can be enqueued. +# +# source://async//lib/async/queue.rb#97 class Async::LimitedQueue < ::Async::Queue + # Create a new limited queue. + # # @return [LimitedQueue] a new instance of LimitedQueue # - # source://async//lib/async/queue.rb#66 - def initialize(limit = T.unsafe(nil), **options); end + # source://async//lib/async/queue.rb#102 + def initialize(limit = T.unsafe(nil), full: T.unsafe(nil), **options); end - # source://async//lib/async/queue.rb#81 + # Add an item to the queue. + # + # If the queue is full, this method will block until there is space available. + # + # source://async//lib/async/queue.rb#122 def <<(item); end - # source://async//lib/async/queue.rb#102 + # Remove and return the next item from the queue. + # + # If the queue is empty, this method will block until an item is available. + # + # source://async//lib/async/queue.rb#153 def dequeue; end - # source://async//lib/async/queue.rb#89 + # Add multiple items to the queue. + # + # If the queue is full, this method will block until there is space available. + # + # source://async//lib/async/queue.rb#135 def enqueue(*items); end # Returns the value of attribute limit. # - # source://async//lib/async/queue.rb#74 + # source://async//lib/async/queue.rb#110 def limit; end # @return [Boolean] # - # source://async//lib/async/queue.rb#77 + # source://async//lib/async/queue.rb#113 def limited?; end end @@ -235,33 +262,35 @@ class Async::List # A callback that is invoked when an item is added to the list. # - # source://async//lib/async/list.rb#48 + # source://async//lib/async/list.rb#49 def added(node); end # Append a node to the end of the list. # - # source://async//lib/async/list.rb#54 + # source://async//lib/async/list.rb#55 def append(node); end # Iterate over each node in the linked list. It is generally safe to remove the current node, any previous node or any future node during iteration. # - # source://async//lib/async/list.rb#173 + # source://async//lib/async/list.rb#175 def each(&block); end # @return [Boolean] # - # source://async//lib/async/list.rb#136 + # source://async//lib/async/list.rb#138 def empty?; end - # source://async//lib/async/list.rb#194 + # source://async//lib/async/list.rb#196 def first; end - # Points at the end of the list. + # Returns the value of attribute head. # # source://async//lib/async/list.rb#40 def head; end - # Points at the end of the list. + # Sets the attribute head + # + # @param value the value to set the attribute head to. # # source://async//lib/async/list.rb#40 def head=(_arg0); end @@ -270,25 +299,25 @@ class Async::List # # @return [Boolean] # - # source://async//lib/async/list.rb#185 + # source://async//lib/async/list.rb#187 def include?(needle); end - # Print a short summary of the list. - # # source://async//lib/async/list.rb#17 def inspect; end - # source://async//lib/async/list.rb#211 + # source://async//lib/async/list.rb#213 def last; end - # source://async//lib/async/list.rb#67 + # Prepend a node to the start of the list. + # + # source://async//lib/async/list.rb#69 def prepend(node); end # Remove the node. If it was already removed, this will raise an error. # # You should be careful to only remove nodes that are part of this list. # - # source://async//lib/async/list.rb#115 + # source://async//lib/async/list.rb#117 def remove(node); end # Remove the node if it is in a list. @@ -297,33 +326,37 @@ class Async::List # # @return [Boolean] # - # source://async//lib/async/list.rb#101 + # source://async//lib/async/list.rb#103 def remove?(node); end # A callback that is invoked when an item is removed from the list. # - # source://async//lib/async/list.rb#91 + # source://async//lib/async/list.rb#93 def removed(node); end - # source://async//lib/async/list.rb#227 + # Shift the first node off the list, if it is not empty. + # + # source://async//lib/async/list.rb#230 def shift; end # Returns the value of attribute size. # - # source://async//lib/async/list.rb#45 + # source://async//lib/async/list.rb#46 def size; end # Add the node, yield, and the remove the node. # - # source://async//lib/async/list.rb#83 + # source://async//lib/async/list.rb#85 def stack(node, &block); end - # Points at the start of the list. + # Returns the value of attribute tail. # # source://async//lib/async/list.rb#43 def tail; end - # Points at the start of the list. + # Sets the attribute tail + # + # @param value the value to set the attribute tail to. # # source://async//lib/async/list.rb#43 def tail=(_arg0); end @@ -333,178 +366,186 @@ class Async::List # source://async//lib/async/list.rb#24 def to_a; end - # Print a short summary of the list. - # # source://async//lib/async/list.rb#17 def to_s; end private - # source://async//lib/async/list.rb#124 + # source://async//lib/async/list.rb#126 def remove!(node); end end -# source://async//lib/async/list.rb#241 +# source://async//lib/async/list.rb#244 class Async::List::Iterator < ::Async::List::Node # @return [Iterator] a new instance of Iterator # - # source://async//lib/async/list.rb#242 + # source://async//lib/async/list.rb#245 def initialize(list); end - # source://async//lib/async/list.rb#285 + # source://async//lib/async/list.rb#288 def each; end - # source://async//lib/async/list.rb#270 + # source://async//lib/async/list.rb#273 def move_current; end - # source://async//lib/async/list.rb#260 + # source://async//lib/async/list.rb#263 def move_next; end - # source://async//lib/async/list.rb#252 + # source://async//lib/async/list.rb#255 def remove!; end class << self - # source://async//lib/async/list.rb#295 + # source://async//lib/async/list.rb#298 def each(list, &block); end end end # A linked list Node. # -# source://async//lib/async/list.rb#234 +# source://async//lib/async/list.rb#237 class Async::List::Node # Returns the value of attribute head. # - # source://async//lib/async/list.rb#235 + # source://async//lib/async/list.rb#238 def head; end # Sets the attribute head # # @param value the value to set the attribute head to. # - # source://async//lib/async/list.rb#235 + # source://async//lib/async/list.rb#238 def head=(_arg0); end def inspect; end # Returns the value of attribute tail. # - # source://async//lib/async/list.rb#236 + # source://async//lib/async/list.rb#239 def tail; end # Sets the attribute tail # # @param value the value to set the attribute tail to. # - # source://async//lib/async/list.rb#236 + # source://async//lib/async/list.rb#239 def tail=(_arg0); end end # A node in a tree, used for implementing the task hierarchy. # -# source://async//lib/async/node.rb#56 +# source://async//lib/async/node.rb#57 class Async::Node # Create a new node in the tree. # # @return [Node] a new instance of Node # - # source://async//lib/async/node.rb#59 + # source://async//lib/async/node.rb#60 def initialize(parent = T.unsafe(nil), annotation: T.unsafe(nil), transient: T.unsafe(nil)); end - # source://async//lib/async/node.rb#112 + # Annotate the node with a description. + # + # source://async//lib/async/node.rb#116 def annotate(annotation); end - # A useful identifier for the current node. + # Returns the value of attribute annotation. # - # source://async//lib/async/node.rb#94 + # source://async//lib/async/node.rb#95 def annotation; end - # source://async//lib/async/node.rb#138 + # Provides a backtrace for nodes that have an active execution context. + # + # source://async//lib/async/node.rb#148 def backtrace(*arguments); end # Returns the value of attribute children. # - # source://async//lib/async/node.rb#91 + # source://async//lib/async/node.rb#92 def children; end # Whether this node has any children. # # @return [Boolean] # - # source://async//lib/async/node.rb#98 + # source://async//lib/async/node.rb#99 def children?; end # If the node has a parent, and is {finished?}, then remove this node from # the parent. # - # source://async//lib/async/node.rb#191 + # source://async//lib/async/node.rb#202 def consume; end - # source://async//lib/async/node.rb#126 + # A description of the node, including the annotation and object name. + # + # source://async//lib/async/node.rb#133 def description; end # Whether the node can be consumed (deleted) safely. By default, checks if the children set is empty. # # @return [Boolean] # - # source://async//lib/async/node.rb#185 + # source://async//lib/async/node.rb#196 def finished?; end # @private # - # source://async//lib/async/node.rb#82 + # source://async//lib/async/node.rb#83 def head; end # @private # - # source://async//lib/async/node.rb#82 + # source://async//lib/async/node.rb#83 def head=(_arg0); end - # source://async//lib/async/node.rb#142 + # source://async//lib/async/node.rb#153 def inspect; end # Returns the value of attribute parent. # - # source://async//lib/async/node.rb#88 + # source://async//lib/async/node.rb#89 def parent; end # Change the parent of this node. # - # source://async//lib/async/node.rb#152 + # source://async//lib/async/node.rb#163 def parent=(parent); end - # source://async//lib/async/node.rb#262 + # Print the hierarchy of the task tree from the given node. + # + # source://async//lib/async/node.rb#278 def print_hierarchy(out = T.unsafe(nil), backtrace: T.unsafe(nil)); end - # source://async//lib/async/node.rb#77 + # source://async//lib/async/node.rb#78 def root; end # Attempt to stop the current node immediately, including all non-transient children. Invokes {#stop_children} to stop all children. # - # source://async//lib/async/node.rb#246 + # source://async//lib/async/node.rb#257 def stop(later = T.unsafe(nil)); end + # Whether the node has been stopped. + # # @return [Boolean] # - # source://async//lib/async/node.rb#258 + # source://async//lib/async/node.rb#270 def stopped?; end # @private # - # source://async//lib/async/node.rb#85 + # source://async//lib/async/node.rb#86 def tail; end # @private # - # source://async//lib/async/node.rb#85 + # source://async//lib/async/node.rb#86 def tail=(_arg0); end # Immediately terminate all children tasks, including transient tasks. Internally invokes `stop(false)` on all children. This should be considered a last ditch effort and is used when closing the scheduler. # - # source://async//lib/async/node.rb#231 + # source://async//lib/async/node.rb#242 def terminate; end - # source://async//lib/async/node.rb#142 + # source://async//lib/async/node.rb#153 def to_s; end # Represents whether a node is transient. Transient nodes are not considered @@ -516,39 +557,39 @@ class Async::Node # # @return [Boolean] # - # source://async//lib/async/node.rb#108 + # source://async//lib/async/node.rb#109 def transient?; end # Traverse the task tree. # - # source://async//lib/async/node.rb#216 + # source://async//lib/async/node.rb#227 def traverse(&block); end protected - # source://async//lib/async/node.rb#171 + # source://async//lib/async/node.rb#182 def add_child(child); end - # source://async//lib/async/node.rb#177 + # source://async//lib/async/node.rb#188 def remove_child(child); end - # source://async//lib/async/node.rb#167 + # source://async//lib/async/node.rb#178 def set_parent(parent); end # @yield [_self, level] # @yieldparam _self [Async::Node] the object that the method was called on # - # source://async//lib/async/node.rb#222 + # source://async//lib/async/node.rb#233 def traverse_recurse(level = T.unsafe(nil), &block); end private - # source://async//lib/async/node.rb#274 + # source://async//lib/async/node.rb#290 def print_backtrace(out, indent, node); end # Attempt to stop all non-transient children. # - # source://async//lib/async/node.rb#252 + # source://async//lib/async/node.rb#263 def stop_children(later = T.unsafe(nil)); end end @@ -605,52 +646,80 @@ end # A queue which allows items to be processed in order. # -# source://async//lib/async/queue.rb#13 -class Async::Queue < ::Async::Notification +# It has a compatible interface with {Notification} and {Condition}, except that it's multi-value. +# +# source://async//lib/async/queue.rb#16 +class Async::Queue + # Create a new queue. + # # @return [Queue] a new instance of Queue # - # source://async//lib/async/queue.rb#14 - def initialize(parent: T.unsafe(nil)); end + # source://async//lib/async/queue.rb#21 + def initialize(parent: T.unsafe(nil), available: T.unsafe(nil)); end - # source://async//lib/async/queue.rb#31 + # Add an item to the queue. + # + # source://async//lib/async/queue.rb#41 def <<(item); end - # source://async//lib/async/queue.rb#51 - def async(parent: T.unsafe(nil), &block); end + # Process each item in the queue. + # + # source://async//lib/async/queue.rb#71 + def async(parent: T.unsafe(nil), **options, &block); end - # source://async//lib/async/queue.rb#43 + # Remove and return the next item from the queue. + # + # source://async//lib/async/queue.rb#55 def dequeue; end - # source://async//lib/async/queue.rb#57 + # Enumerate each item in the queue. + # + # source://async//lib/async/queue.rb#78 def each; end # @return [Boolean] # - # source://async//lib/async/queue.rb#27 + # source://async//lib/async/queue.rb#36 def empty?; end - # source://async//lib/async/queue.rb#37 + # Add multiple items to the queue. + # + # source://async//lib/async/queue.rb#48 def enqueue(*items); end # Returns the value of attribute items. # - # source://async//lib/async/queue.rb#21 + # source://async//lib/async/queue.rb#28 def items; end - # source://async//lib/async/queue.rb#23 + # Signal the queue with a value, the same as {#enqueue}. + # + # source://async//lib/async/queue.rb#85 + def signal(value); end + + # source://async//lib/async/queue.rb#31 def size; end + + # Wait for an item to be available, the same as {#dequeue}. + # + # source://async//lib/async/queue.rb#90 + def wait; end end # A wrapper around the the scheduler which binds it to the current thread automatically. # # source://async//lib/async/reactor.rb#12 class Async::Reactor < ::Async::Scheduler + # Initialize the reactor and assign it to the current Fiber scheduler. + # # @return [Reactor] a new instance of Reactor # - # source://async//lib/async/reactor.rb#18 + # source://async//lib/async/reactor.rb#19 def initialize(*_arg0, **_arg1, &_arg2); end - # source://async//lib/async/reactor.rb#24 + # Close the reactor and remove it from the current Fiber scheduler. + # + # source://async//lib/async/reactor.rb#26 def scheduler_close; end def sleep(*_arg0); end @@ -665,14 +734,16 @@ end # Handles scheduling of fibers. Implements the fiber scheduler interface. # -# source://async//lib/async/scheduler.rb#19 +# source://async//lib/async/scheduler.rb#18 class Async::Scheduler < ::Async::Node + # Create a new scheduler. + # # @return [Scheduler] a new instance of Scheduler # - # source://async//lib/async/scheduler.rb#32 + # source://async//lib/async/scheduler.rb#40 def initialize(parent = T.unsafe(nil), selector: T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#161 + # source://async//lib/async/scheduler.rb#215 def address_resolve(hostname); end # Start an asynchronous task within the specified reactor. The task will be @@ -683,110 +754,135 @@ class Async::Scheduler < ::Async::Node # # @deprecated With no replacement. # - # source://async//lib/async/scheduler.rb#297 + # source://async//lib/async/scheduler.rb#411 def async(*arguments, **options, &block); end # Invoked when a fiber tries to perform a blocking operation which cannot continue. A corresponding call {unblock} must be performed to allow this fiber to continue. # - # source://async//lib/async/scheduler.rb#118 + # source://async//lib/async/scheduler.rb#172 def block(blocker, timeout); end - # source://async//lib/async/scheduler.rb#53 + # Terminate all child tasks and close the scheduler. + # + # source://async//lib/async/scheduler.rb#96 def close; end # @return [Boolean] # - # source://async//lib/async/scheduler.rb#77 + # source://async//lib/async/scheduler.rb#120 def closed?; end - # source://async//lib/async/scheduler.rb#315 + # source://async//lib/async/scheduler.rb#429 def fiber(*_arg0, **_arg1, &_arg2); end # Interrupt the event loop and cause it to exit. # - # source://async//lib/async/scheduler.rb#87 + # source://async//lib/async/scheduler.rb#131 def interrupt; end - # source://async//lib/async/scheduler.rb#184 + # source://async//lib/async/scheduler.rb#255 def io_read(io, buffer, length, offset = T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#169 + # source://async//lib/async/scheduler.rb#234 def io_wait(io, events, timeout = T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#189 + # source://async//lib/async/scheduler.rb#270 def io_write(io, buffer, length, offset = T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#152 + # source://async//lib/async/scheduler.rb#206 def kernel_sleep(duration = T.unsafe(nil)); end + # Compute the scheduler load according to the busy and idle times that are updated by the run loop. + # + # source://async//lib/async/scheduler.rb#56 + def load; end + # Wait for the specified process ID to exit. # - # source://async//lib/async/scheduler.rb#200 + # source://async//lib/async/scheduler.rb#291 def process_wait(pid, flags); end # Schedule a fiber (or equivalent object) to be resumed on the next loop through the reactor. # - # source://async//lib/async/scheduler.rb#104 + # source://async//lib/async/scheduler.rb#148 def push(fiber); end - # source://async//lib/async/scheduler.rb#108 - def raise(*arguments); end + # Raise an exception on a specified fiber with the given arguments. + # + # This internally schedules the current fiber to be ready, before raising the exception, so that it will later resume execution. + # + # source://async//lib/async/scheduler.rb#158 + def raise(*_arg0, **_arg1, &_arg2); end - # source://async//lib/async/scheduler.rb#112 + # Resume execution of the specified fiber. + # + # source://async//lib/async/scheduler.rb#166 def resume(fiber, *arguments); end # Run the reactor until all tasks are finished. Proxies arguments to {#async} immediately before entering the loop, if a block is provided. # - # source://async//lib/async/scheduler.rb#267 + # source://async//lib/async/scheduler.rb#369 def run(*_arg0, **_arg1, &_arg2); end # Run one iteration of the event loop. # Does not handle interrupts. # - # source://async//lib/async/scheduler.rb#208 + # source://async//lib/async/scheduler.rb#299 def run_once(timeout = T.unsafe(nil)); end - # source://async//lib/async/scheduler.rb#43 + # Invoked when the fiber scheduler is being closed. + # + # Executes the run loop until all tasks are finished, then closes the scheduler. + # + # source://async//lib/async/scheduler.rb#78 def scheduler_close; end - # source://async//lib/async/scheduler.rb#335 + # Terminate the scheduler. We deliberately ignore interrupts here, as this code can be called from an interrupt, and we don't want to be interrupted while cleaning up. + # + # source://async//lib/async/scheduler.rb#88 + def terminate; end + + # source://async//lib/async/scheduler.rb#449 def timeout_after(duration, exception, message, &block); end - # source://async//lib/async/scheduler.rb#81 + # source://async//lib/async/scheduler.rb#125 def to_s; end # Transfer from the calling fiber to the event loop. # - # source://async//lib/async/scheduler.rb#93 + # source://async//lib/async/scheduler.rb#137 def transfer; end - # source://async//lib/async/scheduler.rb#141 + # source://async//lib/async/scheduler.rb#195 def unblock(blocker, fiber); end # Invoke the block, but after the specified timeout, raise {TimeoutError} in any currenly blocking operation. If the block runs to completion before the timeout occurs or there are no non-blocking operations after the timeout expires, the code will complete without any exception. # - # source://async//lib/async/scheduler.rb#321 + # source://async//lib/async/scheduler.rb#435 def with_timeout(duration, exception = T.unsafe(nil), message = T.unsafe(nil), &block); end # Yield the current fiber and resume it on the next iteration of the event loop. # - # source://async//lib/async/scheduler.rb#98 + # source://async//lib/async/scheduler.rb#142 def yield; end private + # source://async//lib/async/scheduler.rb#224 + def get_timeout(io); end + # Checks and clears the interrupted state of the scheduler. # # @return [Boolean] # - # source://async//lib/async/scheduler.rb#253 + # source://async//lib/async/scheduler.rb#355 def interrupted?; end # Run one iteration of the event loop. # # When terminating the event loop, we already know we are finished. So we don't need to check the task tree. This is a logical requirement because `run_once` ignores transient tasks. For example, a single top level transient task is not enough to keep the reactor running, but during termination we must still process it in order to terminate child tasks. # - # source://async//lib/async/scheduler.rb#225 + # source://async//lib/async/scheduler.rb#316 def run_once!(timeout = T.unsafe(nil)); end class << self @@ -794,16 +890,20 @@ class Async::Scheduler < ::Async::Node # # @return [Boolean] # - # source://async//lib/async/scheduler.rb#28 + # source://async//lib/async/scheduler.rb#31 def supported?; end end end +# Raised when an operation is attempted on a closed scheduler. +# # source://async//lib/async/scheduler.rb#20 class Async::Scheduler::ClosedError < ::RuntimeError + # Create a new error. + # # @return [ClosedError] a new instance of ClosedError # - # source://async//lib/async/scheduler.rb#21 + # source://async//lib/async/scheduler.rb#24 def initialize(message = T.unsafe(nil)); end end @@ -889,297 +989,240 @@ end # Raised when a task is explicitly stopped. # -# source://async//lib/async/task.rb#16 +# source://async//lib/async/task.rb#20 class Async::Stop < ::Exception; end -# source://async//lib/async/task.rb#17 +# Used to defer stopping the current task until later. +# +# source://async//lib/async/task.rb#22 class Async::Stop::Later + # Create a new stop later operation. + # # @return [Later] a new instance of Later # - # source://async//lib/async/task.rb#18 + # source://async//lib/async/task.rb#26 def initialize(task); end # @return [Boolean] # - # source://async//lib/async/task.rb#22 + # source://async//lib/async/task.rb#31 def alive?; end - # source://async//lib/async/task.rb#26 + # Transfer control to the operation - this will stop the task. + # + # source://async//lib/async/task.rb#36 def transfer; end end -# source://async//lib/async/task.rb#41 +# source://async//lib/async/task.rb#54 class Async::Task < ::Async::Node # Create a new task. # # @return [Task] a new instance of Task # - # source://async//lib/async/task.rb#56 + # source://async//lib/async/task.rb#73 def initialize(parent = T.unsafe(nil), finished: T.unsafe(nil), **options, &block); end - # Whether the internal fiber is alive, i.e. it - # # @return [Boolean] # - # source://async//lib/async/task.rb#118 + # source://async//lib/async/task.rb#146 def alive?; end - # source://async//lib/async/task.rb#79 + # Annotate the task with a description. + # + # This will internally try to annotate the fiber if it is running, otherwise it will annotate the task itself. + # + # source://async//lib/async/task.rb#105 def annotate(annotation, &block); end - # source://async//lib/async/task.rb#87 + # source://async//lib/async/task.rb#114 def annotation; end # Run an asynchronous task as a child of the current task. # # @raise [FinishedError] # - # source://async//lib/async/task.rb#168 + # source://async//lib/async/task.rb#210 def async(*arguments, **options, &block); end - # source://async//lib/async/task.rb#75 + # source://async//lib/async/task.rb#96 def backtrace(*arguments); end - # The task has completed execution and generated a result. - # # @return [Boolean] # - # source://async//lib/async/task.rb#145 + # source://async//lib/async/task.rb#173 def complete?; end - # The task has completed execution and generated a result. - # # @return [Boolean] # - # source://async//lib/async/task.rb#145 + # source://async//lib/async/task.rb#173 def completed?; end # @return [Boolean] # - # source://async//lib/async/task.rb#254 + # source://async//lib/async/task.rb#340 def current?; end + # Defer the handling of stop. During the execution of the given block, if a stop is requested, it will be deferred until the block exits. This is useful for ensuring graceful shutdown of servers and other long-running tasks. You should wrap the response handling code in a defer_stop block to ensure that the task is stopped when the response is complete but not before. + # + # You can nest calls to defer_stop, but the stop will only be deferred until the outermost block exits. + # + # If stop is invoked a second time, it will be immediately executed. + # + # source://async//lib/async/task.rb#298 + def defer_stop; end + # @return [Boolean] # - # source://async//lib/async/task.rb#135 + # source://async//lib/async/task.rb#163 def failed?; end - # @attr fiber [Fiber] The fiber which is being used for the execution of this task. + # Returns the value of attribute fiber. # - # source://async//lib/async/task.rb#115 + # source://async//lib/async/task.rb#143 def fiber; end # Whether we can remove this node from the reactor graph. # # @return [Boolean] # - # source://async//lib/async/task.rb#124 + # source://async//lib/async/task.rb#152 def finished?; end - # source://async//lib/async/task.rb#71 + # source://async//lib/async/task.rb#91 def reactor; end # Access the result of the task without waiting. May be nil if the task is not completed. Does not raise exceptions. # - # source://async//lib/async/task.rb#201 + # source://async//lib/async/task.rb#243 def result; end # Begin the execution of the task. # - # source://async//lib/async/task.rb#155 + # source://async//lib/async/task.rb#185 def run(*arguments); end - # Whether the task is running. - # # @return [Boolean] # - # source://async//lib/async/task.rb#131 + # source://async//lib/async/task.rb#158 def running?; end # @deprecated Prefer {Kernel#sleep} except when compatibility with `stable-v1` is required. # - # source://async//lib/async/task.rb#100 + # source://async//lib/async/task.rb#128 def sleep(duration = T.unsafe(nil)); end - # @attr status [Symbol] The status of the execution of the fiber, one of `:initialized`, `:running`, `:complete`, `:stopped` or `:failed`. + # Returns the value of attribute status. # - # source://async//lib/async/task.rb#152 + # source://async//lib/async/task.rb#180 def status; end # Stop the task and all of its children. # # If `later` is false, it means that `stop` has been invoked directly. When `later` is true, it means that `stop` is invoked by `stop_children` or some other indirect mechanism. In that case, if we encounter the "current" fiber, we can't stop it right away, as it's currently performing `#stop`. Stopping it immediately would interrupt the current stop traversal, so we need to schedule the stop to occur later. # - # source://async//lib/async/task.rb#208 + # source://async//lib/async/task.rb#250 def stop(later = T.unsafe(nil)); end - # The task has been stopped - # # @return [Boolean] # - # source://async//lib/async/task.rb#140 + # source://async//lib/async/task.rb#168 def stopped?; end - # source://async//lib/async/task.rb#95 + # source://async//lib/async/task.rb#123 def to_s; end # Retrieve the current result of the task. Will cause the caller to wait until result is available. If the task resulted in an unhandled error (derived from `StandardError`), this will be raised. If the task was stopped, this will return `nil`. # # Conceptually speaking, waiting on a task should return a result, and if it throws an exception, this is certainly an exceptional case that should represent a failure in your program, not an expected outcome. In other words, you should not design your programs to expect exceptions from `#wait` as a normal flow control, and prefer to catch known exceptions within the task itself and return a result that captures the intention of the failure, e.g. a `TimeoutError` might simply return `nil` or `false` to indicate that the operation did not generate a valid result (as a timeout was an expected outcome of the internal operation in this case). # - # source://async//lib/async/task.rb#184 + # source://async//lib/async/task.rb#226 def wait; end # Execute the given block of code, raising the specified exception if it exceeds the given duration during a non-blocking operation. # - # source://async//lib/async/task.rb#105 + # source://async//lib/async/task.rb#133 def with_timeout(duration, exception = T.unsafe(nil), message = T.unsafe(nil), &block); end # Yield back to the reactor and allow other fibers to execute. # - # source://async//lib/async/task.rb#110 + # source://async//lib/async/task.rb#138 def yield; end private # State transition into the completed state. # - # source://async//lib/async/task.rb#277 + # source://async//lib/async/task.rb#363 def completed!(result); end - # This is a very tricky aspect of tasks to get right. I've modelled it after `Thread` but it's slightly different in that the exception can propagate back up through the reactor. If the user writes code which raises an exception, that exception should always be visible, i.e. cause a failure. If it's not visible, such code fails silently and can be very difficult to debug. + # State transition into the failed state. # - # source://async//lib/async/task.rb#283 - def failed!(exception = T.unsafe(nil), propagate = T.unsafe(nil)); end + # source://async//lib/async/task.rb#369 + def failed!(exception = T.unsafe(nil)); end # Finish the current task, moving any children to the parent. # - # source://async//lib/async/task.rb#261 + # source://async//lib/async/task.rb#347 def finish!; end - # source://async//lib/async/task.rb#325 + # source://async//lib/async/task.rb#400 def schedule(&block); end - # Set the current fiber's `:async_task` to this task. - # - # source://async//lib/async/task.rb#348 - def set!; end - - # source://async//lib/async/task.rb#319 + # source://async//lib/async/task.rb#394 def stop!; end - # source://async//lib/async/task.rb#299 + # source://async//lib/async/task.rb#374 def stopped!; end class << self # Lookup the {Task} for the current fiber. Raise `RuntimeError` if none is available. # @raises[RuntimeError] If task was not {set!} for the current fiber. # - # source://async//lib/async/task.rb#244 + # source://async//lib/async/task.rb#329 def current; end # Check if there is a task defined for the current fiber. # # @return [Boolean] # - # source://async//lib/async/task.rb#250 + # source://async//lib/async/task.rb#335 def current?; end # @deprecated With no replacement. # - # source://async//lib/async/task.rb#49 + # source://async//lib/async/task.rb#66 def yield; end end end -# source://async//lib/async/task.rb#42 +# Raised when a child task is created within a task that has finished execution. +# +# source://async//lib/async/task.rb#56 class Async::Task::FinishedError < ::RuntimeError + # Create a new finished error. + # # @return [FinishedError] a new instance of FinishedError # - # source://async//lib/async/task.rb#43 + # source://async//lib/async/task.rb#60 def initialize(message = T.unsafe(nil)); end end # Raised if a timeout occurs on a specific Fiber. Handled gracefully by `Task`. # -# source://async//lib/async/task.rb#34 +# source://async//lib/async/task.rb#44 class Async::TimeoutError < ::StandardError + # Create a new timeout error. + # # @return [TimeoutError] a new instance of TimeoutError # - # source://async//lib/async/task.rb#35 + # source://async//lib/async/task.rb#48 def initialize(message = T.unsafe(nil)); end end # source://async//lib/async/version.rb#7 Async::VERSION = T.let(T.unsafe(nil), String) -# Represents an asynchronous IO within a reactor. -# -# @deprecated With no replacement. Prefer native interfaces. -# -# source://async//lib/async/wrapper.rb#10 -class Async::Wrapper - # @return [Wrapper] a new instance of Wrapper - # - # source://async//lib/async/wrapper.rb#17 - def initialize(io, reactor = T.unsafe(nil)); end - - # Close the io and monitor. - # - # source://async//lib/async/wrapper.rb#55 - def close; end - - # @return [Boolean] - # - # source://async//lib/async/wrapper.rb#59 - def closed?; end - - # source://async//lib/async/wrapper.rb#26 - def dup; end - - # The underlying native `io`. - # - # source://async//lib/async/wrapper.rb#31 - def io; end - - # Returns the value of attribute reactor. - # - # source://async//lib/async/wrapper.rb#24 - def reactor; end - - # Sets the attribute reactor - # - # @param value the value to set the attribute reactor to. - # - # source://async//lib/async/wrapper.rb#24 - def reactor=(_arg0); end - - # Wait fo the io to become either readable or writable. - # - # source://async//lib/async/wrapper.rb#50 - def wait_any(timeout = T.unsafe(nil)); end - - # Wait for the io to become writable. - # - # source://async//lib/async/wrapper.rb#39 - def wait_priority(timeout = T.unsafe(nil)); end - - # Wait for the io to become readable. - # - # source://async//lib/async/wrapper.rb#34 - def wait_readable(timeout = T.unsafe(nil)); end - - # Wait for the io to become writable. - # - # source://async//lib/async/wrapper.rb#44 - def wait_writable(timeout = T.unsafe(nil)); end -end - -# An exception that occurs when the asynchronous operation was cancelled. -# -# source://async//lib/async/wrapper.rb#12 -class Async::Wrapper::Cancelled < ::StandardError; end - # Extensions to all Ruby objects. # # source://async//lib/kernel/async.rb#8 diff --git a/sorbet/rbi/gems/better_html@2.0.2.rbi b/sorbet/rbi/gems/better_html@2.0.2.rbi deleted file mode 100644 index 8d7395eaf..000000000 --- a/sorbet/rbi/gems/better_html@2.0.2.rbi +++ /dev/null @@ -1,471 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `better_html` gem. -# Please instead update this file by running `bin/tapioca gem better_html`. - -# source://better_html//lib/better_html/errors.rb#6 -module BetterHtml; end - -# source://better_html//lib/better_html/ast/iterator.rb#7 -module BetterHtml::AST; end - -# source://better_html//lib/better_html/ast/iterator.rb#8 -class BetterHtml::AST::Iterator - # @return [Iterator] a new instance of Iterator - # - # source://better_html//lib/better_html/ast/iterator.rb#18 - def initialize(types, &block); end - - # source://better_html//lib/better_html/ast/iterator.rb#23 - def traverse(node); end - - # source://better_html//lib/better_html/ast/iterator.rb#30 - def traverse_all(nodes); end - - class << self - # source://better_html//lib/better_html/ast/iterator.rb#10 - def descendants(root_node, type); end - end -end - -# source://better_html//lib/better_html/ast/node.rb#8 -class BetterHtml::AST::Node < ::AST::Node - # source://better_html//lib/better_html/ast/node.rb#11 - def descendants(*types); end - - # Returns the value of attribute loc. - # - # source://better_html//lib/better_html/ast/node.rb#9 - def loc; end - - # source://better_html//lib/better_html/ast/node.rb#15 - def location; end -end - -# source://better_html//lib/better_html/errors.rb#8 -class BetterHtml::DontInterpolateHere < ::BetterHtml::InterpolatorError; end - -# source://better_html//lib/better_html/errors.rb#12 -class BetterHtml::Errors < ::Array - def add(_arg0); end -end - -# source://better_html//lib/better_html/errors.rb#10 -class BetterHtml::HtmlError < ::RuntimeError; end - -# source://better_html//lib/better_html/errors.rb#7 -class BetterHtml::InterpolatorError < ::RuntimeError; end - -# source://better_html//lib/better_html/parser.rb#13 -class BetterHtml::Parser - # @raise [ArgumentError] - # @return [Parser] a new instance of Parser - # - # source://better_html//lib/better_html/parser.rb#26 - def initialize(buffer, template_language: T.unsafe(nil)); end - - # source://better_html//lib/better_html/parser.rb#48 - def ast; end - - # source://better_html//lib/better_html/parser.rb#61 - def inspect; end - - # source://better_html//lib/better_html/parser.rb#43 - def nodes_with_type(*type); end - - # source://better_html//lib/better_html/parser.rb#52 - def parser_errors; end - - # Returns the value of attribute template_language. - # - # source://better_html//lib/better_html/parser.rb#14 - def template_language; end - - private - - # source://better_html//lib/better_html/parser.rb#180 - def build_attribute_name_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#170 - def build_attribute_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#185 - def build_attribute_value_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#115 - def build_cdata_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#120 - def build_comment_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#69 - def build_document_node; end - - # source://better_html//lib/better_html/parser.rb#91 - def build_erb_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#245 - def build_interpolation_node(tokens); end - - # @raise [ArgumentError] - # - # source://better_html//lib/better_html/parser.rb#206 - def build_location(enumerable); end - - # source://better_html//lib/better_html/parser.rb#104 - def build_lodash_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#165 - def build_nameless_attribute_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#198 - def build_node(type, tokens, pre: T.unsafe(nil), post: T.unsafe(nil)); end - - # source://better_html//lib/better_html/parser.rb#145 - def build_tag_attributes_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#140 - def build_tag_name_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#125 - def build_tag_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#193 - def build_text_node(tokens); end - - # source://better_html//lib/better_html/parser.rb#213 - def empty_location; end - - # source://better_html//lib/better_html/parser.rb#217 - def shift_all(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#255 - def shift_all_with_interpolation(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#280 - def shift_between(tokens, start_type, end_type); end - - # source://better_html//lib/better_html/parser.rb#288 - def shift_between_with_interpolation(tokens, start_type, end_type); end - - # source://better_html//lib/better_html/parser.rb#229 - def shift_single(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#233 - def shift_until(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#268 - def shift_until_with_interpolation(tokens, *types); end - - # source://better_html//lib/better_html/parser.rb#296 - def wrap_token(object); end - - # source://better_html//lib/better_html/parser.rb#313 - def wrap_tokens(enumerable); end -end - -# source://better_html//lib/better_html/parser.rb#16 -class BetterHtml::Parser::Error < ::BetterHtml::HtmlError - # @return [Error] a new instance of Error - # - # source://better_html//lib/better_html/parser.rb#20 - def initialize(message, location:); end - - # Returns the value of attribute location. - # - # source://better_html//lib/better_html/parser.rb#17 - def loc; end - - # Returns the value of attribute location. - # - # source://better_html//lib/better_html/parser.rb#17 - def location; end -end - -# source://better_html//lib/better_html/parser.rb#67 -BetterHtml::Parser::INTERPOLATION_TYPES = T.let(T.unsafe(nil), Array) - -# source://better_html//lib/better_html/errors.rb#16 -class BetterHtml::ParserError < ::RuntimeError - # @return [ParserError] a new instance of ParserError - # - # source://better_html//lib/better_html/errors.rb#19 - def initialize(message, position, line, column); end - - # Returns the value of attribute column. - # - # source://better_html//lib/better_html/errors.rb#17 - def column; end - - # Returns the value of attribute line. - # - # source://better_html//lib/better_html/errors.rb#17 - def line; end - - # Returns the value of attribute position. - # - # source://better_html//lib/better_html/errors.rb#17 - def position; end -end - -# source://better_html//lib/better_html/tokenizer/token.rb#4 -module BetterHtml::Tokenizer; end - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#10 -class BetterHtml::Tokenizer::BaseErb < ::Erubi::Engine - # @raise [ArgumentError] - # @return [BaseErb] a new instance of BaseErb - # - # source://better_html//lib/better_html/tokenizer/base_erb.rb#18 - def initialize(buffer); end - - # Returns the value of attribute current_position. - # - # source://better_html//lib/better_html/tokenizer/base_erb.rb#16 - def current_position; end - - # Returns the value of attribute tokens. - # - # source://better_html//lib/better_html/tokenizer/base_erb.rb#15 - def tokens; end - - private - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#34 - def add_code(code); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#53 - def add_erb_tokens(ltrim, indicator, code, rtrim); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#47 - def add_expression(indicator, code); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#80 - def add_token(type, begin_pos, end_pos); end - - # source://better_html//lib/better_html/tokenizer/base_erb.rb#30 - def append(text); end -end - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#13 -BetterHtml::Tokenizer::BaseErb::EXPR_TRIM_MATCHER = T.let(T.unsafe(nil), Regexp) - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#11 -BetterHtml::Tokenizer::BaseErb::REGEXP_WITHOUT_TRIM = T.let(T.unsafe(nil), Regexp) - -# source://better_html//lib/better_html/tokenizer/base_erb.rb#12 -BetterHtml::Tokenizer::BaseErb::STMT_TRIM_MATCHER = T.let(T.unsafe(nil), Regexp) - -# source://better_html//lib/better_html/tokenizer/html_erb.rb#7 -class BetterHtml::Tokenizer::HtmlErb < ::BetterHtml::Tokenizer::BaseErb - # @return [HtmlErb] a new instance of HtmlErb - # - # source://better_html//lib/better_html/tokenizer/html_erb.rb#10 - def initialize(buffer); end - - # source://better_html//lib/better_html/tokenizer/html_erb.rb#15 - def current_position; end - - # Returns the value of attribute parser. - # - # source://better_html//lib/better_html/tokenizer/html_erb.rb#8 - def parser; end - - private - - # source://better_html//lib/better_html/tokenizer/html_erb.rb#25 - def add_text(text); end - - # source://better_html//lib/better_html/tokenizer/html_erb.rb#21 - def append(text); end -end - -# source://better_html//lib/better_html/tokenizer/html_lodash.rb#9 -class BetterHtml::Tokenizer::HtmlLodash - # @return [HtmlLodash] a new instance of HtmlLodash - # - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#18 - def initialize(buffer); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate=(val); end - - # Returns the value of attribute parser. - # - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#11 - def parser; end - - # Returns the value of attribute tokens. - # - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#10 - def tokens; end - - private - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#79 - def add_lodash_tokens(indicator, code); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#73 - def add_text(text); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#96 - def add_token(type, begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#28 - def scan!; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#62 - def scan_pattern; end - - class << self - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_escape=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_evaluate=(val); end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate; end - - # source://better_html//lib/better_html/tokenizer/html_lodash.rb#13 - def lodash_interpolate=(val); end - end -end - -# source://better_html//lib/better_html/tokenizer/javascript_erb.rb#7 -class BetterHtml::Tokenizer::JavascriptErb < ::BetterHtml::Tokenizer::BaseErb - private - - # source://better_html//lib/better_html/tokenizer/javascript_erb.rb#10 - def add_text(text); end -end - -# source://better_html//lib/better_html/tokenizer/location.rb#8 -class BetterHtml::Tokenizer::Location < ::Parser::Source::Range - # @raise [ArgumentError] - # @return [Location] a new instance of Location - # - # source://better_html//lib/better_html/tokenizer/location.rb#9 - def initialize(buffer, begin_pos, end_pos); end - - # source://better_html//lib/better_html/tokenizer/location.rb#50 - def adjust(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end - - # source://better_html//lib/better_html/tokenizer/location.rb#62 - def begin; end - - # source://better_html//lib/better_html/tokenizer/location.rb#66 - def end; end - - # source://better_html//lib/better_html/tokenizer/location.rb#30 - def line_range; end - - # source://better_html//lib/better_html/tokenizer/location.rb#39 - def line_source_with_underline; end - - # source://better_html//lib/better_html/tokenizer/location.rb#58 - def offset(offset); end - - # source://better_html//lib/better_html/tokenizer/location.rb#26 - def range; end - - # source://better_html//lib/better_html/tokenizer/location.rb#54 - def resize(new_size); end - - # source://parser/3.2.2.4/lib/parser/source/range.rb#92 - def start_column; end - - # source://parser/3.2.2.4/lib/parser/source/range.rb#83 - def start_line; end - - # source://parser/3.2.2.4/lib/parser/source/range.rb#106 - def stop_column; end - - # source://parser/3.2.2.4/lib/parser/source/range.rb#99 - def stop_line; end - - # source://better_html//lib/better_html/tokenizer/location.rb#46 - def with(begin_pos: T.unsafe(nil), end_pos: T.unsafe(nil)); end -end - -# source://better_html//lib/better_html/tokenizer/token.rb#5 -class BetterHtml::Tokenizer::Token - # @return [Token] a new instance of Token - # - # source://better_html//lib/better_html/tokenizer/token.rb#8 - def initialize(type:, loc:); end - - # source://better_html//lib/better_html/tokenizer/token.rb#13 - def inspect; end - - # Returns the value of attribute loc. - # - # source://better_html//lib/better_html/tokenizer/token.rb#6 - def loc; end - - # Returns the value of attribute type. - # - # source://better_html//lib/better_html/tokenizer/token.rb#6 - def type; end -end - -# source://better_html//lib/better_html/tokenizer/token_array.rb#5 -class BetterHtml::Tokenizer::TokenArray - # @return [TokenArray] a new instance of TokenArray - # - # source://better_html//lib/better_html/tokenizer/token_array.rb#6 - def initialize(list); end - - # @return [Boolean] - # - # source://better_html//lib/better_html/tokenizer/token_array.rb#37 - def any?; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#41 - def current; end - - # @return [Boolean] - # - # source://better_html//lib/better_html/tokenizer/token_array.rb#33 - def empty?; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#45 - def last; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#20 - def pop; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#12 - def shift; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#49 - def size; end - - # source://better_html//lib/better_html/tokenizer/token_array.rb#28 - def trim(type); end -end - -# source://better_html//lib/better_html/errors.rb#9 -class BetterHtml::UnsafeHtmlError < ::BetterHtml::InterpolatorError; end diff --git a/sorbet/rbi/gems/better_html@2.1.1.rbi b/sorbet/rbi/gems/better_html@2.1.1.rbi new file mode 100644 index 000000000..4b23d2380 --- /dev/null +++ b/sorbet/rbi/gems/better_html@2.1.1.rbi @@ -0,0 +1,9 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `better_html` gem. +# Please instead update this file by running `bin/tapioca gem better_html`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/bigdecimal@3.1.6.rbi b/sorbet/rbi/gems/bigdecimal@3.1.8.rbi similarity index 99% rename from sorbet/rbi/gems/bigdecimal@3.1.6.rbi rename to sorbet/rbi/gems/bigdecimal@3.1.8.rbi index 439d14e31..c275b2f77 100644 --- a/sorbet/rbi/gems/bigdecimal@3.1.6.rbi +++ b/sorbet/rbi/gems/bigdecimal@3.1.8.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `bigdecimal` gem. # Please instead update this file by running `bin/tapioca gem bigdecimal`. + # source://bigdecimal//lib/bigdecimal/util.rb#78 class BigDecimal < ::Numeric # call-seq: diff --git a/sorbet/rbi/gems/brakeman@6.2.1.rbi b/sorbet/rbi/gems/brakeman@6.2.1.rbi new file mode 100644 index 000000000..d7488289d --- /dev/null +++ b/sorbet/rbi/gems/brakeman@6.2.1.rbi @@ -0,0 +1,222 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `brakeman` gem. +# Please instead update this file by running `bin/tapioca gem brakeman`. + + +# source://brakeman//lib/brakeman/version.rb#1 +module Brakeman + class << self + # source://brakeman//lib/brakeman.rb#573 + def add_external_checks(options); end + + # source://brakeman//lib/brakeman.rb#579 + def check_for_missing_checks(included_checks, excluded_checks, enabled_checks); end + + # Compare JSON output from a previous scan and return the diff of the two scans + # + # @raise [ArgumentError] + # + # source://brakeman//lib/brakeman.rb#484 + def compare(options); end + + # source://brakeman//lib/brakeman.rb#173 + def config_file(custom_location, app_path); end + + # source://brakeman//lib/brakeman.rb#479 + def debug(message); end + + # source://brakeman//lib/brakeman.rb#589 + def debug=(val); end + + # Default set of options + # + # source://brakeman//lib/brakeman.rb#180 + def default_options; end + + # Output configuration to YAML + # + # source://brakeman//lib/brakeman.rb#339 + def dump_config(options); end + + # source://brakeman//lib/brakeman.rb#365 + def ensure_latest; end + + # source://brakeman//lib/brakeman.rb#545 + def filter_warnings(tracker, options); end + + # Determine output formats based on options[:output_formats] + # or options[:output_files] + # + # source://brakeman//lib/brakeman.rb#211 + def get_output_formats(options); end + + # Returns an array of alert fingerprints for any ignored warnings without + # notes found in the specified ignore file (if it exists). + # + # source://brakeman//lib/brakeman.rb#535 + def ignore_file_entries_with_empty_notes(file); end + + # Output list of checks (for `-k` option) + # + # source://brakeman//lib/brakeman.rb#317 + def list_checks(options); end + + # source://brakeman//lib/brakeman.rb#507 + def load_brakeman_dependency(name, allow_fail = T.unsafe(nil)); end + + # Load options from YAML file + # + # source://brakeman//lib/brakeman.rb#125 + def load_options(line_options); end + + # source://brakeman//lib/brakeman.rb#475 + def notify(message); end + + # source://brakeman//lib/brakeman.rb#593 + def quiet=(val); end + + # Rescan a subset of files in a Rails application. + # + # A full scan must have been run already to use this method. + # The returned Tracker object from Brakeman.run is used as a starting point + # for the rescan. + # + # Options may be given as a hash with the same values as Brakeman.run. + # Note that these options will be merged into the Tracker. + # + # This method returns a RescanReport object with information about the scan. + # However, the Tracker object will also be modified as the scan is run. + # + # source://brakeman//lib/brakeman.rb#464 + def rescan(tracker, files, options = T.unsafe(nil)); end + + # Run Brakeman scan. Returns Tracker object. + # + # Options: + # + # * :app_path - path to root of Rails app (required) + # * :additional_checks_path - array of additional directories containing additional out-of-tree checks to run + # * :additional_libs_path - array of additional application relative lib directories (ex. app/mailers) to process + # * :assume_all_routes - assume all methods are routes (default: true) + # * :check_arguments - check arguments of methods (default: true) + # * :collapse_mass_assignment - report unprotected models in single warning (default: false) + # * :combine_locations - combine warning locations (default: true) + # * :config_file - configuration file + # * :escape_html - escape HTML by default (automatic) + # * :exit_on_error - only affects Commandline module (default: true) + # * :exit_on_warn - only affects Commandline module (default: true) + # * :github_repo - github repo to use for file links (user/repo[/path][@ref]) + # * :highlight_user_input - highlight user input in reported warnings (default: true) + # * :html_style - path to CSS file + # * :ignore_model_output - consider models safe (default: false) + # * :index_libs - add libraries to call index (default: true) + # * :interprocedural - limited interprocedural processing of method calls (default: false) + # * :message_limit - limit length of messages + # * :min_confidence - minimum confidence (0-2, 0 is highest) + # * :output_files - files for output + # * :output_formats - formats for output (:to_s, :to_tabs, :to_csv, :to_html) + # * :parallel_checks - run checks in parallel (default: true) + # * :parser_timeout - set timeout for parsing an individual file (default: 10 seconds) + # * :print_report - if no output file specified, print to stdout (default: false) + # * :quiet - suppress most messages (default: true) + # * :rails3 - force Rails 3 mode (automatic) + # * :rails4 - force Rails 4 mode (automatic) + # * :rails5 - force Rails 5 mode (automatic) + # * :rails6 - force Rails 6 mode (automatic) + # * :report_routes - show found routes on controllers (default: false) + # * :run_checks - array of checks to run (run all if not specified) + # * :safe_methods - array of methods to consider safe + # * :show_ignored - Display warnings that are usually ignored + # * :sql_safe_methods - array of sql sanitization methods to consider safe + # * :skip_libs - do not process lib/ directory (default: false) + # * :skip_vendor - do not process vendor/ directory (default: true) + # * :skip_checks - checks not to run (run all if not specified) + # * :absolute_paths - show absolute path of each file (default: false) + # * :summary_only - only output summary section of report for plain/table (:summary_only, :no_summary, true) + # + # Alternatively, just supply a path as a string. + # + # source://brakeman//lib/brakeman.rb#77 + def run(options); end + + # Run a scan. Generally called from Brakeman.run instead of directly. + # + # source://brakeman//lib/brakeman.rb#374 + def scan(options); end + + # Sets up options for run, checks given application path + # + # source://brakeman//lib/brakeman.rb#91 + def set_options(options); end + + private + + # source://brakeman//lib/brakeman.rb#264 + def get_formats_from_output_files(output_files); end + + # source://brakeman//lib/brakeman.rb#230 + def get_formats_from_output_format(output_format); end + + # source://brakeman//lib/brakeman.rb#300 + def get_github_url(options); end + + # source://brakeman//lib/brakeman.rb#418 + def write_report_to_files(tracker, output_files); end + + # source://brakeman//lib/brakeman.rb#436 + def write_report_to_formats(tracker, output_formats); end + end +end + +# source://brakeman//lib/brakeman.rb#161 +Brakeman::CONFIG_FILES = T.let(T.unsafe(nil), Array) + +# source://brakeman//lib/brakeman.rb#597 +class Brakeman::DependencyError < ::RuntimeError; end + +# Exit code returned when an ignored warning has no note and +# --ensure-ignore-notes is set +# +# source://brakeman//lib/brakeman.rb#25 +Brakeman::Empty_Ignore_Note_Exit_Code = T.let(T.unsafe(nil), Integer) + +# Exit code returned when errors were found and the --exit-on-error +# option is set +# +# source://brakeman//lib/brakeman.rb#21 +Brakeman::Errors_Found_Exit_Code = T.let(T.unsafe(nil), Integer) + +# source://brakeman//lib/brakeman.rb#600 +class Brakeman::MissingChecksError < ::RuntimeError; end + +# Exit code returned when user requests non-existent checks +# +# source://brakeman//lib/brakeman.rb#17 +Brakeman::Missing_Checks_Exit_Code = T.let(T.unsafe(nil), Integer) + +# source://brakeman//lib/brakeman.rb#599 +class Brakeman::NoApplication < ::RuntimeError; end + +# source://brakeman//lib/brakeman.rb#598 +class Brakeman::NoBrakemanError < ::RuntimeError; end + +# Exit code returned when no Rails application is detected +# +# source://brakeman//lib/brakeman.rb#11 +Brakeman::No_App_Found_Exit_Code = T.let(T.unsafe(nil), Integer) + +# Exit code returned when brakeman was outdated +# +# source://brakeman//lib/brakeman.rb#14 +Brakeman::Not_Latest_Version_Exit_Code = T.let(T.unsafe(nil), Integer) + +# source://brakeman//lib/brakeman/version.rb#2 +Brakeman::Version = T.let(T.unsafe(nil), String) + +# This exit code is used when warnings are found and the --exit-on-warn +# option is set +# +# source://brakeman//lib/brakeman.rb#8 +Brakeman::Warnings_Found_Exit_Code = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/builder@3.2.4.rbi b/sorbet/rbi/gems/builder@3.3.0.rbi similarity index 99% rename from sorbet/rbi/gems/builder@3.2.4.rbi rename to sorbet/rbi/gems/builder@3.3.0.rbi index 344a340cc..177ba9aeb 100644 --- a/sorbet/rbi/gems/builder@3.2.4.rbi +++ b/sorbet/rbi/gems/builder@3.3.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `builder` gem. # Please instead update this file by running `bin/tapioca gem builder`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/chef-utils@18.3.0.rbi b/sorbet/rbi/gems/chef-utils@18.5.0.rbi similarity index 99% rename from sorbet/rbi/gems/chef-utils@18.3.0.rbi rename to sorbet/rbi/gems/chef-utils@18.5.0.rbi index 5c77fbbce..451da72d5 100644 --- a/sorbet/rbi/gems/chef-utils@18.3.0.rbi +++ b/sorbet/rbi/gems/chef-utils@18.5.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `chef-utils` gem. # Please instead update this file by running `bin/tapioca gem chef-utils`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi b/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi similarity index 99% rename from sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi rename to sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi index e51423a74..e6a82d005 100644 --- a/sorbet/rbi/gems/concurrent-ruby@1.2.3.rbi +++ b/sorbet/rbi/gems/concurrent-ruby@1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `concurrent-ruby` gem. # Please instead update this file by running `bin/tapioca gem concurrent-ruby`. + # {include:file:README.md} # # source://concurrent-ruby//lib/concurrent-ruby/concurrent/constants.rb#1 @@ -147,11 +148,47 @@ module Concurrent # source://concurrent-ruby//lib/concurrent-ruby/concurrent/tvar.rb#82 def atomically; end + # Number of processors cores available for process scheduling. + # This method takes in account the CPU quota if the process is inside a cgroup with a + # dedicated CPU quota (typically Docker). + # Otherwise it returns the same value as #processor_count but as a Float. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [Float] number of available processors + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#194 + def available_processor_count; end + # @raise [ArgumentError] # # source://concurrent-ruby//lib/concurrent-ruby/concurrent/dataflow.rb#56 def call_dataflow(method, executor, *inputs, &block); end + # The maximum number of processors cores available for process scheduling. + # Returns `nil` if there is no enforced limit, or a `Float` if the + # process is inside a cgroup with a dedicated CPU quota (typically Docker). + # + # Note that nothing prevents setting a CPU quota higher than the actual number of + # cores on the system. + # + # For performance reasons the calculated value will be memoized on the first + # call. + # + # @return [nil, Float] Maximum number of available processors as set by a cgroup CPU quota, or nil if none set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#209 + def cpu_quota; end + + # The CPU shares requested by the process. For performance reasons the calculated + # value will be memoized on the first call. + # + # @return [Float, nil] CPU shares requested by the process, or nil if not set + # + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#217 + def cpu_shares; end + # @return [Logger] Logger with provided level and output. # # source://concurrent-ruby//lib/concurrent-ruby/concurrent/concern/logging.rb#37 @@ -290,7 +327,7 @@ module Concurrent # @see http://www.unix.com/man-page/osx/1/HWPREFS/ # @see http://linux.die.net/man/8/sysctl # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#107 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#181 def physical_processor_count; end # Number of processors seen by the OS and used for process scheduling. For @@ -301,18 +338,18 @@ module Concurrent # `java.lang.Runtime.getRuntime.availableProcessors` will be used. According # to the Java documentation this "value may change during a particular # invocation of the virtual machine... [applications] should therefore - # occasionally poll this property." Subsequently the result will NOT be - # memoized under JRuby. + # occasionally poll this property." We still memoize this value once under + # JRuby. # # Otherwise Ruby's Etc.nprocessors will be used. # # @return [Integer] number of processors seen by the OS or Java runtime # @see http://docs.oracle.com/javase/6/docs/api/java/lang/Runtime.html#availableProcessors() # - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#86 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#160 def processor_count; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#68 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#142 def processor_counter; end # Use logger created by #create_simple_logger to log concurrent-ruby messages. @@ -11571,19 +11608,37 @@ class Concurrent::Utility::ProcessorCounter # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#11 def initialize; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#20 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 + def available_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#41 + def cpu_quota; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#45 + def cpu_shares; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#22 def physical_processor_count; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#16 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#18 def processor_count; end private - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#34 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#104 + def compute_cpu_quota; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#124 + def compute_cpu_shares; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#59 def compute_physical_processor_count; end - # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#26 + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#51 def compute_processor_count; end + + # source://concurrent-ruby//lib/concurrent-ruby/concurrent/utility/processor_counter.rb#99 + def run(command); end end # source://concurrent-ruby//lib/concurrent-ruby/concurrent/version.rb#2 diff --git a/sorbet/rbi/gems/console@1.23.2.rbi b/sorbet/rbi/gems/console@1.26.0.rbi similarity index 54% rename from sorbet/rbi/gems/console@1.23.2.rbi rename to sorbet/rbi/gems/console@1.26.0.rbi index 6edd8f69e..9ce822de4 100644 --- a/sorbet/rbi/gems/console@1.23.2.rbi +++ b/sorbet/rbi/gems/console@1.26.0.rbi @@ -4,14 +4,9 @@ # This is an autogenerated file for types exported from the `console` gem. # Please instead update this file by running `bin/tapioca gem console`. -# source://console//lib/console/version.rb#6 -module Console - # source://console//lib/console.rb#51 - def logger; end - - # source://console//lib/console.rb#47 - def logger=(logger); end +# source://console//lib/console/event/generic.rb#6 +module Console class << self # source://console//lib/console.rb#42 def call(*_arg0, **_arg1, &_arg2); end @@ -39,20 +34,6 @@ module Console end end -# source://console//lib/console/buffer.rb#9 -class Console::Buffer < ::StringIO - # @return [Buffer] a new instance of Buffer - # - # source://console//lib/console/buffer.rb#10 - def initialize(prefix = T.unsafe(nil)); end - - # source://console//lib/console/buffer.rb#16 - def <<(*args, prefix: T.unsafe(nil)); end - - # source://console//lib/console/buffer.rb#16 - def puts(*args, prefix: T.unsafe(nil)); end -end - # source://console//lib/console/clock.rb#7 module Console::Clock class << self @@ -69,163 +50,115 @@ end # source://console//lib/console/event/generic.rb#7 module Console::Event; end -# source://console//lib/console/event/failure.rb#11 +# Represents a failure event. +# +# ```ruby +# Console::Event::Failure.for(exception).emit(self) +# ``` +# +# source://console//lib/console/event/failure.rb#16 class Console::Event::Failure < ::Console::Event::Generic # @return [Failure] a new instance of Failure # - # source://console//lib/console/event/failure.rb#22 + # source://console//lib/console/event/failure.rb#31 def initialize(exception, root = T.unsafe(nil)); end - # Returns the value of attribute exception. - # - # source://console//lib/console/event/failure.rb#27 - def exception; end - - # source://console//lib/console/event/failure.rb#42 - def format(output, terminal, verbose); end + # source://console//lib/console/event/failure.rb#44 + def emit(*arguments, **options); end - # source://console//lib/console/event/failure.rb#46 - def format_exception(exception, prefix, output, terminal, verbose); end + # source://console//lib/console/event/failure.rb#36 + def to_hash; end - # Returns the value of attribute root. - # - # source://console//lib/console/event/failure.rb#28 - def root; end + private - # source://console//lib/console/event/failure.rb#38 - def to_h; end + # source://console//lib/console/event/failure.rb#52 + def extract(exception, hash); end class << self - # source://console//lib/console/event/failure.rb#12 - def current_working_directory; end + # source://console//lib/console/event/failure.rb#17 + def default_root; end - # source://console//lib/console/event/failure.rb#18 + # source://console//lib/console/event/failure.rb#23 def for(exception); end - # source://console//lib/console/event/failure.rb#30 - def register(terminal); end + # source://console//lib/console/event/failure.rb#27 + def log(subject, exception, **options); end end end # source://console//lib/console/event/generic.rb#8 class Console::Event::Generic - # source://console//lib/console/event/generic.rb#19 - def format(buffer, terminal); end - - # source://console//lib/console/event/generic.rb#12 - def to_h; end - - # source://console//lib/console/event/generic.rb#15 - def to_json(*arguments); end - - class << self - # source://console//lib/console/event/generic.rb#9 - def register(terminal); end - end -end - -# source://console//lib/console/event/progress.rb#10 -class Console::Event::Progress < ::Console::Event::Generic - # @return [Progress] a new instance of Progress - # - # source://console//lib/console/event/progress.rb#23 - def initialize(current, total); end - - # source://console//lib/console/event/progress.rb#35 - def bar(value = T.unsafe(nil), width = T.unsafe(nil)); end - - # Returns the value of attribute current. - # - # source://console//lib/console/event/progress.rb#28 - def current; end - - # source://console//lib/console/event/progress.rb#55 - def format(output, terminal, verbose); end + # source://console//lib/console/event/generic.rb#9 + def as_json(*_arg0, **_arg1, &_arg2); end - # source://console//lib/console/event/progress.rb#51 - def to_h; end - - # Returns the value of attribute total. - # - # source://console//lib/console/event/progress.rb#29 - def total; end + # source://console//lib/console/event/generic.rb#21 + def emit(*arguments, **options); end - # source://console//lib/console/event/progress.rb#31 - def value; end + # source://console//lib/console/event/generic.rb#13 + def to_json(*_arg0, **_arg1, &_arg2); end - class << self - # source://console//lib/console/event/progress.rb#47 - def register(terminal); end - end + # source://console//lib/console/event/generic.rb#17 + def to_s; end end -# source://console//lib/console/event/progress.rb#11 -Console::Event::Progress::BLOCK = T.let(T.unsafe(nil), Array) - -# source://console//lib/console/event/spawn.rb#10 +# Represents a spawn event. +# +# ```ruby +# Console.info(self, **Console::Event::Spawn.for("ls", "-l")) +# +# event = Console::Event::Spawn.for("ls", "-l") +# event.status = Process.wait +# ``` +# +# source://console//lib/console/event/spawn.rb#19 class Console::Event::Spawn < ::Console::Event::Generic # @return [Spawn] a new instance of Spawn # - # source://console//lib/console/event/spawn.rb#21 + # source://console//lib/console/event/spawn.rb#30 def initialize(environment, arguments, options); end - # Returns the value of attribute arguments. - # - # source://console//lib/console/event/spawn.rb#28 - def arguments; end - - # source://console//lib/console/event/spawn.rb#31 - def chdir_string(options); end - - # Returns the value of attribute environment. - # - # source://console//lib/console/event/spawn.rb#27 - def environment; end + # source://console//lib/console/event/spawn.rb#41 + def duration; end - # source://console//lib/console/event/spawn.rb#49 - def format(output, terminal, verbose); end + # source://console//lib/console/event/spawn.rb#62 + def emit(*arguments, **options); end - # Returns the value of attribute options. - # - # source://console//lib/console/event/spawn.rb#29 - def options; end + # source://console//lib/console/event/spawn.rb#67 + def status=(status); end - # source://console//lib/console/event/spawn.rb#41 - def to_h; end + # source://console//lib/console/event/spawn.rb#47 + def to_hash; end class << self - # source://console//lib/console/event/spawn.rb#11 + # source://console//lib/console/event/spawn.rb#20 def for(*arguments, **options); end - - # source://console//lib/console/event/spawn.rb#37 - def register(terminal); end end end -# source://console//lib/console/filter.rb#14 +# source://console//lib/console/filter.rb#12 class Console::Filter # @return [Filter] a new instance of Filter # - # source://console//lib/console/filter.rb#46 + # source://console//lib/console/filter.rb#55 def initialize(output, verbose: T.unsafe(nil), level: T.unsafe(nil), **options); end - # source://console//lib/console/filter.rb#89 + # source://console//lib/console/filter.rb#98 def all!; end - # source://console//lib/console/filter.rb#137 - def call(*arguments, **options, &block); end + # source://console//lib/console/filter.rb#146 + def call(subject, *arguments, **options, &block); end # Clear any specific filters for the given class. # - # source://console//lib/console/filter.rb#129 + # source://console//lib/console/filter.rb#138 def clear(subject); end - # source://console//lib/console/filter.rb#122 + # source://console//lib/console/filter.rb#131 def disable(subject); end # Enable specific log level for the given class. # - # source://console//lib/console/filter.rb#117 + # source://console//lib/console/filter.rb#126 def enable(subject, level = T.unsafe(nil)); end # You can enable and disable logging for classes. This function checks if logging for a given subject is enabled. @@ -233,66 +166,69 @@ class Console::Filter # @param subject [Object] the subject to check. # @return [Boolean] # - # source://console//lib/console/filter.rb#103 + # source://console//lib/console/filter.rb#112 def enabled?(subject, level = T.unsafe(nil)); end - # source://console//lib/console/filter.rb#93 + # source://console//lib/console/filter.rb#102 def filter(subject, level); end # Returns the value of attribute level. # - # source://console//lib/console/filter.rb#66 + # source://console//lib/console/filter.rb#75 def level; end - # source://console//lib/console/filter.rb#72 + # source://console//lib/console/filter.rb#81 def level=(level); end - # source://console//lib/console/filter.rb#85 + # source://console//lib/console/filter.rb#94 def off!; end # Returns the value of attribute options. # - # source://console//lib/console/filter.rb#70 + # source://console//lib/console/filter.rb#79 def options; end # Sets the attribute options # # @param value the value to set the attribute options to. # - # source://console//lib/console/filter.rb#70 + # source://console//lib/console/filter.rb#79 def options=(_arg0); end # Returns the value of attribute output. # - # source://console//lib/console/filter.rb#64 + # source://console//lib/console/filter.rb#73 def output; end # Sets the attribute output # # @param value the value to set the attribute output to. # - # source://console//lib/console/filter.rb#64 + # source://console//lib/console/filter.rb#73 def output=(_arg0); end # Returns the value of attribute subjects. # - # source://console//lib/console/filter.rb#68 + # source://console//lib/console/filter.rb#77 def subjects; end # Returns the value of attribute verbose. # - # source://console//lib/console/filter.rb#65 + # source://console//lib/console/filter.rb#74 def verbose; end - # source://console//lib/console/filter.rb#80 + # source://console//lib/console/filter.rb#89 def verbose!(value = T.unsafe(nil)); end - # source://console//lib/console/filter.rb#56 + # source://console//lib/console/filter.rb#65 def with(level: T.unsafe(nil), verbose: T.unsafe(nil), **options); end class << self - # source://console//lib/console/filter.rb#15 + # source://console//lib/console/filter.rb#24 def [](**levels); end + + # source://console//lib/console/filter.rb#14 + def define_immutable_method(name, &block); end end end @@ -301,9 +237,6 @@ module Console::Format class << self # source://console//lib/console/format.rb#10 def default; end - - # source://console//lib/console/format.rb#14 - def default_json; end end end @@ -344,21 +277,22 @@ class Console::Format::Safe def safe_dump_recurse(object, limit = T.unsafe(nil), objects = T.unsafe(nil)); end end -# source://console//lib/console/logger.rb#19 +# source://console//lib/console/logger.rb#17 class Console::Logger < ::Console::Filter extend ::Fiber::Local # @return [Logger] a new instance of Logger # - # source://console//lib/console/logger.rb#65 + # source://console//lib/console/logger.rb#63 def initialize(output, **options); end - # @deprecated Use `fatal` instead. - # - # source://console//lib/console/logger.rb#74 - def failure(subject, exception, *arguments, &block); end + # source://console//lib/console/logger.rb#73 + def error(subject, *arguments, **options, &block); end - # source://console//lib/console/logger.rb#69 + # source://console//lib/console/logger.rb#84 + def failure(subject, exception, **options); end + + # source://console//lib/console/logger.rb#67 def progress(subject, total, **options); end class << self @@ -366,31 +300,34 @@ class Console::Logger < ::Console::Filter # You can also specify CONSOLE_LEVEL=debug or CONSOLE_LEVEL=info in environment. # https://mislav.net/2011/06/ruby-verbose-mode/ has more details about how it all fits together. # - # source://console//lib/console/logger.rb#25 + # source://console//lib/console/logger.rb#23 def default_log_level(env = T.unsafe(nil)); end - # source://console//lib/console/logger.rb#42 + # source://console//lib/console/logger.rb#40 def default_logger(output = T.unsafe(nil), env = T.unsafe(nil), **options); end - # source://console//lib/console/logger.rb#59 + # source://fiber-local/1.1.0/lib/fiber/local.rb#16 + def fiber_local_attribute_name; end + + # source://console//lib/console/logger.rb#57 def local; end # Controls verbose output using `$VERBOSE`. # # @return [Boolean] # - # source://console//lib/console/logger.rb#38 + # source://console//lib/console/logger.rb#36 def verbose?(env = T.unsafe(nil)); end end end -# source://console//lib/console/logger.rb#63 +# source://console//lib/console/logger.rb#61 Console::Logger::DEFAULT_LEVEL = T.let(T.unsafe(nil), Integer) -# source://console//lib/console/output/xterm.rb#9 +# source://console//lib/console/output/terminal.rb#16 module Console::Output class << self - # source://console//lib/console/output.rb#14 + # source://console//lib/console/output.rb#13 def new(output = T.unsafe(nil), env = T.unsafe(nil), **options); end end end @@ -403,13 +340,8 @@ module Console::Output::Default end end -# source://console//lib/console/output/json.rb#10 -module Console::Output::JSON - class << self - # source://console//lib/console/output/json.rb#11 - def new(output, **options); end - end -end +# source://console//lib/console/output/serialized.rb#70 +Console::Output::JSON = Console::Output::Serialized # source://console//lib/console/output/null.rb#8 class Console::Output::Null @@ -422,83 +354,220 @@ class Console::Output::Null def call(*_arg0, **_arg1, &_arg2); end end -# source://console//lib/console/output/text.rb#10 +# source://console//lib/console/output/serialized.rb#12 +class Console::Output::Serialized + # @return [Serialized] a new instance of Serialized + # + # source://console//lib/console/output/serialized.rb#13 + def initialize(output, format: T.unsafe(nil), **options); end + + # source://console//lib/console/output/serialized.rb#25 + def call(subject = T.unsafe(nil), *arguments, severity: T.unsafe(nil), **options, &block); end + + # source://console//lib/console/output/serialized.rb#21 + def dump(record); end + + # Returns the value of attribute format. + # + # source://console//lib/console/output/serialized.rb#19 + def format; end + + # Returns the value of attribute io. + # + # source://console//lib/console/output/serialized.rb#18 + def io; end +end + +# source://console//lib/console/output/terminal.rb#17 +class Console::Output::Terminal + # @return [Terminal] a new instance of Terminal + # + # source://console//lib/console/output/terminal.rb#54 + def initialize(output, verbose: T.unsafe(nil), start_at: T.unsafe(nil), format: T.unsafe(nil), **options); end + + # source://console//lib/console/output/terminal.rb#101 + def call(subject = T.unsafe(nil), *arguments, name: T.unsafe(nil), severity: T.unsafe(nil), event: T.unsafe(nil), **options, &block); end + + # Returns the value of attribute io. + # + # source://console//lib/console/output/terminal.rb#81 + def io; end + + # source://console//lib/console/output/terminal.rb#92 + def register_formatters(namespace = T.unsafe(nil)); end + + # Returns the value of attribute start. + # + # source://console//lib/console/output/terminal.rb#85 + def start; end + + # Returns the value of attribute terminal. + # + # source://console//lib/console/output/terminal.rb#86 + def terminal; end + + # Returns the value of attribute verbose. + # + # source://console//lib/console/output/terminal.rb#83 + def verbose; end + + # source://console//lib/console/output/terminal.rb#88 + def verbose!(value = T.unsafe(nil)); end + + # Sets the attribute verbose + # + # @param value the value to set the attribute verbose to. + # + # source://console//lib/console/output/terminal.rb#83 + def verbose=(_arg0); end + + protected + + # source://console//lib/console/output/terminal.rb#231 + def build_prefix(name); end + + # source://console//lib/console/output/terminal.rb#168 + def default_suffix(object = T.unsafe(nil)); end + + # source://console//lib/console/output/terminal.rb#152 + def format_argument(argument, output); end + + # source://console//lib/console/output/terminal.rb#137 + def format_event(event, buffer, width); end + + # source://console//lib/console/output/terminal.rb#194 + def format_object_subject(severity, prefix, subject, output); end + + # source://console//lib/console/output/terminal.rb#148 + def format_options(options, output); end + + # source://console//lib/console/output/terminal.rb#206 + def format_string_subject(severity, prefix, subject, output); end + + # source://console//lib/console/output/terminal.rb#158 + def format_subject(severity, prefix, subject, buffer); end + + # source://console//lib/console/output/terminal.rb#218 + def format_value(value, output); end + + # source://console//lib/console/output/terminal.rb#227 + def time_offset_prefix; end + + class << self + # Exports CONSOLE_START which can be used to synchronize the start times of all child processes when they log using delta time. + # + # source://console//lib/console/output/terminal.rb#41 + def start_at!(environment = T.unsafe(nil)); end + end +end + +# source://console//lib/console/output/terminal.rb#18 +class Console::Output::Terminal::Buffer < ::StringIO + # @return [Buffer] a new instance of Buffer + # + # source://console//lib/console/output/terminal.rb#19 + def initialize(prefix = T.unsafe(nil)); end + + # source://console//lib/console/output/terminal.rb#27 + def <<(*args, prefix: T.unsafe(nil)); end + + # Returns the value of attribute prefix. + # + # source://console//lib/console/output/terminal.rb#25 + def prefix; end + + # source://console//lib/console/output/terminal.rb#27 + def puts(*args, prefix: T.unsafe(nil)); end +end + +# This, and all related methods, is considered private. +# +# source://console//lib/console/output/terminal.rb#38 +Console::Output::Terminal::CONSOLE_START_AT = T.let(T.unsafe(nil), String) + +# source://console//lib/console/output/terminal.rb#99 +Console::Output::Terminal::UNKNOWN = T.let(T.unsafe(nil), Symbol) + +# source://console//lib/console/output/terminal.rb#240 module Console::Output::Text class << self - # source://console//lib/console/output/text.rb#11 + # source://console//lib/console/output/terminal.rb#241 def new(output, **options); end end end -# source://console//lib/console/output/xterm.rb#10 +# source://console//lib/console/output/terminal.rb#246 module Console::Output::XTerm class << self - # source://console//lib/console/output/xterm.rb#11 + # source://console//lib/console/output/terminal.rb#247 def new(output, **options); end end end -# source://console//lib/console/progress.rb#11 +# source://console//lib/console/progress.rb#10 class Console::Progress # @return [Progress] a new instance of Progress # - # source://console//lib/console/progress.rb#16 - def initialize(output, subject, total = T.unsafe(nil), minimum_output_duration: T.unsafe(nil)); end + # source://console//lib/console/progress.rb#15 + def initialize(subject, total = T.unsafe(nil), minimum_output_duration: T.unsafe(nil), **options); end - # source://console//lib/console/progress.rb#45 + # source://console//lib/console/progress.rb#44 def average_duration; end # Returns the value of attribute current. # - # source://console//lib/console/progress.rb#30 + # source://console//lib/console/progress.rb#29 def current; end - # source://console//lib/console/progress.rb#33 + # source://console//lib/console/progress.rb#32 def duration; end - # source://console//lib/console/progress.rb#51 + # source://console//lib/console/progress.rb#50 def estimated_remaining_time; end - # source://console//lib/console/progress.rb#57 + # source://console//lib/console/progress.rb#67 def increment(amount = T.unsafe(nil)); end - # source://console//lib/console/progress.rb#77 - def mark(*_arg0, **_arg1, &_arg2); end + # source://console//lib/console/progress.rb#87 + def mark(*arguments, **options); end - # source://console//lib/console/progress.rb#37 + # source://console//lib/console/progress.rb#36 def ratio; end - # source://console//lib/console/progress.rb#41 + # source://console//lib/console/progress.rb#40 def remaining; end - # source://console//lib/console/progress.rb#68 + # source://console//lib/console/progress.rb#78 def resize(total); end # Returns the value of attribute subject. # - # source://console//lib/console/progress.rb#29 + # source://console//lib/console/progress.rb#28 def subject; end - # source://console//lib/console/progress.rb#81 + # source://console//lib/console/progress.rb#56 + def to_hash; end + + # source://console//lib/console/progress.rb#91 def to_s; end # Returns the value of attribute total. # - # source://console//lib/console/progress.rb#31 + # source://console//lib/console/progress.rb#30 def total; end private - # source://console//lib/console/progress.rb#91 + # source://console//lib/console/progress.rb#101 def duration_since_last_output; end # @return [Boolean] # - # source://console//lib/console/progress.rb#97 + # source://console//lib/console/progress.rb#107 def output?; end class << self - # source://console//lib/console/progress.rb#12 + # source://console//lib/console/progress.rb#11 def now; end end end @@ -533,152 +602,75 @@ class Console::Resolver end end -# source://console//lib/console/serialized/logger.rb#15 -module Console::Serialized; end - -# source://console//lib/console/serialized/logger.rb#16 -class Console::Serialized::Logger - # @return [Logger] a new instance of Logger - # - # source://console//lib/console/serialized/logger.rb#17 - def initialize(io = T.unsafe(nil), format: T.unsafe(nil), verbose: T.unsafe(nil), **options); end - - # source://console//lib/console/serialized/logger.rb#36 - def call(subject = T.unsafe(nil), *arguments, severity: T.unsafe(nil), **options, &block); end - - # source://console//lib/console/serialized/logger.rb#32 - def dump(record); end - - # Returns the value of attribute format. - # - # source://console//lib/console/serialized/logger.rb#26 - def format; end - - # Returns the value of attribute io. - # - # source://console//lib/console/serialized/logger.rb#24 - def io; end - - # Returns the value of attribute start. - # - # source://console//lib/console/serialized/logger.rb#25 - def start; end - - # source://console//lib/console/serialized/logger.rb#28 - def verbose!(value = T.unsafe(nil)); end - - private - - # source://console//lib/console/serialized/logger.rb#90 - def find_exception(message); end - - # source://console//lib/console/serialized/logger.rb#100 - def format_backtrace(exception, buffer); end - - # source://console//lib/console/serialized/logger.rb#94 - def format_stack(exception); end -end - -# Deprecated. -# -# source://console//lib/console/event/spawn.rb#64 -Console::Shell = Console::Event::Spawn - # Styled terminal output. # # source://console//lib/console/terminal/text.rb#10 module Console::Terminal class << self - # source://console//lib/console/terminal/logger.rb#37 + # source://console//lib/console/terminal.rb#15 def for(io); end - - # Exports CONSOLE_START which can be used to synchronize the start times of all child processes when they log using delta time. - # - # source://console//lib/console/terminal/logger.rb#24 - def start_at!(environment = T.unsafe(nil)); end end end -# This, and all related methods, is considered private. -# -# source://console//lib/console/terminal/logger.rb#21 -Console::Terminal::CONSOLE_START_AT = T.let(T.unsafe(nil), String) - -# source://console//lib/console/terminal/logger.rb#45 -class Console::Terminal::Logger - # @return [Logger] a new instance of Logger - # - # source://console//lib/console/terminal/logger.rb#46 - def initialize(io = T.unsafe(nil), verbose: T.unsafe(nil), start_at: T.unsafe(nil), format: T.unsafe(nil), **options); end +# source://console//lib/console/terminal/formatter/progress.rb#8 +module Console::Terminal::Formatter; end - # source://console//lib/console/terminal/logger.rb#92 - def call(subject = T.unsafe(nil), *arguments, name: T.unsafe(nil), severity: T.unsafe(nil), **options, &block); end - - # Returns the value of attribute io. - # - # source://console//lib/console/terminal/logger.rb#72 - def io; end - - # source://console//lib/console/terminal/logger.rb#83 - def register_defaults(terminal); end - - # Returns the value of attribute start. - # - # source://console//lib/console/terminal/logger.rb#76 - def start; end - - # Returns the value of attribute terminal. +# source://console//lib/console/terminal/formatter/failure.rb#9 +class Console::Terminal::Formatter::Failure + # @return [Failure] a new instance of Failure # - # source://console//lib/console/terminal/logger.rb#77 - def terminal; end + # source://console//lib/console/terminal/formatter/failure.rb#12 + def initialize(terminal); end - # Returns the value of attribute verbose. - # - # source://console//lib/console/terminal/logger.rb#74 - def verbose; end + # source://console//lib/console/terminal/formatter/failure.rb#22 + def format(event, output, prefix: T.unsafe(nil), verbose: T.unsafe(nil), width: T.unsafe(nil)); end +end - # source://console//lib/console/terminal/logger.rb#79 - def verbose!(value = T.unsafe(nil)); end +# source://console//lib/console/terminal/formatter/failure.rb#10 +Console::Terminal::Formatter::Failure::KEY = T.let(T.unsafe(nil), Symbol) - # Sets the attribute verbose - # - # @param value the value to set the attribute verbose to. +# source://console//lib/console/terminal/formatter/progress.rb#9 +class Console::Terminal::Formatter::Progress + # @return [Progress] a new instance of Progress # - # source://console//lib/console/terminal/logger.rb#74 - def verbose=(_arg0); end + # source://console//lib/console/terminal/formatter/progress.rb#24 + def initialize(terminal); end - protected + # source://console//lib/console/terminal/formatter/progress.rb#29 + def format(event, output, verbose: T.unsafe(nil), width: T.unsafe(nil)); end - # source://console//lib/console/terminal/logger.rb#204 - def build_prefix(name); end + private - # source://console//lib/console/terminal/logger.rb#148 - def default_suffix(object = T.unsafe(nil)); end + # source://console//lib/console/terminal/formatter/progress.rb#44 + def bar(value, width); end +end - # source://console//lib/console/terminal/logger.rb#125 - def format_argument(argument, output); end +# source://console//lib/console/terminal/formatter/progress.rb#12 +Console::Terminal::Formatter::Progress::BLOCK = T.let(T.unsafe(nil), Array) - # source://console//lib/console/terminal/logger.rb#168 - def format_object_subject(severity, prefix, subject, output); end +# source://console//lib/console/terminal/formatter/progress.rb#10 +Console::Terminal::Formatter::Progress::KEY = T.let(T.unsafe(nil), Symbol) - # source://console//lib/console/terminal/logger.rb#121 - def format_options(options, output); end - - # source://console//lib/console/terminal/logger.rb#180 - def format_string_subject(severity, prefix, subject, output); end +# Format spawn events. +# +# source://console//lib/console/terminal/formatter/spawn.rb#10 +class Console::Terminal::Formatter::Spawn + # @return [Spawn] a new instance of Spawn + # + # source://console//lib/console/terminal/formatter/spawn.rb#13 + def initialize(terminal); end - # source://console//lib/console/terminal/logger.rb#138 - def format_subject(severity, prefix, subject, buffer); end + # source://console//lib/console/terminal/formatter/spawn.rb#18 + def format(event, output, verbose: T.unsafe(nil), width: T.unsafe(nil)); end - # source://console//lib/console/terminal/logger.rb#192 - def format_value(value, output); end + private - # source://console//lib/console/terminal/logger.rb#200 - def time_offset_prefix; end + # source://console//lib/console/terminal/formatter/spawn.rb#34 + def chdir_string(options); end end -# source://console//lib/console/terminal/logger.rb#90 -Console::Terminal::Logger::UNKNOWN = T.let(T.unsafe(nil), Symbol) +# source://console//lib/console/terminal/formatter/spawn.rb#11 +Console::Terminal::Formatter::Spawn::KEY = T.let(T.unsafe(nil), Symbol) # source://console//lib/console/terminal/text.rb#11 class Console::Terminal::Text @@ -703,24 +695,27 @@ class Console::Terminal::Text # When the argument is a proc/lambda, call it with self as the argument. # When the argument is anything else, write it directly to the output. # - # source://console//lib/console/terminal/text.rb#59 + # source://console//lib/console/terminal/text.rb#63 def print(*arguments); end # Print out the arguments as per {#print}, followed by the reset sequence and a newline. # - # source://console//lib/console/terminal/text.rb#73 + # source://console//lib/console/terminal/text.rb#77 def print_line(*arguments); end - # source://console//lib/console/terminal/text.rb#45 + # source://console//lib/console/terminal/text.rb#49 def puts(*arguments, style: T.unsafe(nil)); end - # source://console//lib/console/terminal/text.rb#32 + # source://console//lib/console/terminal/text.rb#36 def reset; end - # source://console//lib/console/terminal/text.rb#29 + # source://console//lib/console/terminal/text.rb#33 def style(foreground, background = T.unsafe(nil), *attributes); end - # source://console//lib/console/terminal/text.rb#35 + # source://console//lib/console/terminal/text.rb#29 + def width; end + + # source://console//lib/console/terminal/text.rb#39 def write(*arguments, style: T.unsafe(nil)); end end @@ -731,14 +726,17 @@ class Console::Terminal::XTerm < ::Console::Terminal::Text # source://console//lib/console/terminal/xterm.rb#38 def colors?; end - # source://console//lib/console/terminal/xterm.rb#64 + # source://console//lib/console/terminal/xterm.rb#71 def reset; end # source://console//lib/console/terminal/xterm.rb#42 def size; end - # source://console//lib/console/terminal/xterm.rb#46 + # source://console//lib/console/terminal/xterm.rb#53 def style(foreground, background = T.unsafe(nil), *attributes); end + + # source://console//lib/console/terminal/xterm.rb#49 + def width; end end # source://console//lib/console/terminal/xterm.rb#26 @@ -747,8 +745,8 @@ Console::Terminal::XTerm::ATTRIBUTES = T.let(T.unsafe(nil), Hash) # source://console//lib/console/terminal/xterm.rb#14 Console::Terminal::XTerm::COLORS = T.let(T.unsafe(nil), Hash) -# source://console//lib/console/filter.rb#12 -Console::UNKNOWN = T.let(T.unsafe(nil), String) +# source://console//lib/console/filter.rb#10 +Console::UNKNOWN = T.let(T.unsafe(nil), Symbol) # source://console//lib/console/version.rb#7 Console::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi b/sorbet/rbi/gems/diff-lcs@1.5.1.rbi similarity index 91% rename from sorbet/rbi/gems/diff-lcs@1.5.0.rbi rename to sorbet/rbi/gems/diff-lcs@1.5.1.rbi index 4e1f79154..aa5aa3c28 100644 --- a/sorbet/rbi/gems/diff-lcs@1.5.0.rbi +++ b/sorbet/rbi/gems/diff-lcs@1.5.1.rbi @@ -4,9 +4,57 @@ # This is an autogenerated file for types exported from the `diff-lcs` gem. # Please instead update this file by running `bin/tapioca gem diff-lcs`. + # source://diff-lcs//lib/diff/lcs.rb#3 module Diff; end +# == How Diff Works (by Mark-Jason Dominus) +# +# I once read an article written by the authors of +diff+; they said that they +# hard worked very hard on the algorithm until they found the right one. +# +# I think what they ended up using (and I hope someone will correct me, because +# I am not very confident about this) was the `longest common subsequence' +# method. In the LCS problem, you have two sequences of items: +# +# a b c d f g h j q z +# a b c d e f g i j k r x y z +# +# and you want to find the longest sequence of items that is present in both +# original sequences in the same order. That is, you want to find a new +# sequence *S* which can be obtained from the first sequence by deleting some +# items, and from the second sequence by deleting other items. You also want +# *S* to be as long as possible. In this case *S* is: +# +# a b c d f g j z +# +# From there it's only a small step to get diff-like output: +# +# e h i k q r x y +# + - + + - + + + +# +# This module solves the LCS problem. It also includes a canned function to +# generate +diff+-like output. +# +# It might seem from the example above that the LCS of two sequences is always +# pretty obvious, but that's not always the case, especially when the two +# sequences have many repeated elements. For example, consider +# +# a x b y c z p d q +# a b c a x b y c z +# +# A naive approach might start by matching up the +a+ and +b+ that appear at +# the beginning of each sequence, like this: +# +# a x b y c z p d q +# a b c a b y c z +# +# This finds the common subsequence +a b c z+. But actually, the LCS is +a x b +# y c z+: +# +# 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 module Diff::LCS # Returns the difference set between +self+ and +other+. See Diff::LCS#diff. @@ -91,7 +139,7 @@ module Diff::LCS def unpatch_me(patchset); end class << self - # :yields seq1[i] for each matched: + # :yields: seq1[i] for each matched # # source://diff-lcs//lib/diff/lcs.rb#144 def LCS(seq1, seq2, &block); end @@ -112,7 +160,7 @@ module Diff::LCS # source://diff-lcs//lib/diff/lcs.rb#168 def diff(seq1, seq2, callbacks = T.unsafe(nil), &block); end - # :yields seq1[i] for each matched: + # :yields: seq1[i] for each matched # # source://diff-lcs//lib/diff/lcs.rb#144 def lcs(seq1, seq2, &block); end @@ -158,13 +206,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#624 + # source://diff-lcs//lib/diff/lcs.rb#626 def patch(src, patchset, direction = T.unsafe(nil)); end # Given a set of patchset, convert the current version to the next version. # Does no auto-discovery. # - # source://diff-lcs//lib/diff/lcs.rb#734 + # source://diff-lcs//lib/diff/lcs.rb#736 def patch!(src, patchset); end # #sdiff computes all necessary components to show two sequences and their @@ -372,7 +420,7 @@ module Diff::LCS # Given a set of patchset, convert the current version to the prior version. # Does no auto-discovery. # - # source://diff-lcs//lib/diff/lcs.rb#728 + # source://diff-lcs//lib/diff/lcs.rb#730 def unpatch!(src, patchset); end private @@ -649,15 +697,15 @@ end # require 'pp' # pp diffs.map { |e| e.map { |f| f.to_a } } # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#223 +# source://diff-lcs//lib/diff/lcs/callbacks.rb#225 class Diff::LCS::ContextDiffCallbacks < ::Diff::LCS::DiffCallbacks - # source://diff-lcs//lib/diff/lcs/callbacks.rb#232 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#234 def change(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#224 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#226 def discard_a(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#228 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#230 def discard_b(event); end end @@ -749,38 +797,38 @@ end # require 'pp' # pp diffs.map { |e| e.map { |f| f.to_a } } # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#106 +# source://diff-lcs//lib/diff/lcs/callbacks.rb#108 class Diff::LCS::DiffCallbacks - # :yields self: + # :yields: self # # @return [DiffCallbacks] a new instance of DiffCallbacks # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 + # source://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#108 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#110 def diffs; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#133 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#135 def discard_a(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#137 + # source://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#125 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#127 def finish; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#129 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#131 def match(_event); end private - # source://diff-lcs//lib/diff/lcs/callbacks.rb#141 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#143 def finish_hunk; end end @@ -800,48 +848,48 @@ class Diff::LCS::Hunk # Returns the value of attribute blocks. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#63 + # source://diff-lcs//lib/diff/lcs/hunk.rb#62 def blocks; end # Returns a diff string based on a format. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#116 + # source://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#65 + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 def end_new; end # Returns the value of attribute end_old. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#65 + # source://diff-lcs//lib/diff/lcs/hunk.rb#64 def end_old; end # Returns the value of attribute file_length_difference. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#66 + # source://diff-lcs//lib/diff/lcs/hunk.rb#65 def file_length_difference; end # Change the "start" and "end" fields to note that context should be added # to this hunk. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#70 + # source://diff-lcs//lib/diff/lcs/hunk.rb#69 def flag_context; end - # source://diff-lcs//lib/diff/lcs/hunk.rb#72 + # source://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#98 + # source://diff-lcs//lib/diff/lcs/hunk.rb#97 def merge(hunk); end # @return [Boolean] # - # source://diff-lcs//lib/diff/lcs/hunk.rb#326 + # source://diff-lcs//lib/diff/lcs/hunk.rb#331 def missing_last_newline?(data); end # Determines whether there is an overlap between this hunk and the @@ -850,60 +898,60 @@ class Diff::LCS::Hunk # # @return [Boolean] # - # source://diff-lcs//lib/diff/lcs/hunk.rb#110 + # source://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#64 + # source://diff-lcs//lib/diff/lcs/hunk.rb#63 def start_new; end # Returns the value of attribute start_old. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#64 + # source://diff-lcs//lib/diff/lcs/hunk.rb#63 def start_old; end # Merges this hunk and the provided hunk together if they overlap. Returns # a truthy value so that if there is no overlap, you can know the merge # was skipped. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#98 + # source://diff-lcs//lib/diff/lcs/hunk.rb#97 def unshift(hunk); end private - # source://diff-lcs//lib/diff/lcs/hunk.rb#213 + # source://diff-lcs//lib/diff/lcs/hunk.rb#214 def context_diff(last = T.unsafe(nil)); end # Generate a range of item numbers to print. Only print 1 number if the # range has only one item in it. Otherwise, it's 'start,end' # - # source://diff-lcs//lib/diff/lcs/hunk.rb#293 + # source://diff-lcs//lib/diff/lcs/hunk.rb#298 def context_range(mode, op, last = T.unsafe(nil)); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#271 + # source://diff-lcs//lib/diff/lcs/hunk.rb#276 def ed_diff(format, _last = T.unsafe(nil)); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#339 + # source://diff-lcs//lib/diff/lcs/hunk.rb#344 def encode(literal, target_encoding = T.unsafe(nil)); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#343 + # source://diff-lcs//lib/diff/lcs/hunk.rb#348 def encode_as(string, *args); end # Note that an old diff can't have any context. Therefore, we know that # there's only one block in the hunk. # - # source://diff-lcs//lib/diff/lcs/hunk.rb#135 + # source://diff-lcs//lib/diff/lcs/hunk.rb#134 def old_diff(_last = T.unsafe(nil)); end - # source://diff-lcs//lib/diff/lcs/hunk.rb#160 + # source://diff-lcs//lib/diff/lcs/hunk.rb#159 def unified_diff(last = T.unsafe(nil)); end # Generate a range of item numbers to print for unified diff. Print number # where block starts, followed by number of lines in the block # (don't print number of lines if it's 1) # - # source://diff-lcs//lib/diff/lcs/hunk.rb#311 + # source://diff-lcs//lib/diff/lcs/hunk.rb#316 def unified_range(mode, last); end end @@ -1042,32 +1090,32 @@ end # require 'pp' # pp diffs.map { |e| e.to_a } # -# source://diff-lcs//lib/diff/lcs/callbacks.rb#301 +# source://diff-lcs//lib/diff/lcs/callbacks.rb#303 class Diff::LCS::SDiffCallbacks - # :yields self: + # :yields: self # # @return [SDiffCallbacks] a new instance of SDiffCallbacks # @yield [_self] # @yieldparam _self [Diff::LCS::SDiffCallbacks] the object that the method was called on # - # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#307 def initialize; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#322 + # source://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#303 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#305 def diffs; end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#314 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#316 def discard_a(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#318 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#320 def discard_b(event); end - # source://diff-lcs//lib/diff/lcs/callbacks.rb#310 + # source://diff-lcs//lib/diff/lcs/callbacks.rb#312 def match(event); end end diff --git a/sorbet/rbi/gems/dotenv-rails@3.0.0.rbi b/sorbet/rbi/gems/dotenv-rails@3.1.2.rbi similarity index 99% rename from sorbet/rbi/gems/dotenv-rails@3.0.0.rbi rename to sorbet/rbi/gems/dotenv-rails@3.1.2.rbi index 26917807e..ecb79a0b0 100644 --- a/sorbet/rbi/gems/dotenv-rails@3.0.0.rbi +++ b/sorbet/rbi/gems/dotenv-rails@3.1.2.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `dotenv-rails` gem. # Please instead update this file by running `bin/tapioca gem dotenv-rails`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/dotenv@3.0.0.rbi b/sorbet/rbi/gems/dotenv@3.1.2.rbi similarity index 85% rename from sorbet/rbi/gems/dotenv@3.0.0.rbi rename to sorbet/rbi/gems/dotenv@3.1.2.rbi index 9d8976dce..11364f386 100644 --- a/sorbet/rbi/gems/dotenv@3.0.0.rbi +++ b/sorbet/rbi/gems/dotenv@3.1.2.rbi @@ -4,32 +4,33 @@ # This is an autogenerated file for types exported from the `dotenv` gem. # Please instead update this file by running `bin/tapioca gem dotenv`. + # Shim to load environment variables from `.env files into `ENV`. # -# source://dotenv//lib/dotenv/substitutions/variable.rb#3 +# source://dotenv//lib/dotenv/version.rb#1 module Dotenv extend ::Dotenv # Returns the value of attribute instrumenter. # - # source://dotenv//lib/dotenv.rb#14 + # source://dotenv//lib/dotenv.rb#15 def instrumenter; end # Sets the attribute instrumenter # # @param value the value to set the attribute instrumenter to. # - # source://dotenv//lib/dotenv.rb#14 + # source://dotenv//lib/dotenv.rb#15 def instrumenter=(_arg0); end # Loads environment variables from one or more `.env` files. See `#parse` for more details. # - # source://dotenv//lib/dotenv.rb#17 + # source://dotenv//lib/dotenv.rb#18 def load(*filenames, overwrite: T.unsafe(nil), ignore: T.unsafe(nil)); end # Same as `#load`, but raises Errno::ENOENT if any files don't exist # - # source://dotenv//lib/dotenv.rb#26 + # source://dotenv//lib/dotenv.rb#27 def load!(*filenames); end # Modify `ENV` for the block and restore it to its previous state afterwards. @@ -39,27 +40,27 @@ module Dotenv # # @param env [Hash] Hash of keys and values to set in `ENV` # - # source://dotenv//lib/dotenv.rb#112 + # source://dotenv//lib/dotenv.rb#116 def modify(env = T.unsafe(nil), &block); end # same as `#load`, but will overwrite existing values in `ENV` # - # source://dotenv//lib/dotenv.rb#31 + # source://dotenv//lib/dotenv.rb#32 def overload(*filenames); end # same as `#overwrite`, but raises Errno::ENOENT if any files don't exist # - # source://dotenv//lib/dotenv.rb#37 + # source://dotenv//lib/dotenv.rb#38 def overload!(*filenames); end # same as `#load`, but will overwrite existing values in `ENV` # - # source://dotenv//lib/dotenv.rb#31 + # source://dotenv//lib/dotenv.rb#32 def overwrite(*filenames); end # same as `#overwrite`, but raises Errno::ENOENT if any files don't exist # - # source://dotenv//lib/dotenv.rb#37 + # source://dotenv//lib/dotenv.rb#38 def overwrite!(*filenames); end # Parses the given files, yielding for each file if a block is given. @@ -70,12 +71,12 @@ module Dotenv # @param block [Proc] Block to yield for each parsed `Dotenv::Environment` # @return [Hash] parsed key/value pairs # - # source://dotenv//lib/dotenv.rb#49 + # source://dotenv//lib/dotenv.rb#50 def parse(*filenames, overwrite: T.unsafe(nil), ignore: T.unsafe(nil), &block); end # @raise [MissingKeys] # - # source://dotenv//lib/dotenv.rb#122 + # source://dotenv//lib/dotenv.rb#126 def require_keys(*keys); end # Restore `ENV` to a given state @@ -83,12 +84,12 @@ module Dotenv # @param env [Hash] Hash of keys and values to restore, defaults to the last saved state # @param safe [Boolean] Is it safe to modify `ENV`? Defaults to `true` in the main thread, otherwise raises an error. # - # source://dotenv//lib/dotenv.rb#76 + # source://dotenv//lib/dotenv.rb#77 def restore(env = T.unsafe(nil), safe: T.unsafe(nil)); end # Save the current `ENV` to be restored later # - # source://dotenv//lib/dotenv.rb#66 + # source://dotenv//lib/dotenv.rb#67 def save; end # Update `ENV` with the given hash of keys and values @@ -96,12 +97,12 @@ module Dotenv # @param env [Hash] Hash of keys and values to set in `ENV` # @param overwrite [Boolean] Overwrite existing `ENV` values # - # source://dotenv//lib/dotenv.rb#94 + # source://dotenv//lib/dotenv.rb#98 def update(env = T.unsafe(nil), overwrite: T.unsafe(nil)); end private - # source://dotenv//lib/dotenv.rb#130 + # source://dotenv//lib/dotenv.rb#134 def instrument(name, payload = T.unsafe(nil), &block); end end @@ -299,20 +300,20 @@ Dotenv::Parser::LINE = T.let(T.unsafe(nil), Regexp) # Rails integration for using Dotenv to load ENV variables from a file # -# source://dotenv//lib/dotenv/rails.rb#20 +# source://dotenv//lib/dotenv/rails.rb#25 class Dotenv::Rails < ::Rails::Railtie # @return [Rails] a new instance of Rails # - # source://dotenv//lib/dotenv/rails.rb#23 + # source://dotenv//lib/dotenv/rails.rb#28 def initialize; end - # source://dotenv//lib/dotenv/rails.rb#21 + # source://dotenv//lib/dotenv/rails.rb#26 def autorestore(*_arg0, **_arg1, &_arg2); end - # source://dotenv//lib/dotenv/rails.rb#21 + # source://dotenv//lib/dotenv/rails.rb#26 def autorestore=(arg); end - # source://dotenv//lib/dotenv/rails.rb#75 + # source://dotenv//lib/dotenv/rails.rb#86 def deprecator; end # The current environment that the app is running in. @@ -322,13 +323,13 @@ class Dotenv::Rails < ::Rails::Railtie # # See https://github.com/bkeepers/dotenv/issues/219 # - # source://dotenv//lib/dotenv/rails.rb#65 + # source://dotenv//lib/dotenv/rails.rb#76 def env; end - # source://dotenv//lib/dotenv/rails.rb#21 + # source://dotenv//lib/dotenv/rails.rb#26 def files(*_arg0, **_arg1, &_arg2); end - # source://dotenv//lib/dotenv/rails.rb#21 + # source://dotenv//lib/dotenv/rails.rb#26 def files=(arg); end # Public: Load dotenv @@ -336,72 +337,71 @@ class Dotenv::Rails < ::Rails::Railtie # This will get called during the `before_configuration` callback, but you # can manually call `Dotenv::Rails.load` if you needed it sooner. # - # source://dotenv//lib/dotenv/rails.rb#43 + # source://dotenv//lib/dotenv/rails.rb#48 def load; end - # source://dotenv//lib/dotenv/rails.rb#21 + # source://dotenv//lib/dotenv/rails.rb#26 def logger(*_arg0, **_arg1, &_arg2); end - # source://dotenv//lib/dotenv/rails.rb#21 - def logger=(arg); end + # Set a new logger and replay logs + # + # source://dotenv//lib/dotenv/rails.rb#65 + def logger=(new_logger); end - # source://dotenv//lib/dotenv/rails.rb#47 + # source://dotenv//lib/dotenv/rails.rb#52 def overload; end - # source://dotenv//lib/dotenv/rails.rb#21 + # source://dotenv//lib/dotenv/rails.rb#26 def overwrite(*_arg0, **_arg1, &_arg2); end - # source://dotenv//lib/dotenv/rails.rb#21 + # source://dotenv//lib/dotenv/rails.rb#26 def overwrite=(arg); end # Internal: `Rails.root` is nil in Rails 4.1 before the application is # initialized, so this falls back to the `RAILS_ROOT` environment variable, # or the current working directory. # - # source://dotenv//lib/dotenv/rails.rb#55 + # source://dotenv//lib/dotenv/rails.rb#60 def root; end class << self # Rails uses `#method_missing` to delegate all class methods to the # instance, which means `Kernel#load` gets called here. We don't want that. # - # source://dotenv//lib/dotenv/rails.rb#81 + # source://dotenv//lib/dotenv/rails.rb#92 def load; end end end -# source://dotenv//lib/dotenv/rails.rb#73 +# source://dotenv//lib/dotenv/rails.rb#84 Dotenv::Rails::TEST_RAKE_TASKS = T.let(T.unsafe(nil), Regexp) -# source://dotenv//lib/dotenv/rails.rb#103 +# source://dotenv//lib/dotenv/rails.rb#113 Dotenv::Railtie = Dotenv::Rails # A logger that can be used before the apps real logger is initialized. # # source://dotenv//lib/dotenv/replay_logger.rb#3 -class Dotenv::ReplayLogger +class Dotenv::ReplayLogger < ::Logger # @return [ReplayLogger] a new instance of ReplayLogger # # source://dotenv//lib/dotenv/replay_logger.rb#4 def initialize; end - # source://dotenv//lib/dotenv/replay_logger.rb#8 - def method_missing(name, *args, &block); end - - # source://dotenv//lib/dotenv/replay_logger.rb#16 - def replay(logger); end - - private + # Override the add method to store logs so we can replay them to a real logger later. + # + # source://dotenv//lib/dotenv/replay_logger.rb#10 + def add(*args, &block); end - # @return [Boolean] + # Replay the store logs to a real logger. # - # source://dotenv//lib/dotenv/replay_logger.rb#12 - def respond_to_missing?(name, include_private = T.unsafe(nil)); end + # source://dotenv//lib/dotenv/replay_logger.rb#15 + def replay(logger); end end # An internal monitor to synchronize access to ENV in multi-threaded environments. # -# source://dotenv//lib/dotenv.rb#11 +# source://dotenv//lib/dotenv.rb#12 Dotenv::SEMAPHORE = T.let(T.unsafe(nil), Monitor) # source://dotenv//lib/dotenv/substitutions/variable.rb#4 @@ -436,3 +436,6 @@ module Dotenv::Substitutions::Variable def substitute(match, variable, env); end end end + +# source://dotenv//lib/dotenv/version.rb#2 +Dotenv::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/drb@2.2.0.rbi b/sorbet/rbi/gems/drb@2.2.1.rbi similarity index 80% rename from sorbet/rbi/gems/drb@2.2.0.rbi rename to sorbet/rbi/gems/drb@2.2.1.rbi index 657ff895f..d97695d9a 100644 --- a/sorbet/rbi/gems/drb@2.2.0.rbi +++ b/sorbet/rbi/gems/drb@2.2.1.rbi @@ -4,7 +4,10 @@ # 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 @@ -13,7 +16,7 @@ module DRb # If there is no current server, this returns the default configuration. # See #current_server and DRbServer::make_config. # - # source://drb//drb/drb.rb#1832 + # source://drb//lib/drb/drb.rb#1832 def config; end # Get the 'current' server. @@ -29,14 +32,14 @@ module DRb # # @raise [DRbServerNotFound] # - # source://drb//drb/drb.rb#1789 + # 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//drb/drb.rb#1934 + # source://drb//lib/drb/drb.rb#1934 def fetch_server(uri); end # Get the front object of the current server. @@ -44,21 +47,21 @@ module DRb # This raises a DRbServerNotFound error if there is no current server. # See #current_server. # - # source://drb//drb/drb.rb#1843 + # source://drb//lib/drb/drb.rb#1843 def front; end # Is +uri+ the URI for the current local server? # # @return [Boolean] # - # source://drb//drb/drb.rb#1822 + # source://drb//lib/drb/drb.rb#1822 def here?(uri); end # Set the default ACL to +acl+. # # See DRb::DRbServer.default_acl. # - # source://drb//drb/drb.rb#1888 + # source://drb//lib/drb/drb.rb#1888 def install_acl(acl); end # Set the default id conversion object. @@ -68,24 +71,24 @@ module DRb # # See DRbServer#default_id_conv. # - # source://drb//drb/drb.rb#1880 + # source://drb//lib/drb/drb.rb#1880 def install_id_conv(idconv); end - # source://drb//drb/drb.rb#1894 + # 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//drb/drb.rb#1776 + # 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//drb/drb.rb#1776 + # source://drb//lib/drb/drb.rb#1776 def primary_server=(_arg0); end # Registers +server+ with DRb. @@ -101,12 +104,12 @@ module DRb # s = DRb::DRbServer.new # automatically calls regist_server # DRb.fetch_server s.uri #=> # # - # source://drb//drb/drb.rb#1912 + # source://drb//lib/drb/drb.rb#1912 def regist_server(server); end # Removes +server+ from the list of registered servers. # - # source://drb//drb/drb.rb#1921 + # source://drb//lib/drb/drb.rb#1921 def remove_server(server); end # Start a dRuby server locally. @@ -125,7 +128,7 @@ module DRb # # See DRbServer::new. # - # source://drb//drb/drb.rb#1768 + # 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. @@ -133,14 +136,14 @@ module DRb # This operates on the primary server. If there is no primary # server currently running, it is a noop. # - # source://drb//drb/drb.rb#1801 + # 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//drb/drb.rb#1869 + # source://drb//lib/drb/drb.rb#1869 def thread; end # Get a reference id for an object using the current server. @@ -148,7 +151,7 @@ module DRb # This raises a DRbServerNotFound error if there is no current server. # See #current_server. # - # source://drb//drb/drb.rb#1860 + # source://drb//lib/drb/drb.rb#1860 def to_id(obj); end # Convert a reference into an object using the current server. @@ -156,14 +159,14 @@ module DRb # This raises a DRbServerNotFound error if there is no current server. # See #current_server. # - # source://drb//drb/drb.rb#1852 + # 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//drb/drb.rb#1810 + # source://drb//lib/drb/drb.rb#1810 def uri; end class << self @@ -172,7 +175,7 @@ module DRb # If there is no current server, this returns the default configuration. # See #current_server and DRbServer::make_config. # - # source://drb//drb/drb.rb#1832 + # source://drb//lib/drb/drb.rb#1832 def config; end # Get the 'current' server. @@ -188,14 +191,14 @@ module DRb # # @raise [DRbServerNotFound] # - # source://drb//drb/drb.rb#1789 + # 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//drb/drb.rb#1934 + # source://drb//lib/drb/drb.rb#1934 def fetch_server(uri); end # Get the front object of the current server. @@ -203,21 +206,21 @@ module DRb # This raises a DRbServerNotFound error if there is no current server. # See #current_server. # - # source://drb//drb/drb.rb#1843 + # source://drb//lib/drb/drb.rb#1843 def front; end # Is +uri+ the URI for the current local server? # # @return [Boolean] # - # source://drb//drb/drb.rb#1822 + # source://drb//lib/drb/drb.rb#1822 def here?(uri); end # Set the default ACL to +acl+. # # See DRb::DRbServer.default_acl. # - # source://drb//drb/drb.rb#1888 + # source://drb//lib/drb/drb.rb#1888 def install_acl(acl); end # Set the default id conversion object. @@ -227,24 +230,24 @@ module DRb # # See DRbServer#default_id_conv. # - # source://drb//drb/drb.rb#1880 + # source://drb//lib/drb/drb.rb#1880 def install_id_conv(idconv); end - # source://drb//drb/drb.rb#1894 + # 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//drb/drb.rb#1776 + # 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//drb/drb.rb#1776 + # source://drb//lib/drb/drb.rb#1776 def primary_server=(_arg0); end # Registers +server+ with DRb. @@ -260,12 +263,12 @@ module DRb # s = DRb::DRbServer.new # automatically calls regist_server # DRb.fetch_server s.uri #=> # # - # source://drb//drb/drb.rb#1912 + # source://drb//lib/drb/drb.rb#1912 def regist_server(server); end # Removes +server+ from the list of registered servers. # - # source://drb//drb/drb.rb#1921 + # source://drb//lib/drb/drb.rb#1921 def remove_server(server); end # Start a dRuby server locally. @@ -284,7 +287,7 @@ module DRb # # See DRbServer::new. # - # source://drb//drb/drb.rb#1768 + # 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. @@ -292,14 +295,14 @@ module DRb # This operates on the primary server. If there is no primary # server currently running, it is a noop. # - # source://drb//drb/drb.rb#1801 + # 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//drb/drb.rb#1869 + # source://drb//lib/drb/drb.rb#1869 def thread; end # Get a reference id for an object using the current server. @@ -307,7 +310,7 @@ module DRb # This raises a DRbServerNotFound error if there is no current server. # See #current_server. # - # source://drb//drb/drb.rb#1860 + # source://drb//lib/drb/drb.rb#1860 def to_id(obj); end # Convert a reference into an object using the current server. @@ -315,14 +318,14 @@ module DRb # This raises a DRbServerNotFound error if there is no current server. # See #current_server. # - # source://drb//drb/drb.rb#1852 + # 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//drb/drb.rb#1810 + # source://drb//lib/drb/drb.rb#1810 def uri; end end end @@ -331,20 +334,22 @@ end # # 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//drb/drb.rb#523 + # source://drb//lib/drb/drb.rb#523 def initialize(ary); end - # source://drb//drb/drb.rb#542 + # source://drb//lib/drb/drb.rb#542 def _dump(lv); end class << self - # source://drb//drb/drb.rb#538 + # source://drb//lib/drb/drb.rb#538 def _load(s); end end end @@ -358,34 +363,36 @@ end # # 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//drb/drb.rb#1317 + # source://drb//lib/drb/drb.rb#1317 def initialize(remote_uri); end # @return [Boolean] # - # source://drb//drb/drb.rb#1333 + # source://drb//lib/drb/drb.rb#1333 def alive?; end - # source://drb//drb/drb.rb#1328 + # source://drb//lib/drb/drb.rb#1328 def close; end - # source://drb//drb/drb.rb#1323 + # source://drb//lib/drb/drb.rb#1323 def send_message(ref, msg_id, arg, block); end - # source://drb//drb/drb.rb#1321 + # source://drb//lib/drb/drb.rb#1321 def uri; end class << self - # source://drb//drb/drb.rb#1259 + # source://drb//lib/drb/drb.rb#1259 def make_pool; end - # source://drb//drb/drb.rb#1297 + # source://drb//lib/drb/drb.rb#1297 def open(remote_uri); end - # source://drb//drb/drb.rb#1292 + # source://drb//lib/drb/drb.rb#1292 def stop_pool; end end end @@ -399,13 +406,15 @@ end # # 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//drb/drb.rb#374 + # source://drb//lib/drb/drb.rb#374 def to_id(obj); end # Convert an object reference id to an object. @@ -413,7 +422,7 @@ class DRb::DRbIdConv # This implementation looks up the reference id in the local object # space and returns the object it refers to. # - # source://drb//drb/drb.rb#366 + # source://drb//lib/drb/drb.rb#366 def to_obj(ref); end end @@ -426,40 +435,43 @@ end # # 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//drb/drb.rb#557 + # source://drb//lib/drb/drb.rb#557 def initialize(config); end - # source://drb//drb/drb.rb#562 + # source://drb//lib/drb/drb.rb#562 def dump(obj, error = T.unsafe(nil)); end # @raise [DRbConnError] # - # source://drb//drb/drb.rb#579 + # source://drb//lib/drb/drb.rb#579 def load(soc); end - # source://drb//drb/drb.rb#639 + # source://drb//lib/drb/drb.rb#639 def recv_reply(stream); end # @raise [DRbConnError] # - # source://drb//drb/drb.rb#619 + # source://drb//lib/drb/drb.rb#619 def recv_request(stream); end - # source://drb//drb/drb.rb#633 + # source://drb//lib/drb/drb.rb#633 def send_reply(stream, succ, result); end - # source://drb//drb/drb.rb#605 + # source://drb//lib/drb/drb.rb#605 def send_request(stream, ref, msg_id, arg, b); end private - # source://drb//drb/drb.rb#646 + # 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. # @@ -469,49 +481,49 @@ class DRb::DRbObject # # @return [DRbObject] a new instance of DRbObject # - # source://drb//drb/drb.rb#1089 + # source://drb//lib/drb/drb.rb#1089 def initialize(obj, uri = T.unsafe(nil)); end - # source://drb//drb/eq.rb#4 + # source://drb//lib/drb/eq.rb#4 def ==(other); end # Get the reference of the object, if local. # - # source://drb//drb/drb.rb#1115 + # source://drb//lib/drb/drb.rb#1115 def __drbref; end # Get the URI of the remote object. # - # source://drb//drb/drb.rb#1110 + # source://drb//lib/drb/drb.rb#1110 def __drburi; end # Marshall this object. # # The URI and ref of the object are marshalled. # - # source://drb//drb/drb.rb#1080 + # source://drb//lib/drb/drb.rb#1080 def _dump(lv); end - # source://drb//drb/eq.rb#4 + # source://drb//lib/drb/eq.rb#4 def eql?(other); end - # source://drb//drb/eq.rb#9 + # source://drb//lib/drb/eq.rb#9 def hash; end - # source://drb//drb/drb.rb#1135 + # source://drb//lib/drb/drb.rb#1135 def method_missing(msg_id, *a, **_arg2, &b); end - # source://drb//drb/drb.rb#1187 + # source://drb//lib/drb/drb.rb#1187 def pretty_print(q); end - # source://drb//drb/drb.rb#1191 + # 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//drb/drb.rb#1123 + # source://drb//lib/drb/drb.rb#1123 def respond_to?(msg_id, priv = T.unsafe(nil)); end class << self @@ -521,29 +533,29 @@ class DRb::DRbObject # the object itself is returned. Otherwise, a new DRbObject is # created to act as a stub for the remote referenced object. # - # source://drb//drb/drb.rb#1051 + # 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//drb/drb.rb#1065 + # source://drb//lib/drb/drb.rb#1065 def new_with(uri, ref); end # Create a new DRbObject from a URI alone. # - # source://drb//drb/drb.rb#1073 + # 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//drb/drb.rb#1173 + # 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//drb/drb.rb#1160 + # source://drb//lib/drb/drb.rb#1160 def with_friend(uri); end end end @@ -614,15 +626,17 @@ end # 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//drb/drb.rb#724 + # source://drb//lib/drb/drb.rb#724 def add_protocol(prot); end - # source://drb//drb/drb.rb#802 + # source://drb//lib/drb/drb.rb#802 def auto_load(uri); end # Open a client connection to +uri+ with the configuration +config+. @@ -635,7 +649,7 @@ module DRb::DRbProtocol # # @raise [DRbBadURI] # - # source://drb//drb/drb.rb#736 + # 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 @@ -650,7 +664,7 @@ module DRb::DRbProtocol # # @raise [DRbBadURI] # - # source://drb//drb/drb.rb#764 + # source://drb//lib/drb/drb.rb#764 def open_server(uri, config, first = T.unsafe(nil)); end # Parse +uri+ into a [uri, option] pair. @@ -662,16 +676,16 @@ module DRb::DRbProtocol # # @raise [DRbBadURI] # - # source://drb//drb/drb.rb#785 + # 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//drb/drb.rb#724 + # source://drb//lib/drb/drb.rb#724 def add_protocol(prot); end - # source://drb//drb/drb.rb#802 + # source://drb//lib/drb/drb.rb#802 def auto_load(uri); end # Open a client connection to +uri+ with the configuration +config+. @@ -684,7 +698,7 @@ module DRb::DRbProtocol # # @raise [DRbBadURI] # - # source://drb//drb/drb.rb#736 + # 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 @@ -699,7 +713,7 @@ module DRb::DRbProtocol # # @raise [DRbBadURI] # - # source://drb//drb/drb.rb#764 + # source://drb//lib/drb/drb.rb#764 def open_server(uri, config, first = T.unsafe(nil)); end # Parse +uri+ into a [uri, option] pair. @@ -711,26 +725,29 @@ module DRb::DRbProtocol # # @raise [DRbBadURI] # - # source://drb//drb/drb.rb#785 + # 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//drb/drb.rb#434 + # source://drb//lib/drb/drb.rb#434 def initialize(error); end # the class of the error, as a string. # - # source://drb//drb/drb.rb#441 + # 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. # @@ -777,14 +794,14 @@ class DRb::DRbServer # # @return [DRbServer] a new instance of DRbServer # - # source://drb//drb/drb.rb#1451 + # 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//drb/drb.rb#1506 + # source://drb//lib/drb/drb.rb#1506 def alive?; end # Check that a method is callable via dRuby. @@ -798,12 +815,12 @@ class DRb::DRbServer # # @raise [ArgumentError] # - # source://drb//drb/drb.rb#1594 + # source://drb//lib/drb/drb.rb#1594 def check_insecure_method(obj, msg_id); end # The configuration of this DRbServer # - # source://drb//drb/drb.rb#1493 + # source://drb//lib/drb/drb.rb#1493 def config; end # The front object of the DRbServer. @@ -811,19 +828,19 @@ class DRb::DRbServer # This object receives remote method calls made on the server's # URI alone, with an object id. # - # source://drb//drb/drb.rb#1490 + # source://drb//lib/drb/drb.rb#1490 def front; end # Is +uri+ the URI for this server? # # @return [Boolean] # - # source://drb//drb/drb.rb#1511 + # source://drb//lib/drb/drb.rb#1511 def here?(uri); end # Stop this server. # - # source://drb//drb/drb.rb#1516 + # source://drb//lib/drb/drb.rb#1516 def stop_service; end # The main thread of this DRbServer. @@ -832,36 +849,36 @@ class DRb::DRbServer # from clients, not that handles each client's request-response # session. # - # source://drb//drb/drb.rb#1484 + # source://drb//lib/drb/drb.rb#1484 def thread; end # Convert a local object to a dRuby reference. # - # source://drb//drb/drb.rb#1533 + # 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//drb/drb.rb#1526 + # source://drb//lib/drb/drb.rb#1526 def to_obj(ref); end # The URI of this DRbServer. # - # source://drb//drb/drb.rb#1477 + # 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//drb/drb.rb#1503 + # 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//drb/drb.rb#1498 + # source://drb//lib/drb/drb.rb#1498 def verbose=(v); end private @@ -869,17 +886,17 @@ class DRb::DRbServer # Coerce an object to a string, providing our own representation if # to_s is not defined for the object. # - # source://drb//drb/drb.rb#1580 + # source://drb//lib/drb/drb.rb#1580 def any_to_s(obj); end - # source://drb//drb/drb.rb#1696 + # 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//drb/drb.rb#1574 + # source://drb//lib/drb/drb.rb#1574 def insecure_method?(msg_id); end # The main loop performed by a DRbServer's internal thread. @@ -890,15 +907,15 @@ class DRb::DRbServer # returning responses, until the client closes the connection # or a local method call fails. # - # source://drb//drb/drb.rb#1714 + # source://drb//lib/drb/drb.rb#1714 def main_loop; end # Starts the DRb main loop in a new thread. # - # source://drb//drb/drb.rb#1555 + # source://drb//lib/drb/drb.rb#1555 def run; end - # source://drb//drb/drb.rb#1540 + # source://drb//lib/drb/drb.rb#1540 def shutdown; end class << self @@ -906,78 +923,80 @@ class DRb::DRbServer # # See also DRb::ACL and #new() # - # source://drb//drb/drb.rb#1375 + # 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//drb/drb.rb#1361 + # 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//drb/drb.rb#1382 + # 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//drb/drb.rb#1368 + # source://drb//lib/drb/drb.rb#1368 def default_load_limit(sz); end - # source://drb//drb/drb.rb#1398 + # 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//drb/drb.rb#1394 + # 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//drb/drb.rb#1389 + # 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//drb/drb.rb#1625 + # source://drb//lib/drb/drb.rb#1625 def initialize(drb_server, client); end - # source://drb//drb/drb.rb#1630 + # source://drb//lib/drb/drb.rb#1630 def perform; end private - # source://drb//drb/drb.rb#1667 + # source://drb//lib/drb/drb.rb#1667 def check_insecure_method; end - # source://drb//drb/drb.rb#1659 + # source://drb//lib/drb/drb.rb#1659 def init_with_client; end - # source://drb//drb/drb.rb#1676 + # source://drb//lib/drb/drb.rb#1676 def perform_without_block; end - # source://drb//drb/drb.rb#1671 + # 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//drb/invokemethod.rb#7 + # source://drb//lib/drb/invokemethod.rb#7 def block_yield(x); end - # source://drb//drb/invokemethod.rb#14 + # source://drb//lib/drb/invokemethod.rb#14 def perform_with_block; end end @@ -985,6 +1004,8 @@ end # # 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. # @@ -994,21 +1015,21 @@ class DRb::DRbTCPSocket # # @return [DRbTCPSocket] a new instance of DRbTCPSocket # - # source://drb//drb/drb.rb#903 + # 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//drb/drb.rb#971 + # source://drb//lib/drb/drb.rb#971 def accept; end # Check to see if this connection is alive. # # @return [Boolean] # - # source://drb//drb/drb.rb#1001 + # source://drb//lib/drb/drb.rb#1001 def alive?; end # Close the connection. @@ -1018,65 +1039,65 @@ class DRb::DRbTCPSocket # returned by #open or by #accept, then it closes this particular # client-server session. # - # source://drb//drb/drb.rb#953 + # 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//drb/drb.rb#918 + # source://drb//lib/drb/drb.rb#918 def peeraddr; end # On the client side, receive a reply from the server. # - # source://drb//drb/drb.rb#941 + # source://drb//lib/drb/drb.rb#941 def recv_reply; end # On the server side, receive a request from the client. # - # source://drb//drb/drb.rb#931 + # source://drb//lib/drb/drb.rb#931 def recv_request; end # On the server side, send a reply to the client. # - # source://drb//drb/drb.rb#936 + # 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//drb/drb.rb#926 + # source://drb//lib/drb/drb.rb#926 def send_request(ref, msg_id, arg, b); end - # source://drb//drb/drb.rb#1010 + # source://drb//lib/drb/drb.rb#1010 def set_sockopt(soc); end # Graceful shutdown # - # source://drb//drb/drb.rb#996 + # source://drb//lib/drb/drb.rb#996 def shutdown; end # Get the socket. # - # source://drb//drb/drb.rb#923 + # source://drb//lib/drb/drb.rb#923 def stream; end # Get the URI that we are connected to. # - # source://drb//drb/drb.rb#914 + # source://drb//lib/drb/drb.rb#914 def uri; end private - # source://drb//drb/drb.rb#986 + # source://drb//lib/drb/drb.rb#986 def accept_or_shutdown; end - # source://drb//drb/drb.rb#962 + # source://drb//lib/drb/drb.rb#962 def close_shutdown_pipe; end class << self # Returns the hostname of this server # - # source://drb//drb/drb.rb#845 + # source://drb//lib/drb/drb.rb#845 def getservername; end # Open a client connection to +uri+ (DRb URI string) using configuration @@ -1086,28 +1107,28 @@ class DRb::DRbTCPSocket # recognized protocol. See DRb::DRbServer.new for information on built-in # URI protocols. # - # source://drb//drb/drb.rb#838 + # 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//drb/drb.rb#876 + # 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//drb/drb.rb#861 + # source://drb//lib/drb/drb.rb#861 def open_server_inaddr_any(host, port); end - # source://drb//drb/drb.rb#818 + # source://drb//lib/drb/drb.rb#818 def parse_uri(uri); end # Parse +uri+ into a [uri, option] pair. # - # source://drb//drb/drb.rb#893 + # source://drb//lib/drb/drb.rb#893 def uri_option(uri, config); end end end @@ -1116,67 +1137,70 @@ end # # DRb UNIX socket URIs look like drbunix:?. The # option is optional. +# +# source://drb//lib/drb/unix.rb#15 class DRb::DRbUNIXSocket < ::DRb::DRbTCPSocket # @return [DRbUNIXSocket] a new instance of DRbUNIXSocket # - # source://drb//drb/unix.rb#62 + # source://drb//lib/drb/unix.rb#62 def initialize(uri, soc, config = T.unsafe(nil), server_mode = T.unsafe(nil)); end - # source://drb//drb/unix.rb#105 + # source://drb//lib/drb/unix.rb#105 def accept; end - # source://drb//drb/unix.rb#95 + # source://drb//lib/drb/unix.rb#95 def close; end - # source://drb//drb/unix.rb#111 + # source://drb//lib/drb/unix.rb#111 def set_sockopt(soc); end class << self - # source://drb//drb/unix.rb#28 + # source://drb//lib/drb/unix.rb#28 def open(uri, config); end - # source://drb//drb/unix.rb#34 + # source://drb//lib/drb/unix.rb#34 def open_server(uri, config); end # :stopdoc: # - # source://drb//drb/unix.rb#17 + # source://drb//lib/drb/unix.rb#17 def parse_uri(uri); end - # source://drb//drb/unix.rb#72 + # source://drb//lib/drb/unix.rb#72 def temp_server; end - # source://drb//drb/unix.rb#57 + # source://drb//lib/drb/unix.rb#57 def uri_option(uri, config); end end end # import from tempfile.rb # -# source://drb//drb/unix.rb#70 +# source://drb//lib/drb/unix.rb#70 DRb::DRbUNIXSocket::Max_try = T.let(T.unsafe(nil), Integer) +# source://drb//lib/drb/drb.rb#1021 class DRb::DRbURIOption # @return [DRbURIOption] a new instance of DRbURIOption # - # source://drb//drb/drb.rb#1022 + # source://drb//lib/drb/drb.rb#1022 def initialize(option); end - # source://drb//drb/drb.rb#1028 + # source://drb//lib/drb/drb.rb#1028 def ==(other); end - # source://drb//drb/drb.rb#1028 + # source://drb//lib/drb/drb.rb#1028 def eql?(other); end - # source://drb//drb/drb.rb#1033 + # source://drb//lib/drb/drb.rb#1033 def hash; end # Returns the value of attribute option. # - # source://drb//drb/drb.rb#1025 + # source://drb//lib/drb/drb.rb#1025 def option; end - # source://drb//drb/drb.rb#1026 + # source://drb//lib/drb/drb.rb#1026 def to_s; end end @@ -1186,10 +1210,12 @@ end # 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//drb/drb.rb#391 + # source://drb//lib/drb/drb.rb#391 def _dump(dummy); end end @@ -1206,6 +1232,8 @@ end # 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. # @@ -1216,20 +1244,20 @@ class DRb::DRbUnknown # # @return [DRbUnknown] a new instance of DRbUnknown # - # source://drb//drb/drb.rb#465 + # source://drb//lib/drb/drb.rb#465 def initialize(err, buf); end - # source://drb//drb/drb.rb#494 + # source://drb//lib/drb/drb.rb#494 def _dump(lv); end # Buffer contained the marshalled, unknown object. # - # source://drb//drb/drb.rb#484 + # source://drb//lib/drb/drb.rb#484 def buf; end # Create a DRbUnknownError exception containing this object. # - # source://drb//drb/drb.rb#508 + # source://drb//lib/drb/drb.rb#508 def exception; end # The name of the unknown thing. @@ -1237,7 +1265,7 @@ class DRb::DRbUnknown # Class name for unknown objects; variable name for unknown # constants. # - # source://drb//drb/drb.rb#481 + # source://drb//lib/drb/drb.rb#481 def name; end # Attempt to load the wrapped marshalled object again. @@ -1246,71 +1274,74 @@ class DRb::DRbUnknown # will be unmarshalled and returned. Otherwise, a new # but identical DRbUnknown object will be returned. # - # source://drb//drb/drb.rb#503 + # source://drb//lib/drb/drb.rb#503 def reload; end class << self - # source://drb//drb/drb.rb#486 + # 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//drb/drb.rb#413 + # source://drb//lib/drb/drb.rb#413 def initialize(unknown); end - # source://drb//drb/drb.rb#425 + # source://drb//lib/drb/drb.rb#425 def _dump(lv); end # Get the wrapped DRb::DRbUnknown object. # - # source://drb//drb/drb.rb#419 + # source://drb//lib/drb/drb.rb#419 def unknown; end class << self - # source://drb//drb/drb.rb#421 + # 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//drb/drb.rb#1202 + # source://drb//lib/drb/drb.rb#1202 def initialize(&blk); end - # source://drb//drb/drb.rb#1237 + # source://drb//lib/drb/drb.rb#1237 def _execute; end # @return [Boolean] # - # source://drb//drb/drb.rb#1213 + # source://drb//lib/drb/drb.rb#1213 def alive?; end - # source://drb//drb/drb.rb#1217 + # source://drb//lib/drb/drb.rb#1217 def kill; end - # source://drb//drb/drb.rb#1222 + # source://drb//lib/drb/drb.rb#1222 def method_missing(msg, *arg, &blk); end end -# source://drb//drb/version.rb#2 +# source://drb//lib/drb/version.rb#2 DRb::VERSION = T.let(T.unsafe(nil), String) -# source://drb//drb/drb.rb#1943 +# source://drb//lib/drb/drb.rb#1943 DRbIdConv = DRb::DRbIdConv # :stopdoc: # -# source://drb//drb/drb.rb#1941 +# source://drb//lib/drb/drb.rb#1941 DRbObject = DRb::DRbObject -# source://drb//drb/drb.rb#1942 +# source://drb//lib/drb/drb.rb#1942 DRbUndumped = DRb::DRbUndumped diff --git a/sorbet/rbi/gems/erb_lint@0.5.0.rbi b/sorbet/rbi/gems/erb_lint@0.6.0.rbi similarity index 99% rename from sorbet/rbi/gems/erb_lint@0.5.0.rbi rename to sorbet/rbi/gems/erb_lint@0.6.0.rbi index cda78b152..1d286490f 100644 --- a/sorbet/rbi/gems/erb_lint@0.5.0.rbi +++ b/sorbet/rbi/gems/erb_lint@0.6.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `erb_lint` gem. # Please instead update this file by running `bin/tapioca gem erb_lint`. + # source://erb_lint//lib/erb_lint/version.rb#3 module ERBLint; end diff --git a/sorbet/rbi/gems/erubi@1.12.0.rbi b/sorbet/rbi/gems/erubi@1.13.0.rbi similarity index 91% rename from sorbet/rbi/gems/erubi@1.12.0.rbi rename to sorbet/rbi/gems/erubi@1.13.0.rbi index c52738faa..16d45faf0 100644 --- a/sorbet/rbi/gems/erubi@1.12.0.rbi +++ b/sorbet/rbi/gems/erubi@1.13.0.rbi @@ -4,14 +4,19 @@ # This is an autogenerated file for types exported from the `erubi` gem. # Please instead update this file by running `bin/tapioca gem erubi`. + # source://erubi//lib/erubi.rb#3 module Erubi + private + + def h(_arg0); end + class << self def h(_arg0); end end end -# source://erubi//lib/erubi.rb#54 +# source://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'). @@ -42,64 +47,64 @@ class Erubi::Engine # # @return [Engine] a new instance of Engine # - # source://erubi//lib/erubi.rb#94 + # source://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#65 + # source://erubi//lib/erubi.rb#62 def bufvar; end # The filename of the template, if one was given. # - # source://erubi//lib/erubi.rb#62 + # source://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#59 + # source://erubi//lib/erubi.rb#56 def src; end private # Add ruby code to the template # - # source://erubi//lib/erubi.rb#226 + # source://erubi//lib/erubi.rb#223 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#235 + # source://erubi//lib/erubi.rb#232 def add_expression(indicator, code); end # Add the result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#244 + # source://erubi//lib/erubi.rb#241 def add_expression_result(code); end # Add the escaped result of Ruby expression to the template # - # source://erubi//lib/erubi.rb#249 + # source://erubi//lib/erubi.rb#246 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#255 + # source://erubi//lib/erubi.rb#252 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#213 + # source://erubi//lib/erubi.rb#210 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#261 + # source://erubi//lib/erubi.rb#258 def handle(indicator, code, tailch, rspace, lspace); end # Make sure that any current expression has been terminated. @@ -107,7 +112,7 @@ class Erubi::Engine # the chain_appends option is used, expressions may not be # terminated. # - # source://erubi//lib/erubi.rb#289 + # source://erubi//lib/erubi.rb#286 def terminate_expression; end # Make sure the buffer variable is the target of the next append @@ -117,13 +122,13 @@ 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#271 + # source://erubi//lib/erubi.rb#268 def with_buffer; end end # The default regular expression used for scanning. # -# source://erubi//lib/erubi.rb#56 +# source://erubi//lib/erubi.rb#53 Erubi::Engine::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) # source://erubi//lib/erubi.rb#17 diff --git a/sorbet/rbi/gems/et-orbi@1.2.7.rbi b/sorbet/rbi/gems/et-orbi@1.2.11.rbi similarity index 77% rename from sorbet/rbi/gems/et-orbi@1.2.7.rbi rename to sorbet/rbi/gems/et-orbi@1.2.11.rbi index 8b736e7e0..5608eaee3 100644 --- a/sorbet/rbi/gems/et-orbi@1.2.7.rbi +++ b/sorbet/rbi/gems/et-orbi@1.2.11.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `et-orbi` gem. # Please instead update this file by running `bin/tapioca gem et-orbi`. + # source://et-orbi//lib/et-orbi/info.rb#2 module EtOrbi class << self @@ -183,22 +184,22 @@ class EtOrbi::EoTime # source://et-orbi//lib/et-orbi/time.rb#67 def initialize(s, zone); end - # source://et-orbi//lib/et-orbi/time.rb#236 + # source://et-orbi//lib/et-orbi/time.rb#251 def +(t); end - # source://et-orbi//lib/et-orbi/time.rb#237 + # source://et-orbi//lib/et-orbi/time.rb#252 def -(t); end - # source://et-orbi//lib/et-orbi/time.rb#229 + # source://et-orbi//lib/et-orbi/time.rb#244 def <(o); end - # source://et-orbi//lib/et-orbi/time.rb#230 + # source://et-orbi//lib/et-orbi/time.rb#245 def <=(o); end - # source://et-orbi//lib/et-orbi/time.rb#231 + # source://et-orbi//lib/et-orbi/time.rb#246 def <=>(o); end - # source://et-orbi//lib/et-orbi/time.rb#206 + # source://et-orbi//lib/et-orbi/time.rb#221 def ==(o); end # Nota Bene: @@ -210,13 +211,13 @@ class EtOrbi::EoTime # The eql? method returns true if obj and other refer to the same hash key. # This is used by Hash to test members for equality. # - # source://et-orbi//lib/et-orbi/time.rb#227 + # source://et-orbi//lib/et-orbi/time.rb#242 def >(o); end - # source://et-orbi//lib/et-orbi/time.rb#228 + # source://et-orbi//lib/et-orbi/time.rb#243 def >=(o); end - # source://et-orbi//lib/et-orbi/time.rb#233 + # source://et-orbi//lib/et-orbi/time.rb#248 def add(t); end # Returns true if this EoTime instance corresponds to 2 different UTC @@ -227,71 +228,78 @@ class EtOrbi::EoTime # # @return [Boolean] # - # source://et-orbi//lib/et-orbi/time.rb#113 + # source://et-orbi//lib/et-orbi/time.rb#128 def ambiguous?; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def asctime; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#409 + def clone; end + + # source://et-orbi//lib/et-orbi/time.rb#218 def day; end # Returns this ::EtOrbi::EoTime as a ::Time instance # in the current UTC timezone. # - # source://et-orbi//lib/et-orbi/time.rb#127 + # source://et-orbi//lib/et-orbi/time.rb#142 def getgm; end # Returns this ::EtOrbi::EoTime as a ::Time instance # in the current UTC timezone. # - # source://et-orbi//lib/et-orbi/time.rb#127 + # source://et-orbi//lib/et-orbi/time.rb#142 def getutc; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def hour; end - # source://et-orbi//lib/et-orbi/time.rb#319 + # source://et-orbi//lib/et-orbi/time.rb#339 def in_time_zone(zone = T.unsafe(nil)); end - # source://et-orbi//lib/et-orbi/time.rb#302 + # source://et-orbi//lib/et-orbi/time.rb#317 def inc(t, dir = T.unsafe(nil)); end # @return [Boolean] # - # source://et-orbi//lib/et-orbi/time.rb#174 + # source://et-orbi//lib/et-orbi/time.rb#189 def is_dst?; end # @return [Boolean] # - # source://et-orbi//lib/et-orbi/time.rb#174 + # source://et-orbi//lib/et-orbi/time.rb#189 def isdst; end - # source://et-orbi//lib/et-orbi/time.rb#277 + # source://et-orbi//lib/et-orbi/time.rb#292 def iso8601(fraction_digits = T.unsafe(nil)); end - # source://et-orbi//lib/et-orbi/time.rb#319 + # source://et-orbi//lib/et-orbi/time.rb#339 def localtime(zone = T.unsafe(nil)); end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def min; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def month; end - # source://et-orbi//lib/et-orbi/time.rb#242 + # source://et-orbi//lib/et-orbi/time.rb#257 def monthdays; end - # source://et-orbi//lib/et-orbi/time.rb#339 + # "reference week", used in fugit for cron modulo notation + # + # source://et-orbi//lib/et-orbi/time.rb#367 def rday; end - # source://et-orbi//lib/et-orbi/time.rb#345 + # source://et-orbi//lib/et-orbi/time.rb#377 def reach(points); end - # source://et-orbi//lib/et-orbi/time.rb#333 + # "reference week", used in fugit for cron modulo notation + # + # source://et-orbi//lib/et-orbi/time.rb#355 def rweek; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def sec; end # instance methods @@ -299,22 +307,22 @@ class EtOrbi::EoTime # source://et-orbi//lib/et-orbi/time.rb#64 def seconds; end - # source://et-orbi//lib/et-orbi/time.rb#95 + # source://et-orbi//lib/et-orbi/time.rb#103 def seconds=(f); end - # source://et-orbi//lib/et-orbi/time.rb#155 + # source://et-orbi//lib/et-orbi/time.rb#170 def strftime(format); end - # source://et-orbi//lib/et-orbi/time.rb#234 + # source://et-orbi//lib/et-orbi/time.rb#249 def subtract(t); end - # source://et-orbi//lib/et-orbi/time.rb#180 + # source://et-orbi//lib/et-orbi/time.rb#195 def to_debug_s; end - # source://et-orbi//lib/et-orbi/time.rb#145 + # source://et-orbi//lib/et-orbi/time.rb#160 def to_f; end - # source://et-orbi//lib/et-orbi/time.rb#150 + # source://et-orbi//lib/et-orbi/time.rb#165 def to_i; end # Returns this ::EtOrbi::EoTime as a ::Time instance @@ -322,10 +330,10 @@ class EtOrbi::EoTime # # Has a #to_t alias. # - # source://et-orbi//lib/et-orbi/time.rb#167 + # source://et-orbi//lib/et-orbi/time.rb#182 def to_local_time; end - # source://et-orbi//lib/et-orbi/time.rb#267 + # source://et-orbi//lib/et-orbi/time.rb#282 def to_s; end # Returns this ::EtOrbi::EoTime as a ::Time instance @@ -333,37 +341,42 @@ class EtOrbi::EoTime # # Has a #to_t alias. # - # source://et-orbi//lib/et-orbi/time.rb#167 + # source://et-orbi//lib/et-orbi/time.rb#182 def to_t; end - # source://et-orbi//lib/et-orbi/time.rb#297 + # source://et-orbi//lib/et-orbi/time.rb#312 def to_time_s; end # Debug current time by showing local time / delta / utc time # for example: "0120-7(0820)" # - # source://et-orbi//lib/et-orbi/time.rb#286 + # source://et-orbi//lib/et-orbi/time.rb#301 def to_utc_comparison_s; end # Returns this ::EtOrbi::EoTime as a ::Time instance # in the current UTC timezone. # - # source://et-orbi//lib/et-orbi/time.rb#127 + # source://et-orbi//lib/et-orbi/time.rb#142 def to_utc_time; end - # source://et-orbi//lib/et-orbi/time.rb#272 + # source://et-orbi//lib/et-orbi/time.rb#287 def to_zs; end - # source://et-orbi//lib/et-orbi/time.rb#319 + # Nullify the "caches" used by #to_time, #rweek, and others + # + # source://et-orbi//lib/et-orbi/time.rb#96 + def touch; end + + # source://et-orbi//lib/et-orbi/time.rb#339 def translate(zone = T.unsafe(nil)); end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def usec; end # Returns this ::EtOrbi::EoTime as a ::Time instance # in the current UTC timezone. # - # source://et-orbi//lib/et-orbi/time.rb#127 + # source://et-orbi//lib/et-orbi/time.rb#142 def utc; end # Returns true if this ::EtOrbi::EoTime instance timezone is UTC. @@ -371,22 +384,22 @@ class EtOrbi::EoTime # # @return [Boolean] # - # source://et-orbi//lib/et-orbi/time.rb#135 + # source://et-orbi//lib/et-orbi/time.rb#150 def utc?; end - # source://et-orbi//lib/et-orbi/time.rb#195 + # source://et-orbi//lib/et-orbi/time.rb#210 def utc_offset; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def wday; end - # source://et-orbi//lib/et-orbi/time.rb#327 + # source://et-orbi//lib/et-orbi/time.rb#347 def wday_in_month; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def yday; end - # source://et-orbi//lib/et-orbi/time.rb#203 + # source://et-orbi//lib/et-orbi/time.rb#218 def year; end # Returns the value of attribute zone. @@ -394,18 +407,18 @@ class EtOrbi::EoTime # source://et-orbi//lib/et-orbi/time.rb#65 def zone; end - # source://et-orbi//lib/et-orbi/time.rb#101 + # source://et-orbi//lib/et-orbi/time.rb#112 def zone=(z); end protected - # source://et-orbi//lib/et-orbi/time.rb#428 + # source://et-orbi//lib/et-orbi/time.rb#465 def _to_f(o); end - # source://et-orbi//lib/et-orbi/time.rb#389 + # source://et-orbi//lib/et-orbi/time.rb#426 def count_weeks(start, dir); end - # source://et-orbi//lib/et-orbi/time.rb#402 + # source://et-orbi//lib/et-orbi/time.rb#439 def strfz(code); end # Returns a Ruby Time instance. @@ -413,7 +426,7 @@ class EtOrbi::EoTime # Warning: the timezone of that Time instance will be UTC when used with # TZInfo < 2.0.0. # - # source://et-orbi//lib/et-orbi/time.rb#384 + # source://et-orbi//lib/et-orbi/time.rb#421 def to_time; end class << self @@ -443,10 +456,10 @@ class EtOrbi::EoTime end end -# source://et-orbi//lib/et-orbi/time.rb#239 +# source://et-orbi//lib/et-orbi/time.rb#254 EtOrbi::EoTime::DAY_S = T.let(T.unsafe(nil), Integer) -# source://et-orbi//lib/et-orbi/time.rb#240 +# source://et-orbi//lib/et-orbi/time.rb#255 EtOrbi::EoTime::WEEK_S = T.let(T.unsafe(nil), Integer) # source://et-orbi//lib/et-orbi.rb#16 diff --git a/sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi b/sorbet/rbi/gems/faraday-http-cache@2.5.1.rbi similarity index 97% rename from sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi rename to sorbet/rbi/gems/faraday-http-cache@2.5.1.rbi index c5440ef36..12ec2a08e 100644 --- a/sorbet/rbi/gems/faraday-http-cache@2.5.0.rbi +++ b/sorbet/rbi/gems/faraday-http-cache@2.5.1.rbi @@ -4,60 +4,61 @@ # This is an autogenerated file for types exported from the `faraday-http-cache` gem. # Please instead update this file by running `bin/tapioca gem faraday-http-cache`. + # source://faraday-http-cache//lib/faraday/http_cache/memory_store.rb#3 module Faraday class << self - # source://faraday/2.7.11/lib/faraday.rb#55 + # source://faraday/2.10.0/lib/faraday.rb#55 def default_adapter; end - # source://faraday/2.7.11/lib/faraday.rb#102 + # source://faraday/2.10.0/lib/faraday.rb#102 def default_adapter=(adapter); end - # source://faraday/2.7.11/lib/faraday.rb#59 + # source://faraday/2.10.0/lib/faraday.rb#59 def default_adapter_options; end - # source://faraday/2.7.11/lib/faraday.rb#59 + # source://faraday/2.10.0/lib/faraday.rb#59 def default_adapter_options=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#120 + # source://faraday/2.10.0/lib/faraday.rb#120 def default_connection; end - # source://faraday/2.7.11/lib/faraday.rb#62 + # source://faraday/2.10.0/lib/faraday.rb#62 def default_connection=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#127 + # source://faraday/2.10.0/lib/faraday.rb#127 def default_connection_options; end - # source://faraday/2.7.11/lib/faraday.rb#134 + # source://faraday/2.10.0/lib/faraday.rb#134 def default_connection_options=(options); end - # source://faraday/2.7.11/lib/faraday.rb#67 + # source://faraday/2.10.0/lib/faraday.rb#67 def ignore_env_proxy; end - # source://faraday/2.7.11/lib/faraday.rb#67 + # source://faraday/2.10.0/lib/faraday.rb#67 def ignore_env_proxy=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#46 + # source://faraday/2.10.0/lib/faraday.rb#46 def lib_path; end - # source://faraday/2.7.11/lib/faraday.rb#46 + # source://faraday/2.10.0/lib/faraday.rb#46 def lib_path=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#96 + # source://faraday/2.10.0/lib/faraday.rb#96 def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://faraday/2.7.11/lib/faraday.rb#107 + # source://faraday/2.10.0/lib/faraday.rb#107 def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end - # source://faraday/2.7.11/lib/faraday.rb#42 + # source://faraday/2.10.0/lib/faraday.rb#42 def root_path; end - # source://faraday/2.7.11/lib/faraday.rb#42 + # source://faraday/2.10.0/lib/faraday.rb#42 def root_path=(_arg0); end private - # source://faraday/2.7.11/lib/faraday.rb#143 + # source://faraday/2.10.0/lib/faraday.rb#143 def method_missing(name, *args, &block); end end end diff --git a/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi b/sorbet/rbi/gems/faraday-net_http@3.1.0.rbi similarity index 72% rename from sorbet/rbi/gems/faraday-net_http@3.0.2.rbi rename to sorbet/rbi/gems/faraday-net_http@3.1.0.rbi index aa059e0c4..4831ce7c7 100644 --- a/sorbet/rbi/gems/faraday-net_http@3.0.2.rbi +++ b/sorbet/rbi/gems/faraday-net_http@3.1.0.rbi @@ -4,84 +4,85 @@ # This is an autogenerated file for types exported from the `faraday-net_http` gem. # Please instead update this file by running `bin/tapioca gem faraday-net_http`. + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#12 module Faraday class << self - # source://faraday/2.7.11/lib/faraday.rb#55 + # source://faraday/2.10.0/lib/faraday.rb#55 def default_adapter; end - # source://faraday/2.7.11/lib/faraday.rb#102 + # source://faraday/2.10.0/lib/faraday.rb#102 def default_adapter=(adapter); end - # source://faraday/2.7.11/lib/faraday.rb#59 + # source://faraday/2.10.0/lib/faraday.rb#59 def default_adapter_options; end - # source://faraday/2.7.11/lib/faraday.rb#59 + # source://faraday/2.10.0/lib/faraday.rb#59 def default_adapter_options=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#120 + # source://faraday/2.10.0/lib/faraday.rb#120 def default_connection; end - # source://faraday/2.7.11/lib/faraday.rb#62 + # source://faraday/2.10.0/lib/faraday.rb#62 def default_connection=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#127 + # source://faraday/2.10.0/lib/faraday.rb#127 def default_connection_options; end - # source://faraday/2.7.11/lib/faraday.rb#134 + # source://faraday/2.10.0/lib/faraday.rb#134 def default_connection_options=(options); end - # source://faraday/2.7.11/lib/faraday.rb#67 + # source://faraday/2.10.0/lib/faraday.rb#67 def ignore_env_proxy; end - # source://faraday/2.7.11/lib/faraday.rb#67 + # source://faraday/2.10.0/lib/faraday.rb#67 def ignore_env_proxy=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#46 + # source://faraday/2.10.0/lib/faraday.rb#46 def lib_path; end - # source://faraday/2.7.11/lib/faraday.rb#46 + # source://faraday/2.10.0/lib/faraday.rb#46 def lib_path=(_arg0); end - # source://faraday/2.7.11/lib/faraday.rb#96 + # source://faraday/2.10.0/lib/faraday.rb#96 def new(url = T.unsafe(nil), options = T.unsafe(nil), &block); end - # source://faraday/2.7.11/lib/faraday.rb#107 + # source://faraday/2.10.0/lib/faraday.rb#107 def respond_to_missing?(symbol, include_private = T.unsafe(nil)); end - # source://faraday/2.7.11/lib/faraday.rb#42 + # source://faraday/2.10.0/lib/faraday.rb#42 def root_path; end - # source://faraday/2.7.11/lib/faraday.rb#42 + # source://faraday/2.10.0/lib/faraday.rb#42 def root_path=(_arg0); end private - # source://faraday/2.7.11/lib/faraday.rb#143 + # source://faraday/2.10.0/lib/faraday.rb#143 def method_missing(name, *args, &block); end end end # source://faraday-net_http//lib/faraday/adapter/net_http.rb#13 class Faraday::Adapter - # source://faraday/2.7.11/lib/faraday/adapter.rb#28 + # source://faraday/2.10.0/lib/faraday/adapter.rb#28 def initialize(_app = T.unsafe(nil), opts = T.unsafe(nil), &block); end - # source://faraday/2.7.11/lib/faraday/adapter.rb#55 + # source://faraday/2.10.0/lib/faraday/adapter.rb#55 def call(env); end - # source://faraday/2.7.11/lib/faraday/adapter.rb#50 + # source://faraday/2.10.0/lib/faraday/adapter.rb#50 def close; end - # source://faraday/2.7.11/lib/faraday/adapter.rb#41 + # source://faraday/2.10.0/lib/faraday/adapter.rb#41 def connection(env); end private - # source://faraday/2.7.11/lib/faraday/adapter.rb#85 + # source://faraday/2.10.0/lib/faraday/adapter.rb#85 def request_timeout(type, options); end - # source://faraday/2.7.11/lib/faraday/adapter.rb#62 + # source://faraday/2.10.0/lib/faraday/adapter.rb#62 def save_response(env, status, body, headers = T.unsafe(nil), reason_phrase = T.unsafe(nil), finished: T.unsafe(nil)); end end @@ -103,36 +104,36 @@ class Faraday::Adapter::NetHttp < ::Faraday::Adapter private - # source://faraday-net_http//lib/faraday/adapter/net_http.rb#152 + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#148 def configure_request(http, req); end - # source://faraday-net_http//lib/faraday/adapter/net_http.rb#135 + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#131 def configure_ssl(http, ssl); end # source://faraday-net_http//lib/faraday/adapter/net_http.rb#79 def create_request(env); end - # source://faraday-net_http//lib/faraday/adapter/net_http.rb#191 + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#185 def encoded_body(http_response); end # source://faraday-net_http//lib/faraday/adapter/net_http.rb#95 def perform_request(http, env); end # source://faraday-net_http//lib/faraday/adapter/net_http.rb#109 - def request_with_wrapped_block(http, env); end + def request_with_wrapped_block(http, env, &block); end - # source://faraday-net_http//lib/faraday/adapter/net_http.rb#125 + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#121 def save_http_response(env, http_response); end - # source://faraday-net_http//lib/faraday/adapter/net_http.rb#172 + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#168 def ssl_cert_store(ssl); end - # source://faraday-net_http//lib/faraday/adapter/net_http.rb#181 + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#175 def ssl_verify_mode(ssl); end # @return [Boolean] # - # source://faraday-net_http//lib/faraday/adapter/net_http.rb#203 + # source://faraday-net_http//lib/faraday/adapter/net_http.rb#197 def verify_hostname_enabled?(http, ssl); end end diff --git a/sorbet/rbi/gems/faraday@2.7.11.rbi b/sorbet/rbi/gems/faraday@2.10.0.rbi similarity index 91% rename from sorbet/rbi/gems/faraday@2.7.11.rbi rename to sorbet/rbi/gems/faraday@2.10.0.rbi index 5158c704b..f0682be04 100644 --- a/sorbet/rbi/gems/faraday@2.7.11.rbi +++ b/sorbet/rbi/gems/faraday@2.10.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `faraday` gem. # Please instead update this file by running `bin/tapioca gem faraday`. + # conn.get '/' # # source://faraday//lib/faraday/version.rb#3 @@ -92,13 +93,13 @@ module Faraday # @example With an URL argument # Faraday.new 'http://faraday.com' # # => Faraday::Connection to http://faraday.com + # @example With an URL argument and an options hash + # Faraday.new 'http://faraday.com', params: { page: 1 } + # # => Faraday::Connection to http://faraday.com?page=1 # @example With everything in an options hash # Faraday.new url: 'http://faraday.com', # params: { page: 1 } # # => Faraday::Connection to http://faraday.com?page=1 - # @example With an URL argument and an options hash - # Faraday.new 'http://faraday.com', params: { page: 1 } - # # => Faraday::Connection to http://faraday.com?page=1 # @option options # @option options # @option options @@ -652,10 +653,10 @@ class Faraday::Connection # @api private # @return [Faraday::Connection] # - # source://faraday//lib/faraday/connection.rb#490 + # source://faraday//lib/faraday/connection.rb#491 def dup; end - # source://faraday//lib/faraday/connection.rb#533 + # source://faraday//lib/faraday/connection.rb#534 def find_default_proxy; end # source://faraday//lib/faraday/connection.rb#199 @@ -765,10 +766,10 @@ class Faraday::Connection # source://faraday//lib/faraday/connection.rb#333 def proxy=(new_value); end - # source://faraday//lib/faraday/connection.rb#541 + # source://faraday//lib/faraday/connection.rb#542 def proxy_for_request(url); end - # source://faraday//lib/faraday/connection.rb#513 + # source://faraday//lib/faraday/connection.rb#514 def proxy_from_env(url); end # source://faraday//lib/faraday/connection.rb#279 @@ -784,8 +785,8 @@ class Faraday::Connection # # @param method [Symbol] HTTP method. # @param url [String, URI, nil] String or URI to access. - # @param body [String, nil] The request body that will eventually be converted to - # a string. + # @param body [String, Hash, Array, nil] The request body that will eventually be converted to + # a string; middlewares can be used to support more complex types. # @param headers [Hash, nil] unencoded HTTP header key/value pairs. # @return [Faraday::Response] # @@ -808,7 +809,7 @@ class Faraday::Connection # @return [Boolean] # - # source://faraday//lib/faraday/connection.rb#551 + # source://faraday//lib/faraday/connection.rb#552 def support_parallel?(adapter); end # source://faraday//lib/faraday/connection.rb#199 @@ -850,7 +851,7 @@ class Faraday::Connection # @yieldparam username [String] any username from URI # @yieldparam password [String] any password from URI # - # source://faraday//lib/faraday/connection.rb#507 + # source://faraday//lib/faraday/connection.rb#508 def with_uri_credentials(uri); end end @@ -864,7 +865,7 @@ Faraday::Connection::USER_AGENT = T.let(T.unsafe(nil), String) # A unified error for failed connections. # -# source://faraday//lib/faraday/error.rb#147 +# source://faraday//lib/faraday/error.rb#151 class Faraday::ConnectionFailed < ::Faraday::Error; end # ConnectionOptions contains the configurable properties for a Faraday @@ -1289,6 +1290,11 @@ end # source://faraday//lib/faraday/error.rb#104 class Faraday::ForbiddenError < ::Faraday::ClientError; end +# Raised by Faraday::Middleware and subclasses when invalid default_options are used +# +# source://faraday//lib/faraday/error.rb#163 +class Faraday::InitializationError < ::Faraday::Error; end + # source://faraday//lib/faraday/logging/formatter.rb#6 module Faraday::Logging; end @@ -1380,32 +1386,66 @@ Faraday::METHODS_WITH_QUERY = T.let(T.unsafe(nil), Array) # Middleware is the basic base class of any Faraday middleware. # -# source://faraday//lib/faraday/middleware.rb#5 +# source://faraday//lib/faraday/middleware.rb#7 class Faraday::Middleware extend ::Faraday::MiddlewareRegistry # @return [Middleware] a new instance of Middleware # - # source://faraday//lib/faraday/middleware.rb#10 + # source://faraday//lib/faraday/middleware.rb#14 def initialize(app = T.unsafe(nil), options = T.unsafe(nil)); end # Returns the value of attribute app. # - # source://faraday//lib/faraday/middleware.rb#8 + # source://faraday//lib/faraday/middleware.rb#10 def app; end - # source://faraday//lib/faraday/middleware.rb#15 + # source://faraday//lib/faraday/middleware.rb#57 def call(env); end - # source://faraday//lib/faraday/middleware.rb#25 + # source://faraday//lib/faraday/middleware.rb#67 def close; end # Returns the value of attribute options. # - # source://faraday//lib/faraday/middleware.rb#8 + # source://faraday//lib/faraday/middleware.rb#10 def options; end + + class << self + # default_options attr_reader that initializes class instance variable + # with the values of any Faraday::Middleware defaults, and merges with + # subclass defaults + # + # source://faraday//lib/faraday/middleware.rb#38 + def default_options; end + + # Faraday::Middleware::default_options= allows user to set default options at the Faraday::Middleware + # class level. + # + # my_app/config/initializers/my_faraday_middleware.rb + # + # Faraday::Response::RaiseError.default_options = { include_request: false } + # + # @example Set the Faraday::Response::RaiseError option, `include_request` to `false` + # + # source://faraday//lib/faraday/middleware.rb#28 + def default_options=(options = T.unsafe(nil)); end + + private + + # source://faraday//lib/faraday/middleware.rb#44 + def lock; end + + # @raise [Faraday::InitializationError] + # + # source://faraday//lib/faraday/middleware.rb#48 + def validate_default_options(options); end + end end +# source://faraday//lib/faraday/middleware.rb#12 +Faraday::Middleware::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + # Adds the ability for other modules to register and lookup # middleware classes. # @@ -1510,11 +1550,11 @@ end # Raised by Faraday::Response::RaiseError in case of a nil status in response. # -# source://faraday//lib/faraday/error.rb#139 +# source://faraday//lib/faraday/error.rb#143 class Faraday::NilStatusError < ::Faraday::ServerError # @return [NilStatusError] a new instance of NilStatusError # - # source://faraday//lib/faraday/error.rb#140 + # source://faraday//lib/faraday/error.rb#144 def initialize(exc, response = T.unsafe(nil)); end end @@ -1673,7 +1713,7 @@ end # Raised by middlewares that parse the response, like the JSON response middleware. # -# source://faraday//lib/faraday/error.rb#155 +# source://faraday//lib/faraday/error.rb#159 class Faraday::ParsingError < ::Faraday::Error; end # Raised by Faraday::Response::RaiseError in case of a 407 response. @@ -1747,20 +1787,20 @@ end # builder.adapter :net_http # Faraday::Adapter::NetHttp # end # -# source://faraday//lib/faraday/rack_builder.rb#15 +# source://faraday//lib/faraday/rack_builder.rb#14 class Faraday::RackBuilder # @return [RackBuilder] a new instance of RackBuilder # - # source://faraday//lib/faraday/rack_builder.rb#61 + # source://faraday//lib/faraday/rack_builder.rb#60 def initialize(&block); end - # source://faraday//lib/faraday/rack_builder.rb#179 + # source://faraday//lib/faraday/rack_builder.rb#178 def ==(other); end - # source://faraday//lib/faraday/rack_builder.rb#79 + # source://faraday//lib/faraday/rack_builder.rb#78 def [](idx); end - # source://faraday//lib/faraday/rack_builder.rb#110 + # source://faraday//lib/faraday/rack_builder.rb#109 def adapter(klass = T.unsafe(nil), *args, **_arg2, &block); end # The "rack app" wrapped in middleware. All requests are sent here. @@ -1771,10 +1811,10 @@ class Faraday::RackBuilder # # Returns an object that responds to `call` and returns a Response. # - # source://faraday//lib/faraday/rack_builder.rb#163 + # source://faraday//lib/faraday/rack_builder.rb#162 def app; end - # source://faraday//lib/faraday/rack_builder.rb#73 + # source://faraday//lib/faraday/rack_builder.rb#72 def build; end # ENV Keys @@ -1794,7 +1834,7 @@ class Faraday::RackBuilder # :password - Proxy server password # :ssl - Hash of options for configuring SSL requests. # - # source://faraday//lib/faraday/rack_builder.rb#201 + # source://faraday//lib/faraday/rack_builder.rb#200 def build_env(connection, request); end # Processes a Request into a Response by passing it through this Builder's @@ -1804,140 +1844,140 @@ class Faraday::RackBuilder # @param request [Faraday::Request] # @return [Faraday::Response] # - # source://faraday//lib/faraday/rack_builder.rb#152 + # source://faraday//lib/faraday/rack_builder.rb#151 def build_response(connection, request); end - # source://faraday//lib/faraday/rack_builder.rb#140 + # source://faraday//lib/faraday/rack_builder.rb#139 def delete(handler); end # Returns the value of attribute handlers. # - # source://faraday//lib/faraday/rack_builder.rb#19 + # source://faraday//lib/faraday/rack_builder.rb#18 def handlers; end # Sets the attribute handlers # # @param value the value to set the attribute handlers to. # - # source://faraday//lib/faraday/rack_builder.rb#19 + # source://faraday//lib/faraday/rack_builder.rb#18 def handlers=(_arg0); end # methods to push onto the various positions in the stack: # - # source://faraday//lib/faraday/rack_builder.rb#119 + # source://faraday//lib/faraday/rack_builder.rb#118 def insert(index, *args, **_arg2, &block); end - # source://faraday//lib/faraday/rack_builder.rb#128 + # source://faraday//lib/faraday/rack_builder.rb#127 def insert_after(index, *args, **_arg2, &block); end # methods to push onto the various positions in the stack: # - # source://faraday//lib/faraday/rack_builder.rb#119 + # source://faraday//lib/faraday/rack_builder.rb#118 def insert_before(index, *args, **_arg2, &block); end # Locks the middleware stack to ensure no further modifications are made. # - # source://faraday//lib/faraday/rack_builder.rb#84 + # source://faraday//lib/faraday/rack_builder.rb#83 def lock!; end # @return [Boolean] # - # source://faraday//lib/faraday/rack_builder.rb#88 + # source://faraday//lib/faraday/rack_builder.rb#87 def locked?; end - # source://faraday//lib/faraday/rack_builder.rb#102 + # source://faraday//lib/faraday/rack_builder.rb#101 def request(key, *args, **_arg2, &block); end - # source://faraday//lib/faraday/rack_builder.rb#106 + # source://faraday//lib/faraday/rack_builder.rb#105 def response(key, *args, **_arg2, &block); end - # source://faraday//lib/faraday/rack_builder.rb#133 + # source://faraday//lib/faraday/rack_builder.rb#132 def swap(index, *args, **_arg2, &block); end - # source://faraday//lib/faraday/rack_builder.rb#171 + # source://faraday//lib/faraday/rack_builder.rb#170 def to_app; end - # source://faraday//lib/faraday/rack_builder.rb#92 + # source://faraday//lib/faraday/rack_builder.rb#91 def use(klass, *args, **_arg2, &block); end private # @return [Boolean] # - # source://faraday//lib/faraday/rack_builder.rb#233 + # source://faraday//lib/faraday/rack_builder.rb#232 def adapter_set?; end - # source://faraday//lib/faraday/rack_builder.rb#245 + # source://faraday//lib/faraday/rack_builder.rb#244 def assert_index(index); end # @raise [MISSING_ADAPTER_ERROR] # - # source://faraday//lib/faraday/rack_builder.rb#229 + # source://faraday//lib/faraday/rack_builder.rb#228 def ensure_adapter!; end - # source://faraday//lib/faraday/rack_builder.rb#67 + # source://faraday//lib/faraday/rack_builder.rb#66 def initialize_dup(original); end # @return [Boolean] # - # source://faraday//lib/faraday/rack_builder.rb#237 + # source://faraday//lib/faraday/rack_builder.rb#236 def is_adapter?(klass); end - # source://faraday//lib/faraday/rack_builder.rb#223 + # source://faraday//lib/faraday/rack_builder.rb#222 def raise_if_adapter(klass); end # @raise [StackLocked] # - # source://faraday//lib/faraday/rack_builder.rb#219 + # source://faraday//lib/faraday/rack_builder.rb#218 def raise_if_locked; end - # source://faraday//lib/faraday/rack_builder.rb#241 + # source://faraday//lib/faraday/rack_builder.rb#240 def use_symbol(mod, key, *args, **_arg3, &block); end end # borrowed from ActiveSupport::Dependencies::Reference & # ActionDispatch::MiddlewareStack::Middleware # -# source://faraday//lib/faraday/rack_builder.rb#26 +# source://faraday//lib/faraday/rack_builder.rb#25 class Faraday::RackBuilder::Handler - # source://faraday//lib/faraday/rack_builder.rb#31 + # source://faraday//lib/faraday/rack_builder.rb#30 def initialize(klass, *args, **_arg2, &block); end - # source://faraday//lib/faraday/rack_builder.rb#46 + # source://faraday//lib/faraday/rack_builder.rb#45 def ==(other); end - # source://faraday//lib/faraday/rack_builder.rb#56 + # source://faraday//lib/faraday/rack_builder.rb#55 def build(app = T.unsafe(nil)); end - # source://faraday//lib/faraday/rack_builder.rb#42 + # source://faraday//lib/faraday/rack_builder.rb#41 def inspect; end - # source://faraday//lib/faraday/rack_builder.rb#38 + # source://faraday//lib/faraday/rack_builder.rb#37 def klass; end # Returns the value of attribute name. # - # source://faraday//lib/faraday/rack_builder.rb#29 + # source://faraday//lib/faraday/rack_builder.rb#28 def name; end end -# source://faraday//lib/faraday/rack_builder.rb#27 +# source://faraday//lib/faraday/rack_builder.rb#26 Faraday::RackBuilder::Handler::REGISTRY = T.let(T.unsafe(nil), Faraday::AdapterRegistry) -# source://faraday//lib/faraday/rack_builder.rb#214 +# source://faraday//lib/faraday/rack_builder.rb#213 Faraday::RackBuilder::LOCK_ERR = T.let(T.unsafe(nil), String) -# source://faraday//lib/faraday/rack_builder.rb#215 +# source://faraday//lib/faraday/rack_builder.rb#214 Faraday::RackBuilder::MISSING_ADAPTER_ERROR = T.let(T.unsafe(nil), String) # Used to detect missing arguments # -# source://faraday//lib/faraday/rack_builder.rb#17 +# source://faraday//lib/faraday/rack_builder.rb#16 Faraday::RackBuilder::NO_ARGUMENT = T.let(T.unsafe(nil), Object) # Error raised when trying to modify the stack after calling `lock!` # -# source://faraday//lib/faraday/rack_builder.rb#22 +# source://faraday//lib/faraday/rack_builder.rb#21 class Faraday::RackBuilder::StackLocked < ::RuntimeError; end # Used to setup URLs, params, headers, and the request body in a sane manner. @@ -2171,7 +2211,7 @@ class Faraday::Request::Json < ::Faraday::Middleware # @return [Boolean] # - # source://faraday//lib/faraday/request/json.rb#42 + # source://faraday//lib/faraday/request/json.rb#48 def body?(env); end # source://faraday//lib/faraday/request/json.rb#26 @@ -2179,15 +2219,15 @@ class Faraday::Request::Json < ::Faraday::Middleware # @yield [] # - # source://faraday//lib/faraday/request/json.rb#30 + # source://faraday//lib/faraday/request/json.rb#36 def match_content_type(env); end # @return [Boolean] # - # source://faraday//lib/faraday/request/json.rb#37 + # source://faraday//lib/faraday/request/json.rb#43 def process_request?(env); end - # source://faraday//lib/faraday/request/json.rb#55 + # source://faraday//lib/faraday/request/json.rb#61 def request_type(env); end end @@ -2374,28 +2414,31 @@ class Faraday::Response::Json < ::Faraday::Middleware # source://faraday//lib/faraday/response/json.rb#9 def initialize(app = T.unsafe(nil), parser_options: T.unsafe(nil), content_type: T.unsafe(nil), preserve_raw: T.unsafe(nil)); end - # source://faraday//lib/faraday/response/json.rb#16 + # source://faraday//lib/faraday/response/json.rb#18 def on_complete(env); end private - # source://faraday//lib/faraday/response/json.rb#29 + # source://faraday//lib/faraday/response/json.rb#31 def parse(body); end # @return [Boolean] # - # source://faraday//lib/faraday/response/json.rb#33 + # source://faraday//lib/faraday/response/json.rb#39 def parse_response?(env); end - # source://faraday//lib/faraday/response/json.rb#22 + # source://faraday//lib/faraday/response/json.rb#57 + def process_parser_options; end + + # source://faraday//lib/faraday/response/json.rb#24 def process_response(env); end # @return [Boolean] # - # source://faraday//lib/faraday/response/json.rb#38 + # source://faraday//lib/faraday/response/json.rb#44 def process_response_type?(env); end - # source://faraday//lib/faraday/response/json.rb#45 + # source://faraday//lib/faraday/response/json.rb#51 def response_type(env); end end @@ -2426,10 +2469,10 @@ end # # source://faraday//lib/faraday/response/raise_error.rb#7 class Faraday::Response::RaiseError < ::Faraday::Middleware - # source://faraday//lib/faraday/response/raise_error.rb#13 + # source://faraday//lib/faraday/response/raise_error.rb#15 def on_complete(env); end - # source://faraday//lib/faraday/response/raise_error.rb#73 + # source://faraday//lib/faraday/response/raise_error.rb#77 def query_params(env); end # Returns a hash of response data with the following keys: @@ -2441,19 +2484,22 @@ class Faraday::Response::RaiseError < ::Faraday::Middleware # The `request` key is omitted when the middleware is explicitly # configured with the option `include_request: false`. # - # source://faraday//lib/faraday/response/raise_error.rb#50 + # source://faraday//lib/faraday/response/raise_error.rb#54 def response_values(env); end end # source://faraday//lib/faraday/response/raise_error.rb#9 Faraday::Response::RaiseError::ClientErrorStatuses = T.let(T.unsafe(nil), Range) +# source://faraday//lib/faraday/response/raise_error.rb#13 +Faraday::Response::RaiseError::DEFAULT_OPTIONS = T.let(T.unsafe(nil), Hash) + # source://faraday//lib/faraday/response/raise_error.rb#10 Faraday::Response::RaiseError::ServerErrorStatuses = T.let(T.unsafe(nil), Range) # A unified client error for SSL errors. # -# source://faraday//lib/faraday/error.rb#151 +# source://faraday//lib/faraday/error.rb#155 class Faraday::SSLError < ::Faraday::Error; end # SSL-related options. @@ -2566,19 +2612,24 @@ end # Faraday server error class. Represents 5xx status responses. # -# source://faraday//lib/faraday/error.rb#128 +# source://faraday//lib/faraday/error.rb#132 class Faraday::ServerError < ::Faraday::Error; end # A unified client error for timeouts. # -# source://faraday//lib/faraday/error.rb#132 +# source://faraday//lib/faraday/error.rb#136 class Faraday::TimeoutError < ::Faraday::ServerError # @return [TimeoutError] a new instance of TimeoutError # - # source://faraday//lib/faraday/error.rb#133 + # source://faraday//lib/faraday/error.rb#137 def initialize(exc = T.unsafe(nil), response = T.unsafe(nil)); end end +# Raised by Faraday::Response::RaiseError in case of a 429 response. +# +# source://faraday//lib/faraday/error.rb#128 +class Faraday::TooManyRequestsError < ::Faraday::ClientError; end + # Raised by Faraday::Response::RaiseError in case of a 401 response. # # source://faraday//lib/faraday/error.rb#100 @@ -2601,61 +2652,61 @@ module Faraday::Utils # # Returns a parsed URI. # - # source://faraday//lib/faraday/utils.rb#71 + # source://faraday//lib/faraday/utils.rb#70 def URI(url); end - # source://faraday//lib/faraday/utils.rb#56 + # source://faraday//lib/faraday/utils.rb#55 def basic_header_from(login, pass); end - # source://faraday//lib/faraday/utils.rb#17 + # source://faraday//lib/faraday/utils.rb#16 def build_nested_query(params); end - # source://faraday//lib/faraday/utils.rb#13 + # source://faraday//lib/faraday/utils.rb#12 def build_query(params); end # Recursive hash merge # - # source://faraday//lib/faraday/utils.rb#114 + # source://faraday//lib/faraday/utils.rb#113 def deep_merge(source, hash); end # Recursive hash update # - # source://faraday//lib/faraday/utils.rb#102 + # source://faraday//lib/faraday/utils.rb#101 def deep_merge!(target, hash); end - # source://faraday//lib/faraday/utils.rb#52 + # source://faraday//lib/faraday/utils.rb#51 def default_params_encoder; end - # source://faraday//lib/faraday/utils.rb#21 + # source://faraday//lib/faraday/utils.rb#20 def default_space_encoding; end - # source://faraday//lib/faraday/utils.rb#81 + # source://faraday//lib/faraday/utils.rb#80 def default_uri_parser; end - # source://faraday//lib/faraday/utils.rb#85 + # source://faraday//lib/faraday/utils.rb#84 def default_uri_parser=(parser); end - # source://faraday//lib/faraday/utils.rb#31 + # source://faraday//lib/faraday/utils.rb#30 def escape(str); end # Receives a String or URI and returns just # the path with the query string sorted. # - # source://faraday//lib/faraday/utils.rb#95 + # source://faraday//lib/faraday/utils.rb#94 def normalize_path(url); end - # source://faraday//lib/faraday/utils.rb#48 + # source://faraday//lib/faraday/utils.rb#47 def parse_nested_query(query); end # Adapted from Rack # - # source://faraday//lib/faraday/utils.rb#44 + # source://faraday//lib/faraday/utils.rb#43 def parse_query(query); end - # source://faraday//lib/faraday/utils.rb#118 + # source://faraday//lib/faraday/utils.rb#117 def sort_query_params(query); end - # source://faraday//lib/faraday/utils.rb#37 + # source://faraday//lib/faraday/utils.rb#36 def unescape(str); end class << self @@ -2665,83 +2716,83 @@ module Faraday::Utils # # Returns a parsed URI. # - # source://faraday//lib/faraday/utils.rb#71 + # source://faraday//lib/faraday/utils.rb#70 def URI(url); end - # source://faraday//lib/faraday/utils.rb#56 + # source://faraday//lib/faraday/utils.rb#55 def basic_header_from(login, pass); end - # source://faraday//lib/faraday/utils.rb#17 + # source://faraday//lib/faraday/utils.rb#16 def build_nested_query(params); end - # source://faraday//lib/faraday/utils.rb#13 + # source://faraday//lib/faraday/utils.rb#12 def build_query(params); end # Recursive hash merge # - # source://faraday//lib/faraday/utils.rb#114 + # source://faraday//lib/faraday/utils.rb#113 def deep_merge(source, hash); end # Recursive hash update # - # source://faraday//lib/faraday/utils.rb#102 + # source://faraday//lib/faraday/utils.rb#101 def deep_merge!(target, hash); end - # source://faraday//lib/faraday/utils.rb#52 + # source://faraday//lib/faraday/utils.rb#51 def default_params_encoder; end # Sets the attribute default_params_encoder # # @param value the value to set the attribute default_params_encoder to. # - # source://faraday//lib/faraday/utils.rb#63 + # source://faraday//lib/faraday/utils.rb#62 def default_params_encoder=(_arg0); end - # source://faraday//lib/faraday/utils.rb#21 + # source://faraday//lib/faraday/utils.rb#20 def default_space_encoding; end # Sets the attribute default_space_encoding # # @param value the value to set the attribute default_space_encoding to. # - # source://faraday//lib/faraday/utils.rb#26 + # source://faraday//lib/faraday/utils.rb#25 def default_space_encoding=(_arg0); end - # source://faraday//lib/faraday/utils.rb#81 + # source://faraday//lib/faraday/utils.rb#80 def default_uri_parser; end - # source://faraday//lib/faraday/utils.rb#85 + # source://faraday//lib/faraday/utils.rb#84 def default_uri_parser=(parser); end - # source://faraday//lib/faraday/utils.rb#31 + # source://faraday//lib/faraday/utils.rb#30 def escape(str); end # Receives a String or URI and returns just # the path with the query string sorted. # - # source://faraday//lib/faraday/utils.rb#95 + # source://faraday//lib/faraday/utils.rb#94 def normalize_path(url); end - # source://faraday//lib/faraday/utils.rb#48 + # source://faraday//lib/faraday/utils.rb#47 def parse_nested_query(query); end # Adapted from Rack # - # source://faraday//lib/faraday/utils.rb#44 + # source://faraday//lib/faraday/utils.rb#43 def parse_query(query); end - # source://faraday//lib/faraday/utils.rb#118 + # source://faraday//lib/faraday/utils.rb#117 def sort_query_params(query); end - # source://faraday//lib/faraday/utils.rb#37 + # source://faraday//lib/faraday/utils.rb#36 def unescape(str); end end end -# source://faraday//lib/faraday/utils.rb#41 +# source://faraday//lib/faraday/utils.rb#40 Faraday::Utils::DEFAULT_SEP = T.let(T.unsafe(nil), Regexp) -# source://faraday//lib/faraday/utils.rb#29 +# source://faraday//lib/faraday/utils.rb#28 Faraday::Utils::ESCAPE_RE = T.let(T.unsafe(nil), Regexp) # A case-insensitive Hash that preserves the original case of a header @@ -2765,17 +2816,20 @@ class Faraday::Utils::Headers < ::Hash # source://faraday//lib/faraday/utils/headers.rb#71 def delete(key); end + # source://faraday//lib/faraday/utils/headers.rb#80 + def dig(key, *rest); end + # source://faraday//lib/faraday/utils/headers.rb#65 - def fetch(key, *args, &block); end + def fetch(key, *_arg1, **_arg2, &_arg3); end # @return [Boolean] # - # source://faraday//lib/faraday/utils/headers.rb#80 + # source://faraday//lib/faraday/utils/headers.rb#86 def has_key?(key); end # @return [Boolean] # - # source://faraday//lib/faraday/utils/headers.rb#80 + # source://faraday//lib/faraday/utils/headers.rb#86 def include?(key); end # source://faraday//lib/faraday/utils/headers.rb#26 @@ -2783,44 +2837,44 @@ class Faraday::Utils::Headers < ::Hash # @return [Boolean] # - # source://faraday//lib/faraday/utils/headers.rb#80 + # source://faraday//lib/faraday/utils/headers.rb#86 def key?(key); end # @return [Boolean] # - # source://faraday//lib/faraday/utils/headers.rb#80 + # source://faraday//lib/faraday/utils/headers.rb#86 def member?(key); end - # source://faraday//lib/faraday/utils/headers.rb#95 + # source://faraday//lib/faraday/utils/headers.rb#101 def merge(other); end - # source://faraday//lib/faraday/utils/headers.rb#88 + # source://faraday//lib/faraday/utils/headers.rb#94 def merge!(other); end - # source://faraday//lib/faraday/utils/headers.rb#111 + # source://faraday//lib/faraday/utils/headers.rb#117 def parse(header_string); end - # source://faraday//lib/faraday/utils/headers.rb#100 + # source://faraday//lib/faraday/utils/headers.rb#106 def replace(other); end - # source://faraday//lib/faraday/utils/headers.rb#107 + # source://faraday//lib/faraday/utils/headers.rb#113 def to_hash; end - # source://faraday//lib/faraday/utils/headers.rb#88 + # source://faraday//lib/faraday/utils/headers.rb#94 def update(other); end protected # Returns the value of attribute names. # - # source://faraday//lib/faraday/utils/headers.rb#129 + # source://faraday//lib/faraday/utils/headers.rb#135 def names; end private # Join multiple values with a comma. # - # source://faraday//lib/faraday/utils/headers.rb#134 + # source://faraday//lib/faraday/utils/headers.rb#140 def add_parsed(key, value); end # on dup/clone, we need to duplicate @names hash diff --git a/sorbet/rbi/gems/ffi@1.16.3.rbi b/sorbet/rbi/gems/ffi@1.17.0.rbi similarity index 99% rename from sorbet/rbi/gems/ffi@1.16.3.rbi rename to sorbet/rbi/gems/ffi@1.17.0.rbi index c24a533ca..926564b57 100644 --- a/sorbet/rbi/gems/ffi@1.16.3.rbi +++ b/sorbet/rbi/gems/ffi@1.17.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `ffi` gem. # Please instead update this file by running `bin/tapioca gem ffi`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/fiber-local@1.0.0.rbi b/sorbet/rbi/gems/fiber-local@1.1.0.rbi similarity index 59% rename from sorbet/rbi/gems/fiber-local@1.0.0.rbi rename to sorbet/rbi/gems/fiber-local@1.1.0.rbi index 80fa6c578..c6a546d53 100644 --- a/sorbet/rbi/gems/fiber-local@1.0.0.rbi +++ b/sorbet/rbi/gems/fiber-local@1.1.0.rbi @@ -4,24 +4,32 @@ # This is an autogenerated file for types exported from the `fiber-local` gem. # Please instead update this file by running `bin/tapioca gem fiber-local`. -# source://fiber-local//lib/fiber/local/version.rb#24 + +# source://fiber-local//lib/fiber/local/version.rb#7 module Fiber::Local # Get the current thread-local instance. Create it if required. # - # source://fiber-local//lib/fiber/local.rb#36 + # source://fiber-local//lib/fiber/local.rb#33 def instance; end # Assigns to the fiber-local instance. # - # source://fiber-local//lib/fiber/local.rb#57 + # source://fiber-local//lib/fiber/local.rb#52 def instance=(instance); end # Instantiate a new thread-local object. # By default, invokes {new} to generate the instance. # - # source://fiber-local//lib/fiber/local.rb#30 + # source://fiber-local//lib/fiber/local.rb#27 def local; end + + class << self + # @private + # + # source://fiber-local//lib/fiber/local.rb#11 + def extended(klass); end + end end -# source://fiber-local//lib/fiber/local/version.rb#25 +# source://fiber-local//lib/fiber/local/version.rb#8 Fiber::Local::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/fiber-storage@0.1.2.rbi b/sorbet/rbi/gems/fiber-storage@0.1.2.rbi new file mode 100644 index 000000000..664c89200 --- /dev/null +++ b/sorbet/rbi/gems/fiber-storage@0.1.2.rbi @@ -0,0 +1,33 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `fiber-storage` gem. +# Please instead update this file by running `bin/tapioca gem fiber-storage`. + + +# source://fiber-storage//lib/fiber/storage.rb#8 +class Fiber + class << self + # source://fiber-storage//lib/fiber/storage.rb#55 + def __borked_keys__; end + end +end + +# source://fiber-storage//lib/fiber/storage.rb#9 +module Fiber::Storage + # source://fiber-storage//lib/fiber/storage.rb#10 + def initialize(*arguments, storage: T.unsafe(nil), **options, &block); end + + # source://fiber-storage//lib/fiber/storage.rb#33 + def __storage__; end + + # The storage associated with this fiber. + # + # source://fiber-storage//lib/fiber/storage.rb#29 + def storage; end + + # Set the storage associated with this fiber, clearing any previous storage. + # + # source://fiber-storage//lib/fiber/storage.rb#24 + def storage=(hash); end +end diff --git a/sorbet/rbi/gems/foreman@0.87.2.rbi b/sorbet/rbi/gems/foreman@0.88.1.rbi similarity index 99% rename from sorbet/rbi/gems/foreman@0.87.2.rbi rename to sorbet/rbi/gems/foreman@0.88.1.rbi index 57f9b9108..ec28af68d 100644 --- a/sorbet/rbi/gems/foreman@0.87.2.rbi +++ b/sorbet/rbi/gems/foreman@0.88.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `foreman` gem. # Please instead update this file by running `bin/tapioca gem foreman`. + # source://foreman//lib/foreman/version.rb#1 module Foreman class << self diff --git a/sorbet/rbi/gems/fugit@1.9.0.rbi b/sorbet/rbi/gems/fugit@1.11.1.rbi similarity index 66% rename from sorbet/rbi/gems/fugit@1.9.0.rbi rename to sorbet/rbi/gems/fugit@1.11.1.rbi index 04ab2e649..8429982fb 100644 --- a/sorbet/rbi/gems/fugit@1.9.0.rbi +++ b/sorbet/rbi/gems/fugit@1.11.1.rbi @@ -4,10 +4,11 @@ # This is an autogenerated file for types exported from the `fugit` gem. # Please instead update this file by running `bin/tapioca gem fugit`. + # source://fugit//lib/fugit.rb#4 module Fugit class << self - # source://fugit//lib/fugit/parse.rb#49 + # source://fugit//lib/fugit/parse.rb#66 def determine_type(s); end # source://fugit//lib/fugit/parse.rb#30 @@ -19,7 +20,7 @@ module Fugit # source://fugit//lib/fugit/parse.rb#13 def do_parse_cron(s); end - # source://fugit//lib/fugit/parse.rb#43 + # source://fugit//lib/fugit/parse.rb#60 def do_parse_cronish(s, opts = T.unsafe(nil)); end # source://fugit//lib/fugit/parse.rb#14 @@ -43,7 +44,7 @@ module Fugit # source://fugit//lib/fugit/parse.rb#7 def parse_cron(s); end - # source://fugit//lib/fugit/parse.rb#36 + # source://fugit//lib/fugit/parse.rb#53 def parse_cronish(s, opts = T.unsafe(nil)); end # source://fugit//lib/fugit/parse.rb#8 @@ -79,7 +80,7 @@ end # source://fugit//lib/fugit/cron.rb#5 class Fugit::Cron - # source://fugit//lib/fugit/cron.rb#431 + # source://fugit//lib/fugit/cron.rb#502 def ==(o); end # Mostly used as a #next_time sanity check. @@ -90,23 +91,23 @@ class Fugit::Cron # # Nota bene: cron with seconds are not supported. # - # source://fugit//lib/fugit/cron.rb#329 + # source://fugit//lib/fugit/cron.rb#400 def brute_frequency(year = T.unsafe(nil)); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#198 + # source://fugit//lib/fugit/cron.rb#211 def day_match?(nt); end - # source://fugit//lib/fugit/cron.rb#431 + # source://fugit//lib/fugit/cron.rb#502 def eql?(o); end - # source://fugit//lib/fugit/cron.rb#437 + # source://fugit//lib/fugit/cron.rb#508 def hash; end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#151 + # source://fugit//lib/fugit/cron.rb#164 def hour_match?(nt); end # Returns the value of attribute hours. @@ -116,12 +117,12 @@ class Fugit::Cron # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#228 + # source://fugit//lib/fugit/cron.rb#241 def match?(t); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#152 + # source://fugit//lib/fugit/cron.rb#165 def min_match?(nt); end # Returns the value of attribute minutes. @@ -131,12 +132,12 @@ class Fugit::Cron # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#150 + # source://fugit//lib/fugit/cron.rb#163 def month_match?(nt); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#187 + # source://fugit//lib/fugit/cron.rb#200 def monthday_match?(nt); end # Returns the value of attribute monthdays. @@ -149,6 +150,12 @@ class Fugit::Cron # source://fugit//lib/fugit/cron.rb#22 def months; end + # Returns an ::Enumerable instance that yields each "next time" in + # succession + # + # source://fugit//lib/fugit/cron.rb#365 + def next(from = T.unsafe(nil)); end + # See gh-15 and tst/iteration_count.rb # # Initially set to 1024 after seeing the worst case for #next_time @@ -156,7 +163,7 @@ class Fugit::Cron # gh-18 and noticing some > 1024 for some experiments. 2048 should # be ok. # - # source://fugit//lib/fugit/cron.rb#245 + # source://fugit//lib/fugit/cron.rb#258 def next_time(from = T.unsafe(nil)); end # Returns the value of attribute original. @@ -164,15 +171,21 @@ class Fugit::Cron # source://fugit//lib/fugit/cron.rb#20 def original; end - # source://fugit//lib/fugit/cron.rb#295 + # Returns an ::Enumerable instance that yields each "previous time" in + # succession + # + # source://fugit//lib/fugit/cron.rb#373 + def prev(from = T.unsafe(nil)); end + + # source://fugit//lib/fugit/cron.rb#310 def previous_time(from = T.unsafe(nil)); end - # source://fugit//lib/fugit/cron.rb#359 + # source://fugit//lib/fugit/cron.rb#430 def rough_frequency; end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#153 + # source://fugit//lib/fugit/cron.rb#166 def sec_match?(nt); end # Returns the value of attribute seconds. @@ -185,28 +198,28 @@ class Fugit::Cron # source://fugit//lib/fugit/cron.rb#22 def timezone; end - # source://fugit//lib/fugit/cron.rb#416 + # source://fugit//lib/fugit/cron.rb#487 def to_a; end - # source://fugit//lib/fugit/cron.rb#53 + # source://fugit//lib/fugit/cron.rb#66 def to_cron_s; end - # source://fugit//lib/fugit/cron.rb#421 + # source://fugit//lib/fugit/cron.rb#492 def to_h; end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#155 + # source://fugit//lib/fugit/cron.rb#168 def weekday_hash_match?(nt, hsh); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#171 + # source://fugit//lib/fugit/cron.rb#184 def weekday_match?(nt); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#166 + # source://fugit//lib/fugit/cron.rb#179 def weekday_modulo_match?(nt, mod); end # Returns the value of attribute weekdays. @@ -214,6 +227,12 @@ class Fugit::Cron # source://fugit//lib/fugit/cron.rb#22 def weekdays; end + # Returns an array of EtOrbi::EoTime instances that correspond to + # the occurrences of the cron within the given time range + # + # source://fugit//lib/fugit/cron.rb#381 + def within(time_range, time_end = T.unsafe(nil)); end + # Returns the value of attribute zone. # # source://fugit//lib/fugit/cron.rb#20 @@ -221,46 +240,46 @@ class Fugit::Cron protected - # source://fugit//lib/fugit/cron.rb#444 + # source://fugit//lib/fugit/cron.rb#515 def compact_month_days; end - # source://fugit//lib/fugit/cron.rb#595 + # source://fugit//lib/fugit/cron.rb#669 def determine_hours(arr); end - # source://fugit//lib/fugit/cron.rb#591 + # source://fugit//lib/fugit/cron.rb#665 def determine_minutes(arr); end - # source://fugit//lib/fugit/cron.rb#599 + # source://fugit//lib/fugit/cron.rb#673 def determine_monthdays(arr); end - # source://fugit//lib/fugit/cron.rb#603 + # source://fugit//lib/fugit/cron.rb#677 def determine_months(arr); end - # source://fugit//lib/fugit/cron.rb#587 + # source://fugit//lib/fugit/cron.rb#661 def determine_seconds(arr); end - # source://fugit//lib/fugit/cron.rb#634 + # source://fugit//lib/fugit/cron.rb#708 def determine_timezone(z); end - # source://fugit//lib/fugit/cron.rb#607 + # source://fugit//lib/fugit/cron.rb#681 def determine_weekdays(arr); end - # source://fugit//lib/fugit/cron.rb#570 + # source://fugit//lib/fugit/cron.rb#644 def do_determine(key, arr, min, max); end - # source://fugit//lib/fugit/cron.rb#510 + # source://fugit//lib/fugit/cron.rb#581 def expand(min, max, r); end - # source://fugit//lib/fugit/cron.rb#487 + # source://fugit//lib/fugit/cron.rb#558 def init(original, h); end - # source://fugit//lib/fugit/cron.rb#528 + # source://fugit//lib/fugit/cron.rb#602 def range(min, max, sta, edn, sla); end - # source://fugit//lib/fugit/cron.rb#460 + # source://fugit//lib/fugit/cron.rb#531 def rough_days; end - # source://fugit//lib/fugit/cron.rb#641 + # source://fugit//lib/fugit/cron.rb#715 def weekdays_to_cron_s; end class << self @@ -272,384 +291,424 @@ class Fugit::Cron # source://fugit//lib/fugit/cron.rb#32 def parse(s); end + + protected + + # source://fugit//lib/fugit/cron.rb#54 + def trunc(s); end end end -# source://fugit//lib/fugit/cron.rb#485 +# Used by Fugit::Cron#next and Fugit::Cron#prev +# +# source://fugit//lib/fugit/cron.rb#340 +class Fugit::Cron::CronIterator + include ::Enumerable + + # @return [CronIterator] a new instance of CronIterator + # + # source://fugit//lib/fugit/cron.rb#345 + def initialize(cron, direction, start); end + + # Returns the value of attribute cron. + # + # source://fugit//lib/fugit/cron.rb#343 + def cron; end + + # Returns the value of attribute current. + # + # source://fugit//lib/fugit/cron.rb#343 + def current; end + + # Returns the value of attribute direction. + # + # source://fugit//lib/fugit/cron.rb#343 + def direction; end + + # source://fugit//lib/fugit/cron.rb#353 + def each; end + + # Returns the value of attribute start. + # + # source://fugit//lib/fugit/cron.rb#343 + def start; end +end + +# source://fugit//lib/fugit/cron.rb#556 Fugit::Cron::FREQUENCY_CACHE = T.let(T.unsafe(nil), Hash) -# source://fugit//lib/fugit/cron.rb#388 +# source://fugit//lib/fugit/cron.rb#459 class Fugit::Cron::Frequency # @return [Frequency] a new instance of Frequency # - # source://fugit//lib/fugit/cron.rb#393 + # source://fugit//lib/fugit/cron.rb#464 def initialize(deltas, span); end # Returns the value of attribute delta_max. # - # source://fugit//lib/fugit/cron.rb#390 + # source://fugit//lib/fugit/cron.rb#461 def delta_max; end # Returns the value of attribute delta_min. # - # source://fugit//lib/fugit/cron.rb#390 + # source://fugit//lib/fugit/cron.rb#461 def delta_min; end # Returns the value of attribute occurrences. # - # source://fugit//lib/fugit/cron.rb#390 + # source://fugit//lib/fugit/cron.rb#461 def occurrences; end # Returns the value of attribute span. # - # source://fugit//lib/fugit/cron.rb#390 + # source://fugit//lib/fugit/cron.rb#461 def span; end # Returns the value of attribute span_years. # - # source://fugit//lib/fugit/cron.rb#391 + # source://fugit//lib/fugit/cron.rb#462 def span_years; end - # source://fugit//lib/fugit/cron.rb#403 + # source://fugit//lib/fugit/cron.rb#474 def to_debug_s; end # Returns the value of attribute yearly_occurrences. # - # source://fugit//lib/fugit/cron.rb#391 + # source://fugit//lib/fugit/cron.rb#462 def yearly_occurrences; end end # source://fugit//lib/fugit/cron.rb#17 Fugit::Cron::MAXDAYS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#236 +# source://fugit//lib/fugit/cron.rb#249 Fugit::Cron::MAX_ITERATION_COUNT = T.let(T.unsafe(nil), Integer) -# source://fugit//lib/fugit/cron.rb#659 +# source://fugit//lib/fugit/cron.rb#733 module Fugit::Cron::Parser include ::Raabro extend ::Raabro::ModuleMethods extend ::Raabro extend ::Fugit::Cron::Parser - # source://fugit//lib/fugit/cron.rb#695 + # source://fugit//lib/fugit/cron.rb#769 def _dom(i); end - # source://fugit//lib/fugit/cron.rb#697 + # source://fugit//lib/fugit/cron.rb#771 def _dow(i); end - # source://fugit//lib/fugit/cron.rb#694 + # source://fugit//lib/fugit/cron.rb#768 def _hou(i); end - # source://fugit//lib/fugit/cron.rb#696 + # source://fugit//lib/fugit/cron.rb#770 def _mon(i); end - # source://fugit//lib/fugit/cron.rb#693 + # source://fugit//lib/fugit/cron.rb#767 def _mos(i); end - # source://fugit//lib/fugit/cron.rb#754 + # source://fugit//lib/fugit/cron.rb#828 def _tz(i); end - # source://fugit//lib/fugit/cron.rb#751 + # source://fugit//lib/fugit/cron.rb#825 def _tz_delta(i); end - # source://fugit//lib/fugit/cron.rb#748 + # source://fugit//lib/fugit/cron.rb#822 def _tz_name(i); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#681 + # source://fugit//lib/fugit/cron.rb#755 def and?(i); end - # source://fugit//lib/fugit/cron.rb#756 + # source://fugit//lib/fugit/cron.rb#830 def classic_cron(i); end - # source://fugit//lib/fugit/cron.rb#679 + # source://fugit//lib/fugit/cron.rb#753 def comma(i); end # @return [Boolean] # - # source://fugit//lib/fugit/cron.rb#680 + # source://fugit//lib/fugit/cron.rb#754 def comma?(i); end - # source://fugit//lib/fugit/cron.rb#765 + # source://fugit//lib/fugit/cron.rb#839 def cron(i); end - # source://fugit//lib/fugit/cron.rb#687 + # source://fugit//lib/fugit/cron.rb#761 def dom(i); end - # source://fugit//lib/fugit/cron.rb#723 + # source://fugit//lib/fugit/cron.rb#797 def dom_elt(i); end - # source://fugit//lib/fugit/cron.rb#689 + # source://fugit//lib/fugit/cron.rb#763 def dow(i); end - # source://fugit//lib/fugit/cron.rb#725 + # source://fugit//lib/fugit/cron.rb#799 def dow_elt(i); end - # source://fugit//lib/fugit/cron.rb#732 + # source://fugit//lib/fugit/cron.rb#806 def dow_elt_(i); end - # source://fugit//lib/fugit/cron.rb#691 + # source://fugit//lib/fugit/cron.rb#765 def dow_hash(i); end - # source://fugit//lib/fugit/cron.rb#730 + # source://fugit//lib/fugit/cron.rb#804 def h_dow(i); end - # source://fugit//lib/fugit/cron.rb#686 + # source://fugit//lib/fugit/cron.rb#760 def hou(i); end - # source://fugit//lib/fugit/cron.rb#722 + # source://fugit//lib/fugit/cron.rb#796 def hou_elt(i); end - # source://fugit//lib/fugit/cron.rb#678 + # source://fugit//lib/fugit/cron.rb#752 def hyphen(i); end - # source://fugit//lib/fugit/cron.rb#744 + # source://fugit//lib/fugit/cron.rb#818 def ldom_(i); end - # source://fugit//lib/fugit/cron.rb#746 + # source://fugit//lib/fugit/cron.rb#820 def ldow(i); end - # source://fugit//lib/fugit/cron.rb#743 + # source://fugit//lib/fugit/cron.rb#817 def lhou_(i); end - # source://fugit//lib/fugit/cron.rb#737 + # source://fugit//lib/fugit/cron.rb#811 def list_dom(i); end - # source://fugit//lib/fugit/cron.rb#739 + # source://fugit//lib/fugit/cron.rb#813 def list_dow(i); end - # source://fugit//lib/fugit/cron.rb#736 + # source://fugit//lib/fugit/cron.rb#810 def list_hou(i); end - # source://fugit//lib/fugit/cron.rb#735 + # source://fugit//lib/fugit/cron.rb#809 def list_min(i); end - # source://fugit//lib/fugit/cron.rb#738 + # source://fugit//lib/fugit/cron.rb#812 def list_mon(i); end - # source://fugit//lib/fugit/cron.rb#734 + # source://fugit//lib/fugit/cron.rb#808 def list_sec(i); end - # source://fugit//lib/fugit/cron.rb#742 + # source://fugit//lib/fugit/cron.rb#816 def lmin_(i); end - # source://fugit//lib/fugit/cron.rb#745 + # source://fugit//lib/fugit/cron.rb#819 def lmon_(i); end - # source://fugit//lib/fugit/cron.rb#741 + # source://fugit//lib/fugit/cron.rb#815 def lsec_(i); end - # source://fugit//lib/fugit/cron.rb#727 + # source://fugit//lib/fugit/cron.rb#801 def mod(i); end - # source://fugit//lib/fugit/cron.rb#729 + # source://fugit//lib/fugit/cron.rb#803 def mod_dow(i); end - # source://fugit//lib/fugit/cron.rb#688 + # source://fugit//lib/fugit/cron.rb#762 def mon(i); end - # source://fugit//lib/fugit/cron.rb#724 + # source://fugit//lib/fugit/cron.rb#798 def mon_elt(i); end # min or sec # - # source://fugit//lib/fugit/cron.rb#685 + # source://fugit//lib/fugit/cron.rb#759 def mos(i); end # ssws: slash or sorws # - # source://fugit//lib/fugit/cron.rb#721 + # source://fugit//lib/fugit/cron.rb#795 def mos_elt(i); end - # source://fugit//lib/fugit/cron.rb#702 + # source://fugit//lib/fugit/cron.rb#776 def r_dom(i); end - # source://fugit//lib/fugit/cron.rb#704 + # source://fugit//lib/fugit/cron.rb#778 def r_dow(i); end - # source://fugit//lib/fugit/cron.rb#701 + # source://fugit//lib/fugit/cron.rb#775 def r_hou(i); end - # source://fugit//lib/fugit/cron.rb#703 + # source://fugit//lib/fugit/cron.rb#777 def r_mon(i); end # r: range # - # source://fugit//lib/fugit/cron.rb#700 + # source://fugit//lib/fugit/cron.rb#774 def r_mos(i); end # rewriting the parsed tree # - # source://fugit//lib/fugit/cron.rb#771 + # source://fugit//lib/fugit/cron.rb#845 def rewrite_bound(k, t); end - # source://fugit//lib/fugit/cron.rb#832 + # source://fugit//lib/fugit/cron.rb#906 def rewrite_cron(t); end - # source://fugit//lib/fugit/cron.rb#789 + # source://fugit//lib/fugit/cron.rb#863 def rewrite_elt(k, t); end - # source://fugit//lib/fugit/cron.rb#817 + # source://fugit//lib/fugit/cron.rb#891 def rewrite_entry(t); end - # source://fugit//lib/fugit/cron.rb#781 + # source://fugit//lib/fugit/cron.rb#855 def rewrite_mod(k, t); end - # source://fugit//lib/fugit/cron.rb#824 + # source://fugit//lib/fugit/cron.rb#898 def rewrite_tz(t); end # piece parsers bottom to top # - # source://fugit//lib/fugit/cron.rb#676 + # source://fugit//lib/fugit/cron.rb#750 def s(i); end - # source://fugit//lib/fugit/cron.rb#760 + # source://fugit//lib/fugit/cron.rb#834 def second_cron(i); end - # source://fugit//lib/fugit/cron.rb#683 + # source://fugit//lib/fugit/cron.rb#757 def slash(i); end - # source://fugit//lib/fugit/cron.rb#709 + # source://fugit//lib/fugit/cron.rb#783 def sor_dom(i); end - # source://fugit//lib/fugit/cron.rb#711 + # source://fugit//lib/fugit/cron.rb#785 def sor_dow(i); end - # source://fugit//lib/fugit/cron.rb#708 + # source://fugit//lib/fugit/cron.rb#782 def sor_hou(i); end - # source://fugit//lib/fugit/cron.rb#710 + # source://fugit//lib/fugit/cron.rb#784 def sor_mon(i); end # sor: star or range # - # source://fugit//lib/fugit/cron.rb#707 + # source://fugit//lib/fugit/cron.rb#781 def sor_mos(i); end - # source://fugit//lib/fugit/cron.rb#716 + # source://fugit//lib/fugit/cron.rb#790 def sorws_dom(i); end - # source://fugit//lib/fugit/cron.rb#718 + # source://fugit//lib/fugit/cron.rb#792 def sorws_dow(i); end - # source://fugit//lib/fugit/cron.rb#715 + # source://fugit//lib/fugit/cron.rb#789 def sorws_hou(i); end - # source://fugit//lib/fugit/cron.rb#717 + # source://fugit//lib/fugit/cron.rb#791 def sorws_mon(i); end # sorws: star or range with[out] slash # - # source://fugit//lib/fugit/cron.rb#714 + # source://fugit//lib/fugit/cron.rb#788 def sorws_mos(i); end - # source://fugit//lib/fugit/cron.rb#677 + # source://fugit//lib/fugit/cron.rb#751 def star(i); end end -# source://fugit//lib/fugit/cron.rb#666 +# source://fugit//lib/fugit/cron.rb#740 Fugit::Cron::Parser::DOW_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/cron.rb#669 +# source://fugit//lib/fugit/cron.rb#743 Fugit::Cron::Parser::MONTHS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#671 +# source://fugit//lib/fugit/cron.rb#745 Fugit::Cron::Parser::MONTH_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/cron.rb#661 +# source://fugit//lib/fugit/cron.rb#735 Fugit::Cron::Parser::WEEKDAYS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#664 +# source://fugit//lib/fugit/cron.rb#738 Fugit::Cron::Parser::WEEKDS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/cron.rb#353 +# source://fugit//lib/fugit/cron.rb#424 Fugit::Cron::SLOTS = T.let(T.unsafe(nil), Array) # source://fugit//lib/fugit/cron.rb#7 Fugit::Cron::SPECIALS = T.let(T.unsafe(nil), Hash) -# source://fugit//lib/fugit/cron.rb#66 +# source://fugit//lib/fugit/cron.rb#79 class Fugit::Cron::TimeCursor # @return [TimeCursor] a new instance of TimeCursor # - # source://fugit//lib/fugit/cron.rb#68 + # source://fugit//lib/fugit/cron.rb#81 def initialize(cron, t); end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def day; end - # source://fugit//lib/fugit/cron.rb#83 + # source://fugit//lib/fugit/cron.rb#96 def dec(i); end - # source://fugit//lib/fugit/cron.rb#132 + # source://fugit//lib/fugit/cron.rb#145 def dec_day; end - # source://fugit//lib/fugit/cron.rb#135 + # source://fugit//lib/fugit/cron.rb#148 def dec_hour; end - # source://fugit//lib/fugit/cron.rb#138 + # source://fugit//lib/fugit/cron.rb#151 def dec_min; end - # source://fugit//lib/fugit/cron.rb#128 + # source://fugit//lib/fugit/cron.rb#141 def dec_month; end - # source://fugit//lib/fugit/cron.rb#142 + # source://fugit//lib/fugit/cron.rb#155 def dec_sec; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def hour; end - # source://fugit//lib/fugit/cron.rb#82 + # source://fugit//lib/fugit/cron.rb#95 def inc(i); end - # source://fugit//lib/fugit/cron.rb#96 + # source://fugit//lib/fugit/cron.rb#109 def inc_day; end - # source://fugit//lib/fugit/cron.rb#113 + # source://fugit//lib/fugit/cron.rb#126 def inc_hour; end - # source://fugit//lib/fugit/cron.rb#116 + # source://fugit//lib/fugit/cron.rb#129 def inc_min; end - # source://fugit//lib/fugit/cron.rb#85 + # source://fugit//lib/fugit/cron.rb#98 def inc_month; end - # source://fugit//lib/fugit/cron.rb#120 + # source://fugit//lib/fugit/cron.rb#133 def inc_sec; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def min; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def month; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def rday; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def rweek; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def sec; end - # source://fugit//lib/fugit/cron.rb#74 + # source://fugit//lib/fugit/cron.rb#87 def time; end - # source://fugit//lib/fugit/cron.rb#77 + # source://fugit//lib/fugit/cron.rb#90 def to_i; end - # source://fugit//lib/fugit/cron.rb#75 + # source://fugit//lib/fugit/cron.rb#88 def to_t; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def wday; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def wday_in_month; end - # source://fugit//lib/fugit/cron.rb#80 + # source://fugit//lib/fugit/cron.rb#93 def year; end end @@ -921,92 +980,95 @@ Fugit::Duration::SECOND_ROUND = T.let(T.unsafe(nil), Integer) # source://fugit//lib/fugit/nat.rb#8 module Fugit::Nat class << self - # source://fugit//lib/fugit/nat.rb#30 + # source://fugit//lib/fugit/nat.rb#42 def do_parse(s, opts = T.unsafe(nil)); end - # source://fugit//lib/fugit/nat.rb#12 + # source://fugit//lib/fugit/nat.rb#14 def parse(s, opts = T.unsafe(nil)); end end end -# source://fugit//lib/fugit/nat.rb#37 +# source://fugit//lib/fugit/nat.rb#10 +Fugit::Nat::MAX_INPUT_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://fugit//lib/fugit/nat.rb#49 module Fugit::Nat::Parser include ::Raabro extend ::Raabro::ModuleMethods extend ::Raabro extend ::Fugit::Nat::Parser - # source://fugit//lib/fugit/nat.rb#109 + # source://fugit//lib/fugit/nat.rb#121 def _and(i); end - # source://fugit//lib/fugit/nat.rb#110 + # source://fugit//lib/fugit/nat.rb#122 def _and_or_or(i); end - # source://fugit//lib/fugit/nat.rb#113 + # source://fugit//lib/fugit/nat.rb#125 def _and_or_or_or_comma(i); end - # source://fugit//lib/fugit/nat.rb#105 + # source://fugit//lib/fugit/nat.rb#117 def _at(i); end - # source://fugit//lib/fugit/nat.rb#119 + # source://fugit//lib/fugit/nat.rb#131 def _day_s(i); end - # source://fugit//lib/fugit/nat.rb#146 + # source://fugit//lib/fugit/nat.rb#158 def _dmin(i); end # parsers bottom to top ################################################# # - # source://fugit//lib/fugit/nat.rb#103 + # source://fugit//lib/fugit/nat.rb#115 def _every(i); end - # source://fugit//lib/fugit/nat.rb#104 + # source://fugit//lib/fugit/nat.rb#116 def _from(i); end - # source://fugit//lib/fugit/nat.rb#111 + # source://fugit//lib/fugit/nat.rb#123 def _in_or_on(i); end - # source://fugit//lib/fugit/nat.rb#144 + # source://fugit//lib/fugit/nat.rb#156 def _minute(i); end - # source://fugit//lib/fugit/nat.rb#106 + # source://fugit//lib/fugit/nat.rb#118 def _on(i); end - # source://fugit//lib/fugit/nat.rb#235 + # source://fugit//lib/fugit/nat.rb#247 def _point(i); end - # source://fugit//lib/fugit/nat.rb#361 + # source://fugit//lib/fugit/nat.rb#373 def _rewrite_sub(t, key = T.unsafe(nil)); end - # source://fugit//lib/fugit/nat.rb#358 + # source://fugit//lib/fugit/nat.rb#370 def _rewrite_subs(t, key = T.unsafe(nil)); end - # source://fugit//lib/fugit/nat.rb#123 + # source://fugit//lib/fugit/nat.rb#135 def _sep(i); end - # source://fugit//lib/fugit/nat.rb#122 + # source://fugit//lib/fugit/nat.rb#134 def _space(i); end - # source://fugit//lib/fugit/nat.rb#120 + # source://fugit//lib/fugit/nat.rb#132 def _the(i); end - # source://fugit//lib/fugit/nat.rb#107 + # source://fugit//lib/fugit/nat.rb#119 def _to(i); end - # source://fugit//lib/fugit/nat.rb#116 + # source://fugit//lib/fugit/nat.rb#128 def _to_or_dash(i); end # Try to follow https://en.wikipedia.org/wiki/12-hour_clock#Confusion_at_noon_and_midnight # - # source://fugit//lib/fugit/nat.rb#486 + # source://fugit//lib/fugit/nat.rb#498 def adjust_h(h, m, ap); end - # source://fugit//lib/fugit/nat.rb#200 + # source://fugit//lib/fugit/nat.rb#212 def ampm(i); end - # source://fugit//lib/fugit/nat.rb#149 + # source://fugit//lib/fugit/nat.rb#161 def and_dmin(i); end - # source://fugit//lib/fugit/nat.rb#261 + # source://fugit//lib/fugit/nat.rb#273 def at(i); end # at five @@ -1016,55 +1078,55 @@ module Fugit::Nat::Parser # at noon # at 18:00 UTC <-- ...tz # - # source://fugit//lib/fugit/nat.rb#254 + # source://fugit//lib/fugit/nat.rb#266 def at_object(i); end - # source://fugit//lib/fugit/nat.rb#257 + # source://fugit//lib/fugit/nat.rb#269 def at_objects(i); end - # source://fugit//lib/fugit/nat.rb#241 + # source://fugit//lib/fugit/nat.rb#253 def at_p(i); end - # source://fugit//lib/fugit/nat.rb#244 + # source://fugit//lib/fugit/nat.rb#256 def at_point(i); end - # source://fugit//lib/fugit/nat.rb#184 + # source://fugit//lib/fugit/nat.rb#196 def city_tz(i); end - # source://fugit//lib/fugit/nat.rb#125 + # source://fugit//lib/fugit/nat.rb#137 def count(i); end - # source://fugit//lib/fugit/nat.rb#237 + # source://fugit//lib/fugit/nat.rb#249 def counts(i); end - # source://fugit//lib/fugit/nat.rb#203 + # source://fugit//lib/fugit/nat.rb#215 def dark(i); end - # source://fugit//lib/fugit/nat.rb#190 + # source://fugit//lib/fugit/nat.rb#202 def delta_tz(i); end - # source://fugit//lib/fugit/nat.rb#207 + # source://fugit//lib/fugit/nat.rb#219 def digital_h(i); end - # source://fugit//lib/fugit/nat.rb#210 + # source://fugit//lib/fugit/nat.rb#222 def digital_hour(i); end - # source://fugit//lib/fugit/nat.rb#340 + # source://fugit//lib/fugit/nat.rb#352 def every(i); end # every day # every 1 minute # - # source://fugit//lib/fugit/nat.rb#271 + # source://fugit//lib/fugit/nat.rb#283 def every_interval(i); end - # source://fugit//lib/fugit/nat.rb#326 + # source://fugit//lib/fugit/nat.rb#338 def every_named(i); end - # source://fugit//lib/fugit/nat.rb#330 + # source://fugit//lib/fugit/nat.rb#342 def every_object(i); end - # source://fugit//lib/fugit/nat.rb#336 + # source://fugit//lib/fugit/nat.rb#348 def every_objects(i); end # every 1st of the month @@ -1073,62 +1135,62 @@ module Fugit::Nat::Parser # Every second of the month # every 15th of the month # - # source://fugit//lib/fugit/nat.rb#322 + # source://fugit//lib/fugit/nat.rb#334 def every_of_the_month(i); end - # source://fugit//lib/fugit/nat.rb#275 + # source://fugit//lib/fugit/nat.rb#287 def every_single_interval(i); end # every monday # every Fri-Sun # every Monday and Tuesday # - # source://fugit//lib/fugit/nat.rb#309 + # source://fugit//lib/fugit/nat.rb#321 def every_weekday(i); end - # source://fugit//lib/fugit/nat.rb#302 + # source://fugit//lib/fugit/nat.rb#314 def from(i); end - # source://fugit//lib/fugit/nat.rb#296 + # source://fugit//lib/fugit/nat.rb#308 def from_object(i); end - # source://fugit//lib/fugit/nat.rb#299 + # source://fugit//lib/fugit/nat.rb#311 def from_objects(i); end - # source://fugit//lib/fugit/nat.rb#265 + # source://fugit//lib/fugit/nat.rb#277 def interval(i); end - # source://fugit//lib/fugit/nat.rb#130 + # source://fugit//lib/fugit/nat.rb#142 def monthday(i); end - # source://fugit//lib/fugit/nat.rb#138 + # source://fugit//lib/fugit/nat.rb#150 def monthdays(i); end - # source://fugit//lib/fugit/nat.rb#228 + # source://fugit//lib/fugit/nat.rb#240 def named_h(i); end - # source://fugit//lib/fugit/nat.rb#231 + # source://fugit//lib/fugit/nat.rb#243 def named_hour(i); end - # source://fugit//lib/fugit/nat.rb#221 + # source://fugit//lib/fugit/nat.rb#233 def named_m(i); end - # source://fugit//lib/fugit/nat.rb#224 + # source://fugit//lib/fugit/nat.rb#236 def named_min(i); end - # source://fugit//lib/fugit/nat.rb#187 + # source://fugit//lib/fugit/nat.rb#199 def named_tz(i); end - # source://fugit//lib/fugit/nat.rb#347 + # source://fugit//lib/fugit/nat.rb#359 def nat(i); end - # source://fugit//lib/fugit/nat.rb#344 + # source://fugit//lib/fugit/nat.rb#356 def nat_elt(i); end - # source://fugit//lib/fugit/nat.rb#127 + # source://fugit//lib/fugit/nat.rb#139 def omonthday(i); end - # source://fugit//lib/fugit/nat.rb#137 + # source://fugit//lib/fugit/nat.rb#149 def omonthdays(i); end # 'every month on day 2 at 10:00' => '0 10 2 * *', @@ -1139,281 +1201,281 @@ module Fugit::Nat::Parser # # every month on the 1st # - # source://fugit//lib/fugit/nat.rb#180 + # source://fugit//lib/fugit/nat.rb#192 def on(i); end - # source://fugit//lib/fugit/nat.rb#162 + # source://fugit//lib/fugit/nat.rb#174 def on_days(i); end - # source://fugit//lib/fugit/nat.rb#153 + # source://fugit//lib/fugit/nat.rb#165 def on_minutes(i); end - # source://fugit//lib/fugit/nat.rb#165 + # source://fugit//lib/fugit/nat.rb#177 def on_object(i); end - # source://fugit//lib/fugit/nat.rb#168 + # source://fugit//lib/fugit/nat.rb#180 def on_objects(i); end - # source://fugit//lib/fugit/nat.rb#142 + # source://fugit//lib/fugit/nat.rb#154 def on_the(i); end - # source://fugit//lib/fugit/nat.rb#161 + # source://fugit//lib/fugit/nat.rb#173 def on_thes(i); end - # source://fugit//lib/fugit/nat.rb#157 + # source://fugit//lib/fugit/nat.rb#169 def on_thex(i); end - # source://fugit//lib/fugit/nat.rb#163 + # source://fugit//lib/fugit/nat.rb#175 def on_weekdays(i); end - # source://fugit//lib/fugit/nat.rb#313 + # source://fugit//lib/fugit/nat.rb#325 def otm(i); end - # source://fugit//lib/fugit/nat.rb#542 + # source://fugit//lib/fugit/nat.rb#554 def rewrite_at(t); end - # source://fugit//lib/fugit/nat.rb#405 + # source://fugit//lib/fugit/nat.rb#417 def rewrite_at_p(t); end - # source://fugit//lib/fugit/nat.rb#499 + # source://fugit//lib/fugit/nat.rb#511 def rewrite_digital_hour(t); end - # source://fugit//lib/fugit/nat.rb#366 + # source://fugit//lib/fugit/nat.rb#378 def rewrite_dmin(t); end - # source://fugit//lib/fugit/nat.rb#546 + # source://fugit//lib/fugit/nat.rb#558 def rewrite_every(t); end - # source://fugit//lib/fugit/nat.rb#426 + # source://fugit//lib/fugit/nat.rb#438 def rewrite_every_interval(t); end - # source://fugit//lib/fugit/nat.rb#446 + # source://fugit//lib/fugit/nat.rb#458 def rewrite_every_named(t); end - # source://fugit//lib/fugit/nat.rb#418 + # source://fugit//lib/fugit/nat.rb#430 def rewrite_every_single_interval(t); end - # source://fugit//lib/fugit/nat.rb#397 + # source://fugit//lib/fugit/nat.rb#409 def rewrite_monthday(t); end - # source://fugit//lib/fugit/nat.rb#516 + # source://fugit//lib/fugit/nat.rb#528 def rewrite_named_hour(t); end - # source://fugit//lib/fugit/nat.rb#550 + # source://fugit//lib/fugit/nat.rb#562 def rewrite_nat(t); end - # source://fugit//lib/fugit/nat.rb#401 + # source://fugit//lib/fugit/nat.rb#413 def rewrite_omonthday(t); end - # source://fugit//lib/fugit/nat.rb#393 + # source://fugit//lib/fugit/nat.rb#405 def rewrite_on(t); end - # source://fugit//lib/fugit/nat.rb#389 + # source://fugit//lib/fugit/nat.rb#401 def rewrite_on_days(t); end - # source://fugit//lib/fugit/nat.rb#370 + # source://fugit//lib/fugit/nat.rb#382 def rewrite_on_minutes(t); end - # source://fugit//lib/fugit/nat.rb#386 + # source://fugit//lib/fugit/nat.rb#398 def rewrite_on_thes(t); end - # source://fugit//lib/fugit/nat.rb#377 + # source://fugit//lib/fugit/nat.rb#389 def rewrite_on_thex(t); end - # source://fugit//lib/fugit/nat.rb#465 + # source://fugit//lib/fugit/nat.rb#477 def rewrite_on_weekdays(t); end - # source://fugit//lib/fugit/nat.rb#508 + # source://fugit//lib/fugit/nat.rb#520 def rewrite_simple_hour(t); end - # source://fugit//lib/fugit/nat.rb#532 + # source://fugit//lib/fugit/nat.rb#544 def rewrite_to_hour(t); end - # source://fugit//lib/fugit/nat.rb#479 + # source://fugit//lib/fugit/nat.rb#491 def rewrite_to_omonthday(t); end - # source://fugit//lib/fugit/nat.rb#472 + # source://fugit//lib/fugit/nat.rb#484 def rewrite_to_weekday(t); end - # source://fugit//lib/fugit/nat.rb#455 + # source://fugit//lib/fugit/nat.rb#467 def rewrite_tz(t); end - # source://fugit//lib/fugit/nat.rb#460 + # source://fugit//lib/fugit/nat.rb#472 def rewrite_weekday(t); end - # source://fugit//lib/fugit/nat.rb#465 + # source://fugit//lib/fugit/nat.rb#477 def rewrite_weekdays(t); end - # source://fugit//lib/fugit/nat.rb#214 + # source://fugit//lib/fugit/nat.rb#226 def simple_h(i); end - # source://fugit//lib/fugit/nat.rb#217 + # source://fugit//lib/fugit/nat.rb#229 def simple_hour(i); end # rewrite parsed tree ################################################### # - # source://fugit//lib/fugit/nat.rb#354 + # source://fugit//lib/fugit/nat.rb#366 def slot(key, data0, data1 = T.unsafe(nil), opts = T.unsafe(nil)); end - # source://fugit//lib/fugit/nat.rb#292 + # source://fugit//lib/fugit/nat.rb#304 def to_hour(i); end - # source://fugit//lib/fugit/nat.rb#287 + # source://fugit//lib/fugit/nat.rb#299 def to_omonthday(i); end - # source://fugit//lib/fugit/nat.rb#279 + # source://fugit//lib/fugit/nat.rb#291 def to_weekday(i); end - # source://fugit//lib/fugit/nat.rb#193 + # source://fugit//lib/fugit/nat.rb#205 def tz(i); end - # source://fugit//lib/fugit/nat.rb#196 + # source://fugit//lib/fugit/nat.rb#208 def tzone(i); end - # source://fugit//lib/fugit/nat.rb#133 + # source://fugit//lib/fugit/nat.rb#145 def weekday(i); end - # source://fugit//lib/fugit/nat.rb#283 + # source://fugit//lib/fugit/nat.rb#295 def weekday_range(i); end - # source://fugit//lib/fugit/nat.rb#140 + # source://fugit//lib/fugit/nat.rb#152 def weekdays(i); end end -# source://fugit//lib/fugit/nat.rb#71 +# source://fugit//lib/fugit/nat.rb#83 Fugit::Nat::Parser::INTERVALS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/nat.rb#98 +# source://fugit//lib/fugit/nat.rb#110 Fugit::Nat::Parser::INTERVAL_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/nat.rb#92 +# source://fugit//lib/fugit/nat.rb#104 Fugit::Nat::Parser::MONTHDAY_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/nat.rb#96 +# source://fugit//lib/fugit/nat.rb#108 Fugit::Nat::Parser::NAMED_H_REX = T.let(T.unsafe(nil), Regexp) # prevent "mon" from eating "monday" # -# source://fugit//lib/fugit/nat.rb#95 +# source://fugit//lib/fugit/nat.rb#107 Fugit::Nat::Parser::NAMED_M_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/nat.rb#51 +# source://fugit//lib/fugit/nat.rb#63 Fugit::Nat::Parser::NHOURS = T.let(T.unsafe(nil), Hash) -# source://fugit//lib/fugit/nat.rb#57 +# source://fugit//lib/fugit/nat.rb#69 Fugit::Nat::Parser::NMINUTES = T.let(T.unsafe(nil), Hash) -# source://fugit//lib/fugit/nat.rb#89 +# source://fugit//lib/fugit/nat.rb#101 Fugit::Nat::Parser::OMONTHDAYS = T.let(T.unsafe(nil), Hash) -# source://fugit//lib/fugit/nat.rb#91 +# source://fugit//lib/fugit/nat.rb#103 Fugit::Nat::Parser::OMONTHDAY_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/nat.rb#68 +# source://fugit//lib/fugit/nat.rb#80 Fugit::Nat::Parser::POINTS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/nat.rb#97 +# source://fugit//lib/fugit/nat.rb#109 Fugit::Nat::Parser::POINT_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/nat.rb#64 +# source://fugit//lib/fugit/nat.rb#76 Fugit::Nat::Parser::WEEKDAYS = T.let(T.unsafe(nil), Array) -# source://fugit//lib/fugit/nat.rb#93 +# source://fugit//lib/fugit/nat.rb#105 Fugit::Nat::Parser::WEEKDAY_REX = T.let(T.unsafe(nil), Regexp) -# source://fugit//lib/fugit/nat.rb#556 +# source://fugit//lib/fugit/nat.rb#568 class Fugit::Nat::Slot # @return [Slot] a new instance of Slot # - # source://fugit//lib/fugit/nat.rb#559 + # source://fugit//lib/fugit/nat.rb#571 def initialize(key, d0, d1 = T.unsafe(nil), opts = T.unsafe(nil)); end # Returns the value of attribute _data0. # - # source://fugit//lib/fugit/nat.rb#558 + # source://fugit//lib/fugit/nat.rb#570 def _data0; end # Sets the attribute _data0 # # @param value the value to set the attribute _data0 to. # - # source://fugit//lib/fugit/nat.rb#558 + # source://fugit//lib/fugit/nat.rb#570 def _data0=(_arg0); end # Returns the value of attribute _data1. # - # source://fugit//lib/fugit/nat.rb#558 + # source://fugit//lib/fugit/nat.rb#570 def _data1; end # Sets the attribute _data1 # # @param value the value to set the attribute _data1 to. # - # source://fugit//lib/fugit/nat.rb#558 + # source://fugit//lib/fugit/nat.rb#570 def _data1=(_arg0); end - # source://fugit//lib/fugit/nat.rb#580 + # source://fugit//lib/fugit/nat.rb#592 def a; end - # source://fugit//lib/fugit/nat.rb#569 + # source://fugit//lib/fugit/nat.rb#581 def append(slot); end - # source://fugit//lib/fugit/nat.rb#564 + # source://fugit//lib/fugit/nat.rb#576 def data0; end - # source://fugit//lib/fugit/nat.rb#565 + # source://fugit//lib/fugit/nat.rb#577 def data1; end # @return [Boolean] # - # source://fugit//lib/fugit/nat.rb#568 + # source://fugit//lib/fugit/nat.rb#580 def graded?; end - # source://fugit//lib/fugit/nat.rb#574 + # source://fugit//lib/fugit/nat.rb#586 def inspect; end # Returns the value of attribute key. # - # source://fugit//lib/fugit/nat.rb#557 + # source://fugit//lib/fugit/nat.rb#569 def key; end - # source://fugit//lib/fugit/nat.rb#567 + # source://fugit//lib/fugit/nat.rb#579 def strong; end - # source://fugit//lib/fugit/nat.rb#566 + # source://fugit//lib/fugit/nat.rb#578 def weak; end protected - # source://fugit//lib/fugit/nat.rb#586 + # source://fugit//lib/fugit/nat.rb#598 def conflate(index, slot); end - # source://fugit//lib/fugit/nat.rb#602 + # source://fugit//lib/fugit/nat.rb#614 def hour_range; end - # source://fugit//lib/fugit/nat.rb#582 + # source://fugit//lib/fugit/nat.rb#594 def to_a(x); end end -# source://fugit//lib/fugit/nat.rb#608 +# source://fugit//lib/fugit/nat.rb#620 class Fugit::Nat::SlotGroup # @return [SlotGroup] a new instance of SlotGroup # - # source://fugit//lib/fugit/nat.rb#610 + # source://fugit//lib/fugit/nat.rb#622 def initialize(slots); end - # source://fugit//lib/fugit/nat.rb#635 + # source://fugit//lib/fugit/nat.rb#647 def to_crons(opts); end protected - # source://fugit//lib/fugit/nat.rb#658 + # source://fugit//lib/fugit/nat.rb#670 def determine_hms; end - # source://fugit//lib/fugit/nat.rb#653 + # source://fugit//lib/fugit/nat.rb#665 def make_slot(key, data0, data1 = T.unsafe(nil)); end - # source://fugit//lib/fugit/nat.rb#681 + # source://fugit//lib/fugit/nat.rb#693 def parse_cron(hm, opts); end # Return nil if the cron is "not strict" @@ -1424,10 +1486,10 @@ class Fugit::Nat::SlotGroup # # It happens here because it's nat being strict, not cron. # - # source://fugit//lib/fugit/nat.rb#718 + # source://fugit//lib/fugit/nat.rb#730 def restrict(a, cron); end - # source://fugit//lib/fugit/nat.rb#729 + # source://fugit//lib/fugit/nat.rb#741 def slot(key, default); end end diff --git a/sorbet/rbi/gems/highline@2.1.0.rbi b/sorbet/rbi/gems/highline@3.1.0.rbi similarity index 99% rename from sorbet/rbi/gems/highline@2.1.0.rbi rename to sorbet/rbi/gems/highline@3.1.0.rbi index 6269c0462..084593875 100644 --- a/sorbet/rbi/gems/highline@2.1.0.rbi +++ b/sorbet/rbi/gems/highline@3.1.0.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `highline` gem. # Please instead update this file by running `bin/tapioca gem highline`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/i18n-tasks@1.0.13.rbi b/sorbet/rbi/gems/i18n-tasks@1.0.14.rbi similarity index 93% rename from sorbet/rbi/gems/i18n-tasks@1.0.13.rbi rename to sorbet/rbi/gems/i18n-tasks@1.0.14.rbi index b4c2422a8..88c9b955b 100644 --- a/sorbet/rbi/gems/i18n-tasks@1.0.13.rbi +++ b/sorbet/rbi/gems/i18n-tasks@1.0.14.rbi @@ -4,51 +4,52 @@ # This is an autogenerated file for types exported from the `i18n-tasks` gem. # Please instead update this file by running `bin/tapioca gem i18n-tasks`. + # define all the modules to be able to use :: # # source://i18n-tasks//lib/i18n/tasks.rb#4 module I18n class << self - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#64 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#64 def cache_key_digest; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#68 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#68 def cache_key_digest=(key_digest); end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#56 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#56 def cache_namespace; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#60 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#60 def cache_namespace=(namespace); end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#48 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#48 def cache_store; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#52 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#52 def cache_store=(store); end - # source://i18n/1.14.1/lib/i18n/backend/fallbacks.rb#17 + # source://i18n/1.14.6/lib/i18n/backend/fallbacks.rb#17 def fallbacks; end - # source://i18n/1.14.1/lib/i18n/backend/fallbacks.rb#23 + # source://i18n/1.14.6/lib/i18n/backend/fallbacks.rb#23 def fallbacks=(fallbacks); end - # source://i18n/1.14.1/lib/i18n/interpolate/ruby.rb#23 + # source://i18n/1.14.6/lib/i18n/interpolate/ruby.rb#23 def interpolate(string, values); end - # source://i18n/1.14.1/lib/i18n/interpolate/ruby.rb#29 + # source://i18n/1.14.6/lib/i18n/interpolate/ruby.rb#29 def interpolate_hash(string, values); end - # source://i18n/1.14.1/lib/i18n.rb#37 + # source://i18n/1.14.6/lib/i18n.rb#38 def new_double_nested_cache; end - # source://i18n/1.14.1/lib/i18n/backend/cache.rb#72 + # source://i18n/1.14.6/lib/i18n/backend/cache.rb#72 def perform_caching?; end - # source://i18n/1.14.1/lib/i18n.rb#45 + # source://i18n/1.14.6/lib/i18n.rb#46 def reserve_key(key); end - # source://i18n/1.14.1/lib/i18n.rb#50 + # source://i18n/1.14.6/lib/i18n.rb#51 def reserved_keys_pattern; end end end @@ -198,7 +199,7 @@ I18n::Tasks::Concurrent::CachedValue::NULL = T.let(T.unsafe(nil), Object) module I18n::Tasks::Configuration # @return [String] default i18n locale # - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#81 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#82 def base_locale; end # i18n-tasks config (defaults + config/i18n-tasks.yml) @@ -211,12 +212,12 @@ module I18n::Tasks::Configuration # source://i18n-tasks//lib/i18n/tasks/configuration.rb#46 def config=(conf); end - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#120 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#121 def config_for_inspect; end # evaluated configuration (as the app sees it) # - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#106 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#107 def config_sections; end # data config @@ -228,15 +229,15 @@ module I18n::Tasks::Configuration # source://i18n-tasks//lib/i18n/tasks/configuration.rb#22 def file_config; end - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#99 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#100 def ignore_config(type = T.unsafe(nil)); end - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#85 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#86 def internal_locale; end # @return [Array] all available locales, base_locale is always first # - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#76 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#77 def locales; end # translation config @@ -248,7 +249,7 @@ module I18n::Tasks::Configuration private - # source://i18n-tasks//lib/i18n/tasks/configuration.rb#130 + # source://i18n-tasks//lib/i18n/tasks/configuration.rb#131 def to_hash_from_indifferent(value); end end @@ -258,7 +259,7 @@ I18n::Tasks::Configuration::CONFIG_FILES = T.let(T.unsafe(nil), Array) # source://i18n-tasks//lib/i18n/tasks/configuration.rb#4 I18n::Tasks::Configuration::DEFAULTS = T.let(T.unsafe(nil), Hash) -# source://i18n-tasks//lib/i18n/tasks/configuration.rb#104 +# source://i18n-tasks//lib/i18n/tasks/configuration.rb#105 I18n::Tasks::Configuration::IGNORE_TYPES = T.let(T.unsafe(nil), Array) # source://i18n-tasks//lib/i18n/tasks.rb#52 @@ -445,7 +446,7 @@ end # source://i18n-tasks//lib/i18n/tasks/data/file_system.rb#9 class I18n::Tasks::Data::FileSystem < ::I18n::Tasks::Data::FileSystemBase; end -# source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#11 +# source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#12 class I18n::Tasks::Data::FileSystemBase include ::I18n::Tasks::Data::FileFormats include ::I18n::Tasks::Logging @@ -453,13 +454,13 @@ class I18n::Tasks::Data::FileSystemBase # @return [FileSystemBase] a new instance of FileSystemBase # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#24 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#25 def initialize(config = T.unsafe(nil)); end # @param locale [String, Symbol] # @return [::I18n::Tasks::Data::Siblings] # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#39 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#40 def [](locale); end # set locale tree @@ -467,76 +468,76 @@ class I18n::Tasks::Data::FileSystemBase # @param locale [String, Symbol] # @param tree [::I18n::Tasks::Data::Siblings] # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#58 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#59 def []=(locale, tree); end # Get available locales from the list of file names to read # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#115 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#116 def available_locales; end # Returns the value of attribute base_locale. # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#16 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#17 def base_locale; end # Returns the value of attribute config. # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#16 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#17 def config; end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#139 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#140 def config=(config); end # @param locale [String, Symbol] # @return [::I18n::Tasks::Data::Siblings] # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#49 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#50 def external(locale); end # @param locale [String, Symbol] # @return [::I18n::Tasks::Data::Siblings] # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#39 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#40 def get(locale); end # Returns the value of attribute locales. # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#15 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#16 def locales; end # Sets the attribute locales # # @param value the value to set the attribute locales to. # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#15 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#16 def locales=(_arg0); end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#88 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#89 def merge!(forest); end # @param locale [String] # @return [Array] paths to files that are not normalized # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#78 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#79 def non_normalized_paths(locale); end # @return self # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#108 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#109 def reload; end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#97 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#98 def remove_by_key!(forest); end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#156 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#158 def router; end # Sets the attribute router # # @param value the value to set the attribute router to. # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#17 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#18 def router=(_arg0); end # set locale tree @@ -544,31 +545,31 @@ class I18n::Tasks::Data::FileSystemBase # @param locale [String, Symbol] # @param tree [::I18n::Tasks::Data::Siblings] # - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#58 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#59 def set(locale, tree); end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#132 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#133 def t(key, locale); end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#144 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#145 def with_router(router); end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#84 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#85 def write(forest); end protected - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#180 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#185 def filter_nil_keys!(path, data, suffix = T.unsafe(nil)); end - # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#167 + # source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#169 def read_locale(locale, paths: T.unsafe(nil)); end end -# source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#19 +# source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#20 I18n::Tasks::Data::FileSystemBase::DEFAULTS = T.let(T.unsafe(nil), Hash) -# source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#152 +# source://i18n-tasks//lib/i18n/tasks/data/file_system_base.rb#153 I18n::Tasks::Data::FileSystemBase::ROUTER_NAME_ALIASES = T.let(T.unsafe(nil), Hash) # source://i18n-tasks//lib/i18n/tasks/data/router/pattern_router.rb#7 @@ -610,6 +611,69 @@ class I18n::Tasks::Data::Router::ConservativeRouter < ::I18n::Tasks::Data::Route def locales; end end +# Route based on source file path +# +# source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#9 +class I18n::Tasks::Data::Router::IsolatingRouter + include ::I18n::Tasks::KeyPatternMatching + + # @return [IsolatingRouter] a new instance of IsolatingRouter + # + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#14 + def initialize(_adapter, data_config); end + + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#51 + def alternate_path_for(source_path, locale); end + + # Returns the value of attribute base_locale. + # + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#12 + def base_locale; end + + # Returns the value of attribute config_read_patterns. + # + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#12 + def config_read_patterns; end + + # Route keys to destinations + # + # @param forest [I18n::Tasks::Data::Tree::Siblings] forest roots are locales. + # @return [Hash] mapping of destination => [ [key, value], ... ] + # @yieldparam dest_path [String] + # @yieldparam tree_slice [I18n::Tasks::Data::Tree::Siblings] + # + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#24 + def route(locale, forest, &block); end +end + +# based on https://github.com/alexch/rerun/blob/36f2d237985b670752abbe4a7f6814893cdde96f/lib/rerun/glob.rb +# +# source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#73 +class I18n::Tasks::Data::Router::IsolatingRouter::Glob + # @return [Glob] a new instance of Glob + # + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#78 + def initialize(pattern); end + + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#129 + def smoosh(chars); end + + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#125 + def to_regexp; end + + # source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#82 + def to_regexp_string; end +end + +# source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#76 +I18n::Tasks::Data::Router::IsolatingRouter::Glob::END_OF_STRING = T.let(T.unsafe(nil), String) + +# source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#74 +I18n::Tasks::Data::Router::IsolatingRouter::Glob::NO_LEADING_DOT = T.let(T.unsafe(nil), String) + +# source://i18n-tasks//lib/i18n/tasks/data/router/isolating_router.rb#75 +I18n::Tasks::Data::Router::IsolatingRouter::Glob::START_OF_FILENAME = T.let(T.unsafe(nil), String) + # Route based on key name # # source://i18n-tasks//lib/i18n/tasks/data/router/pattern_router.rb#9 @@ -956,7 +1020,7 @@ class I18n::Tasks::Data::Tree::Siblings < ::I18n::Tasks::Data::Tree::Nodes # @return [old key => new key] # # source://i18n-tasks//lib/i18n/tasks/data/tree/siblings.rb#39 - def mv_key!(from_pattern, to_pattern, root: T.unsafe(nil)); end + def mv_key!(from_pattern, to_pattern, root: T.unsafe(nil), retain: T.unsafe(nil)); end # Returns the value of attribute parent. # @@ -1527,6 +1591,12 @@ class I18n::Tasks::Scanners::AstMatchers::BaseMatcher def extract_string(node, array_join_with: T.unsafe(nil), array_flatten: T.unsafe(nil), array_reject_blank: T.unsafe(nil)); end end +# source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/default_i18n_subject_matcher.rb#7 +class I18n::Tasks::Scanners::AstMatchers::DefaultI18nSubjectMatcher < ::I18n::Tasks::Scanners::AstMatchers::BaseMatcher + # source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/default_i18n_subject_matcher.rb#8 + def convert_to_key_occurrences(send_node, method_name, location: T.unsafe(nil)); end +end + # source://i18n-tasks//lib/i18n/tasks/scanners/ast_matchers/message_receivers_matcher.rb#7 class I18n::Tasks::Scanners::AstMatchers::MessageReceiversMatcher < ::I18n::Tasks::Scanners::AstMatchers::BaseMatcher # @return [MessageReceiversMatcher] a new instance of MessageReceiversMatcher @@ -1582,46 +1652,9 @@ class I18n::Tasks::Scanners::AstMatchers::RailsModelMatcher < ::I18n::Tasks::Sca def underscore(value); end end -# source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#8 -class I18n::Tasks::Scanners::ErbAstProcessor - include ::AST::Processor::Mixin - - # @return [ErbAstProcessor] a new instance of ErbAstProcessor - # - # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#10 - def initialize; end - - # @param node [::Parser::AST::Node] - # @return [::Parser::AST::Node] - # - # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#40 - def handler_missing(node); end - - # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#21 - def on_code(node); end - - # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#16 - def process_and_extract_comments(ast); end - - private - - # Convert ERB-comments to ::Parser::Source::Comment and skip processing node - # - # @param node Parser::AST::Node Potential comment node - # @return Parser::AST::Node or nil - # - # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#56 - def handle_comment(node); end - - # @return [Boolean] - # - # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_processor.rb#70 - def node?(node); end -end - # Scan for I18n.translate calls in ERB-file better-html and ASTs # -# source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#10 +# source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#8 class I18n::Tasks::Scanners::ErbAstScanner < ::I18n::Tasks::Scanners::RubyAstScanner # @return [ErbAstScanner] a new instance of ErbAstScanner # @@ -1630,13 +1663,11 @@ class I18n::Tasks::Scanners::ErbAstScanner < ::I18n::Tasks::Scanners::RubyAstSca private - # Convert BetterHtml nodes to Parser::AST::Node - # - # @param node BetterHtml::Parser::AST::Node - # @return Parser::AST::Node - # - # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#32 - def convert_better_html(node); end + # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#49 + def handle_code(buffer, code, start, stop); end + + # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#61 + def handle_comment(buffer, start, stop); end # Parse file on path and returns AST and comments. # @@ -1645,8 +1676,14 @@ class I18n::Tasks::Scanners::ErbAstScanner < ::I18n::Tasks::Scanners::RubyAstSca # # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#22 def path_to_ast_and_comments(path); end + + # source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#66 + def root_node(children, buffer); end end +# source://i18n-tasks//lib/i18n/tasks/scanners/erb_ast_scanner.rb#9 +I18n::Tasks::Scanners::ErbAstScanner::DEFAULT_REGEXP = T.let(T.unsafe(nil), Regexp) + # A base class for a scanner that analyses files. # # @abstract The child must implement {#scan_file}. @@ -2281,14 +2318,14 @@ end # Scan for I18n.translate calls using whitequark/parser # -# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#12 +# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#13 class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScanner include ::I18n::Tasks::Scanners::RelativeKeys include ::AST::Sexp # @return [RubyAstScanner] a new instance of RubyAstScanner # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#18 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#19 def initialize(**args); end protected @@ -2298,7 +2335,7 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param ast [Parser::Source::Comment] # @return [nil, [key, Occurrence]] full absolute key name and the occurrence. # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#102 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#103 def ast_to_occurences(ast); end # Convert an array of {Parser::Source::Comment} to occurrences. @@ -2308,12 +2345,12 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param comments [Parser::Source::Comment] # @return [nil, [key, Occurrence]] full absolute key name and the occurrence. # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#69 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#70 def comments_to_occurences(path, ast, comments); end # @return [Boolean] # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#47 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#48 def keys_relative_to_calling_method?(path); end # Create an {Parser::Source::Buffer} with the given contents. @@ -2323,7 +2360,7 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param contents [String] # @return [Parser::Source::Buffer] file contents # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#57 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#58 def make_buffer(path, contents = T.unsafe(nil)); end # Parse file on path and returns AST and comments. @@ -2331,21 +2368,21 @@ class I18n::Tasks::Scanners::RubyAstScanner < ::I18n::Tasks::Scanners::FileScann # @param path Path to file to parse # @return [{Parser::AST::Node}, [Parser::Source::Comment]] # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#42 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#43 def path_to_ast_and_comments(path); end # Extract all occurrences of translate calls from the file at the given path. # # @return [Array<[key, Results::KeyOccurrence]>] each occurrence found in the file # - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#30 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#31 def scan_file(path); end - # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#115 + # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#116 def setup_matchers; end end -# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#16 +# source://i18n-tasks//lib/i18n/tasks/scanners/ruby_ast_scanner.rb#17 I18n::Tasks::Scanners::RubyAstScanner::MAGIC_COMMENT_PREFIX = T.let(T.unsafe(nil), Regexp) # source://i18n-tasks//lib/i18n/tasks/scanners/ruby_key_literals.rb#4 @@ -2431,13 +2468,7 @@ end module I18n::Tasks::SplitKey private - # yield each key part - # dots inside braces or parenthesis are not split on - # - # source://i18n-tasks//lib/i18n/tasks/split_key.rb#38 - def key_parts(key, &block); end - - # source://i18n-tasks//lib/i18n/tasks/split_key.rb#30 + # source://i18n-tasks//lib/i18n/tasks/split_key.rb#50 def last_key_part(key); end # split a key by dots (.) @@ -2447,17 +2478,11 @@ module I18n::Tasks::SplitKey # split_key 'a.#{b.c}' # => ['a', '#{b.c}'] # split_key 'a.b.c', 2 # => ['a', 'b.c'] # - # source://i18n-tasks//lib/i18n/tasks/split_key.rb#14 + # source://i18n-tasks//lib/i18n/tasks/split_key.rb#19 def split_key(key, max = T.unsafe(nil)); end class << self - # yield each key part - # dots inside braces or parenthesis are not split on - # - # source://i18n-tasks//lib/i18n/tasks/split_key.rb#38 - def key_parts(key, &block); end - - # source://i18n-tasks//lib/i18n/tasks/split_key.rb#30 + # source://i18n-tasks//lib/i18n/tasks/split_key.rb#50 def last_key_part(key); end # split a key by dots (.) @@ -2467,16 +2492,19 @@ module I18n::Tasks::SplitKey # split_key 'a.#{b.c}' # => ['a', '#{b.c}'] # split_key 'a.b.c', 2 # => ['a', 'b.c'] # - # source://i18n-tasks//lib/i18n/tasks/split_key.rb#14 + # source://i18n-tasks//lib/i18n/tasks/split_key.rb#19 def split_key(key, max = T.unsafe(nil)); end end end -# source://i18n-tasks//lib/i18n/tasks/split_key.rb#62 -I18n::Tasks::SplitKey::PARENS = T.let(T.unsafe(nil), Hash) +# source://i18n-tasks//lib/i18n/tasks/split_key.rb#10 +I18n::Tasks::SplitKey::END_KEYS = T.let(T.unsafe(nil), Hash) + +# source://i18n-tasks//lib/i18n/tasks/split_key.rb#8 +I18n::Tasks::SplitKey::PARENTHESIS_PAIRS = T.let(T.unsafe(nil), Array) -# source://i18n-tasks//lib/i18n/tasks/split_key.rb#67 -I18n::Tasks::SplitKey::PARENS_ZEROS = T.let(T.unsafe(nil), Array) +# source://i18n-tasks//lib/i18n/tasks/split_key.rb#9 +I18n::Tasks::SplitKey::START_KEYS = T.let(T.unsafe(nil), Set) # source://i18n-tasks//lib/i18n/tasks/stats.rb#4 module I18n::Tasks::Stats @@ -2553,26 +2581,26 @@ class I18n::Tasks::Translators::BaseTranslator # @abstract # @return [String] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#158 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#164 def no_results_error_message; end # @abstract # @return [Hash] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#150 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#156 def options_for_html; end # @abstract # @return [Hash] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#154 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#160 def options_for_plain; end # @abstract # @param options [Hash] # @return [Hash] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#146 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#152 def options_for_translate_values(options); end # Parse translated value from the each_translated enumerator @@ -2581,23 +2609,23 @@ class I18n::Tasks::Translators::BaseTranslator # @param each_translated [Enumerator] # @return [Object] final translated value # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#83 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#86 def parse_value(untranslated, each_translated, opts); end - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#128 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#134 def raise_interpolation_error(untranslated, translated, e); end # @param value [String] # @return [String] 'hello, %{name}' => 'hello, ' # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#106 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#112 def replace_interpolations(value); end # @param untranslated [String] # @param translated [String] # @return [String] 'hello, ' => 'hello, %{name}' # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#117 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#123 def restore_interpolations(untranslated, translated); end # @param list [Array<[String, Object]>] of key-value pairs @@ -2617,14 +2645,14 @@ class I18n::Tasks::Translators::BaseTranslator # @param options [Hash] # @return [Array] # - # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#141 + # source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#147 def translate_values(list, **options); end end -# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#101 +# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#107 I18n::Tasks::Translators::BaseTranslator::INTERPOLATION_KEY_RE = T.let(T.unsafe(nil), Regexp) -# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#102 +# source://i18n-tasks//lib/i18n/tasks/translators/base_translator.rb#108 I18n::Tasks::Translators::BaseTranslator::UNTRANSLATABLE_STRING = T.let(T.unsafe(nil), String) # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#6 @@ -2636,29 +2664,29 @@ class I18n::Tasks::Translators::DeeplTranslator < ::I18n::Tasks::Translators::Ba protected - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#68 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#73 def no_results_error_message; end - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#43 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#48 def options_for_html; end - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#47 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#52 def options_for_plain; end - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#37 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#42 def options_for_translate_values(**options); end # @param value [String] # @return [String] 'hello, %{name}' => 'hello, %{name}' # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#53 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#58 def replace_interpolations(value); end # @param untranslated [String] # @param translated [String] # @return [String] 'hello, %{name}' => 'hello, %{name}' # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#60 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#65 def restore_interpolations(untranslated, translated); end # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#24 @@ -2666,17 +2694,26 @@ class I18n::Tasks::Translators::DeeplTranslator < ::I18n::Tasks::Translators::Ba private - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#91 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#114 + def all_ready_glossaries; end + + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#96 def configure_api_key!; end + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#118 + def find_glossary(from, to); end + + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#109 + def options_with_glossary(options, from, to); end + # Convert 'es-ES' to 'ES', en-us to EN # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#75 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#80 def to_deepl_source_locale(locale); end # Convert 'es-ES' to 'ES' but warn about locales requiring a specific variant # - # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#80 + # source://i18n-tasks//lib/i18n/tasks/translators/deepl_translator.rb#85 def to_deepl_target_locale(locale); end end @@ -2694,79 +2731,89 @@ I18n::Tasks::Translators::DeeplTranslator::SPECIFIC_TARGETS = T.let(T.unsafe(nil class I18n::Tasks::Translators::GoogleTranslator < ::I18n::Tasks::Translators::BaseTranslator # @return [GoogleTranslator] a new instance of GoogleTranslator # - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#7 + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#8 def initialize(*_arg0); end protected - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#38 + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#46 def no_results_error_message; end - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#30 + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#38 def options_for_html; end - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#34 + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#42 def options_for_plain; end - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#22 + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#30 def options_for_translate_values(from:, to:, **options); end - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#18 + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#19 def translate_values(list, **options); end private - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#53 + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#52 def api_key; end - # Convert 'es-ES' to 'es' - # - # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#47 - def to_google_translate_compatible_locale(locale); end + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#68 + def replace_newlines_with_placeholder(list, html); end + + # source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#76 + def restore_newlines(translations, html); end end -# source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#44 -I18n::Tasks::Translators::GoogleTranslator::SUPPORTED_LOCALES_WITH_REGION = T.let(T.unsafe(nil), Array) +# source://i18n-tasks//lib/i18n/tasks/translators/google_translator.rb#7 +I18n::Tasks::Translators::GoogleTranslator::NEWLINE_PLACEHOLDER = T.let(T.unsafe(nil), String) -# source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#6 +# source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#7 class I18n::Tasks::Translators::OpenAiTranslator < ::I18n::Tasks::Translators::BaseTranslator # @return [OpenAiTranslator] a new instance of OpenAiTranslator # - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#10 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#23 def initialize(*_arg0); end - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#34 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#47 def no_results_error_message; end - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#26 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#39 def options_for_html; end - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#30 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#43 def options_for_plain; end - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#19 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#32 def options_for_translate_values(from:, to:, **options); end private - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#44 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#57 def api_key; end - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#65 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#66 + def model; end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#70 + def system_prompt; end + + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#86 def translate(values, from, to); end - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#53 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#74 def translate_values(list, from:, to:); end - # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#40 + # source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#53 def translator; end end # max allowed texts per request # -# source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#8 +# source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#9 I18n::Tasks::Translators::OpenAiTranslator::BATCH_SIZE = T.let(T.unsafe(nil), Integer) +# source://i18n-tasks//lib/i18n/tasks/translators/openai_translator.rb#10 +I18n::Tasks::Translators::OpenAiTranslator::DEFAULT_SYSTEM_PROMPT = T.let(T.unsafe(nil), String) + # source://i18n-tasks//lib/i18n/tasks/translators/yandex_translator.rb#6 class I18n::Tasks::Translators::YandexTranslator < ::I18n::Tasks::Translators::BaseTranslator # @return [YandexTranslator] a new instance of YandexTranslator diff --git a/sorbet/rbi/gems/i18n@1.14.1.rbi b/sorbet/rbi/gems/i18n@1.14.6.rbi similarity index 92% rename from sorbet/rbi/gems/i18n@1.14.1.rbi rename to sorbet/rbi/gems/i18n@1.14.6.rbi index e6c7fbd41..72a32f166 100644 --- a/sorbet/rbi/gems/i18n@1.14.1.rbi +++ b/sorbet/rbi/gems/i18n@1.14.6.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `i18n` gem. # Please instead update this file by running `bin/tapioca gem i18n`. + # source://i18n//lib/i18n/gettext/po_parser.rb#15 module GetText; end @@ -87,7 +88,7 @@ module I18n # source://i18n//lib/i18n/interpolate/ruby.rb#29 def interpolate_hash(string, values); end - # source://i18n//lib/i18n.rb#37 + # source://i18n//lib/i18n.rb#38 def new_double_nested_cache; end # @return [Boolean] @@ -100,10 +101,10 @@ module I18n # extra keys as I18n options, you should call I18n.reserve_key # before any I18n.translate (etc) calls are made. # - # source://i18n//lib/i18n.rb#45 + # source://i18n//lib/i18n.rb#46 def reserve_key(key); end - # source://i18n//lib/i18n.rb#50 + # source://i18n//lib/i18n.rb#51 def reserved_keys_pattern; end end end @@ -123,15 +124,15 @@ module I18n::Backend::Base # # @raise [NotImplementedError] # - # source://i18n//lib/i18n/backend/base.rb#94 + # source://i18n//lib/i18n/backend/base.rb#97 def available_locales; end - # source://i18n//lib/i18n/backend/base.rb#102 + # source://i18n//lib/i18n/backend/base.rb#105 def eager_load!; end # @return [Boolean] # - # source://i18n//lib/i18n/backend/base.rb#68 + # source://i18n//lib/i18n/backend/base.rb#71 def exists?(locale, key, options = T.unsafe(nil)); end # Accepts a list of paths to translation files. Loads translations from @@ -147,10 +148,10 @@ module I18n::Backend::Base # # @raise [ArgumentError] # - # source://i18n//lib/i18n/backend/base.rb#75 + # source://i18n//lib/i18n/backend/base.rb#78 def localize(locale, object, format = T.unsafe(nil), options = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/base.rb#98 + # source://i18n//lib/i18n/backend/base.rb#101 def reload!; end # This method receives a locale, a data hash and options for storing translations. @@ -174,7 +175,7 @@ module I18n::Backend::Base # ann: 'good', john: 'big' # #=> { people: { ann: "Ann is good", john: "John is big" } } # - # source://i18n//lib/i18n/backend/base.rb#207 + # source://i18n//lib/i18n/backend/base.rb#217 def deep_interpolate(locale, data, values = T.unsafe(nil)); end # Evaluates defaults. @@ -182,12 +183,12 @@ module I18n::Backend::Base # first translation that can be resolved. Otherwise it tries to resolve # the translation directly. # - # source://i18n//lib/i18n/backend/base.rb#125 + # source://i18n//lib/i18n/backend/base.rb#128 def default(locale, object, subject, options = T.unsafe(nil)); end # @return [Boolean] # - # source://i18n//lib/i18n/backend/base.rb#108 + # source://i18n//lib/i18n/backend/base.rb#111 def eager_loaded?; end # Interpolates values into a given subject. @@ -198,10 +199,10 @@ module I18n::Backend::Base # # if the given subject is an array then: # each element of the array is recursively interpolated (until it finds a string) - # method interpolates ["yes, %{user}", ["maybe no, %{user}, "no, %{user}"]], :user => "bartuz" - # # => "["yes, bartuz",["maybe no, bartuz", "no, bartuz"]]" + # method interpolates ["yes, %{user}", ["maybe no, %{user}", "no, %{user}"]], :user => "bartuz" + # # => ["yes, bartuz", ["maybe no, bartuz", "no, bartuz"]] # - # source://i18n//lib/i18n/backend/base.rb#191 + # source://i18n//lib/i18n/backend/base.rb#201 def interpolate(locale, subject, values = T.unsafe(nil)); end # Loads a single translations file by delegating to #load_rb or @@ -211,41 +212,41 @@ module I18n::Backend::Base # # @raise [UnknownFileType] # - # source://i18n//lib/i18n/backend/base.rb#230 + # source://i18n//lib/i18n/backend/base.rb#240 def load_file(filename); end # Loads a JSON translations file. The data must have locales as # toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#266 + # source://i18n//lib/i18n/backend/base.rb#276 def load_json(filename); end # Loads a plain Ruby translations file. eval'ing the file must yield # a Hash containing translation data with locales as toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#244 + # source://i18n//lib/i18n/backend/base.rb#254 def load_rb(filename); end # Loads a YAML translations file. The data must have locales as # toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#251 + # source://i18n//lib/i18n/backend/base.rb#261 def load_yaml(filename); end # Loads a YAML translations file. The data must have locales as # toplevel keys. # - # source://i18n//lib/i18n/backend/base.rb#251 + # source://i18n//lib/i18n/backend/base.rb#261 def load_yml(filename); end # The method which actually looks up for the translation in the store. # # @raise [NotImplementedError] # - # source://i18n//lib/i18n/backend/base.rb#113 + # source://i18n//lib/i18n/backend/base.rb#116 def lookup(locale, key, scope = T.unsafe(nil), options = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/base.rb#298 + # source://i18n//lib/i18n/backend/base.rb#308 def pluralization_key(entry, count); end # Picks a translation from a pluralized mnemonic subkey according to English @@ -259,7 +260,7 @@ module I18n::Backend::Base # # @raise [InvalidPluralizationData] # - # source://i18n//lib/i18n/backend/base.rb#172 + # source://i18n//lib/i18n/backend/base.rb#182 def pluralize(locale, entry, count); end # Resolves a translation. @@ -267,7 +268,7 @@ module I18n::Backend::Base # given options. If it is a Proc then it will be evaluated. All other # subjects will be returned directly. # - # source://i18n//lib/i18n/backend/base.rb#147 + # source://i18n//lib/i18n/backend/base.rb#150 def resolve(locale, object, subject, options = T.unsafe(nil)); end # Resolves a translation. @@ -275,15 +276,15 @@ module I18n::Backend::Base # given options. If it is a Proc then it will be evaluated. All other # subjects will be returned directly. # - # source://i18n//lib/i18n/backend/base.rb#147 + # source://i18n//lib/i18n/backend/base.rb#150 def resolve_entry(locale, object, subject, options = T.unsafe(nil)); end # @return [Boolean] # - # source://i18n//lib/i18n/backend/base.rb#117 + # source://i18n//lib/i18n/backend/base.rb#120 def subtrees?; end - # source://i18n//lib/i18n/backend/base.rb#279 + # source://i18n//lib/i18n/backend/base.rb#289 def translate_localization_format(locale, object, format, options); end end @@ -447,10 +448,10 @@ end module I18n::Backend::Fallbacks # @return [Boolean] # - # source://i18n//lib/i18n/backend/fallbacks.rb#94 + # source://i18n//lib/i18n/backend/fallbacks.rb#98 def exists?(locale, key, options = T.unsafe(nil)); end - # source://i18n//lib/i18n/backend/fallbacks.rb#85 + # source://i18n//lib/i18n/backend/fallbacks.rb#89 def extract_non_symbol_default!(options); end # source://i18n//lib/i18n/backend/fallbacks.rb#67 @@ -474,7 +475,7 @@ module I18n::Backend::Fallbacks # Overwrite on_fallback to add specified logic when the fallback succeeds. # - # source://i18n//lib/i18n/backend/fallbacks.rb#110 + # source://i18n//lib/i18n/backend/fallbacks.rb#114 def on_fallback(_original_locale, _fallback_locale, _key, _options); end end @@ -603,15 +604,15 @@ end # source://i18n//lib/i18n/backend/interpolation_compiler.rb#20 module I18n::Backend::InterpolationCompiler - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#99 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#97 def interpolate(locale, string, values); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#109 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#107 def store_translations(locale, data, options = T.unsafe(nil)); end protected - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#115 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#113 def compile_all_strings_in(data); end end @@ -619,58 +620,55 @@ end module I18n::Backend::InterpolationCompiler::Compiler extend ::I18n::Backend::InterpolationCompiler::Compiler - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#27 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#26 def compile_if_an_interpolation(string); end # @return [Boolean] # - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#39 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#38 def interpolated_str?(str); end protected - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#60 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#58 def compile_interpolation_token(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#49 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#48 def compiled_interpolation_body(str); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#73 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#71 def direct_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#93 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#91 def escape_key_sym(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#89 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#87 def escape_plain_str(str); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#55 - def handle_interpolation_token(interpolation, matchdata); end + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#54 + def handle_interpolation_token(token); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#69 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#67 def interpolate_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#64 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#62 def interpolate_or_raise_missing(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#81 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#79 def missing_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#77 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#75 def nil_key(key); end - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#85 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#83 def reserved_key(key); end # tokenize("foo %{bar} baz %%{buz}") # => ["foo ", "%{bar}", " baz ", "%%{buz}"] # - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#45 + # source://i18n//lib/i18n/backend/interpolation_compiler.rb#44 def tokenize(str); end end -# source://i18n//lib/i18n/backend/interpolation_compiler.rb#25 -I18n::Backend::InterpolationCompiler::Compiler::INTERPOLATION_SYNTAX_PATTERN = T.let(T.unsafe(nil), Regexp) - # source://i18n//lib/i18n/backend/interpolation_compiler.rb#24 I18n::Backend::InterpolationCompiler::Compiler::TOKENIZER = T.let(T.unsafe(nil), Regexp) @@ -1063,14 +1061,14 @@ end # The implementation is provided by a Implementation module allowing to easily # extend Simple backend's behavior by including modules. E.g.: # -# module I18n::Backend::Pluralization -# def pluralize(*args) -# # extended pluralization logic -# super -# end -# end +# module I18n::Backend::Pluralization +# def pluralize(*args) +# # extended pluralization logic +# super +# end +# end # -# I18n::Backend::Simple.include(I18n::Backend::Pluralization) +# I18n::Backend::Simple.include(I18n::Backend::Pluralization) # # source://i18n//lib/i18n/backend/simple.rb#21 class I18n::Backend::Simple @@ -1195,69 +1193,69 @@ class I18n::Backend::Transliterator::ProcTransliterator def transliterate(string, replacement = T.unsafe(nil)); end end -# source://i18n//lib/i18n.rb#54 +# source://i18n//lib/i18n.rb#55 module I18n::Base - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def available_locales; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def available_locales=(value); end # @return [Boolean] # - # source://i18n//lib/i18n.rb#355 + # source://i18n//lib/i18n.rb#386 def available_locales_initialized?; end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def backend; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def backend=(value); end # Gets I18n configuration object. # - # source://i18n//lib/i18n.rb#56 + # source://i18n//lib/i18n.rb#57 def config; end # Sets I18n configuration object. # - # source://i18n//lib/i18n.rb#61 + # source://i18n//lib/i18n.rb#62 def config=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def default_locale; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def default_locale=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def default_separator; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def default_separator=(value); end # Tells the backend to load translations now. Used in situations like the # Rails production environment. Backends can implement whatever strategy # is useful. # - # source://i18n//lib/i18n.rb#90 + # source://i18n//lib/i18n.rb#91 def eager_load!; end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def enforce_available_locales; end # Raises an InvalidLocale exception when the passed locale is not available. # - # source://i18n//lib/i18n.rb#349 + # source://i18n//lib/i18n.rb#380 def enforce_available_locales!(locale); end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def enforce_available_locales=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def exception_handler; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def exception_handler=(value); end # Returns true if a translation exists for a given key, otherwise returns false. @@ -1265,26 +1263,51 @@ module I18n::Base # @raise [Disabled] # @return [Boolean] # - # source://i18n//lib/i18n.rb#235 + # source://i18n//lib/i18n.rb#265 def exists?(key, _locale = T.unsafe(nil), locale: T.unsafe(nil), **options); end + # Returns an array of interpolation keys for the given translation key + # + # *Examples* + # + # Suppose we have the following: + # I18n.t 'example.zero' == 'Zero interpolations' + # I18n.t 'example.one' == 'One interpolation %{foo}' + # I18n.t 'example.two' == 'Two interpolations %{foo} %{bar}' + # I18n.t 'example.three' == ['One %{foo}', 'Two %{bar}', 'Three %{baz}'] + # I18n.t 'example.one', locale: :other == 'One interpolation %{baz}' + # + # Then we can expect the following results: + # I18n.interpolation_keys('example.zero') #=> [] + # I18n.interpolation_keys('example.one') #=> ['foo'] + # I18n.interpolation_keys('example.two') #=> ['foo', 'bar'] + # I18n.interpolation_keys('example.three') #=> ['foo', 'bar', 'baz'] + # I18n.interpolation_keys('one', scope: 'example', locale: :other) #=> ['baz'] + # I18n.interpolation_keys('does-not-exist') #=> [] + # I18n.interpolation_keys('example') #=> [] + # + # @raise [I18n::ArgumentError] + # + # source://i18n//lib/i18n.rb#254 + def interpolation_keys(key, **options); end + # Localizes certain objects, such as dates and numbers to local formatting. # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#304 + # source://i18n//lib/i18n.rb#335 def l(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def load_path; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def load_path=(value); end - # source://i18n//lib/i18n.rb#69 + # source://i18n//lib/i18n.rb#70 def locale; end - # source://i18n//lib/i18n.rb#73 + # source://i18n//lib/i18n.rb#74 def locale=(value); end # Returns true when the passed locale, which can be either a String or a @@ -1292,28 +1315,28 @@ module I18n::Base # # @return [Boolean] # - # source://i18n//lib/i18n.rb#344 + # source://i18n//lib/i18n.rb#375 def locale_available?(locale); end # Localizes certain objects, such as dates and numbers to local formatting. # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#304 + # source://i18n//lib/i18n.rb#335 def localize(object, locale: T.unsafe(nil), format: T.unsafe(nil), **options); end # Merges the given locale, key and scope into a single array of keys. # Splits keys that contain dots into multiple keys. Makes sure all # keys are Symbols. # - # source://i18n//lib/i18n.rb#332 + # source://i18n//lib/i18n.rb#363 def normalize_keys(locale, key, scope, separator = T.unsafe(nil)); end # Tells the backend to reload translations. Used in situations like the # Rails development environment. Backends can implement whatever strategy # is useful. # - # source://i18n//lib/i18n.rb#82 + # source://i18n//lib/i18n.rb#83 def reload!; end # Translates, pluralizes and interpolates a given key using a given locale, @@ -1386,7 +1409,7 @@ module I18n::Base # or default if no translations for :foo and :bar were found. # I18n.t :foo, :default => [:bar, 'default'] # - # *BULK LOOKUP* + # BULK LOOKUP # # This returns an array with the translations for :foo and :bar. # I18n.t [:foo, :bar] @@ -1405,7 +1428,7 @@ module I18n::Base # E.g. assuming the key :salutation resolves to: # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". # # Note that the string returned by lambda will go through string interpolation too, # so the following lambda would give the same result: @@ -1417,7 +1440,7 @@ module I18n::Base # always return the same translations/values per unique combination of argument # values. # - # *Ruby 2.7+ keyword arguments warning* + # Ruby 2.7+ keyword arguments warning # # This method uses keyword arguments. # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 @@ -1434,13 +1457,13 @@ module I18n::Base # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#210 + # source://i18n//lib/i18n.rb#211 def t(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end # Wrapper for translate that adds :raise => true. With # this option, if no translation is found, it will raise I18n::MissingTranslationData # - # source://i18n//lib/i18n.rb#229 + # source://i18n//lib/i18n.rb#230 def t!(key, **options); end # Translates, pluralizes and interpolates a given key using a given locale, @@ -1513,7 +1536,7 @@ module I18n::Base # or default if no translations for :foo and :bar were found. # I18n.t :foo, :default => [:bar, 'default'] # - # *BULK LOOKUP* + # BULK LOOKUP # # This returns an array with the translations for :foo and :bar. # I18n.t [:foo, :bar] @@ -1532,7 +1555,7 @@ module I18n::Base # E.g. assuming the key :salutation resolves to: # lambda { |key, options| options[:gender] == 'm' ? "Mr. #{options[:name]}" : "Mrs. #{options[:name]}" } # - # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". + # Then I18n.t(:salutation, :gender => 'w', :name => 'Smith') will result in "Mrs. Smith". # # Note that the string returned by lambda will go through string interpolation too, # so the following lambda would give the same result: @@ -1544,7 +1567,7 @@ module I18n::Base # always return the same translations/values per unique combination of argument # values. # - # *Ruby 2.7+ keyword arguments warning* + # Ruby 2.7+ keyword arguments warning # # This method uses keyword arguments. # There is a breaking change in ruby that produces warning with ruby 2.7 and won't work as expected with ruby 3.0 @@ -1561,13 +1584,13 @@ module I18n::Base # # @raise [Disabled] # - # source://i18n//lib/i18n.rb#210 + # source://i18n//lib/i18n.rb#211 def translate(key = T.unsafe(nil), throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), **options); end # Wrapper for translate that adds :raise => true. With # this option, if no translation is found, it will raise I18n::MissingTranslationData # - # source://i18n//lib/i18n.rb#229 + # source://i18n//lib/i18n.rb#230 def translate!(key, **options); end # Transliterates UTF-8 characters to ASCII. By default this method will @@ -1622,12 +1645,12 @@ module I18n::Base # I18n.transliterate("Jürgen", :locale => :en) # => "Jurgen" # I18n.transliterate("Jürgen", :locale => :de) # => "Juergen" # - # source://i18n//lib/i18n.rb#293 + # source://i18n//lib/i18n.rb#324 def transliterate(key, throw: T.unsafe(nil), raise: T.unsafe(nil), locale: T.unsafe(nil), replacement: T.unsafe(nil), **options); end # Executes block with given I18n.locale set. # - # source://i18n//lib/i18n.rb#315 + # source://i18n//lib/i18n.rb#346 def with_locale(tmp_locale = T.unsafe(nil)); end private @@ -1651,13 +1674,16 @@ module I18n::Base # I18n.exception_handler = I18nExceptionHandler.new # an object # I18n.exception_handler.call(exception, locale, key, options) # will be called like this # - # source://i18n//lib/i18n.rb#391 + # source://i18n//lib/i18n.rb#422 def handle_exception(handling, exception, locale, key, options); end - # source://i18n//lib/i18n.rb#409 + # source://i18n//lib/i18n.rb#464 + def interpolation_keys_from_translation(translation); end + + # source://i18n//lib/i18n.rb#440 def normalize_key(key, separator); end - # source://i18n//lib/i18n.rb#361 + # source://i18n//lib/i18n.rb#392 def translate_key(key, throw, raise, locale, backend, options); end end @@ -1819,7 +1845,7 @@ class I18n::Disabled < ::I18n::ArgumentError def initialize(method); end end -# source://i18n//lib/i18n.rb#35 +# source://i18n//lib/i18n.rb#36 I18n::EMPTY_HASH = T.let(T.unsafe(nil), Hash) # source://i18n//lib/i18n/exceptions.rb#6 @@ -2011,12 +2037,20 @@ class I18n::Locale::Fallbacks < ::Hash # source://i18n//lib/i18n/locale/fallbacks.rb#55 def defaults=(defaults); end + # @return [Boolean] + # + # source://i18n//lib/i18n/locale/fallbacks.rb#82 + def empty?; end + + # source://i18n//lib/i18n/locale/fallbacks.rb#86 + def inspect; end + # source://i18n//lib/i18n/locale/fallbacks.rb#67 def map(*args, &block); end protected - # source://i18n//lib/i18n/locale/fallbacks.rb#84 + # source://i18n//lib/i18n/locale/fallbacks.rb#92 def compute(tags, include_defaults = T.unsafe(nil), exclude = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/io-endpoint@0.13.0.rbi b/sorbet/rbi/gems/io-endpoint@0.13.0.rbi new file mode 100644 index 000000000..6ea96c580 --- /dev/null +++ b/sorbet/rbi/gems/io-endpoint@0.13.0.rbi @@ -0,0 +1,649 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-endpoint` gem. +# Please instead update this file by running `bin/tapioca gem io-endpoint`. + + +# source://io-endpoint//lib/io/endpoint/version.rb#6 +class IO + include ::Enumerable + include ::File::Constants +end + +class IO::Buffer + include ::Comparable + + def initialize(*_arg0); end + + def &(_arg0); end + def <=>(_arg0); end + def ^(_arg0); end + def and!(_arg0); end + def clear(*_arg0); end + def copy(*_arg0); end + def each(*_arg0); end + def each_byte(*_arg0); end + def empty?; end + def external?; end + def free; end + def get_string(*_arg0); end + def get_value(_arg0, _arg1); end + def get_values(_arg0, _arg1); end + def hexdump(*_arg0); end + def inspect; end + def internal?; end + def locked; end + def locked?; end + def mapped?; end + def not!; end + def null?; end + def or!(_arg0); end + def pread(*_arg0); end + def private?; end + def pwrite(*_arg0); end + def read(*_arg0); end + def readonly?; end + def resize(_arg0); end + def set_string(*_arg0); end + def set_value(_arg0, _arg1, _arg2); end + def set_values(_arg0, _arg1, _arg2); end + def shared?; end + def size; end + def slice(*_arg0); end + def to_s; end + def transfer; end + def valid?; end + def values(*_arg0); end + def write(*_arg0); end + def xor!(_arg0); end + def |(_arg0); end + def ~; end + + private + + def initialize_copy(_arg0); end + + class << self + def for(_arg0); end + def map(*_arg0); end + def size_of(_arg0); end + def string(_arg0); end + end +end + +class IO::Buffer::AccessError < ::RuntimeError; end +class IO::Buffer::AllocationError < ::RuntimeError; end +IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) +IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) +class IO::Buffer::InvalidatedError < ::RuntimeError; end +IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::LockedError < ::RuntimeError; end +IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::MaskError < ::ArgumentError; end +IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) +IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) +IO::Buffer::SHARED = T.let(T.unsafe(nil), Integer) + +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + +class IO::EAGAINWaitReadable < ::Errno::EAGAIN + include ::IO::WaitReadable +end + +class IO::EAGAINWaitWritable < ::Errno::EAGAIN + include ::IO::WaitWritable +end + +class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS + include ::IO::WaitReadable +end + +class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS + include ::IO::WaitWritable +end + +IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable +IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable + +# source://io-endpoint//lib/io/endpoint/version.rb#7 +module IO::Endpoint + class << self + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#63 + def composite(*endpoints, **options); end + + # source://io-endpoint//lib/io/endpoint.rb#11 + def file_descriptor_limit; end + + # source://io-endpoint//lib/io/endpoint/socket_endpoint.rb#40 + def socket(socket, **options); end + + # @param arguments + # @param ssl_context [OpenSSL::SSL::SSLContext, nil] + # @param hostname [String, nil] + # @param options keyword arguments passed through to {Endpoint.tcp} + # @return [SSLEndpoint] + # + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#192 + def ssl(*arguments, ssl_context: T.unsafe(nil), hostname: T.unsafe(nil), **options); end + + # @param arguments nodename, service, family, socktype, protocol, flags. `socktype` will be set to Socket::SOCK_STREAM. + # @param options keyword arguments passed on to {HostEndpoint#initialize} + # @return [HostEndpoint] + # + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#82 + def tcp(*arguments, **options); end + + # @param arguments nodename, service, family, socktype, protocol, flags. `socktype` will be set to Socket::SOCK_DGRAM. + # @param options keyword arguments passed on to {HostEndpoint#initialize} + # @return [HostEndpoint] + # + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#92 + def udp(*arguments, **options); end + end +end + +# source://io-endpoint//lib/io/endpoint/generic.rb#11 +IO::Endpoint::Address = Addrinfo + +# source://io-endpoint//lib/io/endpoint/address_endpoint.rb#12 +class IO::Endpoint::AddressEndpoint < ::IO::Endpoint::Generic + # @return [AddressEndpoint] a new instance of AddressEndpoint + # + # source://io-endpoint//lib/io/endpoint/address_endpoint.rb#13 + def initialize(address, **options); end + + # Returns the value of attribute address. + # + # source://io-endpoint//lib/io/endpoint/address_endpoint.rb#23 + def address; end + + # Bind a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. + # + # @return [Array(Socket)] the bound socket + # @yield [|socket| ...] An optional block which will be passed the socket. + # @parameter socket [Socket] The socket which has been bound. + # + # source://io-endpoint//lib/io/endpoint/address_endpoint.rb#29 + def bind(wrapper = T.unsafe(nil), &block); end + + # Connects a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. + # + # @return [Socket] the connected socket + # + # source://io-endpoint//lib/io/endpoint/address_endpoint.rb#35 + def connect(wrapper = T.unsafe(nil), &block); end + + # source://io-endpoint//lib/io/endpoint/address_endpoint.rb#19 + def to_s; end +end + +# source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#11 +class IO::Endpoint::BoundEndpoint < ::IO::Endpoint::Generic + # @return [BoundEndpoint] a new instance of BoundEndpoint + # + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#22 + def initialize(endpoint, sockets, **options); end + + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#61 + def bind(wrapper = T.unsafe(nil), &block); end + + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#52 + def close; end + + # Returns the value of attribute endpoint. + # + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#29 + def endpoint; end + + # A endpoint for the local end of the bound socket. + # + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#34 + def local_address_endpoint(**options); end + + # A endpoint for the remote end of the bound socket. + # + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#44 + def remote_address_endpoint(**options); end + + # Returns the value of attribute sockets. + # + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#30 + def sockets; end + + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#57 + def to_s; end + + class << self + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#12 + def bound(endpoint, backlog: T.unsafe(nil), close_on_exec: T.unsafe(nil)); end + end +end + +# A composite endpoint is a collection of endpoints that are used in order. +# +# source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#10 +class IO::Endpoint::CompositeEndpoint < ::IO::Endpoint::Generic + # @return [CompositeEndpoint] a new instance of CompositeEndpoint + # + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#11 + def initialize(endpoints, **options); end + + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#52 + def bind(wrapper = T.unsafe(nil), &block); end + + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#39 + def connect(wrapper = T.unsafe(nil), &block); end + + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#33 + def each(&block); end + + # Returns the value of attribute endpoints. + # + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#26 + def endpoints; end + + # The number of endpoints in the composite endpoint. + # + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#29 + def size; end + + # source://io-endpoint//lib/io/endpoint/composite_endpoint.rb#22 + def with(**options); end +end + +# source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#13 +class IO::Endpoint::ConnectedEndpoint < ::IO::Endpoint::Generic + # @return [ConnectedEndpoint] a new instance of ConnectedEndpoint + # + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#22 + def initialize(endpoint, socket, **options); end + + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#52 + def close; end + + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#44 + def connect(wrapper = T.unsafe(nil), &block); end + + # Returns the value of attribute endpoint. + # + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#29 + def endpoint; end + + # A endpoint for the local end of the bound socket. + # + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#34 + def local_address_endpoint(**options); end + + # A endpoint for the remote end of the bound socket. + # + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#40 + def remote_address_endpoint(**options); end + + # Returns the value of attribute socket. + # + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#30 + def socket; end + + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#59 + def to_s; end + + class << self + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#14 + def connected(endpoint, close_on_exec: T.unsafe(nil)); end + end +end + +# source://io-endpoint//lib/io/endpoint/wrapper.rb#190 +class IO::Endpoint::FiberWrapper < ::IO::Endpoint::Wrapper + # source://io-endpoint//lib/io/endpoint/wrapper.rb#191 + def async(&block); end +end + +# Endpoints represent a way of connecting or binding to an address. +# +# source://io-endpoint//lib/io/endpoint/generic.rb#14 +class IO::Endpoint::Generic + # @return [Generic] a new instance of Generic + # + # source://io-endpoint//lib/io/endpoint/generic.rb#15 + def initialize(**options); end + + # Bind and accept connections on the given address. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#81 + def accept(wrapper = T.unsafe(nil), &block); end + + # Bind a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. + # + # @raise [NotImplementedError] + # + # source://io-endpoint//lib/io/endpoint/generic.rb#67 + def bind(wrapper = T.unsafe(nil), &block); end + + # source://io-endpoint//lib/io/endpoint/bound_endpoint.rb#75 + def bound(**options); end + + # Connects a socket to the given address. If a block is given, the socket will be automatically closed when the block exits. + # + # @raise [NotImplementedError] + # @return [Socket] the connected socket + # + # source://io-endpoint//lib/io/endpoint/generic.rb#74 + def connect(wrapper = T.unsafe(nil), &block); end + + # source://io-endpoint//lib/io/endpoint/connected_endpoint.rb#65 + def connected(**options); end + + # Enumerate all discrete paths as endpoints. + # + # @yield [_self] + # @yieldparam _self [IO::Endpoint::Generic] the object that the method was called on + # + # source://io-endpoint//lib/io/endpoint/generic.rb#90 + def each; end + + # @return [String] The hostname of the bound socket. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#30 + def hostname; end + + # Controls SO_LINGER. The amount of time the socket will stay in the `TIME_WAIT` state after being closed. + # + # @return [Integer, nil] The value for SO_LINGER. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#48 + def linger; end + + # @return [Address] the address to bind to before connecting. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#58 + def local_address; end + + # Returns the value of attribute options. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#27 + def options; end + + # Sets the attribute options + # + # @param value the value to set the attribute options to. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#27 + def options=(_arg0); end + + # If `SO_REUSEADDR` is enabled on a socket prior to binding it, the socket can be successfully bound unless there is a conflict with another socket bound to exactly the same combination of source address and port. Additionally, when set, binding a socket to the address of an existing socket in `TIME_WAIT` is not an error. + # + # @return [Boolean] The value for `SO_REUSEADDR`. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#42 + def reuse_address?; end + + # If `SO_REUSEPORT` is enabled on a socket, the socket can be successfully bound even if there are existing sockets bound to the same address, as long as all prior bound sockets also had `SO_REUSEPORT` set before they were bound. + # + # @return [Boolean, nil] The value for `SO_REUSEPORT`. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#36 + def reuse_port?; end + + # @return [Numeric] The default timeout for socket operations. + # + # source://io-endpoint//lib/io/endpoint/generic.rb#53 + def timeout; end + + # source://io-endpoint//lib/io/endpoint/generic.rb#19 + def with(**options); end + + class << self + # Create an Endpoint instance by URI scheme. The host and port of the URI will be passed to the Endpoint factory method, along with any options. + # + # You should not use untrusted input as it may execute arbitrary code. + # + # @param string [String] URI as string. Scheme will decide implementation used. + # @param options keyword arguments passed through to {#initialize} + # @see Endpoint.ssl ssl - invoked when parsing a URL with the ssl scheme "ssl://127.0.0.1" + # @see Endpoint.tcp tcp - invoked when parsing a URL with the tcp scheme: "tcp://127.0.0.1" + # @see Endpoint.udp udp - invoked when parsing a URL with the udp scheme: "udp://127.0.0.1" + # @see Endpoint.unix unix - invoked when parsing a URL with the unix scheme: "unix://127.0.0.1" + # + # source://io-endpoint//lib/io/endpoint/generic.rb#107 + def parse(string, **options); end + end +end + +# source://io-endpoint//lib/io/endpoint/host_endpoint.rb#9 +class IO::Endpoint::HostEndpoint < ::IO::Endpoint::Generic + # @return [HostEndpoint] a new instance of HostEndpoint + # + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#10 + def initialize(specification, **options); end + + # Invokes the given block for every address which can be bound to. + # + # @return [Array] an array of bound sockets + # @yield [Socket] the bound socket + # + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#62 + def bind(wrapper = T.unsafe(nil), &block); end + + # Try to connect to the given host by connecting to each address in sequence until a connection is made. + # + # @raise if no connection could complete successfully + # @return [Socket] the connected socket + # @yield [Socket] the socket which is being connected, may be invoked more than once + # + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#37 + def connect(wrapper = T.unsafe(nil), &block); end + + # @yield [AddressEndpoint] address endpoints by resolving the given host specification + # + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#69 + def each; end + + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#25 + def hostname; end + + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#29 + def service; end + + # Returns the value of attribute specification. + # + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#23 + def specification; end + + # source://io-endpoint//lib/io/endpoint/host_endpoint.rb#16 + def to_s; end +end + +# source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#76 +class IO::Endpoint::SSLEndpoint < ::IO::Endpoint::Generic + # @return [SSLEndpoint] a new instance of SSLEndpoint + # + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#77 + def initialize(endpoint, **options); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#93 + def address; end + + # Connect to the underlying endpoint and establish a SSL connection. + # + # @return [Socket] the connected socket + # @yield [Socket] the socket which is being connected + # + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#139 + def bind(*arguments, **options, &block); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#108 + def build_context(context = T.unsafe(nil)); end + + # Connect to the underlying endpoint and establish a SSL connection. + # + # @return [Socket] the connected socket + # @yield [Socket] the socket which is being connected + # + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#154 + def connect(&block); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#119 + def context; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#177 + def each; end + + # Returns the value of attribute endpoint. + # + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#101 + def endpoint; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#97 + def hostname; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#123 + def make_server(io); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#129 + def make_socket(io); end + + # Returns the value of attribute options. + # + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#102 + def options; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#104 + def params; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#89 + def to_s; end +end + +# This class doesn't exert ownership over the specified socket, wraps a native ::IO. +# +# source://io-endpoint//lib/io/endpoint/socket_endpoint.rb#10 +class IO::Endpoint::SocketEndpoint < ::IO::Endpoint::Generic + # @return [SocketEndpoint] a new instance of SocketEndpoint + # + # source://io-endpoint//lib/io/endpoint/socket_endpoint.rb#11 + def initialize(socket, **options); end + + # source://io-endpoint//lib/io/endpoint/socket_endpoint.rb#23 + def bind(&block); end + + # source://io-endpoint//lib/io/endpoint/socket_endpoint.rb#31 + def connect(&block); end + + # Returns the value of attribute socket. + # + # source://io-endpoint//lib/io/endpoint/socket_endpoint.rb#21 + def socket; end + + # source://io-endpoint//lib/io/endpoint/socket_endpoint.rb#17 + def to_s; end +end + +# source://io-endpoint//lib/io/endpoint/wrapper.rb#184 +class IO::Endpoint::ThreadWrapper < ::IO::Endpoint::Wrapper + # source://io-endpoint//lib/io/endpoint/wrapper.rb#185 + def async(&block); end +end + +# source://io-endpoint//lib/io/endpoint/version.rb#8 +IO::Endpoint::VERSION = T.let(T.unsafe(nil), String) + +# source://io-endpoint//lib/io/endpoint/wrapper.rb#9 +class IO::Endpoint::Wrapper + include ::Socket::Constants + + # Bind to a local address and accept connections in a loop. + # + # source://io-endpoint//lib/io/endpoint/wrapper.rb#155 + def accept(server, timeout: T.unsafe(nil), linger: T.unsafe(nil), **options, &block); end + + # @raise [NotImplementedError] + # + # source://io-endpoint//lib/io/endpoint/wrapper.rb#33 + def async; end + + # Bind to a local address. + # + # @example + # socket = Async::IO::Socket.bind(Async::IO::Address.tcp("0.0.0.0", 9090)) + # + # source://io-endpoint//lib/io/endpoint/wrapper.rb#105 + def bind(local_address, protocol: T.unsafe(nil), reuse_address: T.unsafe(nil), reuse_port: T.unsafe(nil), linger: T.unsafe(nil), bound_timeout: T.unsafe(nil), backlog: T.unsafe(nil), **options, &block); end + + # Establish a connection to a given `remote_address`. + # + # @example + # socket = Async::IO::Socket.connect(Async::IO::Address.tcp("8.8.8.8", 53)) + # + # source://io-endpoint//lib/io/endpoint/wrapper.rb#43 + def connect(remote_address, local_address: T.unsafe(nil), linger: T.unsafe(nil), timeout: T.unsafe(nil), buffered: T.unsafe(nil), **options); end + + # source://io-endpoint//lib/io/endpoint/wrapper.rb#18 + def set_buffered(socket, buffered); end + + # source://io-endpoint//lib/io/endpoint/wrapper.rb#12 + def set_timeout(io, timeout); end + + class << self + # source://io-endpoint//lib/io/endpoint/wrapper.rb#197 + def default; end + end +end + +# source://io-endpoint//lib/io/endpoint/wrapper.rb#94 +IO::Endpoint::Wrapper::ServerSocket = Socket + +IO::PRIORITY = T.let(T.unsafe(nil), Integer) +IO::READABLE = T.let(T.unsafe(nil), Integer) +class IO::TimeoutError < ::IOError; end +IO::WRITABLE = T.let(T.unsafe(nil), Integer) + +# source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#13 +class OpenSSL::SSL::SSLSocket + include ::Enumerable + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#15 + def start; end +end + +# source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#21 +module OpenSSL::SSL::SocketForwarder + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#23 + def close_on_exec=(value); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#29 + def local_address; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#35 + def remote_address; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#60 + def timeout; end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#66 + def timeout=(value); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#41 + def wait(*arguments); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#47 + def wait_readable(*arguments); end + + # source://io-endpoint//lib/io/endpoint/ssl_endpoint.rb#53 + def wait_writable(*arguments); end +end diff --git a/sorbet/rbi/gems/io-event@1.3.3.rbi b/sorbet/rbi/gems/io-event@1.6.5.rbi similarity index 58% rename from sorbet/rbi/gems/io-event@1.3.3.rbi rename to sorbet/rbi/gems/io-event@1.6.5.rbi index 5518b6536..4f4ce75fc 100644 --- a/sorbet/rbi/gems/io-event@1.3.3.rbi +++ b/sorbet/rbi/gems/io-event@1.6.5.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `io-event` gem. # Please instead update this file by running `bin/tapioca gem io-event`. + # source://io-event//lib/io/event/version.rb#6 class IO include ::Enumerable @@ -131,56 +132,70 @@ module IO::Event::Debug; end class IO::Event::Debug::Selector # @return [Selector] a new instance of Selector # - # source://io-event//lib/io/event/debug/selector.rb#12 - def initialize(selector); end + # source://io-event//lib/io/event/debug/selector.rb#22 + def initialize(selector, log: T.unsafe(nil)); end - # source://io-event//lib/io/event/debug/selector.rb#28 + # source://io-event//lib/io/event/debug/selector.rb#56 def close; end - # source://io-event//lib/io/event/debug/selector.rb#70 - def io_read(*_arg0, **_arg1, &_arg2); end + # source://io-event//lib/io/event/debug/selector.rb#36 + def idle_duration; end + + # source://io-event//lib/io/event/debug/selector.rb#107 + def io_read(fiber, io, buffer, length, offset = T.unsafe(nil)); end - # source://io-event//lib/io/event/debug/selector.rb#66 + # source://io-event//lib/io/event/debug/selector.rb#102 def io_wait(fiber, io, events); end - # source://io-event//lib/io/event/debug/selector.rb#74 - def io_write(*_arg0, **_arg1, &_arg2); end + # source://io-event//lib/io/event/debug/selector.rb#112 + def io_write(fiber, io, buffer, length, offset = T.unsafe(nil)); end + + # source://io-event//lib/io/event/debug/selector.rb#44 + def log(message); end - # source://io-event//lib/io/event/debug/selector.rb#62 + # source://io-event//lib/io/event/debug/selector.rb#40 + def now; end + + # source://io-event//lib/io/event/debug/selector.rb#97 def process_wait(*arguments); end - # source://io-event//lib/io/event/debug/selector.rb#50 + # source://io-event//lib/io/event/debug/selector.rb#83 def push(fiber); end - # source://io-event//lib/io/event/debug/selector.rb#54 + # source://io-event//lib/io/event/debug/selector.rb#88 def raise(fiber, *arguments); end # @return [Boolean] # - # source://io-event//lib/io/event/debug/selector.rb#58 + # source://io-event//lib/io/event/debug/selector.rb#93 def ready?; end # @return [Boolean] # - # source://io-event//lib/io/event/debug/selector.rb#78 + # source://io-event//lib/io/event/debug/selector.rb#117 def respond_to?(name, include_private = T.unsafe(nil)); end - # source://io-event//lib/io/event/debug/selector.rb#42 + # source://io-event//lib/io/event/debug/selector.rb#73 def resume(*arguments); end - # source://io-event//lib/io/event/debug/selector.rb#82 + # source://io-event//lib/io/event/debug/selector.rb#121 def select(duration = T.unsafe(nil)); end # Transfer from the calling fiber to the event loop. # - # source://io-event//lib/io/event/debug/selector.rb#38 + # source://io-event//lib/io/event/debug/selector.rb#68 def transfer; end - # source://io-event//lib/io/event/debug/selector.rb#24 + # source://io-event//lib/io/event/debug/selector.rb#52 def wakeup; end - # source://io-event//lib/io/event/debug/selector.rb#46 + # source://io-event//lib/io/event/debug/selector.rb#78 def yield; end + + class << self + # source://io-event//lib/io/event/debug/selector.rb#12 + def wrap(selector, env = T.unsafe(nil)); end + end end # A thread safe synchronisation primative. @@ -206,6 +221,65 @@ class IO::Event::Interrupt end end +# A priority queue implementation using a standard binary minheap. It uses straight comparison +# of its contents to determine priority. +# See for explanations of the main methods. +# +# source://io-event//lib/io/event/priority_heap.rb#12 +class IO::Event::PriorityHeap + # @return [PriorityHeap] a new instance of PriorityHeap + # + # source://io-event//lib/io/event/priority_heap.rb#13 + def initialize; end + + # Empties out the heap, discarding all elements + # + # source://io-event//lib/io/event/priority_heap.rb#74 + def clear!; end + + # Returns the earliest timer or nil if the heap is empty. + # + # source://io-event//lib/io/event/priority_heap.rb#21 + def peek; end + + # Returns the earliest timer if the heap is non-empty and removes it from the heap. + # Returns nil if the heap is empty. (and doesn't change the heap in that case) + # + # source://io-event//lib/io/event/priority_heap.rb#32 + def pop; end + + # Inserts a new timer into the heap, then rearranges elements until the heap invariant is true again. + # + # source://io-event//lib/io/event/priority_heap.rb#61 + def push(element); end + + # Returns the number of elements in the heap + # + # source://io-event//lib/io/event/priority_heap.rb#26 + def size; end + + # Validate the heap invariant. Every element except the root must not be smaller than + # its parent element. Note that it MAY be equal. + # + # @return [Boolean] + # + # source://io-event//lib/io/event/priority_heap.rb#80 + def valid?; end + + private + + # source://io-event//lib/io/event/priority_heap.rb#108 + def bubble_down(index); end + + # Left here for reference, but unused. + # def swap(i, j) + # @contents[i], @contents[j] = @contents[j], @contents[i] + # end + # + # source://io-event//lib/io/event/priority_heap.rb#92 + def bubble_up(index); end +end + # source://io-event//lib/io/event/selector/select.rb#11 module IO::Event::Selector class << self @@ -219,10 +293,11 @@ module IO::Event::Selector end end -class IO::Event::Selector::KQueue +class IO::Event::Selector::EPoll def initialize(_arg0); end def close; end + def idle_duration; end def io_read(*_arg0); end def io_wait(_arg0, _arg1, _arg2); end def io_write(*_arg0); end @@ -247,89 +322,94 @@ class IO::Event::Selector::Select # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#159 + # source://io-event//lib/io/event/selector/select.rb#164 def again?(errno); end - # source://io-event//lib/io/event/selector/select.rb#37 + # source://io-event//lib/io/event/selector/select.rb#42 def close; end + # This is the amount of time the event loop was idle during the last select call. + # + # source://io-event//lib/io/event/selector/select.rb#29 + def idle_duration; end + # Ruby <= 3.1, limited IO::Buffer support. # - # source://io-event//lib/io/event/selector/select.rb#168 + # source://io-event//lib/io/event/selector/select.rb#173 def io_read(fiber, io, buffer, length, offset = T.unsafe(nil)); end - # source://io-event//lib/io/event/selector/select.rb#150 + # source://io-event//lib/io/event/selector/select.rb#155 def io_select(readable, writable, priority, timeout); end - # source://io-event//lib/io/event/selector/select.rb#142 + # source://io-event//lib/io/event/selector/select.rb#147 def io_wait(fiber, io, events); end - # source://io-event//lib/io/event/selector/select.rb#196 + # source://io-event//lib/io/event/selector/select.rb#201 def io_write(fiber, io, buffer, length, offset = T.unsafe(nil)); end # Returns the value of attribute loop. # - # source://io-event//lib/io/event/selector/select.rb#24 + # source://io-event//lib/io/event/selector/select.rb#26 def loop; end - # source://io-event//lib/io/event/selector/select.rb#370 + # source://io-event//lib/io/event/selector/select.rb#375 def process_wait(fiber, pid, flags); end # Append the given fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#84 + # source://io-event//lib/io/event/selector/select.rb#89 def push(fiber); end # Transfer to the given fiber and raise an exception. Put the current fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#89 + # source://io-event//lib/io/event/selector/select.rb#94 def raise(fiber, *arguments); end # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#98 + # source://io-event//lib/io/event/selector/select.rb#103 def ready?; end # Transfer from the current fiber to the specified fiber. Put the current fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#64 + # source://io-event//lib/io/event/selector/select.rb#69 def resume(fiber, *arguments); end - # source://io-event//lib/io/event/selector/select.rb#389 + # source://io-event//lib/io/event/selector/select.rb#394 def select(duration = T.unsafe(nil)); end # Transfer from the current fiber to the event loop. # - # source://io-event//lib/io/event/selector/select.rb#59 + # source://io-event//lib/io/event/selector/select.rb#64 def transfer; end # If the event loop is currently sleeping, wake it up. # - # source://io-event//lib/io/event/selector/select.rb#27 + # source://io-event//lib/io/event/selector/select.rb#32 def wakeup; end # Yield from the current fiber back to the event loop. Put the current fiber into the ready list. # - # source://io-event//lib/io/event/selector/select.rb#74 + # source://io-event//lib/io/event/selector/select.rb#79 def yield; end private - # source://io-event//lib/io/event/selector/select.rb#376 + # source://io-event//lib/io/event/selector/select.rb#381 def pop_ready; end end -# source://io-event//lib/io/event/selector/select.rb#156 +# source://io-event//lib/io/event/selector/select.rb#161 IO::Event::Selector::Select::EAGAIN = T.let(T.unsafe(nil), Integer) -# source://io-event//lib/io/event/selector/select.rb#157 +# source://io-event//lib/io/event/selector/select.rb#162 IO::Event::Selector::Select::EWOULDBLOCK = T.let(T.unsafe(nil), Integer) -# source://io-event//lib/io/event/selector/select.rb#44 +# source://io-event//lib/io/event/selector/select.rb#49 class IO::Event::Selector::Select::Optional < ::Struct # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#49 + # source://io-event//lib/io/event/selector/select.rb#54 def alive?; end # Returns the value of attribute fiber @@ -343,10 +423,10 @@ class IO::Event::Selector::Select::Optional < ::Struct # @return [Object] the newly set value def fiber=(_); end - # source://io-event//lib/io/event/selector/select.rb#53 + # source://io-event//lib/io/event/selector/select.rb#58 def nullify; end - # source://io-event//lib/io/event/selector/select.rb#45 + # source://io-event//lib/io/event/selector/select.rb#50 def transfer(*arguments); end class << self @@ -358,19 +438,19 @@ class IO::Event::Selector::Select::Optional < ::Struct end end -# source://io-event//lib/io/event/selector/select.rb#102 +# source://io-event//lib/io/event/selector/select.rb#107 class IO::Event::Selector::Select::Waiter < ::Struct # @return [Boolean] # - # source://io-event//lib/io/event/selector/select.rb#103 + # source://io-event//lib/io/event/selector/select.rb#108 def alive?; end # Dispatch the given events to the list of waiting fibers. If the fiber was not waiting for the given events, it is reactivated by calling the given block. # - # source://io-event//lib/io/event/selector/select.rb#108 + # source://io-event//lib/io/event/selector/select.rb#113 def dispatch(events, &reactivate); end - # source://io-event//lib/io/event/selector/select.rb#133 + # source://io-event//lib/io/event/selector/select.rb#138 def each(&block); end # Returns the value of attribute events @@ -395,7 +475,7 @@ class IO::Event::Selector::Select::Waiter < ::Struct # @return [Object] the newly set value def fiber=(_); end - # source://io-event//lib/io/event/selector/select.rb#129 + # source://io-event//lib/io/event/selector/select.rb#134 def invalidate; end # Returns the value of attribute tail @@ -418,6 +498,27 @@ class IO::Event::Selector::Select::Waiter < ::Struct end end +class IO::Event::Selector::URing + def initialize(_arg0); end + + def close; end + def idle_duration; end + def io_close(_arg0); end + def io_read(*_arg0); end + def io_wait(_arg0, _arg1, _arg2); end + def io_write(*_arg0); end + def loop; end + def process_wait(_arg0, _arg1, _arg2); end + def push(_arg0); end + def raise(*_arg0); end + def ready?; end + def resume(*_arg0); end + def select(_arg0); end + def transfer; end + def wakeup; end + def yield; end +end + # source://io-event//lib/io/event/support.rb#8 module IO::Event::Support class << self @@ -443,6 +544,76 @@ module IO::Event::Support end end +# source://io-event//lib/io/event/timers.rb#10 +class IO::Event::Timers + # @return [Timers] a new instance of Timers + # + # source://io-event//lib/io/event/timers.rb#41 + def initialize; end + + # Schedule a block to be called after a specific time offset, relative to the current time as returned by {#now}. + # + # source://io-event//lib/io/event/timers.rb#64 + def after(offset, &block); end + + # source://io-event//lib/io/event/timers.rb#84 + def fire(now = T.unsafe(nil)); end + + # source://io-event//lib/io/event/timers.rb#80 + def now; end + + # Schedule a block to be called at a specific time in the future. + # + # source://io-event//lib/io/event/timers.rb#54 + def schedule(time, block); end + + # source://io-event//lib/io/event/timers.rb#46 + def size; end + + # source://io-event//lib/io/event/timers.rb#68 + def wait_interval(now = T.unsafe(nil)); end + + protected + + # source://io-event//lib/io/event/timers.rb#104 + def flush!; end +end + +# source://io-event//lib/io/event/timers.rb#11 +class IO::Event::Timers::Handle + # @return [Handle] a new instance of Handle + # + # source://io-event//lib/io/event/timers.rb#12 + def initialize(time, block); end + + # source://io-event//lib/io/event/timers.rb#17 + def <(other); end + + # source://io-event//lib/io/event/timers.rb#21 + def >(other); end + + # Returns the value of attribute block. + # + # source://io-event//lib/io/event/timers.rb#26 + def block; end + + # source://io-event//lib/io/event/timers.rb#28 + def call(*_arg0, **_arg1, &_arg2); end + + # source://io-event//lib/io/event/timers.rb#32 + def cancel!; end + + # @return [Boolean] + # + # source://io-event//lib/io/event/timers.rb#36 + def cancelled?; end + + # Returns the value of attribute time. + # + # source://io-event//lib/io/event/timers.rb#25 + def time; end +end + # source://io-event//lib/io/event/version.rb#8 IO::Event::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/io-stream@0.4.0.rbi b/sorbet/rbi/gems/io-stream@0.4.0.rbi new file mode 100644 index 000000000..988a05efc --- /dev/null +++ b/sorbet/rbi/gems/io-stream@0.4.0.rbi @@ -0,0 +1,441 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `io-stream` gem. +# Please instead update this file by running `bin/tapioca gem io-stream`. + + +# source://io-stream//lib/io/stream/shim/buffered.rb#21 +class BasicSocket < ::IO + # source://io-stream//lib/io/stream/shim/buffered.rb#38 + def buffered=(value); end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/buffered.rb#28 + def buffered?; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/buffered.rb#22 + def ip_protocol_tcp?; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/readable.rb#19 + def readable?; end +end + +# source://io-stream//lib/io/stream/shim/buffered.rb#7 +class IO + include ::Enumerable + include ::File::Constants + + # source://io-stream//lib/io/stream/shim/buffered.rb#12 + def buffered=(value); end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/buffered.rb#8 + def buffered?; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/readable.rb#8 + def readable?; end + + class << self + # source://io-stream//lib/io/stream.rb#13 + def Stream(io); end + end +end + +class IO::Buffer + include ::Comparable + + def initialize(*_arg0); end + + def &(_arg0); end + def <=>(_arg0); end + def ^(_arg0); end + def and!(_arg0); end + def clear(*_arg0); end + def copy(*_arg0); end + def each(*_arg0); end + def each_byte(*_arg0); end + def empty?; end + def external?; end + def free; end + def get_string(*_arg0); end + def get_value(_arg0, _arg1); end + def get_values(_arg0, _arg1); end + def hexdump(*_arg0); end + def inspect; end + def internal?; end + def locked; end + def locked?; end + def mapped?; end + def not!; end + def null?; end + def or!(_arg0); end + def pread(*_arg0); end + def private?; end + def pwrite(*_arg0); end + def read(*_arg0); end + def readonly?; end + def resize(_arg0); end + def set_string(*_arg0); end + def set_value(_arg0, _arg1, _arg2); end + def set_values(_arg0, _arg1, _arg2); end + def shared?; end + def size; end + def slice(*_arg0); end + def to_s; end + def transfer; end + def valid?; end + def values(*_arg0); end + def write(*_arg0); end + def xor!(_arg0); end + def |(_arg0); end + def ~; end + + private + + def initialize_copy(_arg0); end + + class << self + def for(_arg0); end + def map(*_arg0); end + def size_of(_arg0); end + def string(_arg0); end + end +end + +class IO::Buffer::AccessError < ::RuntimeError; end +class IO::Buffer::AllocationError < ::RuntimeError; end +IO::Buffer::BIG_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::DEFAULT_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::EXTERNAL = T.let(T.unsafe(nil), Integer) +IO::Buffer::HOST_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::INTERNAL = T.let(T.unsafe(nil), Integer) +class IO::Buffer::InvalidatedError < ::RuntimeError; end +IO::Buffer::LITTLE_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::LOCKED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::LockedError < ::RuntimeError; end +IO::Buffer::MAPPED = T.let(T.unsafe(nil), Integer) +class IO::Buffer::MaskError < ::ArgumentError; end +IO::Buffer::NETWORK_ENDIAN = T.let(T.unsafe(nil), Integer) +IO::Buffer::PAGE_SIZE = T.let(T.unsafe(nil), Integer) +IO::Buffer::PRIVATE = T.let(T.unsafe(nil), Integer) +IO::Buffer::READONLY = T.let(T.unsafe(nil), Integer) +IO::Buffer::SHARED = T.let(T.unsafe(nil), Integer) + +class IO::ConsoleMode + def echo=(_arg0); end + def raw(*_arg0); end + def raw!(*_arg0); end + + private + + def initialize_copy(_arg0); end +end + +class IO::EAGAINWaitReadable < ::Errno::EAGAIN + include ::IO::WaitReadable +end + +class IO::EAGAINWaitWritable < ::Errno::EAGAIN + include ::IO::WaitWritable +end + +class IO::EINPROGRESSWaitReadable < ::Errno::EINPROGRESS + include ::IO::WaitReadable +end + +class IO::EINPROGRESSWaitWritable < ::Errno::EINPROGRESS + include ::IO::WaitWritable +end + +IO::EWOULDBLOCKWaitReadable = IO::EAGAINWaitReadable +IO::EWOULDBLOCKWaitWritable = IO::EAGAINWaitWritable +IO::PRIORITY = T.let(T.unsafe(nil), Integer) +IO::READABLE = T.let(T.unsafe(nil), Integer) + +# source://io-stream//lib/io/stream/version.rb#6 +module IO::Stream; end + +# The default block size for IO buffers. Defaults to 64KB (typical pipe buffer size). +# +# source://io-stream//lib/io/stream/generic.rb#16 +IO::Stream::BLOCK_SIZE = T.let(T.unsafe(nil), Integer) + +# source://io-stream//lib/io/stream/buffered.rb#9 +class IO::Stream::Buffered < ::IO::Stream::Generic + # @return [Buffered] a new instance of Buffered + # + # source://io-stream//lib/io/stream/buffered.rb#40 + def initialize(io, *_arg1, **_arg2, &_arg3); end + + # source://io-stream//lib/io/stream/buffered.rb#57 + def close_read; end + + # source://io-stream//lib/io/stream/buffered.rb#61 + def close_write; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/buffered.rb#53 + def closed?; end + + # Returns the value of attribute io. + # + # source://io-stream//lib/io/stream/buffered.rb#51 + def io; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/buffered.rb#67 + def readable?; end + + protected + + # source://io-stream//lib/io/stream/buffered.rb#73 + def sysclose; end + + # Reads data from the underlying stream as efficiently as possible. + # + # source://io-stream//lib/io/stream/buffered.rb#100 + def sysread(size, buffer); end + + # source://io-stream//lib/io/stream/buffered.rb#77 + def syswrite(buffer); end + + class << self + # source://io-stream//lib/io/stream/buffered.rb#10 + def open(path, mode = T.unsafe(nil), **options); end + + # source://io-stream//lib/io/stream/buffered.rb#22 + def wrap(io, **options); end + end +end + +# source://io-stream//lib/io/stream/generic.rb#21 +class IO::Stream::Generic + # @return [Generic] a new instance of Generic + # + # source://io-stream//lib/io/stream/generic.rb#22 + def initialize(block_size: T.unsafe(nil), maximum_read_size: T.unsafe(nil)); end + + # Writes `string` to the stream and returns self. + # + # source://io-stream//lib/io/stream/generic.rb#164 + def <<(string); end + + # Returns the value of attribute block_size. + # + # source://io-stream//lib/io/stream/generic.rb#38 + def block_size; end + + # Sets the attribute block_size + # + # @param value the value to set the attribute block_size to. + # + # source://io-stream//lib/io/stream/generic.rb#38 + def block_size=(_arg0); end + + # Best effort to flush any unwritten data, and then close the underling IO. + # + # source://io-stream//lib/io/stream/generic.rb#190 + def close; end + + # source://io-stream//lib/io/stream/generic.rb#182 + def close_read; end + + # source://io-stream//lib/io/stream/generic.rb#185 + def close_write; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/generic.rb#178 + def closed?; end + + # @raise [EOFError] + # + # source://io-stream//lib/io/stream/generic.rb#216 + def eof!; end + + # Determins if the stream has consumed all available data. May block if the stream is not readable. + # See {readable?} for a non-blocking alternative. + # + # @return [Boolean] + # + # source://io-stream//lib/io/stream/generic.rb#206 + def eof?; end + + # Flushes buffered data to the stream. + # + # source://io-stream//lib/io/stream/generic.rb#133 + def flush; end + + # source://io-stream//lib/io/stream/generic.rb#128 + def gets(separator = T.unsafe(nil), **options); end + + # source://io-stream//lib/io/stream/generic.rb#111 + def peek(size = T.unsafe(nil)); end + + # source://io-stream//lib/io/stream/generic.rb#170 + def puts(*arguments, separator: T.unsafe(nil)); end + + # Reads `size` bytes from the stream. If size is not specified, read until end of file. + # + # source://io-stream//lib/io/stream/generic.rb#41 + def read(size = T.unsafe(nil)); end + + # @raise [exception] + # + # source://io-stream//lib/io/stream/generic.rb#72 + def read_exactly(size, exception: T.unsafe(nil)); end + + # Read at most `size` bytes from the stream. Will avoid reading from the underlying stream if possible. + # + # source://io-stream//lib/io/stream/generic.rb#62 + def read_partial(size = T.unsafe(nil)); end + + # Efficiently read data from the stream until encountering pattern. + # + # @param pattern [String] The pattern to match. + # @return [String] The contents of the stream up until the pattern, which is consumed but not returned. + # + # source://io-stream//lib/io/stream/generic.rb#92 + def read_until(pattern, offset = T.unsafe(nil), chomp: T.unsafe(nil)); end + + # Whether there is a chance that a read operation will succeed or not. + # + # @return [Boolean] + # + # source://io-stream//lib/io/stream/generic.rb#225 + def readable?; end + + # This is a compatibility shim for existing code that uses `readpartial`. + # + # source://io-stream//lib/io/stream/generic.rb#85 + def readpartial(size = T.unsafe(nil)); end + + # Writes `string` to the buffer. When the buffer is full or #sync is true the + # buffer is flushed to the underlying `io`. + # + # @param string the string to write to the buffer. + # @return the number of bytes appended to the buffer. + # + # source://io-stream//lib/io/stream/generic.rb#153 + def write(string); end + + protected + + # @raise [NotImplementedError] + # + # source://io-stream//lib/io/stream/generic.rb#242 + def sysclose; end + + # Reads data from the underlying stream as efficiently as possible. + # + # @raise [NotImplementedError] + # + # source://io-stream//lib/io/stream/generic.rb#251 + def sysread(size, buffer); end + + # @raise [NotImplementedError] + # + # source://io-stream//lib/io/stream/generic.rb#246 + def syswrite(buffer); end + + private + + # Consumes at most `size` bytes from the buffer. + # + # @param size [Integer|nil] The amount of data to consume. If nil, consume entire buffer. + # + # source://io-stream//lib/io/stream/generic.rb#288 + def consume_read_buffer(size = T.unsafe(nil)); end + + # Fills the buffer from the underlying stream. + # + # source://io-stream//lib/io/stream/generic.rb#258 + def fill_read_buffer(size = T.unsafe(nil)); end +end + +# The maximum read size when appending to IO buffers. Defaults to 8MB. +# +# source://io-stream//lib/io/stream/generic.rb#19 +IO::Stream::MAXIMUM_READ_SIZE = T.let(T.unsafe(nil), Integer) + +# source://io-stream//lib/io/stream/string_buffer.rb#7 +class IO::Stream::StringBuffer < ::String + # @return [StringBuffer] a new instance of StringBuffer + # + # source://io-stream//lib/io/stream/string_buffer.rb#10 + def initialize; end + + # source://io-stream//lib/io/stream/string_buffer.rb#16 + def <<(string); end + + # source://io-stream//lib/io/stream/string_buffer.rb#16 + def concat(string); end +end + +# source://io-stream//lib/io/stream/string_buffer.rb#8 +IO::Stream::StringBuffer::BINARY = T.let(T.unsafe(nil), Encoding) + +# source://io-stream//lib/io/stream/version.rb#7 +IO::Stream::VERSION = T.let(T.unsafe(nil), String) + +# Compatibility shim. +class IO::TimeoutError < ::IOError; end + +IO::WRITABLE = T.let(T.unsafe(nil), Integer) + +# source://io-stream//lib/io/stream/shim/readable.rb#47 +class OpenSSL::SSL::SSLSocket + include ::Enumerable + + # source://io-stream//lib/io/stream/openssl.rb#12 + def close_read; end + + # source://io-stream//lib/io/stream/openssl.rb#18 + def close_write; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/readable.rb#49 + def readable?; end + + # source://io-stream//lib/io/stream/openssl.rb#36 + def timeout; end + + # source://io-stream//lib/io/stream/openssl.rb#42 + def timeout=(value); end + + # source://io-stream//lib/io/stream/openssl.rb#24 + def wait_readable(*_arg0, **_arg1, &_arg2); end + + # source://io-stream//lib/io/stream/openssl.rb#30 + def wait_writable(*_arg0, **_arg1, &_arg2); end +end + +# source://io-stream//lib/io/stream/shim/buffered.rb#56 +class StringIO + include ::Enumerable + + # source://io-stream//lib/io/stream/shim/buffered.rb#61 + def buffered=(value); end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/buffered.rb#57 + def buffered?; end + + # @return [Boolean] + # + # source://io-stream//lib/io/stream/shim/readable.rb#39 + def readable?; end +end diff --git a/sorbet/rbi/gems/json@2.6.3.rbi b/sorbet/rbi/gems/json@2.7.2.rbi similarity index 92% rename from sorbet/rbi/gems/json@2.6.3.rbi rename to sorbet/rbi/gems/json@2.7.2.rbi index 4bbdb823e..ce4a9b24c 100644 --- a/sorbet/rbi/gems/json@2.6.3.rbi +++ b/sorbet/rbi/gems/json@2.7.2.rbi @@ -1,12 +1,13 @@ -# typed: true +# 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`. + # Extends any Class to include _json_creatable?_ method. # -# source://json//lib/json/common.rb#695 +# source://json//lib/json/common.rb#690 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 @@ -15,7 +16,7 @@ class Class < ::Module # # @return [Boolean] # - # source://json//lib/json/common.rb#700 + # source://json//lib/json/common.rb#695 def json_creatable?; end end @@ -302,6 +303,15 @@ end # # 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 @@ -623,8 +633,8 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + # source://json//lib/json/common.rb#615 + 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 @@ -640,13 +650,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#329 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#329 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -685,7 +695,7 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#300 def generate(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -816,7 +826,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#541 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :call-seq: @@ -827,7 +837,7 @@ module JSON # # See method #parse. # - # source://json//lib/json/common.rb#245 + # source://json//lib/json/common.rb#249 def load_file(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -838,9 +848,12 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#256 + # source://json//lib/json/common.rb#260 def load_file!(filespec, opts = T.unsafe(nil)); end + # source://json//lib/json/common.rb#643 + def merge_dump_options(opts, strict: T.unsafe(nil)); end + # :call-seq: # JSON.parse(source, opts) -> object # @@ -889,7 +902,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#215 + # source://json//lib/json/common.rb#219 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -904,7 +917,7 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#230 + # source://json//lib/json/common.rb#234 def parse!(source, opts = T.unsafe(nil)); end # :call-seq: @@ -937,28 +950,28 @@ module JSON # } # } # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#374 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#374 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#575 + # source://json//lib/json/common.rb#559 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#541 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#300 def unparse(obj, opts = T.unsafe(nil)); end class << self @@ -974,26 +987,26 @@ module JSON # ruby = [0, 1, nil] # JSON[ruby] # => '[0,1,null]' # - # source://json//lib/json/common.rb#18 + # source://json//lib/json/common.rb#22 def [](object, opts = T.unsafe(nil)); end - # source://json//lib/json/common.rb#81 + # source://json//lib/json/common.rb#85 def create_fast_state; end # Returns the current create identifier. # See also JSON.create_id=. # - # source://json//lib/json/common.rb#126 + # source://json//lib/json/common.rb#130 def create_id; end # Sets create identifier, which is used to decide if the _json_create_ # hook of a class should be called; initial value is +json_class+: # JSON.create_id # => 'json_class' # - # source://json//lib/json/common.rb#120 + # source://json//lib/json/common.rb#124 def create_id=(new_value); end - # source://json//lib/json/common.rb#91 + # source://json//lib/json/common.rb#95 def create_pretty_state; end # Return the constant located at _path_. The format of _path_ has to be @@ -1001,7 +1014,7 @@ module JSON # level (absolute namespace path?). If there doesn't exist a constant at # the given path, an ArgumentError is raised. # - # source://json//lib/json/common.rb#42 + # source://json//lib/json/common.rb#46 def deep_const_get(path); end # :call-seq: @@ -1032,23 +1045,23 @@ module JSON # Output: # {"foo":[0,1],"bar":{"baz":2,"bat":3},"bam":"bad"} # - # source://json//lib/json/common.rb#631 - def dump(obj, anIO = T.unsafe(nil), limit = T.unsafe(nil)); end + # source://json//lib/json/common.rb#615 + 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, :escape_slash=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#596 + # source://json//lib/json/common.rb#580 def dump_default_options; end # Sets or returns the default options for the JSON.dump method. # Initially: # opts = JSON.dump_default_options - # opts # => {:max_nesting=>false, :allow_nan=>true, :escape_slash=>false} + # opts # => {:max_nesting=>false, :allow_nan=>true, :script_safe=>false} # - # source://json//lib/json/common.rb#596 + # source://json//lib/json/common.rb#580 def dump_default_options=(_arg0); end # :call-seq: @@ -1065,13 +1078,13 @@ module JSON # # Raises SystemStackError (stack level too deep): # JSON.fast_generate(a) # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#329 def fast_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#335 + # source://json//lib/json/common.rb#329 def fast_unparse(obj, opts = T.unsafe(nil)); end # :call-seq: @@ -1110,24 +1123,24 @@ module JSON # # Raises JSON::NestingError (nesting of 100 is too deep): # JSON.generate(a) # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#300 def generate(obj, opts = T.unsafe(nil)); end # Returns the JSON generator module that is used by JSON. This is # either JSON::Ext::Generator or JSON::Pure::Generator: # JSON.generator # => JSON::Ext::Generator # - # source://json//lib/json/common.rb#103 + # source://json//lib/json/common.rb#107 def generator; end # Set the module _generator_ to be used by JSON. # - # source://json//lib/json/common.rb#58 + # source://json//lib/json/common.rb#62 def generator=(generator); end # Encodes string using String.encode. # - # source://json//lib/json/common.rb#653 + # source://json//lib/json/common.rb#639 def iconv(to, from, string); end # :call-seq: @@ -1258,7 +1271,7 @@ module JSON # #"Admin", "password"=>"0wn3d"}>} # - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#541 def load(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or returns default options for the JSON.load method. @@ -1266,7 +1279,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#420 + # source://json//lib/json/common.rb#404 def load_default_options; end # Sets or returns default options for the JSON.load method. @@ -1274,7 +1287,7 @@ module JSON # opts = JSON.load_default_options # opts # => {:max_nesting=>false, :allow_nan=>true, :allow_blank=>true, :create_additions=>true} # - # source://json//lib/json/common.rb#420 + # source://json//lib/json/common.rb#404 def load_default_options=(_arg0); end # :call-seq: @@ -1285,7 +1298,7 @@ module JSON # # See method #parse! # - # source://json//lib/json/common.rb#256 + # source://json//lib/json/common.rb#260 def load_file!(filespec, opts = T.unsafe(nil)); end # :call-seq: @@ -1336,7 +1349,7 @@ module JSON # # Raises JSON::ParserError (783: unexpected token at ''): # JSON.parse('') # - # source://json//lib/json/common.rb#215 + # source://json//lib/json/common.rb#219 def parse(source, opts = T.unsafe(nil)); end # :call-seq: @@ -1351,19 +1364,19 @@ module JSON # which disables checking for nesting depth. # - Option +allow_nan+, if not provided, defaults to +true+. # - # source://json//lib/json/common.rb#230 + # source://json//lib/json/common.rb#234 def parse!(source, opts = T.unsafe(nil)); end # Returns the JSON parser class that is used by JSON. This is either # JSON::Ext::Parser or JSON::Pure::Parser: # JSON.parser # => JSON::Ext::Parser # - # source://json//lib/json/common.rb#29 + # source://json//lib/json/common.rb#33 def parser; end # Set the JSON parser class _parser_ to be used by JSON. # - # source://json//lib/json/common.rb#32 + # source://json//lib/json/common.rb#36 def parser=(parser); end # :call-seq: @@ -1396,115 +1409,123 @@ module JSON # } # } # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#374 def pretty_generate(obj, opts = T.unsafe(nil)); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and later delete them. # - # source://json//lib/json/common.rb#390 + # source://json//lib/json/common.rb#374 def pretty_unparse(obj, opts = T.unsafe(nil)); end # Recursively calls passed _Proc_ if the parsed data structure is an _Array_ or _Hash_ # - # source://json//lib/json/common.rb#575 + # source://json//lib/json/common.rb#559 def recurse_proc(result, &proc); end - # source://json//lib/json/common.rb#557 + # source://json//lib/json/common.rb#541 def restore(source, proc = T.unsafe(nil), options = T.unsafe(nil)); end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//lib/json/common.rb#108 + # source://json//lib/json/common.rb#112 def state; end # Sets or Returns the JSON generator state class that is used by JSON. This is # either JSON::Ext::Generator::State or JSON::Pure::Generator::State: # JSON.state # => JSON::Ext::Generator::State # - # source://json//lib/json/common.rb#108 + # source://json//lib/json/common.rb#112 def state=(_arg0); end # :stopdoc: # I want to deprecate these later, so I'll first be silent about them, and # later delete them. # - # source://json//lib/json/common.rb#296 + # source://json//lib/json/common.rb#300 def unparse(obj, opts = T.unsafe(nil)); end + + private + + # source://json//lib/json/common.rb#643 + def merge_dump_options(opts, strict: T.unsafe(nil)); end end end -# source://json//lib/json/common.rb#114 +# source://json//lib/json/common.rb#118 JSON::CREATE_ID_TLS_KEY = T.let(T.unsafe(nil), String) -# source://json//lib/json/common.rb#111 +# source://json//lib/json/common.rb#115 JSON::DEFAULT_CREATE_ID = T.let(T.unsafe(nil), String) -# source://json//lib/json/generic_object.rb#5 +# source://json//lib/json/generic_object.rb#9 class JSON::GenericObject < ::OpenStruct - # source://json//lib/json/generic_object.rb#63 + # source://json//lib/json/generic_object.rb#67 def as_json(*_arg0); end - # source://json//lib/json/generic_object.rb#47 + # source://json//lib/json/generic_object.rb#51 def to_hash; end - # source://json//lib/json/generic_object.rb#67 + # source://json//lib/json/generic_object.rb#71 def to_json(*a); end - # source://json//lib/json/generic_object.rb#59 + # source://json//lib/json/generic_object.rb#63 def |(other); end class << self - # source://json//lib/json/generic_object.rb#41 + # source://json//lib/json/generic_object.rb#45 def dump(obj, *args); end - # source://json//lib/json/generic_object.rb#21 + # 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#13 + # source://json//lib/json/generic_object.rb#17 def json_creatable=(_arg0); end # @return [Boolean] # - # source://json//lib/json/generic_object.rb#9 + # source://json//lib/json/generic_object.rb#13 def json_creatable?; end - # source://json//lib/json/generic_object.rb#15 + # source://json//lib/json/generic_object.rb#19 def json_create(data); end - # source://json//lib/json/generic_object.rb#36 + # 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#137 +# source://json//lib/json/common.rb#141 class JSON::JSONError < ::StandardError class << self - # source://json//lib/json/common.rb#138 + # source://json//lib/json/common.rb#142 def wrap(exception); end end end -# source://json//lib/json/common.rb#35 +# source://json//lib/json/common.rb#7 +JSON::NOT_SET = T.let(T.unsafe(nil), Object) + +# source://json//lib/json/common.rb#39 JSON::Parser = JSON::Ext::Parser -# source://json//lib/json/common.rb#73 +# source://json//lib/json/common.rb#77 JSON::State = JSON::Ext::Generator::State # For backwards compatibility # -# source://json//lib/json/common.rb#159 +# source://json//lib/json/common.rb#163 JSON::UnparserError = JSON::GeneratorError -# source://json//lib/json/common.rb#658 +# source://json//lib/json/common.rb#653 module Kernel private @@ -1515,18 +1536,18 @@ module Kernel # The _opts_ argument is passed through to generate/parse respectively. See # generate and parse for their documentation. # - # source://json//lib/json/common.rb#685 + # source://json//lib/json/common.rb#680 def JSON(object, *args); end # Outputs _objs_ to STDOUT as JSON strings in the shortest form, that is in # one line. # - # source://json//lib/json/common.rb#663 + # source://json//lib/json/common.rb#658 def j(*objs); end # Outputs _objs_ to STDOUT as JSON strings in a pretty format, with # indentation and over many lines. # - # source://json//lib/json/common.rb#672 + # source://json//lib/json/common.rb#667 def jj(*objs); end end diff --git a/sorbet/rbi/gems/logger@1.6.0.rbi b/sorbet/rbi/gems/logger@1.6.0.rbi new file mode 100644 index 000000000..0723d96aa --- /dev/null +++ b/sorbet/rbi/gems/logger@1.6.0.rbi @@ -0,0 +1,912 @@ +# 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]. + # + # @return [Logger] a new instance of Logger + # + # source://logger//lib/logger.rb#578 + 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)); 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#684 + 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#651 + 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#731 + 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#690 + 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#708 + 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#714 + 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#696 + 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#651 + 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#619 + 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#720 + def unknown(progname = T.unsafe(nil), &block); end + + # Equivalent to calling #add with severity Logger::WARN. + # + # source://logger//lib/logger.rb#702 + 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#744 + def format_message(severity, datetime, progname, msg); end + + # source://logger//lib/logger.rb#740 + def format_severity(severity); 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)); end + + # source://logger//lib/logger/log_device.rb#52 + 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#62 + def reopen(log = T.unsafe(nil)); end + + # source://logger//lib/logger/log_device.rb#31 + def write(message); end + + private + + # source://logger//lib/logger/log_device.rb#119 + def add_log_header(file); end + + # source://logger//lib/logger/log_device.rb#125 + def check_shift_log; end + + # source://logger//lib/logger/log_device.rb#103 + def create_logfile(filename); end + + # source://logger//lib/logger/log_device.rb#145 + def lock_shift_log; end + + # source://logger//lib/logger/log_device.rb#95 + def open_logfile(filename); end + + # source://logger//lib/logger/log_device.rb#79 + def set_dev(log); end + + # source://logger//lib/logger/log_device.rb#176 + def shift_log_age; end + + # source://logger//lib/logger/log_device.rb#188 + def shift_log_period(period_end); end +end + +# 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#738 +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/marcel@1.0.2.rbi b/sorbet/rbi/gems/marcel@1.0.4.rbi similarity index 66% rename from sorbet/rbi/gems/marcel@1.0.2.rbi rename to sorbet/rbi/gems/marcel@1.0.4.rbi index 135aac855..861f2c1c8 100644 --- a/sorbet/rbi/gems/marcel@1.0.2.rbi +++ b/sorbet/rbi/gems/marcel@1.0.4.rbi @@ -4,20 +4,21 @@ # This is an autogenerated file for types exported from the `marcel` gem. # Please instead update this file by running `bin/tapioca gem marcel`. + # This file is auto-generated. Instead of editing this file, please # add MIMEs to data/custom.xml or lib/marcel/mime_type/definitions.rb. # -# source://marcel//lib/marcel.rb#1 +# source://marcel//lib/marcel.rb#3 module Marcel; end # @private # -# source://marcel//lib/marcel/tables.rb#10 +# source://marcel//lib/marcel/tables.rb#9 Marcel::EXTENSIONS = T.let(T.unsafe(nil), Hash) # @private # -# source://marcel//lib/marcel/tables.rb#2154 +# source://marcel//lib/marcel/tables.rb#2394 Marcel::MAGIC = T.let(T.unsafe(nil), Array) # Mime type detection @@ -35,46 +36,46 @@ class Marcel::Magic # # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#102 + # source://marcel//lib/marcel/magic.rb#103 def ==(other); end # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#53 + # source://marcel//lib/marcel/magic.rb#54 def audio?; end # Returns true if type is child of parent type # # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#57 + # source://marcel//lib/marcel/magic.rb#58 def child_of?(parent); end # Get mime comment # - # source://marcel//lib/marcel/magic.rb#67 + # source://marcel//lib/marcel/magic.rb#68 def comment; end # Allow comparison with string # # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#102 + # source://marcel//lib/marcel/magic.rb#103 def eql?(other); end # Get string list of file extensions # - # source://marcel//lib/marcel/magic.rb#62 + # source://marcel//lib/marcel/magic.rb#63 def extensions; end - # source://marcel//lib/marcel/magic.rb#106 + # source://marcel//lib/marcel/magic.rb#107 def hash; end # Mediatype shortcuts # # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#52 + # source://marcel//lib/marcel/magic.rb#53 def image?; end # Returns the value of attribute mediatype. @@ -91,12 +92,12 @@ class Marcel::Magic # # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#49 + # source://marcel//lib/marcel/magic.rb#50 def text?; end # Return type as string # - # source://marcel//lib/marcel/magic.rb#97 + # source://marcel//lib/marcel/magic.rb#98 def to_s; end # Returns the value of attribute type. @@ -106,7 +107,7 @@ class Marcel::Magic # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#54 + # source://marcel//lib/marcel/magic.rb#55 def video?; end class << self @@ -126,28 +127,28 @@ class Marcel::Magic # Lookup all mime types by magic content analysis. # This is a slower operation. # - # source://marcel//lib/marcel/magic.rb#92 + # source://marcel//lib/marcel/magic.rb#93 def all_by_magic(io); end # Lookup mime type by file extension # - # source://marcel//lib/marcel/magic.rb#72 + # source://marcel//lib/marcel/magic.rb#73 def by_extension(ext); end # Lookup mime type by magic content analysis. # This is a slow operation. # - # source://marcel//lib/marcel/magic.rb#85 + # source://marcel//lib/marcel/magic.rb#86 def by_magic(io); end # Lookup mime type by filename # - # source://marcel//lib/marcel/magic.rb#79 + # source://marcel//lib/marcel/magic.rb#80 def by_path(path); end # @return [Boolean] # - # source://marcel//lib/marcel/magic.rb#112 + # source://marcel//lib/marcel/magic.rb#113 def child?(child, parent); end # Removes a mime type from the dictionary. You might want to do this if @@ -159,62 +160,80 @@ class Marcel::Magic private - # source://marcel//lib/marcel/magic.rb#116 + # source://marcel//lib/marcel/magic.rb#117 def magic_match(io, method); end - # source://marcel//lib/marcel/magic.rb#126 + # source://marcel//lib/marcel/magic.rb#127 def magic_match_io(io, matches, buffer); end end end -# source://marcel//lib/marcel/mime_type.rb#2 +# source://marcel//lib/marcel/mime_type.rb#4 class Marcel::MimeType class << self - # source://marcel//lib/marcel/mime_type.rb#6 + # source://marcel//lib/marcel/mime_type.rb#8 def extend(type, extensions: T.unsafe(nil), parents: T.unsafe(nil), magic: T.unsafe(nil)); end - # source://marcel//lib/marcel/mime_type.rb#16 + # Returns the most appropriate content type for the given file. + # + # The first argument should be a +Pathname+ or an +IO+. If it is a +Pathname+, the specified + # file will be opened first. + # + # Optional parameters: + # * +name+: file name, if known + # * +extension+: file extension, if known + # * +declared_type+: MIME type, if known + # + # The most appropriate type is determined by the following: + # * type declared by binary magic number data + # * type declared by the first of file name, file extension, or declared MIME type + # + # If no type can be determined, then +application/octet-stream+ is returned. + # + # source://marcel//lib/marcel/mime_type.rb#29 def for(pathname_or_io = T.unsafe(nil), name: T.unsafe(nil), extension: T.unsafe(nil), declared_type: T.unsafe(nil)); end private - # source://marcel//lib/marcel/mime_type.rb#28 + # source://marcel//lib/marcel/mime_type.rb#36 def for_data(pathname_or_io); end - # source://marcel//lib/marcel/mime_type.rb#54 + # source://marcel//lib/marcel/mime_type.rb#62 def for_declared_type(declared_type); end - # source://marcel//lib/marcel/mime_type.rb#46 + # source://marcel//lib/marcel/mime_type.rb#54 def for_extension(extension); end - # source://marcel//lib/marcel/mime_type.rb#38 + # source://marcel//lib/marcel/mime_type.rb#46 def for_name(name); end # For some document types (notably Microsoft Office) we recognise the main content # type with magic, but not the specific subclass. In this situation, if we can get a more # specific class using either the name or declared_type, we should use that in preference # - # source://marcel//lib/marcel/mime_type.rb#80 - def most_specific_type(from_magic_type, fallback_type); end + # source://marcel//lib/marcel/mime_type.rb#89 + def most_specific_type(*candidates); end - # source://marcel//lib/marcel/mime_type.rb#70 + # source://marcel//lib/marcel/mime_type.rb#79 def parse_media_type(content_type); end - # source://marcel//lib/marcel/mime_type.rb#88 - def root_types(type); end - - # source://marcel//lib/marcel/mime_type.rb#62 + # source://marcel//lib/marcel/mime_type.rb#71 def with_io(pathname_or_io, &block); end end end -# source://marcel//lib/marcel/mime_type.rb#3 +# source://marcel//lib/marcel/mime_type.rb#5 Marcel::MimeType::BINARY = T.let(T.unsafe(nil), String) # @private # -# source://marcel//lib/marcel/tables.rb#1261 -Marcel::TYPES = T.let(T.unsafe(nil), Hash) +# source://marcel//lib/marcel/tables.rb#1260 +Marcel::TYPE_EXTS = T.let(T.unsafe(nil), Hash) + +# Cooltalk Audio +# +# source://marcel//lib/marcel/tables.rb#2151 +Marcel::TYPE_PARENTS = T.let(T.unsafe(nil), Hash) -# source://marcel//lib/marcel/version.rb#2 +# source://marcel//lib/marcel/version.rb#4 Marcel::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/memory_profiler@1.0.1.rbi b/sorbet/rbi/gems/memory_profiler@1.0.2.rbi similarity index 95% rename from sorbet/rbi/gems/memory_profiler@1.0.1.rbi rename to sorbet/rbi/gems/memory_profiler@1.0.2.rbi index 8217eaf8c..c627f6bb0 100644 --- a/sorbet/rbi/gems/memory_profiler@1.0.1.rbi +++ b/sorbet/rbi/gems/memory_profiler@1.0.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `memory_profiler` gem. # Please instead update this file by running `bin/tapioca gem memory_profiler`. + # source://memory_profiler//lib/memory_profiler/version.rb#3 module MemoryProfiler class << self @@ -18,42 +19,36 @@ module MemoryProfiler end end -# source://memory_profiler//lib/memory_profiler/cli.rb#6 +# source://memory_profiler//lib/memory_profiler/cli.rb#7 class MemoryProfiler::CLI - # source://memory_profiler//lib/memory_profiler/cli.rb#31 + # source://memory_profiler//lib/memory_profiler/cli.rb#18 def run(argv); end private - # source://memory_profiler//lib/memory_profiler/cli.rb#61 + # source://memory_profiler//lib/memory_profiler/cli.rb#55 def option_parser(options); end - # source://memory_profiler//lib/memory_profiler/cli.rb#141 - def reporter_options(options); end + # source://memory_profiler//lib/memory_profiler/cli.rb#135 + def profile_command(options, argv); end - # source://memory_profiler//lib/memory_profiler/cli.rb#145 - def results_options(options); end + # source://memory_profiler//lib/memory_profiler/cli.rb#143 + def serialize_hash(hash); end end -# source://memory_profiler//lib/memory_profiler/cli.rb#7 +# source://memory_profiler//lib/memory_profiler/cli.rb#8 MemoryProfiler::CLI::BIN_NAME = T.let(T.unsafe(nil), String) -# source://memory_profiler//lib/memory_profiler/cli.rb#13 +# source://memory_profiler//lib/memory_profiler/cli.rb#14 MemoryProfiler::CLI::DEFAULTS = T.let(T.unsafe(nil), Hash) -# source://memory_profiler//lib/memory_profiler/cli.rb#17 -MemoryProfiler::CLI::REPORTER_KEYS = T.let(T.unsafe(nil), Array) - -# source://memory_profiler//lib/memory_profiler/cli.rb#21 -MemoryProfiler::CLI::RESULTS_KEYS = T.let(T.unsafe(nil), Array) - -# source://memory_profiler//lib/memory_profiler/cli.rb#11 +# source://memory_profiler//lib/memory_profiler/cli.rb#12 MemoryProfiler::CLI::STATUS_ERROR = T.let(T.unsafe(nil), Integer) -# source://memory_profiler//lib/memory_profiler/cli.rb#10 +# source://memory_profiler//lib/memory_profiler/cli.rb#11 MemoryProfiler::CLI::STATUS_SUCCESS = T.let(T.unsafe(nil), Integer) -# source://memory_profiler//lib/memory_profiler/cli.rb#8 +# source://memory_profiler//lib/memory_profiler/cli.rb#9 MemoryProfiler::CLI::VERSION_INFO = T.let(T.unsafe(nil), String) # source://memory_profiler//lib/memory_profiler/helpers.rb#4 diff --git a/sorbet/rbi/gems/minitest@5.22.2.rbi b/sorbet/rbi/gems/minitest@5.25.1.rbi similarity index 75% rename from sorbet/rbi/gems/minitest@5.22.2.rbi rename to sorbet/rbi/gems/minitest@5.25.1.rbi index 1f18c02ff..ee1b3b9c9 100644 --- a/sorbet/rbi/gems/minitest@5.22.2.rbi +++ b/sorbet/rbi/gems/minitest@5.25.1.rbi @@ -4,15 +4,16 @@ # This is an autogenerated file for types exported from the `minitest` gem. # Please instead update this file by running `bin/tapioca gem minitest`. + # :include: README.rdoc # -# source://minitest//lib/minitest/assertions.rb#7 +# source://minitest//lib/minitest/assertions.rb#5 module Minitest class << self # Internal run method. Responsible for telling all Runnable # sub-classes to run. # - # source://minitest//lib/minitest.rb#197 + # source://minitest//lib/minitest.rb#322 def __run(reporter, options); end # A simple hook allowing you to run a block of code after everything @@ -20,7 +21,7 @@ module Minitest # # Minitest.after_run { p $debugging_info } # - # source://minitest//lib/minitest.rb#97 + # source://minitest//lib/minitest.rb#96 def after_run(&block); end # source://minitest//lib/minitest.rb#19 @@ -43,10 +44,10 @@ module Minitest # source://minitest//lib/minitest.rb#18 def cattr_accessor(name); end - # source://minitest//lib/minitest.rb#1146 + # source://minitest//lib/minitest.rb#1215 def clock_time; end - # source://minitest//lib/minitest.rb#177 + # source://minitest//lib/minitest.rb#302 def empty_run!(options); end # source://minitest//lib/minitest.rb#19 @@ -55,7 +56,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def extensions=(_arg0); end - # source://minitest//lib/minitest.rb#292 + # source://minitest//lib/minitest.rb#335 def filter_backtrace(bt); end # source://minitest//lib/minitest.rb#19 @@ -64,7 +65,7 @@ module Minitest # source://minitest//lib/minitest.rb#19 def info_signal=(_arg0); end - # source://minitest//lib/minitest.rb#101 + # source://minitest//lib/minitest.rb#124 def init_plugins(options); end # source://minitest//lib/minitest.rb#108 @@ -76,9 +77,14 @@ module Minitest # source://minitest//lib/minitest.rb#19 def parallel_executor=(_arg0); end - # source://minitest//lib/minitest.rb#210 + # source://minitest//lib/minitest.rb#142 def process_args(args = T.unsafe(nil)); end + # Register a plugin to be used. Does NOT require / load it. + # + # source://minitest//lib/minitest.rb#103 + def register_plugin(name_or_mod); end + # source://minitest//lib/minitest.rb#19 def reporter; end @@ -93,6 +99,9 @@ module Minitest # # Minitest.autorun # Minitest.run(args) + # Minitest.load_plugins + # Minitest.process_args + # Minitest.init_plugins # Minitest.__run(reporter, options) # Runnable.runnables.each # runnable_klass.run(reporter, options) @@ -101,10 +110,10 @@ module Minitest # Minitest.run_one_method(klass, runnable_method) # klass.new(runnable_method).run # - # source://minitest//lib/minitest.rb#143 + # source://minitest//lib/minitest.rb#268 def run(args = T.unsafe(nil)); end - # source://minitest//lib/minitest.rb#1137 + # source://minitest//lib/minitest.rb#1206 def run_one_method(klass, method_name); end # source://minitest//lib/minitest.rb#19 @@ -118,24 +127,24 @@ end # Defines the API for Reporters. Subclass this and override whatever # you want. Go nuts. # -# source://minitest//lib/minitest.rb#638 +# source://minitest//lib/minitest.rb#686 class Minitest::AbstractReporter # @return [AbstractReporter] a new instance of AbstractReporter # - # source://minitest//lib/minitest.rb#640 + # source://minitest//lib/minitest.rb#688 def initialize; end # Did this run pass? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#675 + # source://minitest//lib/minitest.rb#723 def passed?; end # About to start running a test. This allows a reporter to show # that it is starting or that we are in the middle of a test run. # - # source://minitest//lib/minitest.rb#654 + # source://minitest//lib/minitest.rb#702 def prerecord(klass, name); end # Output and record the result of the test. Call @@ -143,43 +152,43 @@ class Minitest::AbstractReporter # result character string. Stores the result of the run if the run # did not pass. # - # source://minitest//lib/minitest.rb#663 + # source://minitest//lib/minitest.rb#711 def record(result); end # Outputs the summary of the run. # - # source://minitest//lib/minitest.rb#669 + # source://minitest//lib/minitest.rb#717 def report; end # Starts reporting on the run. # - # source://minitest//lib/minitest.rb#647 + # source://minitest//lib/minitest.rb#695 def start; end - # source://minitest//lib/minitest.rb#679 + # source://minitest//lib/minitest.rb#727 def synchronize(&block); end end # Represents run failures. # -# source://minitest//lib/minitest.rb#962 +# source://minitest//lib/minitest.rb#1019 class Minitest::Assertion < ::Exception - # source://minitest//lib/minitest.rb#965 + # source://minitest//lib/minitest.rb#1022 def error; end # Where was this run before an assertion was raised? # - # source://minitest//lib/minitest.rb#972 + # source://minitest//lib/minitest.rb#1029 def location; end - # source://minitest//lib/minitest.rb#980 + # source://minitest//lib/minitest.rb#1037 def result_code; end - # source://minitest//lib/minitest.rb#984 + # source://minitest//lib/minitest.rb#1041 def result_label; end end -# source://minitest//lib/minitest.rb#963 +# source://minitest//lib/minitest.rb#1020 Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) # Minitest Assertions. All assertion methods accept a +msg+ which is @@ -191,22 +200,22 @@ Minitest::Assertion::RE = T.let(T.unsafe(nil), Regexp) # provided by the thing including Assertions. See Minitest::Runnable # for an example. # -# source://minitest//lib/minitest/assertions.rb#18 +# source://minitest//lib/minitest/assertions.rb#16 module Minitest::Assertions - # source://minitest//lib/minitest/assertions.rb#188 + # source://minitest//lib/minitest/assertions.rb#181 def _synchronize; end - # source://minitest//lib/minitest/assertions.rb#201 + # source://minitest//lib/minitest/assertions.rb#194 def _where; end # Fails unless +test+ is truthy. # - # source://minitest//lib/minitest/assertions.rb#178 + # source://minitest//lib/minitest/assertions.rb#171 def assert(test, msg = T.unsafe(nil)); end # Fails unless +obj+ is empty. # - # source://minitest//lib/minitest/assertions.rb#195 + # source://minitest//lib/minitest/assertions.rb#188 def assert_empty(obj, msg = T.unsafe(nil)); end # Fails unless exp == act printing the difference between @@ -221,7 +230,7 @@ module Minitest::Assertions # # See also: Minitest::Assertions.diff # - # source://minitest//lib/minitest/assertions.rb#221 + # source://minitest//lib/minitest/assertions.rb#214 def assert_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ are within +delta+ @@ -229,45 +238,45 @@ module Minitest::Assertions # # assert_in_delta Math::PI, (22.0 / 7.0), 0.01 # - # source://minitest//lib/minitest/assertions.rb#242 + # source://minitest//lib/minitest/assertions.rb#235 def assert_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails unless +exp+ and +act+ have a relative # error less than +epsilon+. # - # source://minitest//lib/minitest/assertions.rb#254 + # source://minitest//lib/minitest/assertions.rb#247 def assert_in_epsilon(exp, act, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails unless +collection+ includes +obj+. # - # source://minitest//lib/minitest/assertions.rb#261 + # source://minitest//lib/minitest/assertions.rb#254 def assert_includes(collection, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#272 + # source://minitest//lib/minitest/assertions.rb#265 def assert_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is a kind of +cls+. # - # source://minitest//lib/minitest/assertions.rb#283 + # source://minitest//lib/minitest/assertions.rb#276 def assert_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails unless +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#293 + # source://minitest//lib/minitest/assertions.rb#287 def assert_match(matcher, obj, msg = T.unsafe(nil)); end # Fails unless +obj+ is nil # - # source://minitest//lib/minitest/assertions.rb#305 + # source://minitest//lib/minitest/assertions.rb#299 def assert_nil(obj, msg = T.unsafe(nil)); end # For testing with binary operators. Eg: # # assert_operator 5, :<=, 4 # - # source://minitest//lib/minitest/assertions.rb#315 + # source://minitest//lib/minitest/assertions.rb#309 def assert_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if stdout or stderr do not output the expected results. @@ -281,12 +290,12 @@ module Minitest::Assertions # # See also: #assert_silent # - # source://minitest//lib/minitest/assertions.rb#333 + # source://minitest//lib/minitest/assertions.rb#327 def assert_output(stdout = T.unsafe(nil), stderr = T.unsafe(nil)); end # Fails unless +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#357 + # source://minitest//lib/minitest/assertions.rb#351 def assert_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -304,7 +313,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest//lib/minitest/assertions.rb#376 + # source://minitest//lib/minitest/assertions.rb#370 def assert_pattern; end # For testing with predicates. Eg: @@ -315,7 +324,7 @@ module Minitest::Assertions # # str.must_be :empty? # - # source://minitest//lib/minitest/assertions.rb#397 + # source://minitest//lib/minitest/assertions.rb#391 def assert_predicate(o1, op, msg = T.unsafe(nil)); end # Fails unless the block raises one of +exp+. Returns the @@ -339,37 +348,37 @@ module Minitest::Assertions # # assert_equal 'This is really bad', error.message # - # source://minitest//lib/minitest/assertions.rb#424 + # source://minitest//lib/minitest/assertions.rb#418 def assert_raises(*exp); end # Fails unless +obj+ responds to +meth+. # include_all defaults to false to match Object#respond_to? # - # source://minitest//lib/minitest/assertions.rb#456 + # source://minitest//lib/minitest/assertions.rb#450 def assert_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails unless +exp+ and +act+ are #equal? # - # source://minitest//lib/minitest/assertions.rb#466 + # source://minitest//lib/minitest/assertions.rb#460 def assert_same(exp, act, msg = T.unsafe(nil)); end # +send_ary+ is a receiver, message and arguments. # # Fails unless the call returns a true value # - # source://minitest//lib/minitest/assertions.rb#479 + # source://minitest//lib/minitest/assertions.rb#473 def assert_send(send_ary, m = T.unsafe(nil)); end # Fails if the block outputs anything to stderr or stdout. # # See also: #assert_output # - # source://minitest//lib/minitest/assertions.rb#493 + # source://minitest//lib/minitest/assertions.rb#488 def assert_silent; end # Fails unless the block throws +sym+ # - # source://minitest//lib/minitest/assertions.rb#502 + # source://minitest//lib/minitest/assertions.rb#497 def assert_throws(sym, msg = T.unsafe(nil)); end # Captures $stdout and $stderr into strings: @@ -386,7 +395,7 @@ module Minitest::Assertions # capture IO for subprocesses. Use #capture_subprocess_io for # that. # - # source://minitest//lib/minitest/assertions.rb#543 + # source://minitest//lib/minitest/assertions.rb#538 def capture_io; end # Captures $stdout and $stderr into strings, using Tempfile to @@ -403,7 +412,7 @@ module Minitest::Assertions # NOTE: This method is approximately 10x slower than #capture_io so # only use it when you need to test the output of a subprocess. # - # source://minitest//lib/minitest/assertions.rb#576 + # source://minitest//lib/minitest/assertions.rb#571 def capture_subprocess_io; end # Returns a diff between +exp+ and +act+. If there is no known @@ -413,29 +422,29 @@ module Minitest::Assertions # # See +things_to_diff+ for more info. # - # source://minitest//lib/minitest/assertions.rb#59 + # source://minitest//lib/minitest/assertions.rb#57 def diff(exp, act); end # Returns details for exception +e+ # - # source://minitest//lib/minitest/assertions.rb#608 + # source://minitest//lib/minitest/assertions.rb#603 def exception_details(e, msg); end # Fails after a given date (in the local time zone). This allows # you to put time-bombs in your tests if you need to keep # something around until a later date lest you forget about it. # - # source://minitest//lib/minitest/assertions.rb#624 + # source://minitest//lib/minitest/assertions.rb#619 def fail_after(y, m, d, msg); end # Fails with +msg+. # - # source://minitest//lib/minitest/assertions.rb#631 + # source://minitest//lib/minitest/assertions.rb#626 def flunk(msg = T.unsafe(nil)); end # Returns a proc that will output +msg+ along with the default message. # - # source://minitest//lib/minitest/assertions.rb#639 + # source://minitest//lib/minitest/assertions.rb#634 def message(msg = T.unsafe(nil), ending = T.unsafe(nil), &default); end # This returns a human-readable version of +obj+. By default @@ -444,7 +453,7 @@ module Minitest::Assertions # # See Minitest::Test.make_my_diffs_pretty! # - # source://minitest//lib/minitest/assertions.rb#129 + # source://minitest//lib/minitest/assertions.rb#127 def mu_pp(obj); end # This returns a diff-able more human-readable version of +obj+. @@ -452,67 +461,67 @@ module Minitest::Assertions # newlines and makes hex-values (like object_ids) generic. This # uses mu_pp to do the first pass and then cleans it up. # - # source://minitest//lib/minitest/assertions.rb#152 + # source://minitest//lib/minitest/assertions.rb#145 def mu_pp_for_diff(obj); end # used for counting assertions # - # source://minitest//lib/minitest/assertions.rb#650 + # source://minitest//lib/minitest/assertions.rb#645 def pass(_msg = T.unsafe(nil)); end # Fails if +test+ is truthy. # - # source://minitest//lib/minitest/assertions.rb#657 + # source://minitest//lib/minitest/assertions.rb#652 def refute(test, msg = T.unsafe(nil)); end # Fails if +obj+ is empty. # - # source://minitest//lib/minitest/assertions.rb#665 + # source://minitest//lib/minitest/assertions.rb#660 def refute_empty(obj, msg = T.unsafe(nil)); end # Fails if exp == act. # # For floats use refute_in_delta. # - # source://minitest//lib/minitest/assertions.rb#676 + # source://minitest//lib/minitest/assertions.rb#671 def refute_equal(exp, act, msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ is within +delta+ of +act+. # # refute_in_delta Math::PI, (22.0 / 7.0) # - # source://minitest//lib/minitest/assertions.rb#688 + # source://minitest//lib/minitest/assertions.rb#683 def refute_in_delta(exp, act, delta = T.unsafe(nil), msg = T.unsafe(nil)); end # For comparing Floats. Fails if +exp+ and +act+ have a relative error # less than +epsilon+. # - # source://minitest//lib/minitest/assertions.rb#700 + # source://minitest//lib/minitest/assertions.rb#695 def refute_in_epsilon(a, b, epsilon = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +collection+ includes +obj+. # - # source://minitest//lib/minitest/assertions.rb#707 + # source://minitest//lib/minitest/assertions.rb#702 def refute_includes(collection, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is an instance of +cls+. # - # source://minitest//lib/minitest/assertions.rb#718 + # source://minitest//lib/minitest/assertions.rb#713 def refute_instance_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is a kind of +cls+. # - # source://minitest//lib/minitest/assertions.rb#728 + # source://minitest//lib/minitest/assertions.rb#723 def refute_kind_of(cls, obj, msg = T.unsafe(nil)); end # Fails if +matcher+ =~ +obj+. # - # source://minitest//lib/minitest/assertions.rb#736 + # source://minitest//lib/minitest/assertions.rb#731 def refute_match(matcher, obj, msg = T.unsafe(nil)); end # Fails if +obj+ is nil. # - # source://minitest//lib/minitest/assertions.rb#746 + # source://minitest//lib/minitest/assertions.rb#741 def refute_nil(obj, msg = T.unsafe(nil)); end # Fails if +o1+ is not +op+ +o2+. Eg: @@ -520,12 +529,12 @@ module Minitest::Assertions # refute_operator 1, :>, 2 #=> pass # refute_operator 1, :<, 2 #=> fail # - # source://minitest//lib/minitest/assertions.rb#781 + # source://minitest//lib/minitest/assertions.rb#776 def refute_operator(o1, op, o2 = T.unsafe(nil), msg = T.unsafe(nil)); end # Fails if +path+ exists. # - # source://minitest//lib/minitest/assertions.rb#790 + # source://minitest//lib/minitest/assertions.rb#785 def refute_path_exists(path, msg = T.unsafe(nil)); end # For testing with pattern matching (only supported with Ruby 3.0 and later) @@ -541,7 +550,7 @@ module Minitest::Assertions # # @raise [NotImplementedError] # - # source://minitest//lib/minitest/assertions.rb#763 + # source://minitest//lib/minitest/assertions.rb#758 def refute_pattern; end # For testing with predicates. @@ -552,18 +561,18 @@ module Minitest::Assertions # # str.wont_be :empty? # - # source://minitest//lib/minitest/assertions.rb#804 + # source://minitest//lib/minitest/assertions.rb#799 def refute_predicate(o1, op, msg = T.unsafe(nil)); end # Fails if +obj+ responds to the message +meth+. # include_all defaults to false to match Object#respond_to? # - # source://minitest//lib/minitest/assertions.rb#813 + # source://minitest//lib/minitest/assertions.rb#808 def refute_respond_to(obj, meth, msg = T.unsafe(nil), include_all: T.unsafe(nil)); end # Fails if +exp+ is the same (by object identity) as +act+. # - # source://minitest//lib/minitest/assertions.rb#822 + # source://minitest//lib/minitest/assertions.rb#817 def refute_same(exp, act, msg = T.unsafe(nil)); end # Skips the current run. If run in verbose-mode, the skipped run @@ -572,7 +581,7 @@ module Minitest::Assertions # # @raise [Minitest::Skip] # - # source://minitest//lib/minitest/assertions.rb#835 + # source://minitest//lib/minitest/assertions.rb#830 def skip(msg = T.unsafe(nil), _ignored = T.unsafe(nil)); end # Skips the current run until a given date (in the local time @@ -580,14 +589,14 @@ module Minitest::Assertions # date, but still holds you accountable and prevents you from # forgetting it. # - # source://minitest//lib/minitest/assertions.rb#847 + # source://minitest//lib/minitest/assertions.rb#842 def skip_until(y, m, d, msg); end # Was this testcase skipped? Meant for #teardown. # # @return [Boolean] # - # source://minitest//lib/minitest/assertions.rb#856 + # source://minitest//lib/minitest/assertions.rb#851 def skipped?; end # Returns things to diff [expect, butwas], or [nil, nil] if nothing to diff. @@ -599,104 +608,102 @@ module Minitest::Assertions # 3. or: Strings are equal to each other (but maybe different encodings?). # 4. and: we found a diff executable. # - # source://minitest//lib/minitest/assertions.rb#104 + # source://minitest//lib/minitest/assertions.rb#102 def things_to_diff(exp, act); end class << self # Returns the diff command to use in #diff. Tries to intelligently # figure out what diff to use. # - # source://minitest//lib/minitest/assertions.rb#29 + # source://minitest//lib/minitest/assertions.rb#27 def diff; end # Set the diff command to use in #diff. # - # source://minitest//lib/minitest/assertions.rb#47 + # source://minitest//lib/minitest/assertions.rb#45 def diff=(o); end end end -# source://minitest//lib/minitest/assertions.rb#206 +# source://minitest//lib/minitest/assertions.rb#199 Minitest::Assertions::E = T.let(T.unsafe(nil), String) -# source://minitest//lib/minitest/assertions.rb#19 +# source://minitest//lib/minitest/assertions.rb#17 Minitest::Assertions::UNDEFINED = T.let(T.unsafe(nil), Object) # The standard backtrace filter for minitest. # # See Minitest.backtrace_filter=. # -# source://minitest//lib/minitest.rb#1108 +# source://minitest//lib/minitest.rb#1174 class Minitest::BacktraceFilter # @return [BacktraceFilter] a new instance of BacktraceFilter # - # source://minitest//lib/minitest.rb#1114 + # source://minitest//lib/minitest.rb#1183 def initialize(regexp = T.unsafe(nil)); end # Filter +bt+ to something useful. Returns the whole thing if # $DEBUG (ruby) or $MT_DEBUG (env). # - # source://minitest//lib/minitest.rb#1122 + # source://minitest//lib/minitest.rb#1191 def filter(bt); end - # Returns the value of attribute regexp. + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. # - # source://minitest//lib/minitest.rb#1112 + # source://minitest//lib/minitest.rb#1181 def regexp; end - # Sets the attribute regexp - # - # @param value the value to set the attribute regexp to. + # The regular expression to use to filter backtraces. Defaults to +MT_RE+. # - # source://minitest//lib/minitest.rb#1112 + # source://minitest//lib/minitest.rb#1181 def regexp=(_arg0); end end -# source://minitest//lib/minitest.rb#1110 +# source://minitest//lib/minitest.rb#1176 Minitest::BacktraceFilter::MT_RE = T.let(T.unsafe(nil), Regexp) # Dispatch to multiple reporters as one. # -# source://minitest//lib/minitest.rb#911 +# source://minitest//lib/minitest.rb#968 class Minitest::CompositeReporter < ::Minitest::AbstractReporter # @return [CompositeReporter] a new instance of CompositeReporter # - # source://minitest//lib/minitest.rb#917 + # source://minitest//lib/minitest.rb#974 def initialize(*reporters); end # Add another reporter to the mix. # - # source://minitest//lib/minitest.rb#929 + # source://minitest//lib/minitest.rb#986 def <<(reporter); end - # source://minitest//lib/minitest.rb#922 + # source://minitest//lib/minitest.rb#979 def io; end # @return [Boolean] # - # source://minitest//lib/minitest.rb#933 + # source://minitest//lib/minitest.rb#990 def passed?; end - # source://minitest//lib/minitest.rb#941 + # source://minitest//lib/minitest.rb#998 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#948 + # source://minitest//lib/minitest.rb#1005 def record(result); end - # source://minitest//lib/minitest.rb#954 + # source://minitest//lib/minitest.rb#1011 def report; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#915 + # source://minitest//lib/minitest.rb#972 def reporters; end # The list of reporters to dispatch to. # - # source://minitest//lib/minitest.rb#915 + # source://minitest//lib/minitest.rb#972 def reporters=(_arg0); end - # source://minitest//lib/minitest.rb#937 + # source://minitest//lib/minitest.rb#994 def start; end end @@ -725,48 +732,48 @@ end # # ... lots of test methods ... # end # -# source://minitest//lib/minitest.rb#1052 +# source://minitest//lib/minitest.rb#1118 module Minitest::Guard # Is this running on jruby? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1057 + # source://minitest//lib/minitest.rb#1123 def jruby?(platform = T.unsafe(nil)); end # Is this running on maglev? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1064 + # source://minitest//lib/minitest.rb#1130 def maglev?(platform = T.unsafe(nil)); end # Is this running on mri? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1074 + # source://minitest//lib/minitest.rb#1140 def mri?(platform = T.unsafe(nil)); end # Is this running on macOS? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1081 + # source://minitest//lib/minitest.rb#1147 def osx?(platform = T.unsafe(nil)); end # Is this running on rubinius? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1088 + # source://minitest//lib/minitest.rb#1154 def rubinius?(platform = T.unsafe(nil)); end # Is this running on windows? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#1098 + # source://minitest//lib/minitest.rb#1164 def windows?(platform = T.unsafe(nil)); end end @@ -829,36 +836,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#710 +# source://minitest//lib/minitest.rb#758 class Minitest::ProgressReporter < ::Minitest::Reporter - # source://minitest//lib/minitest.rb#711 + # source://minitest//lib/minitest.rb#759 def prerecord(klass, name); end - # source://minitest//lib/minitest.rb#718 + # source://minitest//lib/minitest.rb#766 def record(result); end end # Shared code for anything that can get passed to a Reporter. See # Minitest::Test & Minitest::Result. # -# source://minitest//lib/minitest.rb#532 +# source://minitest//lib/minitest.rb#580 module Minitest::Reportable # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#554 + # source://minitest//lib/minitest.rb#602 def class_name; end # Did this run error? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#575 + # source://minitest//lib/minitest.rb#623 def error?; end # The location identifier of this test. Depends on a method # existing called class_name. # - # source://minitest//lib/minitest.rb#549 + # source://minitest//lib/minitest.rb#597 def location; end # Did this run pass? @@ -868,50 +875,50 @@ module Minitest::Reportable # # @return [Boolean] # - # source://minitest//lib/minitest.rb#539 + # source://minitest//lib/minitest.rb#587 def passed?; end # Returns ".", "F", or "E" based on the result of the run. # - # source://minitest//lib/minitest.rb#561 + # source://minitest//lib/minitest.rb#609 def result_code; end # Was this run skipped? # # @return [Boolean] # - # source://minitest//lib/minitest.rb#568 + # source://minitest//lib/minitest.rb#616 def skipped?; end end -# source://minitest//lib/minitest.rb#543 +# source://minitest//lib/minitest.rb#591 Minitest::Reportable::BASE_DIR = T.let(T.unsafe(nil), String) -# source://minitest//lib/minitest.rb#686 +# source://minitest//lib/minitest.rb#734 class Minitest::Reporter < ::Minitest::AbstractReporter # @return [Reporter] a new instance of Reporter # - # source://minitest//lib/minitest.rb#695 + # source://minitest//lib/minitest.rb#743 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # The IO used to report. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#736 def io; end # The IO used to report. # - # source://minitest//lib/minitest.rb#688 + # source://minitest//lib/minitest.rb#736 def io=(_arg0); end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#741 def options; end # Command-line options for this run. # - # source://minitest//lib/minitest.rb#693 + # source://minitest//lib/minitest.rb#741 def options=(_arg0); end end @@ -921,80 +928,80 @@ end # blow up. By using Result.from(a_test) you can be reasonably sure # that the test result can be marshalled. # -# source://minitest//lib/minitest.rb#587 +# source://minitest//lib/minitest.rb#635 class Minitest::Result < ::Minitest::Runnable include ::Minitest::Reportable - # source://minitest//lib/minitest.rb#621 + # source://minitest//lib/minitest.rb#669 def class_name; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#596 + # source://minitest//lib/minitest.rb#644 def klass; end # The class name of the test result. # - # source://minitest//lib/minitest.rb#596 + # source://minitest//lib/minitest.rb#644 def klass=(_arg0); end # The location of the test method. # - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#649 def source_location; end # The location of the test method. # - # source://minitest//lib/minitest.rb#601 + # source://minitest//lib/minitest.rb#649 def source_location=(_arg0); end - # source://minitest//lib/minitest.rb#625 + # source://minitest//lib/minitest.rb#673 def to_s; end class << self # Create a new test result from a Runnable instance. # - # source://minitest//lib/minitest.rb#606 + # source://minitest//lib/minitest.rb#654 def from(runnable); end end end # re-open # -# source://minitest//lib/minitest.rb#305 +# source://minitest//lib/minitest.rb#348 class Minitest::Runnable # @return [Runnable] a new instance of Runnable # - # source://minitest//lib/minitest.rb#463 + # source://minitest//lib/minitest.rb#511 def initialize(name); end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#309 + # source://minitest//lib/minitest.rb#352 def assertions; end # Number of assertions executed in this run. # - # source://minitest//lib/minitest.rb#309 + # source://minitest//lib/minitest.rb#352 def assertions=(_arg0); end - # source://minitest//lib/minitest.rb#459 + # source://minitest//lib/minitest.rb#507 def failure; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#314 + # source://minitest//lib/minitest.rb#357 def failures; end # An assertion raised during the run, if any. # - # source://minitest//lib/minitest.rb#314 + # source://minitest//lib/minitest.rb#357 def failures=(_arg0); end - # source://minitest//lib/minitest.rb#445 + # source://minitest//lib/minitest.rb#493 def marshal_dump; end - # source://minitest//lib/minitest.rb#455 + # source://minitest//lib/minitest.rb#503 def marshal_load(ary); end # Metadata you attach to the test results that get sent to the reporter. @@ -1004,29 +1011,29 @@ class Minitest::Runnable # NOTE: this data *must* be plain (read: marshal-able) data! # Hashes! Arrays! Strings! # - # source://minitest//lib/minitest.rb#478 + # source://minitest//lib/minitest.rb#526 def metadata; end # Sets metadata, mainly used for +Result.from+. # - # source://minitest//lib/minitest.rb#485 + # source://minitest//lib/minitest.rb#533 def metadata=(_arg0); end # Returns true if metadata exists. # # @return [Boolean] # - # source://minitest//lib/minitest.rb#490 + # source://minitest//lib/minitest.rb#538 def metadata?; end # Name of the run. # - # source://minitest//lib/minitest.rb#332 + # source://minitest//lib/minitest.rb#375 def name; end # Set the name of the run. # - # source://minitest//lib/minitest.rb#339 + # source://minitest//lib/minitest.rb#382 def name=(o); end # Did this run pass? @@ -1037,7 +1044,7 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#507 + # source://minitest//lib/minitest.rb#555 def passed?; end # Returns a single character string to print based on the result @@ -1046,14 +1053,14 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#516 + # source://minitest//lib/minitest.rb#564 def result_code; end # Runs a single method. Needs to return self. # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#497 + # source://minitest//lib/minitest.rb#545 def run; end # Was this run skipped? See #passed? for more information. @@ -1061,42 +1068,42 @@ class Minitest::Runnable # @raise [NotImplementedError] # @return [Boolean] # - # source://minitest//lib/minitest.rb#523 + # source://minitest//lib/minitest.rb#571 def skipped?; end # The time it took to run. # - # source://minitest//lib/minitest.rb#319 + # source://minitest//lib/minitest.rb#362 def time; end # The time it took to run. # - # source://minitest//lib/minitest.rb#319 + # source://minitest//lib/minitest.rb#362 def time=(_arg0); end - # source://minitest//lib/minitest.rb#321 + # source://minitest//lib/minitest.rb#364 def time_it; end class << self - # source://minitest//lib/minitest.rb#1156 + # source://minitest//lib/minitest.rb#1225 def inherited(klass); end # Returns all instance methods matching the pattern +re+. # - # source://minitest//lib/minitest.rb#346 + # source://minitest//lib/minitest.rb#389 def methods_matching(re); end - # source://minitest//lib/minitest.rb#415 + # source://minitest//lib/minitest.rb#463 def on_signal(name, action); end - # source://minitest//lib/minitest.rb#350 + # source://minitest//lib/minitest.rb#393 def reset; end # Responsible for running all runnable methods in a given class, # each in its own instance. Each instance is passed to the # reporter to record. # - # source://minitest//lib/minitest.rb#361 + # source://minitest//lib/minitest.rb#404 def run(reporter, options = T.unsafe(nil)); end # Runs a single method and has the reporter record the result. @@ -1104,7 +1111,7 @@ class Minitest::Runnable # that subclasses can specialize the running of an individual # test. See Minitest::ParallelTest::ClassMethods for an example. # - # source://minitest//lib/minitest.rb#387 + # source://minitest//lib/minitest.rb#444 def run_one_method(klass, method_name, reporter); end # Each subclass of Runnable is responsible for overriding this @@ -1112,33 +1119,33 @@ class Minitest::Runnable # # @raise [NotImplementedError] # - # source://minitest//lib/minitest.rb#432 + # source://minitest//lib/minitest.rb#480 def runnable_methods; end # Returns all subclasses of Runnable. # - # source://minitest//lib/minitest.rb#439 + # source://minitest//lib/minitest.rb#487 def runnables; end # Defines the order to run tests (:random by default). Override # this or use a convenience method to change it for your tests. # - # source://minitest//lib/minitest.rb#396 + # source://minitest//lib/minitest.rb#453 def test_order; end - # source://minitest//lib/minitest.rb#400 + # source://minitest//lib/minitest.rb#457 def with_info_handler(reporter, &block); end end end -# source://minitest//lib/minitest.rb#413 +# source://minitest//lib/minitest.rb#461 Minitest::Runnable::SIGNALS = T.let(T.unsafe(nil), Hash) # Assertion raised when skipping a run. # -# source://minitest//lib/minitest.rb#992 +# source://minitest//lib/minitest.rb#1049 class Minitest::Skip < ::Minitest::Assertion - # source://minitest//lib/minitest.rb#993 + # source://minitest//lib/minitest.rb#1050 def result_label; end end @@ -1162,114 +1169,124 @@ end # end # end # -# source://minitest//lib/minitest.rb#746 +# source://minitest//lib/minitest.rb#794 class Minitest::StatisticsReporter < ::Minitest::Reporter # @return [StatisticsReporter] a new instance of StatisticsReporter # - # source://minitest//lib/minitest.rb#790 + # source://minitest//lib/minitest.rb#843 def initialize(io = T.unsafe(nil), options = T.unsafe(nil)); end # Total number of assertions. # - # source://minitest//lib/minitest.rb#750 + # source://minitest//lib/minitest.rb#798 def assertions; end # Total number of assertions. # - # source://minitest//lib/minitest.rb#750 + # source://minitest//lib/minitest.rb#798 def assertions=(_arg0); end # Total number of test cases. # - # source://minitest//lib/minitest.rb#755 + # source://minitest//lib/minitest.rb#803 def count; end # Total number of test cases. # - # source://minitest//lib/minitest.rb#755 + # source://minitest//lib/minitest.rb#803 def count=(_arg0); end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#783 + # source://minitest//lib/minitest.rb#831 def errors; end # Total number of tests that erred. # - # source://minitest//lib/minitest.rb#783 + # source://minitest//lib/minitest.rb#831 def errors=(_arg0); end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#778 + # source://minitest//lib/minitest.rb#826 def failures; end # Total number of tests that failed. # - # source://minitest//lib/minitest.rb#778 + # source://minitest//lib/minitest.rb#826 def failures=(_arg0); end # @return [Boolean] # - # source://minitest//lib/minitest.rb#803 + # source://minitest//lib/minitest.rb#857 def passed?; end - # source://minitest//lib/minitest.rb#811 + # source://minitest//lib/minitest.rb#865 def record(result); end # Report on the tracked statistics. # - # source://minitest//lib/minitest.rb#821 + # source://minitest//lib/minitest.rb#875 def report; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#760 + # source://minitest//lib/minitest.rb#808 def results; end # An +Array+ of test cases that failed or were skipped. # - # source://minitest//lib/minitest.rb#760 + # source://minitest//lib/minitest.rb#808 def results=(_arg0); end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#788 + # source://minitest//lib/minitest.rb#841 def skips; end # Total number of tests that where skipped. # - # source://minitest//lib/minitest.rb#788 + # source://minitest//lib/minitest.rb#841 def skips=(_arg0); end - # source://minitest//lib/minitest.rb#807 + # source://minitest//lib/minitest.rb#861 def start; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#767 + # source://minitest//lib/minitest.rb#815 def start_time; end # Time the test run started. If available, the monotonic clock is # used and this is a +Float+, otherwise it's an instance of # +Time+. # - # source://minitest//lib/minitest.rb#767 + # source://minitest//lib/minitest.rb#815 def start_time=(_arg0); end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#773 + # source://minitest//lib/minitest.rb#821 def total_time; end # Test run time. If available, the monotonic clock is used and # this is a +Float+, otherwise it's an instance of +Time+. # - # source://minitest//lib/minitest.rb#773 + # source://minitest//lib/minitest.rb#821 def total_time=(_arg0); end + + # Total number of tests that warned. + # + # source://minitest//lib/minitest.rb#836 + def warnings; end + + # Total number of tests that warned. + # + # source://minitest//lib/minitest.rb#836 + def warnings=(_arg0); end end # A reporter that prints the header, summary, and failure details at @@ -1280,48 +1297,36 @@ end # plugin, pull this out of the composite and replace it with your # own. # -# source://minitest//lib/minitest.rb#841 +# source://minitest//lib/minitest.rb#896 class Minitest::SummaryReporter < ::Minitest::StatisticsReporter - # source://minitest//lib/minitest.rb#876 + # source://minitest//lib/minitest.rb#929 def aggregated_results(io); end - # Returns the value of attribute old_sync. - # - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#898 def old_sync; end - # Sets the attribute old_sync - # - # @param value the value to set the attribute old_sync to. - # - # source://minitest//lib/minitest.rb#844 + # source://minitest//lib/minitest.rb#898 def old_sync=(_arg0); end - # source://minitest//lib/minitest.rb#859 + # source://minitest//lib/minitest.rb#912 def report; end - # :startdoc: - # - # source://minitest//lib/minitest.rb#847 + # source://minitest//lib/minitest.rb#900 def start; end - # source://minitest//lib/minitest.rb#871 + # source://minitest//lib/minitest.rb#924 def statistics; end - # source://minitest//lib/minitest.rb#896 + # source://minitest//lib/minitest.rb#949 def summary; end - # :stopdoc: - # - # source://minitest//lib/minitest.rb#843 + # source://minitest//lib/minitest.rb#897 def sync; end - # :stopdoc: - # - # source://minitest//lib/minitest.rb#843 + # source://minitest//lib/minitest.rb#897 def sync=(_arg0); end - # source://minitest//lib/minitest.rb#892 + # source://minitest//lib/minitest.rb#945 def to_s; end end @@ -1340,29 +1345,26 @@ class Minitest::Test < ::Minitest::Runnable # LifecycleHooks # - # source://minitest//lib/minitest/test.rb#190 + # source://minitest//lib/minitest/test.rb#189 def capture_exceptions; end # source://minitest//lib/minitest/test.rb#15 def class_name; end - # source://minitest//lib/minitest/test.rb#207 + # source://minitest//lib/minitest/test.rb#206 def neuter_exception(e); end - # source://minitest//lib/minitest/test.rb#218 + # source://minitest//lib/minitest/test.rb#217 def new_exception(klass, msg, bt, kill = T.unsafe(nil)); end # Runs a single test with setup/teardown hooks. # - # source://minitest//lib/minitest/test.rb#86 + # source://minitest//lib/minitest/test.rb#87 def run; end - # source://minitest//lib/minitest/test.rb#200 + # source://minitest//lib/minitest/test.rb#199 def sanitize_exception(e); end - # source://minitest//lib/minitest/test.rb#232 - def with_info_handler(&block); end - class << self # Call this at the top of your tests when you absolutely # positively need to have ordered tests. In doing so, you're @@ -1391,18 +1393,19 @@ class Minitest::Test < ::Minitest::Runnable # source://minitest//lib/minitest/test.rb#48 def make_my_diffs_pretty!; end - # Call this at the top of your tests when you want to run your - # tests in parallel. In doing so, you're admitting that you rule - # and your tests are awesome. + # Call this at the top of your tests (inside the +Minitest::Test+ + # subclass or +describe+ block) when you want to run your tests in + # parallel. In doing so, you're admitting that you rule and your + # tests are awesome. # - # source://minitest//lib/minitest/test.rb#59 + # source://minitest//lib/minitest/test.rb#60 def parallelize_me!; end # Returns all instance methods starting with "test_". Based on # #test_order, the methods are either sorted, randomized # (default), or run in parallel. # - # source://minitest//lib/minitest/test.rb#69 + # source://minitest//lib/minitest/test.rb#70 def runnable_methods; end end end @@ -1411,7 +1414,7 @@ end # meant for library writers, NOT for regular test authors. See # #before_setup for an example. # -# source://minitest//lib/minitest/test.rb#113 +# source://minitest//lib/minitest/test.rb#112 module Minitest::Test::LifecycleHooks # Runs before every test, after setup. This hook is meant for # libraries to extend minitest. It is not meant to be used by @@ -1419,7 +1422,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#163 + # source://minitest//lib/minitest/test.rb#162 def after_setup; end # Runs after every test, after teardown. This hook is meant for @@ -1428,7 +1431,7 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#187 + # source://minitest//lib/minitest/test.rb#186 def after_teardown; end # Runs before every test, before setup. This hook is meant for @@ -1463,7 +1466,7 @@ module Minitest::Test::LifecycleHooks # include MyMinitestPlugin # end # - # source://minitest//lib/minitest/test.rb#148 + # source://minitest//lib/minitest/test.rb#147 def before_setup; end # Runs after every test, before teardown. This hook is meant for @@ -1472,19 +1475,19 @@ module Minitest::Test::LifecycleHooks # # See #before_setup for an example. # - # source://minitest//lib/minitest/test.rb#172 + # source://minitest//lib/minitest/test.rb#171 def before_teardown; end # Runs before every test. Use this to set up before each test # run. # - # source://minitest//lib/minitest/test.rb#154 + # source://minitest//lib/minitest/test.rb#153 def setup; end # Runs after every test. Use this to clean up after each test # run. # - # source://minitest//lib/minitest/test.rb#178 + # source://minitest//lib/minitest/test.rb#177 def teardown; end end @@ -1499,37 +1502,45 @@ Minitest::Test::TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) # Assertion wrapping an unexpected error that was raised during a run. # -# source://minitest//lib/minitest.rb#1001 +# source://minitest//lib/minitest.rb#1058 class Minitest::UnexpectedError < ::Minitest::Assertion include ::Minitest::Compress # @return [UnexpectedError] a new instance of UnexpectedError # - # source://minitest//lib/minitest.rb#1007 + # source://minitest//lib/minitest.rb#1064 def initialize(error); end - # source://minitest//lib/minitest.rb#1020 + # source://minitest//lib/minitest.rb#1077 def backtrace; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#1005 + # source://minitest//lib/minitest.rb#1062 def error; end # TODO: figure out how to use `cause` instead # - # source://minitest//lib/minitest.rb#1005 + # source://minitest//lib/minitest.rb#1062 def error=(_arg0); end - # source://minitest//lib/minitest.rb#1026 + # source://minitest//lib/minitest.rb#1083 def message; end - # source://minitest//lib/minitest.rb#1032 + # source://minitest//lib/minitest.rb#1089 def result_label; end end -# source://minitest//lib/minitest.rb#1024 +# source://minitest//lib/minitest.rb#1081 Minitest::UnexpectedError::BASE_RE = T.let(T.unsafe(nil), Regexp) +# Assertion raised on warning when running in -Werror mode. +# +# source://minitest//lib/minitest.rb#1097 +class Minitest::UnexpectedWarning < ::Minitest::Assertion + # source://minitest//lib/minitest.rb#1098 + def result_label; end +end + # source://minitest//lib/minitest.rb#12 Minitest::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi b/sorbet/rbi/gems/mixlib-shellout@3.2.8.rbi similarity index 99% rename from sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi rename to sorbet/rbi/gems/mixlib-shellout@3.2.8.rbi index 451d9444d..c55c32356 100644 --- a/sorbet/rbi/gems/mixlib-shellout@3.2.7.rbi +++ b/sorbet/rbi/gems/mixlib-shellout@3.2.8.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `mixlib-shellout` gem. # Please instead update this file by running `bin/tapioca gem mixlib-shellout`. + # source://mixlib-shellout//lib/mixlib/shellout/exceptions.rb#1 module Mixlib; end diff --git a/sorbet/rbi/gems/net-http@0.4.1.rbi b/sorbet/rbi/gems/net-http@0.4.1.rbi new file mode 100644 index 000000000..bae87a83c --- /dev/null +++ b/sorbet/rbi/gems/net-http@0.4.1.rbi @@ -0,0 +1,4039 @@ +# typed: false + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `net-http` gem. +# Please instead update this file by running `bin/tapioca gem net-http`. + + +# \Class \Net::HTTP provides a rich library that implements the client +# in a client-server model that uses the \HTTP request-response protocol. +# For information about \HTTP, see: +# +# - {Hypertext Transfer Protocol}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol]. +# - {Technical overview}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Technical_overview]. +# +# == About the Examples +# +# :include: doc/net-http/examples.rdoc +# +# == Strategies +# +# - If you will make only a few GET requests, +# consider using {OpenURI}[https://docs.ruby-lang.org/en/master/OpenURI.html]. +# - If you will make only a few requests of all kinds, +# consider using the various singleton convenience methods in this class. +# Each of the following methods automatically starts and finishes +# a {session}[rdoc-ref:Net::HTTP@Sessions] that sends a single request: +# +# # Return string response body. +# Net::HTTP.get(hostname, path) +# Net::HTTP.get(uri) +# +# # Write string response body to $stdout. +# Net::HTTP.get_print(hostname, path) +# Net::HTTP.get_print(uri) +# +# # Return response as Net::HTTPResponse object. +# Net::HTTP.get_response(hostname, path) +# Net::HTTP.get_response(uri) +# data = '{"title": "foo", "body": "bar", "userId": 1}' +# Net::HTTP.post(uri, data) +# params = {title: 'foo', body: 'bar', userId: 1} +# Net::HTTP.post_form(uri, params) +# +# - If performance is important, consider using sessions, which lower request overhead. +# This {session}[rdoc-ref:Net::HTTP@Sessions] has multiple requests for +# {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods] +# and {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]: +# +# Net::HTTP.start(hostname) do |http| +# # Session started automatically before block execution. +# http.get(path) +# http.head(path) +# body = 'Some text' +# http.post(path, body) # Can also have a block. +# http.put(path, body) +# http.delete(path) +# http.options(path) +# http.trace(path) +# http.patch(path, body) # Can also have a block. +# http.copy(path) +# http.lock(path, body) +# http.mkcol(path, body) +# http.move(path) +# http.propfind(path, body) +# http.proppatch(path, body) +# http.unlock(path, body) +# # Session finished automatically at block exit. +# end +# +# The methods cited above are convenience methods that, via their few arguments, +# allow minimal control over the requests. +# For greater control, consider using {request objects}[rdoc-ref:Net::HTTPRequest]. +# +# == URIs +# +# On the internet, a URI +# ({Universal Resource Identifier}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier]) +# is a string that identifies a particular resource. +# It consists of some or all of: scheme, hostname, path, query, and fragment; +# see {URI syntax}[https://en.wikipedia.org/wiki/Uniform_Resource_Identifier#Syntax]. +# +# A Ruby {URI::Generic}[https://docs.ruby-lang.org/en/master/URI/Generic.html] object +# represents an internet URI. +# It provides, among others, methods +# +scheme+, +hostname+, +path+, +query+, and +fragment+. +# +# === Schemes +# +# An internet \URI has +# a {scheme}[https://en.wikipedia.org/wiki/List_of_URI_schemes]. +# +# The two schemes supported in \Net::HTTP are 'https' and 'http': +# +# uri.scheme # => "https" +# URI('http://example.com').scheme # => "http" +# +# === Hostnames +# +# A hostname identifies a server (host) to which requests may be sent: +# +# hostname = uri.hostname # => "jsonplaceholder.typicode.com" +# Net::HTTP.start(hostname) do |http| +# # Some HTTP stuff. +# end +# +# === Paths +# +# A host-specific path identifies a resource on the host: +# +# _uri = uri.dup +# _uri.path = '/todos/1' +# hostname = _uri.hostname +# path = _uri.path +# Net::HTTP.get(hostname, path) +# +# === Queries +# +# A host-specific query adds name/value pairs to the URI: +# +# _uri = uri.dup +# params = {userId: 1, completed: false} +# _uri.query = URI.encode_www_form(params) +# _uri # => # +# Net::HTTP.get(_uri) +# +# === Fragments +# +# A {URI fragment}[https://en.wikipedia.org/wiki/URI_fragment] has no effect +# in \Net::HTTP; +# the same data is returned, regardless of whether a fragment is included. +# +# == Request Headers +# +# Request headers may be used to pass additional information to the host, +# similar to arguments passed in a method call; +# each header is a name/value pair. +# +# Each of the \Net::HTTP methods that sends a request to the host +# has optional argument +headers+, +# where the headers are expressed as a hash of field-name/value pairs: +# +# headers = {Accept: 'application/json', Connection: 'Keep-Alive'} +# Net::HTTP.get(uri, headers) +# +# See lists of both standard request fields and common request fields at +# {Request Fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields]. +# A host may also accept other custom fields. +# +# == \HTTP Sessions +# +# A _session_ is a connection between a server (host) and a client that: +# +# - Is begun by instance method Net::HTTP#start. +# - May contain any number of requests. +# - Is ended by instance method Net::HTTP#finish. +# +# See example sessions at {Strategies}[rdoc-ref:Net::HTTP@Strategies]. +# +# === Session Using \Net::HTTP.start +# +# If you have many requests to make to a single host (and port), +# consider using singleton method Net::HTTP.start with a block; +# the method handles the session automatically by: +# +# - Calling #start before block execution. +# - Executing the block. +# - Calling #finish after block execution. +# +# In the block, you can use these instance methods, +# each of which that sends a single request: +# +# - {HTTP methods}[https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods]: +# +# - #get, #request_get: GET. +# - #head, #request_head: HEAD. +# - #post, #request_post: POST. +# - #delete: DELETE. +# - #options: OPTIONS. +# - #trace: TRACE. +# - #patch: PATCH. +# +# - {WebDAV methods}[https://en.wikipedia.org/wiki/WebDAV#Implementation]: +# +# - #copy: COPY. +# - #lock: LOCK. +# - #mkcol: MKCOL. +# - #move: MOVE. +# - #propfind: PROPFIND. +# - #proppatch: PROPPATCH. +# - #unlock: UNLOCK. +# +# === Session Using \Net::HTTP.start and \Net::HTTP.finish +# +# You can manage a session manually using methods #start and #finish: +# +# http = Net::HTTP.new(hostname) +# http.start +# http.get('/todos/1') +# http.get('/todos/2') +# http.delete('/posts/1') +# http.finish # Needed to free resources. +# +# === Single-Request Session +# +# Certain convenience methods automatically handle a session by: +# +# - Creating an \HTTP object +# - Starting a session. +# - Sending a single request. +# - Finishing the session. +# - Destroying the object. +# +# Such methods that send GET requests: +# +# - ::get: Returns the string response body. +# - ::get_print: Writes the string response body to $stdout. +# - ::get_response: Returns a Net::HTTPResponse object. +# +# Such methods that send POST requests: +# +# - ::post: Posts data to the host. +# - ::post_form: Posts form data to the host. +# +# == \HTTP Requests and Responses +# +# Many of the methods above are convenience methods, +# each of which sends a request and returns a string +# without directly using \Net::HTTPRequest and \Net::HTTPResponse objects. +# +# You can, however, directly create a request object, send the request, +# and retrieve the response object; see: +# +# - Net::HTTPRequest. +# - Net::HTTPResponse. +# +# == Following Redirection +# +# Each returned response is an instance of a subclass of Net::HTTPResponse. +# See the {response class hierarchy}[rdoc-ref:Net::HTTPResponse@Response+Subclasses]. +# +# In particular, class Net::HTTPRedirection is the parent +# of all redirection classes. +# This allows you to craft a case statement to handle redirections properly: +# +# def fetch(uri, limit = 10) +# # You should choose a better exception. +# raise ArgumentError, 'Too many HTTP redirects' if limit == 0 +# +# res = Net::HTTP.get_response(URI(uri)) +# case res +# when Net::HTTPSuccess # Any success class. +# res +# when Net::HTTPRedirection # Any redirection class. +# location = res['Location'] +# warn "Redirected to #{location}" +# fetch(location, limit - 1) +# else # Any other class. +# res.value +# end +# end +# +# fetch(uri) +# +# == Basic Authentication +# +# Basic authentication is performed according to +# {RFC2617}[http://www.ietf.org/rfc/rfc2617.txt]: +# +# req = Net::HTTP::Get.new(uri) +# req.basic_auth('user', 'pass') +# res = Net::HTTP.start(hostname) do |http| +# http.request(req) +# end +# +# == Streaming Response Bodies +# +# By default \Net::HTTP reads an entire response into memory. If you are +# handling large files or wish to implement a progress bar you can instead +# stream the body directly to an IO. +# +# Net::HTTP.start(hostname) do |http| +# req = Net::HTTP::Get.new(uri) +# http.request(req) do |res| +# open('t.tmp', 'w') do |f| +# res.read_body do |chunk| +# f.write chunk +# end +# end +# end +# end +# +# == HTTPS +# +# HTTPS is enabled for an \HTTP connection by Net::HTTP#use_ssl=: +# +# Net::HTTP.start(hostname, :use_ssl => true) do |http| +# req = Net::HTTP::Get.new(uri) +# res = http.request(req) +# end +# +# Or if you simply want to make a GET request, you may pass in a URI +# object that has an \HTTPS URL. \Net::HTTP automatically turns on TLS +# verification if the URI object has a 'https' URI scheme: +# +# uri # => # +# Net::HTTP.get(uri) +# +# == Proxy Server +# +# An \HTTP object can have +# a {proxy server}[https://en.wikipedia.org/wiki/Proxy_server]. +# +# You can create an \HTTP object with a proxy server +# using method Net::HTTP.new or method Net::HTTP.start. +# +# The proxy may be defined either by argument +p_addr+ +# or by environment variable 'http_proxy'. +# +# === Proxy Using Argument +p_addr+ as a \String +# +# When argument +p_addr+ is a string hostname, +# the returned +http+ has the given host as its proxy: +# +# http = Net::HTTP.new(hostname, nil, 'proxy.example') +# http.proxy? # => true +# http.proxy_from_env? # => false +# http.proxy_address # => "proxy.example" +# # These use default values. +# http.proxy_port # => 80 +# http.proxy_user # => nil +# http.proxy_pass # => nil +# +# The port, username, and password for the proxy may also be given: +# +# http = Net::HTTP.new(hostname, nil, 'proxy.example', 8000, 'pname', 'ppass') +# # => # +# http.proxy? # => true +# http.proxy_from_env? # => false +# http.proxy_address # => "proxy.example" +# http.proxy_port # => 8000 +# http.proxy_user # => "pname" +# http.proxy_pass # => "ppass" +# +# === Proxy Using 'ENV['http_proxy']' +# +# When environment variable 'http_proxy' +# is set to a \URI string, +# the returned +http+ will have the server at that URI as its proxy; +# note that the \URI string must have a protocol +# such as 'http' or 'https': +# +# ENV['http_proxy'] = 'http://example.com' +# http = Net::HTTP.new(hostname) +# http.proxy? # => true +# http.proxy_from_env? # => true +# http.proxy_address # => "example.com" +# # These use default values. +# http.proxy_port # => 80 +# http.proxy_user # => nil +# http.proxy_pass # => nil +# +# The \URI string may include proxy username, password, and port number: +# +# ENV['http_proxy'] = 'http://pname:ppass@example.com:8000' +# http = Net::HTTP.new(hostname) +# http.proxy? # => true +# http.proxy_from_env? # => true +# http.proxy_address # => "example.com" +# http.proxy_port # => 8000 +# http.proxy_user # => "pname" +# http.proxy_pass # => "ppass" +# +# === Filtering Proxies +# +# With method Net::HTTP.new (but not Net::HTTP.start), +# you can use argument +p_no_proxy+ to filter proxies: +# +# - Reject a certain address: +# +# http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example') +# http.proxy_address # => nil +# +# - Reject certain domains or subdomains: +# +# http = Net::HTTP.new('example.com', nil, 'my.proxy.example', 8000, 'pname', 'ppass', 'proxy.example') +# http.proxy_address # => nil +# +# - Reject certain addresses and port combinations: +# +# http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:1234') +# http.proxy_address # => "proxy.example" +# +# http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'proxy.example:8000') +# http.proxy_address # => nil +# +# - Reject a list of the types above delimited using a comma: +# +# http = Net::HTTP.new('example.com', nil, 'proxy.example', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000') +# http.proxy_address # => nil +# +# http = Net::HTTP.new('example.com', nil, 'my.proxy', 8000, 'pname', 'ppass', 'my.proxy,proxy.example:8000') +# http.proxy_address # => nil +# +# == Compression and Decompression +# +# \Net::HTTP does not compress the body of a request before sending. +# +# By default, \Net::HTTP adds header 'Accept-Encoding' +# to a new {request object}[rdoc-ref:Net::HTTPRequest]: +# +# Net::HTTP::Get.new(uri)['Accept-Encoding'] +# # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" +# +# This requests the server to zip-encode the response body if there is one; +# the server is not required to do so. +# +# \Net::HTTP does not automatically decompress a response body +# if the response has header 'Content-Range'. +# +# Otherwise decompression (or not) depends on the value of header +# {Content-Encoding}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-encoding-response-header]: +# +# - 'deflate', 'gzip', or 'x-gzip': +# decompresses the body and deletes the header. +# - 'none' or 'identity': +# does not decompress the body, but deletes the header. +# - Any other value: +# leaves the body and header unchanged. +# +# == What's Here +# +# This is a categorized summary of methods and attributes. +# +# === \Net::HTTP Objects +# +# - {::new}[rdoc-ref:Net::HTTP.new]: +# Creates a new instance. +# - {#inspect}[rdoc-ref:Net::HTTP#inspect]: +# Returns a string representation of +self+. +# +# === Sessions +# +# - {::start}[rdoc-ref:Net::HTTP.start]: +# Begins a new session in a new \Net::HTTP object. +# - {#started?}[rdoc-ref:Net::HTTP#started?] +# (aliased as {#active?}[rdoc-ref:Net::HTTP#active?]): +# Returns whether in a session. +# - {#finish}[rdoc-ref:Net::HTTP#finish]: +# Ends an active session. +# - {#start}[rdoc-ref:Net::HTTP#start]: +# Begins a new session in an existing \Net::HTTP object (+self+). +# +# === Connections +# +# - {:continue_timeout}[rdoc-ref:Net::HTTP#continue_timeout]: +# Returns the continue timeout. +# - {#continue_timeout=}[rdoc-ref:Net::HTTP#continue_timeout=]: +# Sets the continue timeout seconds. +# - {:keep_alive_timeout}[rdoc-ref:Net::HTTP#keep_alive_timeout]: +# Returns the keep-alive timeout. +# - {:keep_alive_timeout=}[rdoc-ref:Net::HTTP#keep_alive_timeout=]: +# Sets the keep-alive timeout. +# - {:max_retries}[rdoc-ref:Net::HTTP#max_retries]: +# Returns the maximum retries. +# - {#max_retries=}[rdoc-ref:Net::HTTP#max_retries=]: +# Sets the maximum retries. +# - {:open_timeout}[rdoc-ref:Net::HTTP#open_timeout]: +# Returns the open timeout. +# - {:open_timeout=}[rdoc-ref:Net::HTTP#open_timeout=]: +# Sets the open timeout. +# - {:read_timeout}[rdoc-ref:Net::HTTP#read_timeout]: +# Returns the open timeout. +# - {:read_timeout=}[rdoc-ref:Net::HTTP#read_timeout=]: +# Sets the read timeout. +# - {:ssl_timeout}[rdoc-ref:Net::HTTP#ssl_timeout]: +# Returns the ssl timeout. +# - {:ssl_timeout=}[rdoc-ref:Net::HTTP#ssl_timeout=]: +# Sets the ssl timeout. +# - {:write_timeout}[rdoc-ref:Net::HTTP#write_timeout]: +# Returns the write timeout. +# - {write_timeout=}[rdoc-ref:Net::HTTP#write_timeout=]: +# Sets the write timeout. +# +# === Requests +# +# - {::get}[rdoc-ref:Net::HTTP.get]: +# Sends a GET request and returns the string response body. +# - {::get_print}[rdoc-ref:Net::HTTP.get_print]: +# Sends a GET request and write the string response body to $stdout. +# - {::get_response}[rdoc-ref:Net::HTTP.get_response]: +# Sends a GET request and returns a response object. +# - {::post_form}[rdoc-ref:Net::HTTP.post_form]: +# Sends a POST request with form data and returns a response object. +# - {::post}[rdoc-ref:Net::HTTP.post]: +# Sends a POST request with data and returns a response object. +# - {#copy}[rdoc-ref:Net::HTTP#copy]: +# Sends a COPY request and returns a response object. +# - {#delete}[rdoc-ref:Net::HTTP#delete]: +# Sends a DELETE request and returns a response object. +# - {#get}[rdoc-ref:Net::HTTP#get]: +# Sends a GET request and returns a response object. +# - {#head}[rdoc-ref:Net::HTTP#head]: +# Sends a HEAD request and returns a response object. +# - {#lock}[rdoc-ref:Net::HTTP#lock]: +# Sends a LOCK request and returns a response object. +# - {#mkcol}[rdoc-ref:Net::HTTP#mkcol]: +# Sends a MKCOL request and returns a response object. +# - {#move}[rdoc-ref:Net::HTTP#move]: +# Sends a MOVE request and returns a response object. +# - {#options}[rdoc-ref:Net::HTTP#options]: +# Sends a OPTIONS request and returns a response object. +# - {#patch}[rdoc-ref:Net::HTTP#patch]: +# Sends a PATCH request and returns a response object. +# - {#post}[rdoc-ref:Net::HTTP#post]: +# Sends a POST request and returns a response object. +# - {#propfind}[rdoc-ref:Net::HTTP#propfind]: +# Sends a PROPFIND request and returns a response object. +# - {#proppatch}[rdoc-ref:Net::HTTP#proppatch]: +# Sends a PROPPATCH request and returns a response object. +# - {#put}[rdoc-ref:Net::HTTP#put]: +# Sends a PUT request and returns a response object. +# - {#request}[rdoc-ref:Net::HTTP#request]: +# Sends a request and returns a response object. +# - {#request_get}[rdoc-ref:Net::HTTP#request_get] +# (aliased as {#get2}[rdoc-ref:Net::HTTP#get2]): +# Sends a GET request and forms a response object; +# if a block given, calls the block with the object, +# otherwise returns the object. +# - {#request_head}[rdoc-ref:Net::HTTP#request_head] +# (aliased as {#head2}[rdoc-ref:Net::HTTP#head2]): +# Sends a HEAD request and forms a response object; +# if a block given, calls the block with the object, +# otherwise returns the object. +# - {#request_post}[rdoc-ref:Net::HTTP#request_post] +# (aliased as {#post2}[rdoc-ref:Net::HTTP#post2]): +# Sends a POST request and forms a response object; +# if a block given, calls the block with the object, +# otherwise returns the object. +# - {#send_request}[rdoc-ref:Net::HTTP#send_request]: +# Sends a request and returns a response object. +# - {#trace}[rdoc-ref:Net::HTTP#trace]: +# Sends a TRACE request and returns a response object. +# - {#unlock}[rdoc-ref:Net::HTTP#unlock]: +# Sends an UNLOCK request and returns a response object. +# +# === Responses +# +# - {:close_on_empty_response}[rdoc-ref:Net::HTTP#close_on_empty_response]: +# Returns whether to close connection on empty response. +# - {:close_on_empty_response=}[rdoc-ref:Net::HTTP#close_on_empty_response=]: +# Sets whether to close connection on empty response. +# - {:ignore_eof}[rdoc-ref:Net::HTTP#ignore_eof]: +# Returns whether to ignore end-of-file when reading a response body +# with Content-Length headers. +# - {:ignore_eof=}[rdoc-ref:Net::HTTP#ignore_eof=]: +# Sets whether to ignore end-of-file when reading a response body +# with Content-Length headers. +# - {:response_body_encoding}[rdoc-ref:Net::HTTP#response_body_encoding]: +# Returns the encoding to use for the response body. +# - {#response_body_encoding=}[rdoc-ref:Net::HTTP#response_body_encoding=]: +# Sets the response body encoding. +# +# === Proxies +# +# - {:proxy_address}[rdoc-ref:Net::HTTP#proxy_address]: +# Returns the proxy address. +# - {:proxy_address=}[rdoc-ref:Net::HTTP#proxy_address=]: +# Sets the proxy address. +# - {::proxy_class?}[rdoc-ref:Net::HTTP.proxy_class?]: +# Returns whether +self+ is a proxy class. +# - {#proxy?}[rdoc-ref:Net::HTTP#proxy?]: +# Returns whether +self+ has a proxy. +# - {#proxy_address}[rdoc-ref:Net::HTTP#proxy_address] +# (aliased as {#proxyaddr}[rdoc-ref:Net::HTTP#proxyaddr]): +# Returns the proxy address. +# - {#proxy_from_env?}[rdoc-ref:Net::HTTP#proxy_from_env?]: +# Returns whether the proxy is taken from an environment variable. +# - {:proxy_from_env=}[rdoc-ref:Net::HTTP#proxy_from_env=]: +# Sets whether the proxy is to be taken from an environment variable. +# - {:proxy_pass}[rdoc-ref:Net::HTTP#proxy_pass]: +# Returns the proxy password. +# - {:proxy_pass=}[rdoc-ref:Net::HTTP#proxy_pass=]: +# Sets the proxy password. +# - {:proxy_port}[rdoc-ref:Net::HTTP#proxy_port]: +# Returns the proxy port. +# - {:proxy_port=}[rdoc-ref:Net::HTTP#proxy_port=]: +# Sets the proxy port. +# - {#proxy_user}[rdoc-ref:Net::HTTP#proxy_user]: +# Returns the proxy user name. +# - {:proxy_user=}[rdoc-ref:Net::HTTP#proxy_user=]: +# Sets the proxy user. +# +# === Security +# +# - {:ca_file}[rdoc-ref:Net::HTTP#ca_file]: +# Returns the path to a CA certification file. +# - {:ca_file=}[rdoc-ref:Net::HTTP#ca_file=]: +# Sets the path to a CA certification file. +# - {:ca_path}[rdoc-ref:Net::HTTP#ca_path]: +# Returns the path of to CA directory containing certification files. +# - {:ca_path=}[rdoc-ref:Net::HTTP#ca_path=]: +# Sets the path of to CA directory containing certification files. +# - {:cert}[rdoc-ref:Net::HTTP#cert]: +# Returns the OpenSSL::X509::Certificate object to be used for client certification. +# - {:cert=}[rdoc-ref:Net::HTTP#cert=]: +# Sets the OpenSSL::X509::Certificate object to be used for client certification. +# - {:cert_store}[rdoc-ref:Net::HTTP#cert_store]: +# Returns the X509::Store to be used for verifying peer certificate. +# - {:cert_store=}[rdoc-ref:Net::HTTP#cert_store=]: +# Sets the X509::Store to be used for verifying peer certificate. +# - {:ciphers}[rdoc-ref:Net::HTTP#ciphers]: +# Returns the available SSL ciphers. +# - {:ciphers=}[rdoc-ref:Net::HTTP#ciphers=]: +# Sets the available SSL ciphers. +# - {:extra_chain_cert}[rdoc-ref:Net::HTTP#extra_chain_cert]: +# Returns the extra X509 certificates to be added to the certificate chain. +# - {:extra_chain_cert=}[rdoc-ref:Net::HTTP#extra_chain_cert=]: +# Sets the extra X509 certificates to be added to the certificate chain. +# - {:key}[rdoc-ref:Net::HTTP#key]: +# Returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. +# - {:key=}[rdoc-ref:Net::HTTP#key=]: +# Sets the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. +# - {:max_version}[rdoc-ref:Net::HTTP#max_version]: +# Returns the maximum SSL version. +# - {:max_version=}[rdoc-ref:Net::HTTP#max_version=]: +# Sets the maximum SSL version. +# - {:min_version}[rdoc-ref:Net::HTTP#min_version]: +# Returns the minimum SSL version. +# - {:min_version=}[rdoc-ref:Net::HTTP#min_version=]: +# Sets the minimum SSL version. +# - {#peer_cert}[rdoc-ref:Net::HTTP#peer_cert]: +# Returns the X509 certificate chain for the session's socket peer. +# - {:ssl_version}[rdoc-ref:Net::HTTP#ssl_version]: +# Returns the SSL version. +# - {:ssl_version=}[rdoc-ref:Net::HTTP#ssl_version=]: +# Sets the SSL version. +# - {#use_ssl=}[rdoc-ref:Net::HTTP#use_ssl=]: +# Sets whether a new session is to use Transport Layer Security. +# - {#use_ssl?}[rdoc-ref:Net::HTTP#use_ssl?]: +# Returns whether +self+ uses SSL. +# - {:verify_callback}[rdoc-ref:Net::HTTP#verify_callback]: +# Returns the callback for the server certification verification. +# - {:verify_callback=}[rdoc-ref:Net::HTTP#verify_callback=]: +# Sets the callback for the server certification verification. +# - {:verify_depth}[rdoc-ref:Net::HTTP#verify_depth]: +# Returns the maximum depth for the certificate chain verification. +# - {:verify_depth=}[rdoc-ref:Net::HTTP#verify_depth=]: +# Sets the maximum depth for the certificate chain verification. +# - {:verify_hostname}[rdoc-ref:Net::HTTP#verify_hostname]: +# Returns the flags for server the certification verification at the beginning of the SSL/TLS session. +# - {:verify_hostname=}[rdoc-ref:Net::HTTP#verify_hostname=]: +# Sets he flags for server the certification verification at the beginning of the SSL/TLS session. +# - {:verify_mode}[rdoc-ref:Net::HTTP#verify_mode]: +# Returns the flags for server the certification verification at the beginning of the SSL/TLS session. +# - {:verify_mode=}[rdoc-ref:Net::HTTP#verify_mode=]: +# Sets the flags for server the certification verification at the beginning of the SSL/TLS session. +# +# === Addresses and Ports +# +# - {:address}[rdoc-ref:Net::HTTP#address]: +# Returns the string host name or host IP. +# - {::default_port}[rdoc-ref:Net::HTTP.default_port]: +# Returns integer 80, the default port to use for HTTP requests. +# - {::http_default_port}[rdoc-ref:Net::HTTP.http_default_port]: +# Returns integer 80, the default port to use for HTTP requests. +# - {::https_default_port}[rdoc-ref:Net::HTTP.https_default_port]: +# Returns integer 443, the default port to use for HTTPS requests. +# - {#ipaddr}[rdoc-ref:Net::HTTP#ipaddr]: +# Returns the IP address for the connection. +# - {#ipaddr=}[rdoc-ref:Net::HTTP#ipaddr=]: +# Sets the IP address for the connection. +# - {:local_host}[rdoc-ref:Net::HTTP#local_host]: +# Returns the string local host used to establish the connection. +# - {:local_host=}[rdoc-ref:Net::HTTP#local_host=]: +# Sets the string local host used to establish the connection. +# - {:local_port}[rdoc-ref:Net::HTTP#local_port]: +# Returns the integer local port used to establish the connection. +# - {:local_port=}[rdoc-ref:Net::HTTP#local_port=]: +# Sets the integer local port used to establish the connection. +# - {:port}[rdoc-ref:Net::HTTP#port]: +# Returns the integer port number. +# +# === \HTTP Version +# +# - {::version_1_2?}[rdoc-ref:Net::HTTP.version_1_2?] +# (aliased as {::is_version_1_2?}[rdoc-ref:Net::HTTP.is_version_1_2?] +# and {::version_1_2}[rdoc-ref:Net::HTTP.version_1_2]): +# Returns true; retained for compatibility. +# +# === Debugging +# +# - {#set_debug_output}[rdoc-ref:Net::HTTP#set_debug_output]: +# Sets the output stream for debugging. +# +# source://net-http//lib/net/http.rb#722 +class Net::HTTP < ::Net::Protocol + # Creates a new \Net::HTTP object for the specified server address, + # without opening the TCP connection or initializing the \HTTP session. + # The +address+ should be a DNS hostname or IP address. + # + # @return [HTTP] a new instance of HTTP + # + # source://net-http//lib/net/http.rb#1093 + def initialize(address, port = T.unsafe(nil)); end + + # Returns +true+ if the \HTTP session has been started: + # + # http = Net::HTTP.new(hostname) + # http.started? # => false + # http.start + # http.started? # => true + # http.finish # => nil + # http.started? # => false + # + # Net::HTTP.start(hostname) do |http| + # http.started? + # end # => true + # http.started? # => false + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#1413 + def active?; end + + # Returns the string host name or host IP given as argument +address+ in ::new. + # + # source://net-http//lib/net/http.rb#1194 + def address; end + + # Sets or returns the path to a CA certification file in PEM format. + # + # source://net-http//lib/net/http.rb#1479 + def ca_file; end + + # Sets or returns the path to a CA certification file in PEM format. + # + # source://net-http//lib/net/http.rb#1479 + def ca_file=(_arg0); end + + # Sets or returns the path of to CA directory + # containing certification files in PEM format. + # + # source://net-http//lib/net/http.rb#1483 + def ca_path; end + + # Sets or returns the path of to CA directory + # containing certification files in PEM format. + # + # source://net-http//lib/net/http.rb#1483 + def ca_path=(_arg0); end + + # Sets or returns the OpenSSL::X509::Certificate object + # to be used for client certification. + # + # source://net-http//lib/net/http.rb#1487 + def cert; end + + # Sets or returns the OpenSSL::X509::Certificate object + # to be used for client certification. + # + # source://net-http//lib/net/http.rb#1487 + def cert=(_arg0); end + + # Sets or returns the X509::Store to be used for verifying peer certificate. + # + # source://net-http//lib/net/http.rb#1490 + def cert_store; end + + # Sets or returns the X509::Store to be used for verifying peer certificate. + # + # source://net-http//lib/net/http.rb#1490 + def cert_store=(_arg0); end + + # Sets or returns the available SSL ciphers. + # See {OpenSSL::SSL::SSLContext#ciphers=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ciphers-3D]. + # + # source://net-http//lib/net/http.rb#1494 + def ciphers; end + + # Sets or returns the available SSL ciphers. + # See {OpenSSL::SSL::SSLContext#ciphers=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ciphers-3D]. + # + # source://net-http//lib/net/http.rb#1494 + def ciphers=(_arg0); end + + # Sets or returns whether to close the connection when the response is empty; + # initially +false+. + # + # source://net-http//lib/net/http.rb#1421 + def close_on_empty_response; end + + # Sets or returns whether to close the connection when the response is empty; + # initially +false+. + # + # source://net-http//lib/net/http.rb#1421 + def close_on_empty_response=(_arg0); end + + # Returns the continue timeout value; + # see continue_timeout=. + # + # source://net-http//lib/net/http.rb#1374 + def continue_timeout; end + + # Sets the continue timeout value, + # which is the number of seconds to wait for an expected 100 Continue response. + # If the \HTTP object does not receive a response in this many seconds + # it sends the request body. + # + # source://net-http//lib/net/http.rb#1380 + def continue_timeout=(sec); end + + # Sends a COPY request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Copy object + # created from string +path+ and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.copy('/todos/1') + # + # source://net-http//lib/net/http.rb#2123 + def copy(path, initheader = T.unsafe(nil)); end + + # Sends a DELETE request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Delete object + # created from string +path+ and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.delete('/todos/1') + # + # source://net-http//lib/net/http.rb#2097 + def delete(path, initheader = T.unsafe(nil)); end + + # Sets or returns the extra X509 certificates to be added to the certificate chain. + # See {OpenSSL::SSL::SSLContext#add_certificate}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-add_certificate]. + # + # source://net-http//lib/net/http.rb#1498 + def extra_chain_cert; end + + # Sets or returns the extra X509 certificates to be added to the certificate chain. + # See {OpenSSL::SSL::SSLContext#add_certificate}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-add_certificate]. + # + # source://net-http//lib/net/http.rb#1498 + def extra_chain_cert=(_arg0); end + + # Finishes the \HTTP session: + # + # http = Net::HTTP.new(hostname) + # http.start + # http.started? # => true + # http.finish # => nil + # http.started? # => false + # + # Raises IOError if not in a session. + # + # @raise [IOError] + # + # source://net-http//lib/net/http.rb#1708 + def finish; end + + # :call-seq: + # get(path, initheader = nil) {|res| ... } + # + # Sends a GET request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Get object + # created from string +path+ and initial headers hash +initheader+. + # + # With a block given, calls the block with the response body: + # + # http = Net::HTTP.new(hostname) + # http.get('/todos/1') do |res| + # p res + # end # => # + # + # Output: + # + # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}" + # + # With no block given, simply returns the response object: + # + # http.get('/') # => # + # + # Related: + # + # - Net::HTTP::Get: request class for \HTTP method GET. + # - Net::HTTP.get: sends GET request, returns response body. + # + # source://net-http//lib/net/http.rb#1914 + def get(path, initheader = T.unsafe(nil), dest = T.unsafe(nil), &block); end + + # Sends a GET request to the server; + # forms the response into a Net::HTTPResponse object. + # + # The request is based on the Net::HTTP::Get object + # created from string +path+ and initial headers hash +initheader+. + # + # With no block given, returns the response object: + # + # http = Net::HTTP.new(hostname) + # http.request_get('/todos') # => # + # + # With a block given, calls the block with the response object + # and returns the response object: + # + # http.request_get('/todos') do |res| + # p res + # end # => # + # + # Output: + # + # # + # + # source://net-http//lib/net/http.rb#2176 + def get2(path, initheader = T.unsafe(nil), &block); end + + # Sends a HEAD request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Head object + # created from string +path+ and initial headers hash +initheader+: + # + # res = http.head('/todos/1') # => # + # res.body # => nil + # res.to_hash.take(3) + # # => + # [["date", ["Wed, 15 Feb 2023 15:25:42 GMT"]], + # ["content-type", ["application/json; charset=utf-8"]], + # ["connection", ["close"]]] + # + # source://net-http//lib/net/http.rb#1938 + def head(path, initheader = T.unsafe(nil)); end + + # Sends a HEAD request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Head object + # created from string +path+ and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.head('/todos/1') # => # + # + # source://net-http//lib/net/http.rb#2189 + def head2(path, initheader = T.unsafe(nil), &block); end + + # Sets or returns whether to ignore end-of-file when reading a response body + # with Content-Length headers; + # initially +true+. + # + # source://net-http//lib/net/http.rb#1397 + def ignore_eof; end + + # Sets or returns whether to ignore end-of-file when reading a response body + # with Content-Length headers; + # initially +true+. + # + # source://net-http//lib/net/http.rb#1397 + def ignore_eof=(_arg0); end + + # Returns a string representation of +self+: + # + # Net::HTTP.new(hostname).inspect + # # => "#" + # + # source://net-http//lib/net/http.rb#1135 + def inspect; end + + # Returns the IP address for the connection. + # + # If the session has not been started, + # returns the value set by #ipaddr=, + # or +nil+ if it has not been set: + # + # http = Net::HTTP.new(hostname) + # http.ipaddr # => nil + # http.ipaddr = '172.67.155.76' + # http.ipaddr # => "172.67.155.76" + # + # If the session has been started, + # returns the IP address from the socket: + # + # http = Net::HTTP.new(hostname) + # http.start + # http.ipaddr # => "172.67.155.76" + # http.finish + # + # source://net-http//lib/net/http.rb#1274 + def ipaddr; end + + # Sets the IP address for the connection: + # + # http = Net::HTTP.new(hostname) + # http.ipaddr # => nil + # http.ipaddr = '172.67.155.76' + # http.ipaddr # => "172.67.155.76" + # + # The IP address may not be set if the session has been started. + # + # @raise [IOError] + # + # source://net-http//lib/net/http.rb#1286 + def ipaddr=(addr); end + + # Sets or returns the numeric (\Integer or \Float) number of seconds + # to keep the connection open after a request is sent; + # initially 2. + # If a new request is made during the given interval, + # the still-open connection is used; + # otherwise the connection will have been closed + # and a new connection is opened. + # + # source://net-http//lib/net/http.rb#1392 + def keep_alive_timeout; end + + # Sets or returns the numeric (\Integer or \Float) number of seconds + # to keep the connection open after a request is sent; + # initially 2. + # If a new request is made during the given interval, + # the still-open connection is used; + # otherwise the connection will have been closed + # and a new connection is opened. + # + # source://net-http//lib/net/http.rb#1392 + def keep_alive_timeout=(_arg0); end + + # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. + # + # source://net-http//lib/net/http.rb#1501 + def key; end + + # Sets or returns the OpenSSL::PKey::RSA or OpenSSL::PKey::DSA object. + # + # source://net-http//lib/net/http.rb#1501 + def key=(_arg0); end + + # Sets or returns the string local host used to establish the connection; + # initially +nil+. + # + # source://net-http//lib/net/http.rb#1201 + def local_host; end + + # Sets or returns the string local host used to establish the connection; + # initially +nil+. + # + # source://net-http//lib/net/http.rb#1201 + def local_host=(_arg0); end + + # Sets or returns the integer local port used to establish the connection; + # initially +nil+. + # + # source://net-http//lib/net/http.rb#1205 + def local_port; end + + # Sets or returns the integer local port used to establish the connection; + # initially +nil+. + # + # source://net-http//lib/net/http.rb#1205 + def local_port=(_arg0); end + + # Sends a LOCK request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Lock object + # created from string +path+, string +body+, and initial headers hash +initheader+. + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http = Net::HTTP.new(hostname) + # http.lock('/todos/1', data) + # + # source://net-http//lib/net/http.rb#2043 + def lock(path, body, initheader = T.unsafe(nil)); end + + # Returns the maximum number of times to retry an idempotent request; + # see #max_retries=. + # + # source://net-http//lib/net/http.rb#1330 + def max_retries; end + + # Sets the maximum number of times to retry an idempotent request in case of + # \Net::ReadTimeout, IOError, EOFError, Errno::ECONNRESET, + # Errno::ECONNABORTED, Errno::EPIPE, OpenSSL::SSL::SSLError, + # Timeout::Error. + # The initial value is 1. + # + # Argument +retries+ must be a non-negative numeric value: + # + # http = Net::HTTP.new(hostname) + # http.max_retries = 2 # => 2 + # http.max_retries # => 2 + # + # source://net-http//lib/net/http.rb#1320 + def max_retries=(retries); end + + # Sets or returns the maximum SSL version. + # See {OpenSSL::SSL::SSLContext#max_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D]. + # + # source://net-http//lib/net/http.rb#1516 + def max_version; end + + # Sets or returns the maximum SSL version. + # See {OpenSSL::SSL::SSLContext#max_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-max_version-3D]. + # + # source://net-http//lib/net/http.rb#1516 + def max_version=(_arg0); end + + # Sets or returns the minimum SSL version. + # See {OpenSSL::SSL::SSLContext#min_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D]. + # + # source://net-http//lib/net/http.rb#1512 + def min_version; end + + # Sets or returns the minimum SSL version. + # See {OpenSSL::SSL::SSLContext#min_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D]. + # + # source://net-http//lib/net/http.rb#1512 + def min_version=(_arg0); end + + # Sends a MKCOL request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Mkcol object + # created from string +path+, string +body+, and initial headers hash +initheader+. + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http.mkcol('/todos/1', data) + # http = Net::HTTP.new(hostname) + # + # source://net-http//lib/net/http.rb#2137 + def mkcol(path, body = T.unsafe(nil), initheader = T.unsafe(nil)); end + + # Sends a MOVE request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Move object + # created from string +path+ and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.move('/todos/1') + # + # source://net-http//lib/net/http.rb#2110 + def move(path, initheader = T.unsafe(nil)); end + + # Sets or returns the numeric (\Integer or \Float) number of seconds + # to wait for a connection to open; + # initially 60. + # If the connection is not made in the given interval, + # an exception is raised. + # + # source://net-http//lib/net/http.rb#1296 + def open_timeout; end + + # Sets or returns the numeric (\Integer or \Float) number of seconds + # to wait for a connection to open; + # initially 60. + # If the connection is not made in the given interval, + # an exception is raised. + # + # source://net-http//lib/net/http.rb#1296 + def open_timeout=(_arg0); end + + # Sends an Options request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Options object + # created from string +path+ and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.options('/') + # + # source://net-http//lib/net/http.rb#2070 + def options(path, initheader = T.unsafe(nil)); end + + # :call-seq: + # patch(path, data, initheader = nil) {|res| ... } + # + # Sends a PATCH request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Patch object + # created from string +path+, string +data+, and initial headers hash +initheader+. + # + # With a block given, calls the block with the response body: + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http = Net::HTTP.new(hostname) + # http.patch('/todos/1', data) do |res| + # p res + # end # => # + # + # Output: + # + # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false,\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\"\n}" + # + # With no block given, simply returns the response object: + # + # http.patch('/todos/1', data) # => # + # + # source://net-http//lib/net/http.rb#2001 + def patch(path, data, initheader = T.unsafe(nil), dest = T.unsafe(nil), &block); end + + # Returns the X509 certificate chain (an array of strings) + # for the session's socket peer, + # or +nil+ if none. + # + # source://net-http//lib/net/http.rb#1537 + def peer_cert; end + + # Returns the integer port number given as argument +port+ in ::new. + # + # source://net-http//lib/net/http.rb#1197 + def port; end + + # :call-seq: + # post(path, data, initheader = nil) {|res| ... } + # + # Sends a POST request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Post object + # created from string +path+, string +data+, and initial headers hash +initheader+. + # + # With a block given, calls the block with the response body: + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http = Net::HTTP.new(hostname) + # http.post('/todos', data) do |res| + # p res + # end # => # + # + # Output: + # + # "{\n \"{\\\"userId\\\": 1, \\\"id\\\": 1, \\\"title\\\": \\\"delectus aut autem\\\", \\\"completed\\\": false}\": \"\",\n \"id\": 201\n}" + # + # With no block given, simply returns the response object: + # + # http.post('/todos', data) # => # + # + # Related: + # + # - Net::HTTP::Post: request class for \HTTP method POST. + # - Net::HTTP.post: sends POST request, returns response body. + # + # source://net-http//lib/net/http.rb#1972 + def post(path, data, initheader = T.unsafe(nil), dest = T.unsafe(nil), &block); end + + # Sends a POST request to the server; + # forms the response into a Net::HTTPResponse object. + # + # The request is based on the Net::HTTP::Post object + # created from string +path+, string +data+, and initial headers hash +initheader+. + # + # With no block given, returns the response object: + # + # http = Net::HTTP.new(hostname) + # http.post('/todos', 'xyzzy') + # # => # + # + # With a block given, calls the block with the response body + # and returns the response object: + # + # http.post('/todos', 'xyzzy') do |res| + # p res + # end # => # + # + # Output: + # + # "{\n \"xyzzy\": \"\",\n \"id\": 201\n}" + # + # source://net-http//lib/net/http.rb#2216 + def post2(path, data, initheader = T.unsafe(nil), &block); end + + # Sends a PROPFIND request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Propfind object + # created from string +path+, string +body+, and initial headers hash +initheader+. + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http = Net::HTTP.new(hostname) + # http.propfind('/todos/1', data) + # + # source://net-http//lib/net/http.rb#2084 + def propfind(path, body = T.unsafe(nil), initheader = T.unsafe(nil)); end + + # Sends a PROPPATCH request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Proppatch object + # created from string +path+, string +body+, and initial headers hash +initheader+. + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http = Net::HTTP.new(hostname) + # http.proppatch('/todos/1', data) + # + # source://net-http//lib/net/http.rb#2029 + def proppatch(path, body, initheader = T.unsafe(nil)); end + + # Returns +true+ if a proxy server is defined, +false+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#1785 + def proxy?; end + + # Returns the address of the proxy server, if defined, +nil+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1807 + def proxy_address; end + + # Sets the proxy address; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1241 + def proxy_address=(_arg0); end + + # Sets whether to determine the proxy from environment variable + # 'ENV['http_proxy']'; + # see {Proxy Using ENV['http_proxy']}[rdoc-ref:Net::HTTP@Proxy+Using+-27ENV-5B-27http_proxy-27-5D-27]. + # + # source://net-http//lib/net/http.rb#1237 + def proxy_from_env=(_arg0); end + + # Returns +true+ if the proxy server is defined in the environment, + # +false+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#1792 + def proxy_from_env?; end + + # Returns the password of the proxy server, if defined, +nil+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1838 + def proxy_pass; end + + # Sets the proxy password; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1253 + def proxy_pass=(_arg0); end + + # Returns the port number of the proxy server, if defined, +nil+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1817 + def proxy_port; end + + # Sets the proxy port; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1245 + def proxy_port=(_arg0); end + + # The proxy URI determined from the environment for this connection. + # + # source://net-http//lib/net/http.rb#1797 + def proxy_uri; end + + # Returns the user name of the proxy server, if defined, +nil+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1827 + def proxy_user; end + + # Sets the proxy user; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1249 + def proxy_user=(_arg0); end + + # Returns the address of the proxy server, if defined, +nil+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1807 + def proxyaddr; end + + # Returns the port number of the proxy server, if defined, +nil+ otherwise; + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1817 + def proxyport; end + + # Sends a PUT request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Put object + # created from string +path+, string +data+, and initial headers hash +initheader+. + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http = Net::HTTP.new(hostname) + # http.put('/todos/1', data) # => # + # + # source://net-http//lib/net/http.rb#2015 + def put(path, data, initheader = T.unsafe(nil)); end + + # Sends a PUT request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Put object + # created from string +path+, string +data+, and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.put('/todos/1', 'xyzzy') + # # => # + # + # source://net-http//lib/net/http.rb#2230 + def put2(path, data, initheader = T.unsafe(nil), &block); end + + # Returns the numeric (\Integer or \Float) number of seconds + # to wait for one block to be read (via one read(2) call); + # see #read_timeout=. + # + # source://net-http//lib/net/http.rb#1301 + def read_timeout; end + + # Sets the read timeout, in seconds, for +self+ to integer +sec+; + # the initial value is 60. + # + # Argument +sec+ must be a non-negative numeric value: + # + # http = Net::HTTP.new(hostname) + # http.read_timeout # => 60 + # http.get('/todos/1') # => # + # http.read_timeout = 0 + # http.get('/todos/1') # Raises Net::ReadTimeout. + # + # source://net-http//lib/net/http.rb#1343 + def read_timeout=(sec); end + + # Sends a GET request to the server; + # forms the response into a Net::HTTPResponse object. + # + # The request is based on the Net::HTTP::Get object + # created from string +path+ and initial headers hash +initheader+. + # + # With no block given, returns the response object: + # + # http = Net::HTTP.new(hostname) + # http.request_get('/todos') # => # + # + # With a block given, calls the block with the response object + # and returns the response object: + # + # http.request_get('/todos') do |res| + # p res + # end # => # + # + # Output: + # + # # + # + # source://net-http//lib/net/http.rb#2176 + def request_get(path, initheader = T.unsafe(nil), &block); end + + # Sends a HEAD request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Head object + # created from string +path+ and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.head('/todos/1') # => # + # + # source://net-http//lib/net/http.rb#2189 + def request_head(path, initheader = T.unsafe(nil), &block); end + + # Sends a POST request to the server; + # forms the response into a Net::HTTPResponse object. + # + # The request is based on the Net::HTTP::Post object + # created from string +path+, string +data+, and initial headers hash +initheader+. + # + # With no block given, returns the response object: + # + # http = Net::HTTP.new(hostname) + # http.post('/todos', 'xyzzy') + # # => # + # + # With a block given, calls the block with the response body + # and returns the response object: + # + # http.post('/todos', 'xyzzy') do |res| + # p res + # end # => # + # + # Output: + # + # "{\n \"xyzzy\": \"\",\n \"id\": 201\n}" + # + # source://net-http//lib/net/http.rb#2216 + def request_post(path, data, initheader = T.unsafe(nil), &block); end + + # Sends a PUT request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Put object + # created from string +path+, string +data+, and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.put('/todos/1', 'xyzzy') + # # => # + # + # source://net-http//lib/net/http.rb#2230 + def request_put(path, data, initheader = T.unsafe(nil), &block); end + + # source://net-http//lib/net/http.rb#2295 + def request_without_mini_profiler(req, body = T.unsafe(nil), &block); end + + # Returns the encoding to use for the response body; + # see #response_body_encoding=. + # + # source://net-http//lib/net/http.rb#1209 + def response_body_encoding; end + + # Sets the encoding to be used for the response body; + # returns the encoding. + # + # The given +value+ may be: + # + # - An Encoding object. + # - The name of an encoding. + # - An alias for an encoding name. + # + # See {Encoding}[https://docs.ruby-lang.org/en/master/Encoding.html]. + # + # Examples: + # + # http = Net::HTTP.new(hostname) + # http.response_body_encoding = Encoding::US_ASCII # => # + # http.response_body_encoding = 'US-ASCII' # => "US-ASCII" + # http.response_body_encoding = 'ASCII' # => "ASCII" + # + # source://net-http//lib/net/http.rb#1229 + def response_body_encoding=(value); end + + # Sends an \HTTP request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTPRequest object + # created from string +path+, string +data+, and initial headers hash +header+. + # That object is an instance of the + # {subclass of Net::HTTPRequest}[rdoc-ref:Net::HTTPRequest@Request+Subclasses], + # that corresponds to the given uppercase string +name+, + # which must be + # an {HTTP request method}[https://en.wikipedia.org/wiki/HTTP#Request_methods] + # or a {WebDAV request method}[https://en.wikipedia.org/wiki/WebDAV#Implementation]. + # + # Examples: + # + # http = Net::HTTP.new(hostname) + # http.send_request('GET', '/todos/1') + # # => # + # http.send_request('POST', '/todos', 'xyzzy') + # # => # + # + # source://net-http//lib/net/http.rb#2259 + def send_request(name, path, data = T.unsafe(nil), header = T.unsafe(nil)); end + + # *WARNING* This method opens a serious security hole. + # Never use this method in production code. + # + # Sets the output stream for debugging: + # + # http = Net::HTTP.new(hostname) + # File.open('t.tmp', 'w') do |file| + # http.set_debug_output(file) + # http.start + # http.get('/nosuch/1') + # http.finish + # end + # puts File.read('t.tmp') + # + # Output: + # + # opening connection to jsonplaceholder.typicode.com:80... + # opened + # <- "GET /nosuch/1 HTTP/1.1\r\nAccept-Encoding: gzip;q=1.0,deflate;q=0.6,identity;q=0.3\r\nAccept: */*\r\nUser-Agent: Ruby\r\nHost: jsonplaceholder.typicode.com\r\n\r\n" + # -> "HTTP/1.1 404 Not Found\r\n" + # -> "Date: Mon, 12 Dec 2022 21:14:11 GMT\r\n" + # -> "Content-Type: application/json; charset=utf-8\r\n" + # -> "Content-Length: 2\r\n" + # -> "Connection: keep-alive\r\n" + # -> "X-Powered-By: Express\r\n" + # -> "X-Ratelimit-Limit: 1000\r\n" + # -> "X-Ratelimit-Remaining: 999\r\n" + # -> "X-Ratelimit-Reset: 1670879660\r\n" + # -> "Vary: Origin, Accept-Encoding\r\n" + # -> "Access-Control-Allow-Credentials: true\r\n" + # -> "Cache-Control: max-age=43200\r\n" + # -> "Pragma: no-cache\r\n" + # -> "Expires: -1\r\n" + # -> "X-Content-Type-Options: nosniff\r\n" + # -> "Etag: W/\"2-vyGp6PvFo4RvsFtPoIWeCReyIC8\"\r\n" + # -> "Via: 1.1 vegur\r\n" + # -> "CF-Cache-Status: MISS\r\n" + # -> "Server-Timing: cf-q-config;dur=1.3000000762986e-05\r\n" + # -> "Report-To: {\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v3?s=yOr40jo%2BwS1KHzhTlVpl54beJ5Wx2FcG4gGV0XVrh3X9OlR5q4drUn2dkt5DGO4GDcE%2BVXT7CNgJvGs%2BZleIyMu8CLieFiDIvOviOY3EhHg94m0ZNZgrEdpKD0S85S507l1vsEwEHkoTm%2Ff19SiO\"}],\"group\":\"cf-nel\",\"max_age\":604800}\r\n" + # -> "NEL: {\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}\r\n" + # -> "Server: cloudflare\r\n" + # -> "CF-RAY: 778977dc484ce591-DFW\r\n" + # -> "alt-svc: h3=\":443\"; ma=86400, h3-29=\":443\"; ma=86400\r\n" + # -> "\r\n" + # reading 2 bytes... + # -> "{}" + # read 2 bytes + # Conn keep-alive + # + # source://net-http//lib/net/http.rb#1188 + def set_debug_output(output); end + + # Sets or returns the SSL timeout seconds. + # + # source://net-http//lib/net/http.rb#1504 + def ssl_timeout; end + + # Sets or returns the SSL timeout seconds. + # + # source://net-http//lib/net/http.rb#1504 + def ssl_timeout=(_arg0); end + + # Sets or returns the SSL version. + # See {OpenSSL::SSL::SSLContext#ssl_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D]. + # + # source://net-http//lib/net/http.rb#1508 + def ssl_version; end + + # Sets or returns the SSL version. + # See {OpenSSL::SSL::SSLContext#ssl_version=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-ssl_version-3D]. + # + # source://net-http//lib/net/http.rb#1508 + def ssl_version=(_arg0); end + + # Starts an \HTTP session. + # + # Without a block, returns +self+: + # + # http = Net::HTTP.new(hostname) + # # => # + # http.start + # # => # + # http.started? # => true + # http.finish + # + # With a block, calls the block with +self+, + # finishes the session when the block exits, + # and returns the block's value: + # + # http.start do |http| + # http + # end + # # => # + # http.started? # => false + # + # @raise [IOError] + # + # source://net-http//lib/net/http.rb#1565 + def start; end + + # Returns +true+ if the \HTTP session has been started: + # + # http = Net::HTTP.new(hostname) + # http.started? # => false + # http.start + # http.started? # => true + # http.finish # => nil + # http.started? # => false + # + # Net::HTTP.start(hostname) do |http| + # http.started? + # end # => true + # http.started? # => false + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#1413 + def started?; end + + # Sends a TRACE request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Trace object + # created from string +path+ and initial headers hash +initheader+. + # + # http = Net::HTTP.new(hostname) + # http.trace('/todos/1') + # + # source://net-http//lib/net/http.rb#2150 + def trace(path, initheader = T.unsafe(nil)); end + + # Sends an UNLOCK request to the server; + # returns an instance of a subclass of Net::HTTPResponse. + # + # The request is based on the Net::HTTP::Unlock object + # created from string +path+, string +body+, and initial headers hash +initheader+. + # + # data = '{"userId": 1, "id": 1, "title": "delectus aut autem", "completed": false}' + # http = Net::HTTP.new(hostname) + # http.unlock('/todos/1', data) + # + # source://net-http//lib/net/http.rb#2057 + def unlock(path, body, initheader = T.unsafe(nil)); end + + # Sets whether a new session is to use + # {Transport Layer Security}[https://en.wikipedia.org/wiki/Transport_Layer_Security]: + # + # Raises IOError if attempting to change during a session. + # + # Raises OpenSSL::SSL::SSLError if the port is not an HTTPS port. + # + # source://net-http//lib/net/http.rb#1435 + def use_ssl=(flag); end + + # Returns +true+ if +self+ uses SSL, +false+ otherwise. + # See Net::HTTP#use_ssl=. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#1425 + def use_ssl?; end + + # Sets or returns the callback for the server certification verification. + # + # source://net-http//lib/net/http.rb#1519 + def verify_callback; end + + # Sets or returns the callback for the server certification verification. + # + # source://net-http//lib/net/http.rb#1519 + def verify_callback=(_arg0); end + + # Sets or returns the maximum depth for the certificate chain verification. + # + # source://net-http//lib/net/http.rb#1522 + def verify_depth; end + + # Sets or returns the maximum depth for the certificate chain verification. + # + # source://net-http//lib/net/http.rb#1522 + def verify_depth=(_arg0); end + + # Sets or returns whether to verify that the server certificate is valid + # for the hostname. + # See {OpenSSL::SSL::SSLContext#verify_hostname=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode]. + # + # source://net-http//lib/net/http.rb#1532 + def verify_hostname; end + + # Sets or returns whether to verify that the server certificate is valid + # for the hostname. + # See {OpenSSL::SSL::SSLContext#verify_hostname=}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode]. + # + # source://net-http//lib/net/http.rb#1532 + def verify_hostname=(_arg0); end + + # Sets or returns the flags for server the certification verification + # at the beginning of the SSL/TLS session. + # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable. + # + # source://net-http//lib/net/http.rb#1527 + def verify_mode; end + + # Sets or returns the flags for server the certification verification + # at the beginning of the SSL/TLS session. + # OpenSSL::SSL::VERIFY_NONE or OpenSSL::SSL::VERIFY_PEER are acceptable. + # + # source://net-http//lib/net/http.rb#1527 + def verify_mode=(_arg0); end + + # Returns the numeric (\Integer or \Float) number of seconds + # to wait for one block to be written (via one write(2) call); + # see #write_timeout=. + # + # source://net-http//lib/net/http.rb#1306 + def write_timeout; end + + # Sets the write timeout, in seconds, for +self+ to integer +sec+; + # the initial value is 60. + # + # Argument +sec+ must be a non-negative numeric value: + # + # _uri = uri.dup + # _uri.path = '/posts' + # body = 'bar' * 200000 + # data = < 60 + # http.post(_uri.path, data, headers) + # # => # + # http.write_timeout = 0 + # http.post(_uri.path, data, headers) # Raises Net::WriteTimeout. + # + # source://net-http//lib/net/http.rb#1367 + def write_timeout=(sec); end + + private + + # Adds a message to debugging output + # + # source://net-http//lib/net/http.rb#2472 + def D(msg); end + + # source://net-http//lib/net/http.rb#2464 + def addr_port; end + + # source://net-http//lib/net/http.rb#2381 + def begin_transport(req); end + + # without proxy, obsolete + # + # source://net-http//lib/net/http.rb#1859 + def conn_address; end + + # source://net-http//lib/net/http.rb#1863 + def conn_port; end + + # source://net-http//lib/net/http.rb#1585 + def connect; end + + # Adds a message to debugging output + # + # source://net-http//lib/net/http.rb#2472 + def debug(msg); end + + # source://net-http//lib/net/http.rb#1713 + def do_finish; end + + # source://net-http//lib/net/http.rb#1579 + def do_start; end + + # source://net-http//lib/net/http.rb#1867 + def edit_path(path); end + + # source://net-http//lib/net/http.rb#2404 + def end_transport(req, res); end + + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#2421 + def keep_alive?(req, res); end + + # source://net-http//lib/net/http.rb#1695 + def on_connect; end + + # Executes a request which uses a representation + # and returns its body. + # + # source://net-http//lib/net/http.rb#2318 + def send_entity(path, data, initheader, dest, type, &block); end + + # source://net-http//lib/net/http.rb#2445 + def sspi_auth(req); end + + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#2430 + def sspi_auth?(res); end + + # source://net-http//lib/net/http.rb#2329 + def transport_request(req); end + + # source://net-http//lib/net/http.rb#1852 + def unescape(value); end + + class << self + # Creates an \HTTP proxy class which behaves like \Net::HTTP, but + # performs all access via the specified proxy. + # + # This class is obsolete. You may pass these same parameters directly to + # \Net::HTTP.new. See Net::HTTP.new for details of the arguments. + # + # source://net-http//lib/net/http.rb#1739 + def Proxy(p_addr = T.unsafe(nil), p_port = T.unsafe(nil), p_user = T.unsafe(nil), p_pass = T.unsafe(nil)); end + + # Returns integer +80+, the default port to use for \HTTP requests: + # + # Net::HTTP.default_port # => 80 + # + # source://net-http//lib/net/http.rb#900 + def default_port; end + + # :call-seq: + # Net::HTTP.get(hostname, path, port = 80) -> body + # Net::HTTP:get(uri, headers = {}, port = uri.port) -> body + # + # Sends a GET request and returns the \HTTP response body as a string. + # + # With string arguments +hostname+ and +path+: + # + # hostname = 'jsonplaceholder.typicode.com' + # path = '/todos/1' + # puts Net::HTTP.get(hostname, path) + # + # Output: + # + # { + # "userId": 1, + # "id": 1, + # "title": "delectus aut autem", + # "completed": false + # } + # + # With URI object +uri+ and optional hash argument +headers+: + # + # uri = URI('https://jsonplaceholder.typicode.com/todos/1') + # headers = {'Content-type' => 'application/json; charset=UTF-8'} + # Net::HTTP.get(uri, headers) + # + # Related: + # + # - Net::HTTP::Get: request class for \HTTP method +GET+. + # - Net::HTTP#get: convenience method for \HTTP method +GET+. + # + # source://net-http//lib/net/http.rb#802 + def get(uri_or_host, path_or_headers = T.unsafe(nil), port = T.unsafe(nil)); end + + # :call-seq: + # Net::HTTP.get_print(hostname, path, port = 80) -> nil + # Net::HTTP:get_print(uri, headers = {}, port = uri.port) -> nil + # + # Like Net::HTTP.get, but writes the returned body to $stdout; + # returns +nil+. + # + # source://net-http//lib/net/http.rb#761 + def get_print(uri_or_host, path_or_headers = T.unsafe(nil), port = T.unsafe(nil)); end + + # :call-seq: + # Net::HTTP.get_response(hostname, path, port = 80) -> http_response + # Net::HTTP:get_response(uri, headers = {}, port = uri.port) -> http_response + # + # Like Net::HTTP.get, but returns a Net::HTTPResponse object + # instead of the body string. + # + # source://net-http//lib/net/http.rb#812 + def get_response(uri_or_host, path_or_headers = T.unsafe(nil), port = T.unsafe(nil), &block); end + + # Returns integer +80+, the default port to use for \HTTP requests: + # + # Net::HTTP.http_default_port # => 80 + # + # source://net-http//lib/net/http.rb#908 + def http_default_port; end + + # Returns integer +443+, the default port to use for HTTPS requests: + # + # Net::HTTP.https_default_port # => 443 + # + # source://net-http//lib/net/http.rb#916 + def https_default_port; end + + # Returns +false+; retained for compatibility. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#746 + def is_version_1_1?; end + + # Returns +true+; retained for compatibility. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#741 + def is_version_1_2?; end + + # Returns a new \Net::HTTP object +http+ + # (but does not open a TCP connection or \HTTP session). + # + # With only string argument +address+ given + # (and ENV['http_proxy'] undefined or +nil+), + # the returned +http+: + # + # - Has the given address. + # - Has the default port number, Net::HTTP.default_port (80). + # - Has no proxy. + # + # Example: + # + # http = Net::HTTP.new(hostname) + # # => # + # http.address # => "jsonplaceholder.typicode.com" + # http.port # => 80 + # http.proxy? # => false + # + # With integer argument +port+ also given, + # the returned +http+ has the given port: + # + # http = Net::HTTP.new(hostname, 8000) + # # => # + # http.port # => 8000 + # + # For proxy-defining arguments +p_addr+ through +p_no_proxy+, + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # + # source://net-http//lib/net/http.rb#1065 + def new(address, port = T.unsafe(nil), p_addr = T.unsafe(nil), p_port = T.unsafe(nil), p_user = T.unsafe(nil), p_pass = T.unsafe(nil), p_no_proxy = T.unsafe(nil)); end + + # Posts data to a host; returns a Net::HTTPResponse object. + # + # Argument +url+ must be a URL; + # argument +data+ must be a string: + # + # _uri = uri.dup + # _uri.path = '/posts' + # data = '{"title": "foo", "body": "bar", "userId": 1}' + # headers = {'content-type': 'application/json'} + # res = Net::HTTP.post(_uri, data, headers) # => # + # puts res.body + # + # Output: + # + # { + # "title": "foo", + # "body": "bar", + # "userId": 1, + # "id": 101 + # } + # + # Related: + # + # - Net::HTTP::Post: request class for \HTTP method +POST+. + # - Net::HTTP#post: convenience method for \HTTP method +POST+. + # + # source://net-http//lib/net/http.rb#855 + def post(url, data, header = T.unsafe(nil)); end + + # Posts data to a host; returns a Net::HTTPResponse object. + # + # Argument +url+ must be a URI; + # argument +data+ must be a hash: + # + # _uri = uri.dup + # _uri.path = '/posts' + # data = {title: 'foo', body: 'bar', userId: 1} + # res = Net::HTTP.post_form(_uri, data) # => # + # puts res.body + # + # Output: + # + # { + # "title": "foo", + # "body": "bar", + # "userId": "1", + # "id": 101 + # } + # + # source://net-http//lib/net/http.rb#882 + def post_form(url, params); end + + # Returns the address of the proxy host, or +nil+ if none; + # see Net::HTTP@Proxy+Server. + # + # source://net-http//lib/net/http.rb#1768 + def proxy_address; end + + # Returns true if self is a class which was created by HTTP::Proxy. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#1762 + def proxy_class?; end + + # Returns the password for accessing the proxy, or +nil+ if none; + # see Net::HTTP@Proxy+Server. + # + # source://net-http//lib/net/http.rb#1780 + def proxy_pass; end + + # Returns the port number of the proxy host, or +nil+ if none; + # see Net::HTTP@Proxy+Server. + # + # source://net-http//lib/net/http.rb#1772 + def proxy_port; end + + # Returns the user name for accessing the proxy, or +nil+ if none; + # see Net::HTTP@Proxy+Server. + # + # source://net-http//lib/net/http.rb#1776 + def proxy_user; end + + # source://net-http//lib/net/http.rb#920 + def socket_type; end + + # :call-seq: + # HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) -> http + # HTTP.start(address, port = nil, p_addr = :ENV, p_port = nil, p_user = nil, p_pass = nil, opts) {|http| ... } -> object + # + # Creates a new \Net::HTTP object, +http+, via \Net::HTTP.new: + # + # - For arguments +address+ and +port+, see Net::HTTP.new. + # - For proxy-defining arguments +p_addr+ through +p_pass+, + # see {Proxy Server}[rdoc-ref:Net::HTTP@Proxy+Server]. + # - For argument +opts+, see below. + # + # With no block given: + # + # - Calls http.start with no block (see #start), + # which opens a TCP connection and \HTTP session. + # - Returns +http+. + # - The caller should call #finish to close the session: + # + # http = Net::HTTP.start(hostname) + # http.started? # => true + # http.finish + # http.started? # => false + # + # With a block given: + # + # - Calls http.start with the block (see #start), which: + # + # - Opens a TCP connection and \HTTP session. + # - Calls the block, + # which may make any number of requests to the host. + # - Closes the \HTTP session and TCP connection on block exit. + # - Returns the block's value +object+. + # + # - Returns +object+. + # + # Example: + # + # hostname = 'jsonplaceholder.typicode.com' + # Net::HTTP.start(hostname) do |http| + # puts http.get('/todos/1').body + # puts http.get('/todos/2').body + # end + # + # Output: + # + # { + # "userId": 1, + # "id": 1, + # "title": "delectus aut autem", + # "completed": false + # } + # { + # "userId": 1, + # "id": 2, + # "title": "quis ut nam facilis et officia qui", + # "completed": false + # } + # + # If the last argument given is a hash, it is the +opts+ hash, + # where each key is a method or accessor to be called, + # and its value is the value to be set. + # + # The keys may include: + # + # - #ca_file + # - #ca_path + # - #cert + # - #cert_store + # - #ciphers + # - #close_on_empty_response + # - +ipaddr+ (calls #ipaddr=) + # - #keep_alive_timeout + # - #key + # - #open_timeout + # - #read_timeout + # - #ssl_timeout + # - #ssl_version + # - +use_ssl+ (calls #use_ssl=) + # - #verify_callback + # - #verify_depth + # - #verify_mode + # - #write_timeout + # + # Note: If +port+ is +nil+ and opts[:use_ssl] is a truthy value, + # the value passed to +new+ is Net::HTTP.https_default_port, not +port+. + # + # source://net-http//lib/net/http.rb#1010 + def start(address, *arg, &block); end + + # Returns +false+; retained for compatibility. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#746 + def version_1_1?; end + + # Returns +true+; retained for compatibility. + # + # source://net-http//lib/net/http.rb#736 + def version_1_2; end + + # Returns +true+; retained for compatibility. + # + # @return [Boolean] + # + # source://net-http//lib/net/http.rb#741 + def version_1_2?; end + end +end + +# source://net-http//lib/net/http/proxy_delta.rb#2 +module Net::HTTP::ProxyDelta + private + + # source://net-http//lib/net/http/proxy_delta.rb#5 + def conn_address; end + + # source://net-http//lib/net/http/proxy_delta.rb#9 + def conn_port; end + + # source://net-http//lib/net/http/proxy_delta.rb#13 + def edit_path(path); end +end + +# source://net-http//lib/net/http/backward.rb#7 +Net::HTTP::ProxyMod = Net::HTTP::ProxyDelta + +# :stopdoc: +# +# source://net-http//lib/net/http.rb#725 +Net::HTTP::VERSION = T.let(T.unsafe(nil), String) + +# Response class for Already Reported (WebDAV) responses (status code 208). +# +# The Already Reported (WebDAV) response indicates that the server +# has received the request, +# and that the members of a DAV binding have already been enumerated +# in a preceding part of the (multi-status) response, +# and are not being included again. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {RFC 5842}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.1]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208]. +# +# source://net-http//lib/net/http/responses.rb#306 +class Net::HTTPAlreadyReported < ::Net::HTTPSuccess; end + +# source://net-http//lib/net/http/responses.rb#307 +Net::HTTPAlreadyReported::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# source://net-http//lib/net/http/responses.rb#67 +Net::HTTPClientError::EXCEPTION_TYPE = Net::HTTPClientException + +# source://net-http//lib/net/http/backward.rb#23 +Net::HTTPClientErrorCode = Net::HTTPClientError + +# Response class for Early Hints responses (status code 103). +# +# The Early Hints indicates that the server has received +# and is processing the request, and contains certain headers; +# the final response is not available yet. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103]. +# - {RFC 8297}[https://www.rfc-editor.org/rfc/rfc8297.html#section-2]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#103]. +# +# source://net-http//lib/net/http/responses.rb#147 +class Net::HTTPEarlyHints < ::Net::HTTPInformation; end + +# source://net-http//lib/net/http/responses.rb#148 +Net::HTTPEarlyHints::HAS_BODY = T.let(T.unsafe(nil), FalseClass) + +# source://net-http//lib/net/http/backward.rb#24 +Net::HTTPFatalErrorCode = Net::HTTPClientError + +# \HTTPGenericRequest is the parent of the Net::HTTPRequest class. +# +# Do not use this directly; instead, use a subclass of Net::HTTPRequest. +# +# == About the Examples +# +# :include: doc/net-http/examples.rdoc +# +# source://net-http//lib/net/http/generic_request.rb#11 +class Net::HTTPGenericRequest + include ::Net::HTTPHeader + + # @return [HTTPGenericRequest] a new instance of HTTPGenericRequest + # + # source://net-http//lib/net/http/generic_request.rb#15 + def initialize(m, reqbody, resbody, uri_or_path, initheader = T.unsafe(nil)); end + + # Don't automatically decode response content-encoding if the user indicates + # they want to handle it. + # + # source://net-http//lib/net/http/generic_request.rb#109 + def []=(key, val); end + + # Returns the string body for the request, or +nil+ if there is none: + # + # req = Net::HTTP::Post.new(uri) + # req.body # => nil + # req.body = '{"title": "foo","body": "bar","userId": 1}' + # req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}" + # + # source://net-http//lib/net/http/generic_request.rb#145 + def body; end + + # Sets the body for the request: + # + # req = Net::HTTP::Post.new(uri) + # req.body # => nil + # req.body = '{"title": "foo","body": "bar","userId": 1}' + # req.body # => "{\"title\": \"foo\",\"body\": \"bar\",\"userId\": 1}" + # + # source://net-http//lib/net/http/generic_request.rb#154 + def body=(str); end + + # @return [Boolean] + # + # source://net-http//lib/net/http/generic_request.rb#133 + def body_exist?; end + + # Returns the body stream object for the request, or +nil+ if there is none: + # + # req = Net::HTTP::Post.new(uri) # => # + # req.body_stream # => nil + # require 'stringio' + # req.body_stream = StringIO.new('xyzzy') # => # + # req.body_stream # => # + # + # source://net-http//lib/net/http/generic_request.rb#169 + def body_stream; end + + # Sets the body stream for the request: + # + # req = Net::HTTP::Post.new(uri) # => # + # req.body_stream # => nil + # require 'stringio' + # req.body_stream = StringIO.new('xyzzy') # => # + # req.body_stream # => # + # + # source://net-http//lib/net/http/generic_request.rb#179 + def body_stream=(input); end + + # Returns +false+ if the request's header 'Accept-Encoding' + # has been set manually or deleted + # (indicating that the user intends to handle encoding in the response), + # +true+ otherwise: + # + # req = Net::HTTP::Get.new(uri) # => # + # req['Accept-Encoding'] # => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3" + # req.decode_content # => true + # req['Accept-Encoding'] = 'foo' + # req.decode_content # => false + # req.delete('Accept-Encoding') + # req.decode_content # => false + # + # source://net-http//lib/net/http/generic_request.rb#95 + def decode_content; end + + # write + # + # source://net-http//lib/net/http/generic_request.rb#198 + def exec(sock, ver, path); end + + # Returns a string representation of the request: + # + # Net::HTTP::Post.new(uri).inspect # => "#" + # + # source://net-http//lib/net/http/generic_request.rb#101 + def inspect; end + + # Returns the string method name for the request: + # + # Net::HTTP::Get.new(uri).method # => "GET" + # Net::HTTP::Post.new(uri).method # => "POST" + # + # source://net-http//lib/net/http/generic_request.rb#65 + def method; end + + # Returns the string path for the request: + # + # Net::HTTP::Get.new(uri).path # => "/" + # Net::HTTP::Post.new('example.com').path # => "example.com" + # + # source://net-http//lib/net/http/generic_request.rb#72 + def path; end + + # Returns whether the request may have a body: + # + # Net::HTTP::Post.new(uri).request_body_permitted? # => true + # Net::HTTP::Get.new(uri).request_body_permitted? # => false + # + # @return [Boolean] + # + # source://net-http//lib/net/http/generic_request.rb#120 + def request_body_permitted?; end + + # Returns whether the response may have a body: + # + # Net::HTTP::Post.new(uri).response_body_permitted? # => true + # Net::HTTP::Head.new(uri).response_body_permitted? # => false + # + # @return [Boolean] + # + # source://net-http//lib/net/http/generic_request.rb#129 + def response_body_permitted?; end + + # @raise [ArgumentError] + # + # source://net-http//lib/net/http/generic_request.rb#186 + def set_body_internal(str); end + + # source://net-http//lib/net/http/generic_request.rb#210 + def update_uri(addr, port, ssl); end + + # Returns the URI object for the request, or +nil+ if none: + # + # Net::HTTP::Get.new(uri).uri + # # => # + # Net::HTTP::Get.new('example.com').uri # => nil + # + # source://net-http//lib/net/http/generic_request.rb#80 + def uri; end + + private + + # source://net-http//lib/net/http/generic_request.rb#312 + def encode_multipart_form_data(out, params, opt); end + + # source://net-http//lib/net/http/generic_request.rb#368 + def flush_buffer(out, buf, chunked_p); end + + # source://net-http//lib/net/http/generic_request.rb#363 + def quote_string(str, charset); end + + # source://net-http//lib/net/http/generic_request.rb#260 + def send_request_with_body(sock, ver, path, body); end + + # source://net-http//lib/net/http/generic_request.rb#286 + def send_request_with_body_data(sock, ver, path, params); end + + # source://net-http//lib/net/http/generic_request.rb#269 + def send_request_with_body_stream(sock, ver, path, f); end + + # source://net-http//lib/net/http/generic_request.rb#376 + def supply_default_content_type; end + + # Waits up to the continue timeout for a response from the server provided + # we're speaking HTTP 1.1 and are expecting a 100-continue response. + # + # source://net-http//lib/net/http/generic_request.rb#386 + def wait_for_continue(sock, ver); end + + # source://net-http//lib/net/http/generic_request.rb#399 + def write_header(sock, ver, path); end +end + +# source://net-http//lib/net/http/generic_request.rb#242 +class Net::HTTPGenericRequest::Chunker + # @return [Chunker] a new instance of Chunker + # + # source://net-http//lib/net/http/generic_request.rb#243 + def initialize(sock); end + + # source://net-http//lib/net/http/generic_request.rb#255 + def finish; end + + # source://net-http//lib/net/http/generic_request.rb#248 + def write(buf); end +end + +# The \HTTPHeader module provides access to \HTTP headers. +# +# The module is included in: +# +# - Net::HTTPGenericRequest (and therefore Net::HTTPRequest). +# - Net::HTTPResponse. +# +# The headers are a hash-like collection of key/value pairs called _fields_. +# +# == Request and Response Fields +# +# Headers may be included in: +# +# - A Net::HTTPRequest object: +# the object's headers will be sent with the request. +# Any fields may be defined in the request; +# see {Setters}[rdoc-ref:Net::HTTPHeader@Setters]. +# - A Net::HTTPResponse object: +# the objects headers are usually those returned from the host. +# Fields may be retrieved from the object; +# see {Getters}[rdoc-ref:Net::HTTPHeader@Getters] +# and {Iterators}[rdoc-ref:Net::HTTPHeader@Iterators]. +# +# Exactly which fields should be sent or expected depends on the host; +# see: +# +# - {Request fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Request_fields]. +# - {Response fields}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Response_fields]. +# +# == About the Examples +# +# :include: doc/net-http/examples.rdoc +# +# == Fields +# +# A header field is a key/value pair. +# +# === Field Keys +# +# A field key may be: +# +# - A string: Key 'Accept' is treated as if it were +# 'Accept'.downcase; i.e., 'accept'. +# - A symbol: Key :Accept is treated as if it were +# :Accept.to_s.downcase; i.e., 'accept'. +# +# Examples: +# +# req = Net::HTTP::Get.new(uri) +# req[:accept] # => "*/*" +# req['Accept'] # => "*/*" +# req['ACCEPT'] # => "*/*" +# +# req['accept'] = 'text/html' +# req[:accept] = 'text/html' +# req['ACCEPT'] = 'text/html' +# +# === Field Values +# +# A field value may be returned as an array of strings or as a string: +# +# - These methods return field values as arrays: +# +# - #get_fields: Returns the array value for the given key, +# or +nil+ if it does not exist. +# - #to_hash: Returns a hash of all header fields: +# each key is a field name; its value is the array value for the field. +# +# - These methods return field values as string; +# the string value for a field is equivalent to +# self[key.downcase.to_s].join(', ')): +# +# - #[]: Returns the string value for the given key, +# or +nil+ if it does not exist. +# - #fetch: Like #[], but accepts a default value +# to be returned if the key does not exist. +# +# The field value may be set: +# +# - #[]=: Sets the value for the given key; +# the given value may be a string, a symbol, an array, or a hash. +# - #add_field: Adds a given value to a value for the given key +# (not overwriting the existing value). +# - #delete: Deletes the field for the given key. +# +# Example field values: +# +# - \String: +# +# req['Accept'] = 'text/html' # => "text/html" +# req['Accept'] # => "text/html" +# req.get_fields('Accept') # => ["text/html"] +# +# - \Symbol: +# +# req['Accept'] = :text # => :text +# req['Accept'] # => "text" +# req.get_fields('Accept') # => ["text"] +# +# - Simple array: +# +# req[:foo] = %w[bar baz bat] +# req[:foo] # => "bar, baz, bat" +# req.get_fields(:foo) # => ["bar", "baz", "bat"] +# +# - Simple hash: +# +# req[:foo] = {bar: 0, baz: 1, bat: 2} +# req[:foo] # => "bar, 0, baz, 1, bat, 2" +# req.get_fields(:foo) # => ["bar", "0", "baz", "1", "bat", "2"] +# +# - Nested: +# +# req[:foo] = [%w[bar baz], {bat: 0, bam: 1}] +# req[:foo] # => "bar, baz, bat, 0, bam, 1" +# req.get_fields(:foo) # => ["bar", "baz", "bat", "0", "bam", "1"] +# +# req[:foo] = {bar: %w[baz bat], bam: {bah: 0, bad: 1}} +# req[:foo] # => "bar, baz, bat, bam, bah, 0, bad, 1" +# req.get_fields(:foo) # => ["bar", "baz", "bat", "bam", "bah", "0", "bad", "1"] +# +# == Convenience Methods +# +# Various convenience methods retrieve values, set values, query values, +# set form values, or iterate over fields. +# +# === Setters +# +# \Method #[]= can set any field, but does little to validate the new value; +# some of the other setter methods provide some validation: +# +# - #[]=: Sets the string or array value for the given key. +# - #add_field: Creates or adds to the array value for the given key. +# - #basic_auth: Sets the string authorization header for 'Authorization'. +# - #content_length=: Sets the integer length for field 'Content-Length. +# - #content_type=: Sets the string value for field 'Content-Type'. +# - #proxy_basic_auth: Sets the string authorization header for 'Proxy-Authorization'. +# - #set_range: Sets the value for field 'Range'. +# +# === Form Setters +# +# - #set_form: Sets an HTML form data set. +# - #set_form_data: Sets header fields and a body from HTML form data. +# +# === Getters +# +# \Method #[] can retrieve the value of any field that exists, +# but always as a string; +# some of the other getter methods return something different +# from the simple string value: +# +# - #[]: Returns the string field value for the given key. +# - #content_length: Returns the integer value of field 'Content-Length'. +# - #content_range: Returns the Range value of field 'Content-Range'. +# - #content_type: Returns the string value of field 'Content-Type'. +# - #fetch: Returns the string field value for the given key. +# - #get_fields: Returns the array field value for the given +key+. +# - #main_type: Returns first part of the string value of field 'Content-Type'. +# - #sub_type: Returns second part of the string value of field 'Content-Type'. +# - #range: Returns an array of Range objects of field 'Range', or +nil+. +# - #range_length: Returns the integer length of the range given in field 'Content-Range'. +# - #type_params: Returns the string parameters for 'Content-Type'. +# +# === Queries +# +# - #chunked?: Returns whether field 'Transfer-Encoding' is set to 'chunked'. +# - #connection_close?: Returns whether field 'Connection' is set to 'close'. +# - #connection_keep_alive?: Returns whether field 'Connection' is set to 'keep-alive'. +# - #key?: Returns whether a given key exists. +# +# === Iterators +# +# - #each_capitalized: Passes each field capitalized-name/value pair to the block. +# - #each_capitalized_name: Passes each capitalized field name to the block. +# - #each_header: Passes each field name/value pair to the block. +# - #each_name: Passes each field name to the block. +# - #each_value: Passes each string field value to the block. +# +# source://net-http//lib/net/http/header.rb#181 +module Net::HTTPHeader + # Returns the string field value for the case-insensitive field +key+, + # or +nil+ if there is no such key; + # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['Connection'] # => "keep-alive" + # res['Nosuch'] # => nil + # + # Note that some field values may be retrieved via convenience methods; + # see {Getters}[rdoc-ref:Net::HTTPHeader@Getters]. + # + # source://net-http//lib/net/http/header.rb#224 + def [](key); end + + # Sets the value for the case-insensitive +key+ to +val+, + # overwriting the previous value if the field exists; + # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]: + # + # req = Net::HTTP::Get.new(uri) + # req['Accept'] # => "*/*" + # req['Accept'] = 'text/html' + # req['Accept'] # => "text/html" + # + # Note that some field values may be set via convenience methods; + # see {Setters}[rdoc-ref:Net::HTTPHeader@Setters]. + # + # source://net-http//lib/net/http/header.rb#240 + def []=(key, val); end + + # Adds value +val+ to the value array for field +key+ if the field exists; + # creates the field with the given +key+ and +val+ if it does not exist. + # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]: + # + # req = Net::HTTP::Get.new(uri) + # req.add_field('Foo', 'bar') + # req['Foo'] # => "bar" + # req.add_field('Foo', 'baz') + # req['Foo'] # => "bar, baz" + # req.add_field('Foo', %w[baz bam]) + # req['Foo'] # => "bar, baz, baz, bam" + # req.get_fields('Foo') # => ["bar", "baz", "baz", "bam"] + # + # source://net-http//lib/net/http/header.rb#261 + def add_field(key, val); end + + # Sets header 'Authorization' using the given + # +account+ and +password+ strings: + # + # req.basic_auth('my_account', 'my_password') + # req['Authorization'] + # # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA==" + # + # source://net-http//lib/net/http/header.rb#945 + def basic_auth(account, password); end + + # Like #each_header, but the keys are returned in capitalized form. + # + # Net::HTTPHeader#canonical_each is an alias for Net::HTTPHeader#each_capitalized. + # + # source://net-http//lib/net/http/header.rb#484 + def canonical_each; end + + # Returns +true+ if field 'Transfer-Encoding' + # exists and has value 'chunked', + # +false+ otherwise; + # see {Transfer-Encoding response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#transfer-encoding-response-header]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['Transfer-Encoding'] # => "chunked" + # res.chunked? # => true + # + # @return [Boolean] + # + # source://net-http//lib/net/http/header.rb#654 + def chunked?; end + + # Returns whether the HTTP session is to be closed. + # + # @return [Boolean] + # + # source://net-http//lib/net/http/header.rb#966 + def connection_close?; end + + # Returns whether the HTTP session is to be kept alive. + # + # @return [Boolean] + # + # source://net-http//lib/net/http/header.rb#974 + def connection_keep_alive?; end + + # Returns the value of field 'Content-Length' as an integer, + # or +nil+ if there is no such field; + # see {Content-Length request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-request-header]: + # + # res = Net::HTTP.get_response(hostname, '/nosuch/1') + # res.content_length # => 2 + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.content_length # => nil + # + # source://net-http//lib/net/http/header.rb#616 + def content_length; end + + # Sets the value of field 'Content-Length' to the given numeric; + # see {Content-Length response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-length-response-header]: + # + # _uri = uri.dup + # hostname = _uri.hostname # => "jsonplaceholder.typicode.com" + # _uri.path = '/posts' # => "/posts" + # req = Net::HTTP::Post.new(_uri) # => # + # req.body = '{"title": "foo","body": "bar","userId": 1}' + # req.content_length = req.body.size # => 42 + # req.content_type = 'application/json' + # res = Net::HTTP.start(hostname) do |http| + # http.request(req) + # end # => # + # + # source://net-http//lib/net/http/header.rb#637 + def content_length=(len); end + + # Returns a Range object representing the value of field + # 'Content-Range', or +nil+ if no such field exists; + # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['Content-Range'] # => nil + # res['Content-Range'] = 'bytes 0-499/1000' + # res['Content-Range'] # => "bytes 0-499/1000" + # res.content_range # => 0..499 + # + # source://net-http//lib/net/http/header.rb#670 + def content_range; end + + # Returns the {media type}[https://en.wikipedia.org/wiki/Media_type] + # from the value of field 'Content-Type', + # or +nil+ if no such field exists; + # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['content-type'] # => "application/json; charset=utf-8" + # res.content_type # => "application/json" + # + # source://net-http//lib/net/http/header.rb#701 + def content_type; end + + # Sets the value of field 'Content-Type'; + # returns the new value; + # see {Content-Type request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-request-header]: + # + # req = Net::HTTP::Get.new(uri) + # req.set_content_type('application/json') # => ["application/json"] + # + # Net::HTTPHeader#content_type= is an alias for Net::HTTPHeader#set_content_type. + # + # source://net-http//lib/net/http/header.rb#772 + def content_type=(type, params = T.unsafe(nil)); end + + # Removes the header for the given case-insensitive +key+ + # (see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]); + # returns the deleted value, or +nil+ if no such field exists: + # + # req = Net::HTTP::Get.new(uri) + # req.delete('Accept') # => ["*/*"] + # req.delete('Nosuch') # => nil + # + # source://net-http//lib/net/http/header.rb#453 + def delete(key); end + + # Calls the block with each key/value pair: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.each_header do |key, value| + # p [key, value] if key.start_with?('c') + # end + # + # Output: + # + # ["content-type", "application/json; charset=utf-8"] + # ["connection", "keep-alive"] + # ["cache-control", "max-age=43200"] + # ["cf-cache-status", "HIT"] + # ["cf-ray", "771d17e9bc542cf5-ORD"] + # + # Returns an enumerator if no block is given. + # + # Net::HTTPHeader#each is an alias for Net::HTTPHeader#each_header. + # + # source://net-http//lib/net/http/header.rb#364 + def each; end + + # Like #each_header, but the keys are returned in capitalized form. + # + # Net::HTTPHeader#canonical_each is an alias for Net::HTTPHeader#each_capitalized. + # + # source://net-http//lib/net/http/header.rb#484 + def each_capitalized; end + + # Calls the block with each capitalized field name: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.each_capitalized_name do |key| + # p key if key.start_with?('C') + # end + # + # Output: + # + # "Content-Type" + # "Connection" + # "Cache-Control" + # "Cf-Cache-Status" + # "Cf-Ray" + # + # The capitalization is system-dependent; + # see {Case Mapping}[https://docs.ruby-lang.org/en/master/case_mapping_rdoc.html]. + # + # Returns an enumerator if no block is given. + # + # source://net-http//lib/net/http/header.rb#417 + def each_capitalized_name; end + + # Calls the block with each key/value pair: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.each_header do |key, value| + # p [key, value] if key.start_with?('c') + # end + # + # Output: + # + # ["content-type", "application/json; charset=utf-8"] + # ["connection", "keep-alive"] + # ["cache-control", "max-age=43200"] + # ["cf-cache-status", "HIT"] + # ["cf-ray", "771d17e9bc542cf5-ORD"] + # + # Returns an enumerator if no block is given. + # + # Net::HTTPHeader#each is an alias for Net::HTTPHeader#each_header. + # + # source://net-http//lib/net/http/header.rb#364 + def each_header; end + + # Calls the block with each field key: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.each_key do |key| + # p key if key.start_with?('c') + # end + # + # Output: + # + # "content-type" + # "connection" + # "cache-control" + # "cf-cache-status" + # "cf-ray" + # + # Returns an enumerator if no block is given. + # + # Net::HTTPHeader#each_name is an alias for Net::HTTPHeader#each_key. + # + # source://net-http//lib/net/http/header.rb#391 + def each_key(&block); end + + # Calls the block with each field key: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.each_key do |key| + # p key if key.start_with?('c') + # end + # + # Output: + # + # "content-type" + # "connection" + # "cache-control" + # "cf-cache-status" + # "cf-ray" + # + # Returns an enumerator if no block is given. + # + # Net::HTTPHeader#each_name is an alias for Net::HTTPHeader#each_key. + # + # source://net-http//lib/net/http/header.rb#391 + def each_name(&block); end + + # Calls the block with each string field value: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.each_value do |value| + # p value if value.start_with?('c') + # end + # + # Output: + # + # "chunked" + # "cf-q-config;dur=6.0000002122251e-06" + # "cloudflare" + # + # Returns an enumerator if no block is given. + # + # source://net-http//lib/net/http/header.rb#438 + def each_value; end + + # call-seq: + # fetch(key, default_val = nil) {|key| ... } -> object + # fetch(key, default_val = nil) -> value or default_val + # + # With a block, returns the string value for +key+ if it exists; + # otherwise returns the value of the block; + # ignores the +default_val+; + # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # + # # Field exists; block not called. + # res.fetch('Connection') do |value| + # fail 'Cannot happen' + # end # => "keep-alive" + # + # # Field does not exist; block called. + # res.fetch('Nosuch') do |value| + # value.downcase + # end # => "nosuch" + # + # With no block, returns the string value for +key+ if it exists; + # otherwise, returns +default_val+ if it was given; + # otherwise raises an exception: + # + # res.fetch('Connection', 'Foo') # => "keep-alive" + # res.fetch('Nosuch', 'Foo') # => "Foo" + # res.fetch('Nosuch') # Raises KeyError. + # + # source://net-http//lib/net/http/header.rb#341 + def fetch(key, *args, &block); end + + # Sets the request body to a URL-encoded string derived from argument +params+, + # and sets request header field 'Content-Type' + # to 'application/x-www-form-urlencoded'. + # + # The resulting request is suitable for HTTP request +POST+ or +PUT+. + # + # Argument +params+ must be suitable for use as argument +enum+ to + # {URI.encode_www_form}[https://docs.ruby-lang.org/en/master/URI.html#method-c-encode_www_form]. + # + # With only argument +params+ given, + # sets the body to a URL-encoded string with the default separator '&': + # + # req = Net::HTTP::Post.new('example.com') + # + # req.set_form_data(q: 'ruby', lang: 'en') + # req.body # => "q=ruby&lang=en" + # req['Content-Type'] # => "application/x-www-form-urlencoded" + # + # req.set_form_data([['q', 'ruby'], ['lang', 'en']]) + # req.body # => "q=ruby&lang=en" + # + # req.set_form_data(q: ['ruby', 'perl'], lang: 'en') + # req.body # => "q=ruby&q=perl&lang=en" + # + # req.set_form_data([['q', 'ruby'], ['q', 'perl'], ['lang', 'en']]) + # req.body # => "q=ruby&q=perl&lang=en" + # + # With string argument +sep+ also given, + # uses that string as the separator: + # + # req.set_form_data({q: 'ruby', lang: 'en'}, '|') + # req.body # => "q=ruby|lang=en" + # + # Net::HTTPHeader#form_data= is an alias for Net::HTTPHeader#set_form_data. + # + # source://net-http//lib/net/http/header.rb#812 + def form_data=(params, sep = T.unsafe(nil)); end + + # Returns the array field value for the given +key+, + # or +nil+ if there is no such field; + # see {Fields}[rdoc-ref:Net::HTTPHeader@Fields]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res.get_fields('Connection') # => ["keep-alive"] + # res.get_fields('Nosuch') # => nil + # + # source://net-http//lib/net/http/header.rb#306 + def get_fields(key); end + + # source://net-http//lib/net/http/header.rb#185 + def initialize_http_header(initheader); end + + # Returns +true+ if the field for the case-insensitive +key+ exists, +false+ otherwise: + # + # req = Net::HTTP::Get.new(uri) + # req.key?('Accept') # => true + # req.key?('Nosuch') # => false + # + # @return [Boolean] + # + # source://net-http//lib/net/http/header.rb#463 + def key?(key); end + + # source://net-http//lib/net/http/header.rb#208 + def length; end + + # Returns the leading ('type') part of the + # {media type}[https://en.wikipedia.org/wiki/Media_type] + # from the value of field 'Content-Type', + # or +nil+ if no such field exists; + # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['content-type'] # => "application/json; charset=utf-8" + # res.main_type # => "application" + # + # source://net-http//lib/net/http/header.rb#723 + def main_type; end + + # Sets header 'Proxy-Authorization' using the given + # +account+ and +password+ strings: + # + # req.proxy_basic_auth('my_account', 'my_password') + # req['Proxy-Authorization'] + # # => "Basic bXlfYWNjb3VudDpteV9wYXNzd29yZA==" + # + # source://net-http//lib/net/http/header.rb#956 + def proxy_basic_auth(account, password); end + + # Returns an array of Range objects that represent + # the value of field 'Range', + # or +nil+ if there is no such field; + # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]: + # + # req = Net::HTTP::Get.new(uri) + # req['Range'] = 'bytes=0-99,200-299,400-499' + # req.range # => [0..99, 200..299, 400..499] + # req.delete('Range') + # req.range # # => nil + # + # source://net-http//lib/net/http/header.rb#509 + def range; end + + # call-seq: + # set_range(length) -> length + # set_range(offset, length) -> range + # set_range(begin..length) -> range + # + # Sets the value for field 'Range'; + # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]: + # + # With argument +length+: + # + # req = Net::HTTP::Get.new(uri) + # req.set_range(100) # => 100 + # req['Range'] # => "bytes=0-99" + # + # With arguments +offset+ and +length+: + # + # req.set_range(100, 100) # => 100...200 + # req['Range'] # => "bytes=100-199" + # + # With argument +range+: + # + # req.set_range(100..199) # => 100..199 + # req['Range'] # => "bytes=100-199" + # + # Net::HTTPHeader#range= is an alias for Net::HTTPHeader#set_range. + # + # source://net-http//lib/net/http/header.rb#576 + def range=(r, e = T.unsafe(nil)); end + + # Returns the integer representing length of the value of field + # 'Content-Range', or +nil+ if no such field exists; + # see {Content-Range response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-range-response-header]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['Content-Range'] # => nil + # res['Content-Range'] = 'bytes 0-499/1000' + # res.range_length # => 500 + # + # source://net-http//lib/net/http/header.rb#687 + def range_length; end + + # Sets the value of field 'Content-Type'; + # returns the new value; + # see {Content-Type request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-request-header]: + # + # req = Net::HTTP::Get.new(uri) + # req.set_content_type('application/json') # => ["application/json"] + # + # Net::HTTPHeader#content_type= is an alias for Net::HTTPHeader#set_content_type. + # + # source://net-http//lib/net/http/header.rb#772 + def set_content_type(type, params = T.unsafe(nil)); end + + # Stores form data to be used in a +POST+ or +PUT+ request. + # + # The form data given in +params+ consists of zero or more fields; + # each field is: + # + # - A scalar value. + # - A name/value pair. + # - An IO stream opened for reading. + # + # Argument +params+ should be an + # {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html#module-Enumerable-label-Enumerable+in+Ruby+Classes] + # (method params.map will be called), + # and is often an array or hash. + # + # First, we set up a request: + # + # _uri = uri.dup + # _uri.path ='/posts' + # req = Net::HTTP::Post.new(_uri) + # + # Argument +params+ As an Array + # + # When +params+ is an array, + # each of its elements is a subarray that defines a field; + # the subarray may contain: + # + # - One string: + # + # req.set_form([['foo'], ['bar'], ['baz']]) + # + # - Two strings: + # + # req.set_form([%w[foo 0], %w[bar 1], %w[baz 2]]) + # + # - When argument +enctype+ (see below) is given as + # 'multipart/form-data': + # + # - A string name and an IO stream opened for reading: + # + # require 'stringio' + # req.set_form([['file', StringIO.new('Ruby is cool.')]]) + # + # - A string name, an IO stream opened for reading, + # and an options hash, which may contain these entries: + # + # - +:filename+: The name of the file to use. + # - +:content_type+: The content type of the uploaded file. + # + # Example: + # + # req.set_form([['file', file, {filename: "other-filename.foo"}]] + # + # The various forms may be mixed: + # + # req.set_form(['foo', %w[bar 1], ['file', file]]) + # + # Argument +params+ As a Hash + # + # When +params+ is a hash, + # each of its entries is a name/value pair that defines a field: + # + # - The name is a string. + # - The value may be: + # + # - +nil+. + # - Another string. + # - An IO stream opened for reading + # (only when argument +enctype+ -- see below -- is given as + # 'multipart/form-data'). + # + # Examples: + # + # # Nil-valued fields. + # req.set_form({'foo' => nil, 'bar' => nil, 'baz' => nil}) + # + # # String-valued fields. + # req.set_form({'foo' => 0, 'bar' => 1, 'baz' => 2}) + # + # # IO-valued field. + # require 'stringio' + # req.set_form({'file' => StringIO.new('Ruby is cool.')}) + # + # # Mixture of fields. + # req.set_form({'foo' => nil, 'bar' => 1, 'file' => file}) + # + # Optional argument +enctype+ specifies the value to be given + # to field 'Content-Type', and must be one of: + # + # - 'application/x-www-form-urlencoded' (the default). + # - 'multipart/form-data'; + # see {RFC 7578}[https://www.rfc-editor.org/rfc/rfc7578]. + # + # Optional argument +formopt+ is a hash of options + # (applicable only when argument +enctype+ + # is 'multipart/form-data') + # that may include the following entries: + # + # - +:boundary+: The value is the boundary string for the multipart message. + # If not given, the boundary is a random string. + # See {Boundary}[https://www.rfc-editor.org/rfc/rfc7578#section-4.1]. + # - +:charset+: Value is the character set for the form submission. + # Field names and values of non-file fields should be encoded with this charset. + # + # source://net-http//lib/net/http/header.rb#924 + def set_form(params, enctype = T.unsafe(nil), formopt = T.unsafe(nil)); end + + # Sets the request body to a URL-encoded string derived from argument +params+, + # and sets request header field 'Content-Type' + # to 'application/x-www-form-urlencoded'. + # + # The resulting request is suitable for HTTP request +POST+ or +PUT+. + # + # Argument +params+ must be suitable for use as argument +enum+ to + # {URI.encode_www_form}[https://docs.ruby-lang.org/en/master/URI.html#method-c-encode_www_form]. + # + # With only argument +params+ given, + # sets the body to a URL-encoded string with the default separator '&': + # + # req = Net::HTTP::Post.new('example.com') + # + # req.set_form_data(q: 'ruby', lang: 'en') + # req.body # => "q=ruby&lang=en" + # req['Content-Type'] # => "application/x-www-form-urlencoded" + # + # req.set_form_data([['q', 'ruby'], ['lang', 'en']]) + # req.body # => "q=ruby&lang=en" + # + # req.set_form_data(q: ['ruby', 'perl'], lang: 'en') + # req.body # => "q=ruby&q=perl&lang=en" + # + # req.set_form_data([['q', 'ruby'], ['q', 'perl'], ['lang', 'en']]) + # req.body # => "q=ruby&q=perl&lang=en" + # + # With string argument +sep+ also given, + # uses that string as the separator: + # + # req.set_form_data({q: 'ruby', lang: 'en'}, '|') + # req.body # => "q=ruby|lang=en" + # + # Net::HTTPHeader#form_data= is an alias for Net::HTTPHeader#set_form_data. + # + # source://net-http//lib/net/http/header.rb#812 + def set_form_data(params, sep = T.unsafe(nil)); end + + # call-seq: + # set_range(length) -> length + # set_range(offset, length) -> range + # set_range(begin..length) -> range + # + # Sets the value for field 'Range'; + # see {Range request header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#range-request-header]: + # + # With argument +length+: + # + # req = Net::HTTP::Get.new(uri) + # req.set_range(100) # => 100 + # req['Range'] # => "bytes=0-99" + # + # With arguments +offset+ and +length+: + # + # req.set_range(100, 100) # => 100...200 + # req['Range'] # => "bytes=100-199" + # + # With argument +range+: + # + # req.set_range(100..199) # => 100..199 + # req['Range'] # => "bytes=100-199" + # + # Net::HTTPHeader#range= is an alias for Net::HTTPHeader#set_range. + # + # source://net-http//lib/net/http/header.rb#576 + def set_range(r, e = T.unsafe(nil)); end + + # source://net-http//lib/net/http/header.rb#208 + def size; end + + # Returns the trailing ('subtype') part of the + # {media type}[https://en.wikipedia.org/wiki/Media_type] + # from the value of field 'Content-Type', + # or +nil+ if no such field exists; + # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['content-type'] # => "application/json; charset=utf-8" + # res.sub_type # => "json" + # + # source://net-http//lib/net/http/header.rb#738 + def sub_type; end + + # Returns a hash of the key/value pairs: + # + # req = Net::HTTP::Get.new(uri) + # req.to_hash + # # => + # {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"], + # "accept"=>["*/*"], + # "user-agent"=>["Ruby"], + # "host"=>["jsonplaceholder.typicode.com"]} + # + # source://net-http//lib/net/http/header.rb#477 + def to_hash; end + + # Returns the trailing ('parameters') part of the value of field 'Content-Type', + # or +nil+ if no such field exists; + # see {Content-Type response header}[https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#content-type-response-header]: + # + # res = Net::HTTP.get_response(hostname, '/todos/1') + # res['content-type'] # => "application/json; charset=utf-8" + # res.type_params # => {"charset"=>"utf-8"} + # + # source://net-http//lib/net/http/header.rb#753 + def type_params; end + + private + + # source://net-http//lib/net/http/header.rb#285 + def append_field_value(ary, val); end + + # source://net-http//lib/net/http/header.rb#960 + def basic_encode(account, password); end + + # source://net-http//lib/net/http/header.rb#493 + def capitalize(name); end + + # source://net-http//lib/net/http/header.rb#270 + def set_field(key, val); end +end + +# source://net-http//lib/net/http/header.rb#183 +Net::HTTPHeader::MAX_FIELD_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://net-http//lib/net/http/header.rb#182 +Net::HTTPHeader::MAX_KEY_LENGTH = T.let(T.unsafe(nil), Integer) + +# source://net-http//lib/net/http/responses.rb#23 +Net::HTTPInformation::EXCEPTION_TYPE = Net::HTTPError + +# source://net-http//lib/net/http/backward.rb#19 +Net::HTTPInformationCode = Net::HTTPInformation + +# Response class for Loop Detected (WebDAV) responses (status code 508). +# +# The server detected an infinite loop while processing the request. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508]. +# - {RFC 5942}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.2]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#508]. +# +# source://net-http//lib/net/http/responses.rb#1061 +class Net::HTTPLoopDetected < ::Net::HTTPServerError; end + +# source://net-http//lib/net/http/responses.rb#1062 +Net::HTTPLoopDetected::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# Response class for Misdirected Request responses (status code 421). +# +# The request was directed at a server that is not able to produce a response. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-421-misdirected-request]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#421]. +# +# source://net-http//lib/net/http/responses.rb#776 +class Net::HTTPMisdirectedRequest < ::Net::HTTPClientError; end + +# source://net-http//lib/net/http/responses.rb#777 +Net::HTTPMisdirectedRequest::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# source://net-http//lib/net/http/responses.rb#378 +Net::HTTPMovedTemporarily = Net::HTTPFound + +# source://net-http//lib/net/http/responses.rb#343 +Net::HTTPMultipleChoice = Net::HTTPMultipleChoices + +# Response class for Not Extended responses (status code 510). +# +# Further extensions to the request are required for the server to fulfill it. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/510]. +# - {RFC 2774}[https://www.rfc-editor.org/rfc/rfc2774.html#section-7]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#510]. +# +# source://net-http//lib/net/http/responses.rb#1078 +class Net::HTTPNotExtended < ::Net::HTTPServerError; end + +# source://net-http//lib/net/http/responses.rb#1079 +Net::HTTPNotExtended::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# Response class for Payload Too Large responses (status code 413). +# +# The request is larger than the server is willing or able to process. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413]. +# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-413-content-too-large]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#413]. +# +# source://net-http//lib/net/http/responses.rb#688 +class Net::HTTPPayloadTooLarge < ::Net::HTTPClientError; end + +# source://net-http//lib/net/http/responses.rb#689 +Net::HTTPPayloadTooLarge::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# Response class for +Processing+ responses (status code 102). +# +# The +Processing+ response indicates that the server has received +# and is processing the request, but no response is available yet. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {RFC 2518}[https://www.rfc-editor.org/rfc/rfc2518#section-10.1]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#102]. +# +# source://net-http//lib/net/http/responses.rb#129 +class Net::HTTPProcessing < ::Net::HTTPInformation; end + +# source://net-http//lib/net/http/responses.rb#130 +Net::HTTPProcessing::HAS_BODY = T.let(T.unsafe(nil), FalseClass) + +# Response class for Range Not Satisfiable responses (status code 416). +# +# The request entity has a media type which the server or resource does not support. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416]. +# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-416-range-not-satisfiable]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#416]. +# +# source://net-http//lib/net/http/responses.rb#739 +class Net::HTTPRangeNotSatisfiable < ::Net::HTTPClientError; end + +# source://net-http//lib/net/http/responses.rb#740 +Net::HTTPRangeNotSatisfiable::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# source://net-http//lib/net/http/responses.rb#53 +Net::HTTPRedirection::EXCEPTION_TYPE = Net::HTTPRetriableError + +# source://net-http//lib/net/http/backward.rb#21 +Net::HTTPRedirectionCode = Net::HTTPRedirection + +# source://net-http//lib/net/http/responses.rb#709 +Net::HTTPRequestURITooLarge = Net::HTTPURITooLong + +# Typo since 2001 +# +# source://net-http//lib/net/http/backward.rb#28 +Net::HTTPResponceReceiver = Net::HTTPResponse + +# This class is the base class for \Net::HTTP response classes. +# +# == About the Examples +# +# :include: doc/net-http/examples.rdoc +# +# == Returned Responses +# +# \Method Net::HTTP.get_response returns +# an instance of one of the subclasses of \Net::HTTPResponse: +# +# Net::HTTP.get_response(uri) +# # => # +# Net::HTTP.get_response(hostname, '/nosuch') +# # => # +# +# As does method Net::HTTP#request: +# +# req = Net::HTTP::Get.new(uri) +# Net::HTTP.start(hostname) do |http| +# http.request(req) +# end # => # +# +# \Class \Net::HTTPResponse includes module Net::HTTPHeader, +# which provides access to response header values via (among others): +# +# - \Hash-like method []. +# - Specific reader methods, such as +content_type+. +# +# Examples: +# +# res = Net::HTTP.get_response(uri) # => # +# res['Content-Type'] # => "text/html; charset=UTF-8" +# res.content_type # => "text/html" +# +# == Response Subclasses +# +# \Class \Net::HTTPResponse has a subclass for each +# {HTTP status code}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes]. +# You can look up the response class for a given code: +# +# Net::HTTPResponse::CODE_TO_OBJ['200'] # => Net::HTTPOK +# Net::HTTPResponse::CODE_TO_OBJ['400'] # => Net::HTTPBadRequest +# Net::HTTPResponse::CODE_TO_OBJ['404'] # => Net::HTTPNotFound +# +# And you can retrieve the status code for a response object: +# +# Net::HTTP.get_response(uri).code # => "200" +# Net::HTTP.get_response(hostname, '/nosuch').code # => "404" +# +# The response subclasses (indentation shows class hierarchy): +# +# - Net::HTTPUnknownResponse (for unhandled \HTTP extensions). +# +# - Net::HTTPInformation: +# +# - Net::HTTPContinue (100) +# - Net::HTTPSwitchProtocol (101) +# - Net::HTTPProcessing (102) +# - Net::HTTPEarlyHints (103) +# +# - Net::HTTPSuccess: +# +# - Net::HTTPOK (200) +# - Net::HTTPCreated (201) +# - Net::HTTPAccepted (202) +# - Net::HTTPNonAuthoritativeInformation (203) +# - Net::HTTPNoContent (204) +# - Net::HTTPResetContent (205) +# - Net::HTTPPartialContent (206) +# - Net::HTTPMultiStatus (207) +# - Net::HTTPAlreadyReported (208) +# - Net::HTTPIMUsed (226) +# +# - Net::HTTPRedirection: +# +# - Net::HTTPMultipleChoices (300) +# - Net::HTTPMovedPermanently (301) +# - Net::HTTPFound (302) +# - Net::HTTPSeeOther (303) +# - Net::HTTPNotModified (304) +# - Net::HTTPUseProxy (305) +# - Net::HTTPTemporaryRedirect (307) +# - Net::HTTPPermanentRedirect (308) +# +# - Net::HTTPClientError: +# +# - Net::HTTPBadRequest (400) +# - Net::HTTPUnauthorized (401) +# - Net::HTTPPaymentRequired (402) +# - Net::HTTPForbidden (403) +# - Net::HTTPNotFound (404) +# - Net::HTTPMethodNotAllowed (405) +# - Net::HTTPNotAcceptable (406) +# - Net::HTTPProxyAuthenticationRequired (407) +# - Net::HTTPRequestTimeOut (408) +# - Net::HTTPConflict (409) +# - Net::HTTPGone (410) +# - Net::HTTPLengthRequired (411) +# - Net::HTTPPreconditionFailed (412) +# - Net::HTTPRequestEntityTooLarge (413) +# - Net::HTTPRequestURITooLong (414) +# - Net::HTTPUnsupportedMediaType (415) +# - Net::HTTPRequestedRangeNotSatisfiable (416) +# - Net::HTTPExpectationFailed (417) +# - Net::HTTPMisdirectedRequest (421) +# - Net::HTTPUnprocessableEntity (422) +# - Net::HTTPLocked (423) +# - Net::HTTPFailedDependency (424) +# - Net::HTTPUpgradeRequired (426) +# - Net::HTTPPreconditionRequired (428) +# - Net::HTTPTooManyRequests (429) +# - Net::HTTPRequestHeaderFieldsTooLarge (431) +# - Net::HTTPUnavailableForLegalReasons (451) +# +# - Net::HTTPServerError: +# +# - Net::HTTPInternalServerError (500) +# - Net::HTTPNotImplemented (501) +# - Net::HTTPBadGateway (502) +# - Net::HTTPServiceUnavailable (503) +# - Net::HTTPGatewayTimeOut (504) +# - Net::HTTPVersionNotSupported (505) +# - Net::HTTPVariantAlsoNegotiates (506) +# - Net::HTTPInsufficientStorage (507) +# - Net::HTTPLoopDetected (508) +# - Net::HTTPNotExtended (510) +# - Net::HTTPNetworkAuthenticationRequired (511) +# +# There is also the Net::HTTPBadResponse exception which is raised when +# there is a protocol error. +# +# source://net-http//lib/net/http/response.rb#135 +class Net::HTTPResponse + include ::Net::HTTPHeader + + # @return [HTTPResponse] a new instance of HTTPResponse + # + # source://net-http//lib/net/http/response.rb#194 + def initialize(httpv, code, msg); end + + # Returns the string response body; + # note that repeated calls for the unmodified body return a cached string: + # + # path = '/todos/1' + # Net::HTTP.start(hostname) do |http| + # res = http.get(path) + # p res.body + # p http.head(path).body # No body. + # end + # + # Output: + # + # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}" + # nil + # + # source://net-http//lib/net/http/response.rb#400 + def body; end + + # Sets the body of the response to the given value. + # + # source://net-http//lib/net/http/response.rb#405 + def body=(value); end + + # Returns the value set by body_encoding=, or +false+ if none; + # see #body_encoding=. + # + # source://net-http//lib/net/http/response.rb#229 + def body_encoding; end + + # Sets the encoding that should be used when reading the body: + # + # - If the given value is an Encoding object, that encoding will be used. + # - Otherwise if the value is a string, the value of + # {Encoding#find(value)}[https://docs.ruby-lang.org/en/master/Encoding.html#method-c-find] + # will be used. + # - Otherwise an encoding will be deduced from the body itself. + # + # Examples: + # + # http = Net::HTTP.new(hostname) + # req = Net::HTTP::Get.new('/') + # + # http.request(req) do |res| + # p res.body.encoding # => # + # end + # + # http.request(req) do |res| + # res.body_encoding = "UTF-8" + # p res.body.encoding # => # + # end + # + # source://net-http//lib/net/http/response.rb#253 + def body_encoding=(value); end + + # The HTTP result code string. For example, '302'. You can also + # determine the response type by examining which response subclass + # the response object is an instance of. + # + # source://net-http//lib/net/http/response.rb#213 + def code; end + + # response <-> exception relationship + # + # source://net-http//lib/net/http/response.rb#270 + def code_type; end + + # Set to true automatically when the request did not contain an + # Accept-Encoding header from the user. + # + # source://net-http//lib/net/http/response.rb#225 + def decode_content; end + + # Set to true automatically when the request did not contain an + # Accept-Encoding header from the user. + # + # source://net-http//lib/net/http/response.rb#225 + def decode_content=(_arg0); end + + # Returns the string response body; + # note that repeated calls for the unmodified body return a cached string: + # + # path = '/todos/1' + # Net::HTTP.start(hostname) do |http| + # res = http.get(path) + # p res.body + # p http.head(path).body # No body. + # end + # + # Output: + # + # "{\n \"userId\": 1,\n \"id\": 1,\n \"title\": \"delectus aut autem\",\n \"completed\": false\n}" + # nil + # + # source://net-http//lib/net/http/response.rb#400 + def entity; end + + # @raise [error_type()] + # + # source://net-http//lib/net/http/response.rb#274 + def error!; end + + # source://net-http//lib/net/http/response.rb#280 + def error_type; end + + # source://net-http//lib/net/http/response.rb#302 + def header; end + + # The HTTP version supported by the server. + # + # source://net-http//lib/net/http/response.rb#208 + def http_version; end + + # Whether to ignore EOF when reading bodies with a specified Content-Length + # header. + # + # source://net-http//lib/net/http/response.rb#260 + def ignore_eof; end + + # Whether to ignore EOF when reading bodies with a specified Content-Length + # header. + # + # source://net-http//lib/net/http/response.rb#260 + def ignore_eof=(_arg0); end + + # source://net-http//lib/net/http/response.rb#262 + def inspect; end + + # The HTTP result message sent by the server. For example, 'Not Found'. + # + # source://net-http//lib/net/http/response.rb#216 + def message; end + + # The HTTP result message sent by the server. For example, 'Not Found'. + # + # source://net-http//lib/net/http/response.rb#216 + def msg; end + + # Gets the entity body returned by the remote HTTP server. + # + # If a block is given, the body is passed to the block, and + # the body is provided in fragments, as it is read in from the socket. + # + # If +dest+ argument is given, response is read into that variable, + # with dest#<< method (it could be String or IO, or any + # other object responding to <<). + # + # Calling this method a second or subsequent time for the same + # HTTPResponse object will return the value already read. + # + # http.request_get('/index.html') {|res| + # puts res.read_body + # } + # + # http.request_get('/index.html') {|res| + # p res.read_body.object_id # 538149362 + # p res.read_body.object_id # 538149362 + # } + # + # # using iterator + # http.request_get('/index.html') {|res| + # res.read_body do |segment| + # print segment + # end + # } + # + # source://net-http//lib/net/http/response.rb#355 + def read_body(dest = T.unsafe(nil), &block); end + + # source://net-http//lib/net/http/response.rb#307 + def read_header; end + + # body + # + # source://net-http//lib/net/http/response.rb#316 + def reading_body(sock, reqmethodallowbody); end + + # header (for backward compatibility only; DO NOT USE) + # + # source://net-http//lib/net/http/response.rb#297 + def response; end + + # The URI used to fetch this response. The response URI is only available + # if a URI was used to create the request. + # + # source://net-http//lib/net/http/response.rb#221 + def uri; end + + # source://net-http//lib/net/http/response.rb#289 + def uri=(uri); end + + # Raises an HTTP error if the response is not 2xx (success). + # + # source://net-http//lib/net/http/response.rb#285 + def value; end + + private + + # source://net-http//lib/net/http/response.rb#450 + def check_bom(str); end + + # source://net-http//lib/net/http/response.rb#414 + def detect_encoding(str, encoding = T.unsafe(nil)); end + + # source://net-http//lib/net/http/response.rb#540 + def extracting_encodings_from_meta_elements(value); end + + # source://net-http//lib/net/http/response.rb#505 + def get_attribute(ss); end + + # Checks for a supported Content-Encoding header and yields an Inflate + # wrapper for this response's socket when zlib is present. If the + # Content-Encoding is not supported or zlib is missing, the plain socket is + # yielded. + # + # If a Content-Range header is present, a plain socket is yielded as the + # bytes in the range may not be a complete deflate block. + # + # source://net-http//lib/net/http/response.rb#557 + def inflater; end + + # @raise [ArgumentError] + # + # source://net-http//lib/net/http/response.rb#646 + def procdest(dest, block); end + + # source://net-http//lib/net/http/response.rb#592 + def read_body_0(dest); end + + # read_chunked reads from +@socket+ for chunk-size, chunk-extension, CRLF, + # etc. and +chunk_data_io+ for chunk-data which may be deflate or gzip + # encoded. + # + # See RFC 2616 section 3.6.1 for definitions + # + # source://net-http//lib/net/http/response.rb#622 + def read_chunked(dest, chunk_data_io); end + + # source://net-http//lib/net/http/response.rb#464 + def scanning_meta(str); end + + # source://net-http//lib/net/http/response.rb#434 + def sniff_encoding(str, encoding = T.unsafe(nil)); end + + # @raise [IOError] + # + # source://net-http//lib/net/http/response.rb#642 + def stream_check; end + + class << self + # true if the response has a body. + # + # @return [Boolean] + # + # source://net-http//lib/net/http/response.rb#138 + def body_permitted?; end + + # source://net-http//lib/net/http/response.rb#142 + def exception_type; end + + # source://net-http//lib/net/http/response.rb#146 + def read_new(sock); end + + private + + # @yield [key, value] + # + # source://net-http//lib/net/http/response.rb#170 + def each_response_header(sock); end + + # source://net-http//lib/net/http/response.rb#157 + def read_status_line(sock); end + + # source://net-http//lib/net/http/response.rb#164 + def response_class(code); end + end +end + +# Inflater is a wrapper around Net::BufferedIO that transparently inflates +# zlib and gzip streams. +# +# source://net-http//lib/net/http/response.rb#660 +class Net::HTTPResponse::Inflater + # Creates a new Inflater wrapping +socket+ + # + # @return [Inflater] a new instance of Inflater + # + # source://net-http//lib/net/http/response.rb#665 + def initialize(socket); end + + # The number of bytes inflated, used to update the Content-Length of + # the response. + # + # source://net-http//lib/net/http/response.rb#683 + def bytes_inflated; end + + # Finishes the inflate stream. + # + # source://net-http//lib/net/http/response.rb#674 + def finish; end + + # Returns a Net::ReadAdapter that inflates each read chunk into +dest+. + # + # This allows a large response body to be inflated without storing the + # entire body in memory. + # + # source://net-http//lib/net/http/response.rb#693 + def inflate_adapter(dest); end + + # Reads +clen+ bytes from the socket, inflates them, then writes them to + # +dest+. +ignore_eof+ is passed down to Net::BufferedIO#read + # + # Unlike Net::BufferedIO#read, this method returns more than +clen+ bytes. + # At this time there is no way for a user of Net::HTTPResponse to read a + # specific number of bytes from the HTTP response body, so this internal + # API does not return the same number of bytes as were requested. + # + # See https://bugs.ruby-lang.org/issues/6492 for further discussion. + # + # source://net-http//lib/net/http/response.rb#720 + def read(clen, dest, ignore_eof = T.unsafe(nil)); end + + # Reads the rest of the socket, inflates it, then writes it to +dest+. + # + # source://net-http//lib/net/http/response.rb#729 + def read_all(dest); end +end + +# source://net-http//lib/net/http/backward.rb#26 +Net::HTTPResponseReceiver = Net::HTTPResponse + +# source://net-http//lib/net/http/backward.rb#22 +Net::HTTPRetriableCode = Net::HTTPRedirection + +# source://net-http//lib/net/http/responses.rb#81 +Net::HTTPServerError::EXCEPTION_TYPE = Net::HTTPFatalError + +# source://net-http//lib/net/http/backward.rb#25 +Net::HTTPServerErrorCode = Net::HTTPServerError + +# source://net-http//lib/net/http/backward.rb#17 +Net::HTTPSession = Net::HTTP + +# source://net-http//lib/net/http/responses.rb#38 +Net::HTTPSuccess::EXCEPTION_TYPE = Net::HTTPError + +# source://net-http//lib/net/http/backward.rb#20 +Net::HTTPSuccessCode = Net::HTTPSuccess + +# Response class for URI Too Long responses (status code 414). +# +# The URI provided was too long for the server to process. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/414]. +# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-414-uri-too-long]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#414]. +# +# source://net-http//lib/net/http/responses.rb#705 +class Net::HTTPURITooLong < ::Net::HTTPClientError; end + +# source://net-http//lib/net/http/responses.rb#706 +Net::HTTPURITooLong::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# source://net-http//lib/net/http/responses.rb#9 +Net::HTTPUnknownResponse::EXCEPTION_TYPE = Net::HTTPError + +# Response class for Variant Also Negotiates responses (status code 506). +# +# Transparent content negotiation for the request results in a circular reference. +# +# :include: doc/net-http/included_getters.rdoc +# +# References: +# +# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/506]. +# - {RFC 2295}[https://www.rfc-editor.org/rfc/rfc2295#section-8.1]. +# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#506]. +# +# source://net-http//lib/net/http/responses.rb#1029 +class Net::HTTPVariantAlsoNegotiates < ::Net::HTTPServerError; end + +# source://net-http//lib/net/http/responses.rb#1030 +Net::HTTPVariantAlsoNegotiates::HAS_BODY = T.let(T.unsafe(nil), TrueClass) + +# source://net-http//lib/net/http/backward.rb#12 +Net::NetPrivate::HTTPRequest = Net::HTTPRequest diff --git a/sorbet/rbi/gems/net-imap@0.4.10.rbi b/sorbet/rbi/gems/net-imap@0.4.14.rbi similarity index 91% rename from sorbet/rbi/gems/net-imap@0.4.10.rbi rename to sorbet/rbi/gems/net-imap@0.4.14.rbi index 23528cac9..a7462cd0c 100644 --- a/sorbet/rbi/gems/net-imap@0.4.10.rbi +++ b/sorbet/rbi/gems/net-imap@0.4.14.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `net-imap` gem. # Please instead update this file by running `bin/tapioca gem net-imap`. + # Net::IMAP implements Internet Message Access Protocol (\IMAP) client # functionality. The protocol is described # in {IMAP4rev1 [RFC3501]}[https://tools.ietf.org/html/rfc3501] @@ -721,18 +722,44 @@ class Net::IMAP < ::Net::Protocol # If +ssl+ is a hash, it's passed to # {OpenSSL::SSL::SSLContext#set_params}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-set_params]; # the keys are names of attribute assignment methods on - # SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html]. + # SSLContext[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html]. For example: + # + # [{ca_file}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_file]] + # The path to a file containing a PEM-format CA certificate. + # [{ca_path}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-ca_path]] + # The path to a directory containing CA certificates in PEM format. + # [{min_version}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#method-i-min_version-3D]] + # Sets the lower bound on the supported SSL/TLS protocol version. Set to + # an +OpenSSL+ constant such as +OpenSSL::SSL::TLS1_2_VERSION+, + # [{verify_mode}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html#attribute-i-verify_mode]] + # SSL session verification mode. Valid modes include + # +OpenSSL::SSL::VERIFY_PEER+ and +OpenSSL::SSL::VERIFY_NONE+. + # + # See {OpenSSL::SSL::SSLContext}[https://docs.ruby-lang.org/en/master/OpenSSL/SSL/SSLContext.html] for other valid SSL context params. + # + # See DeprecatedClientOptions.new for deprecated SSL arguments. + # + # [config] + # A Net::IMAP::Config object to use as the basis for #config. By default, + # the global Net::IMAP.config is used. # - # [open_timeout] - # Seconds to wait until a connection is opened - # [idle_response_timeout] - # Seconds to wait until an IDLE response is received + # >>> + # *NOTE:* +config+ does not set #config directly---it sets the _parent_ + # config for inheritance. Every client creates its own unique #config. # - # See DeprecatedClientOptions.new for deprecated arguments. + # All other keyword arguments are forwarded to Net::IMAP::Config.new, to + # initialize the client's #config. For example: + # + # [{open_timeout}[rdoc-ref:Config#open_timeout]] + # Seconds to wait until a connection is opened + # [{idle_response_timeout}[rdoc-ref:Config#idle_response_timeout]] + # Seconds to wait until an IDLE response is received + # + # See Net::IMAP::Config for other valid options. # # ==== Examples # - # Connect to cleartext port 143 at mail.example.com and recieve the server greeting: + # Connect to cleartext port 143 at mail.example.com and receive the server greeting: # imap = Net::IMAP.new('mail.example.com', ssl: false) # => # # imap.port => 143 # imap.tls_verified? => false @@ -804,7 +831,7 @@ class Net::IMAP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-imap//lib/net/imap.rb#2563 + # source://net-imap//lib/net/imap.rb#2614 def add_response_handler(handler = T.unsafe(nil), &block); end # Sends an {APPEND command [IMAP4rev1 §6.3.11]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.11] @@ -839,7 +866,7 @@ class Net::IMAP < ::Net::Protocol # TODO: add MULTIAPPEND support # ++ # - # source://net-imap//lib/net/imap.rb#1831 + # source://net-imap//lib/net/imap.rb#1866 def append(mailbox, message, flags = T.unsafe(nil), date_time = T.unsafe(nil)); end # Returns whether the server supports a given SASL +mechanism+ for use with @@ -856,7 +883,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap//lib/net/imap.rb#1027 + # source://net-imap//lib/net/imap.rb#1059 def auth_capable?(mechanism); end # Returns the #authenticate mechanisms that the server claims to support. @@ -880,11 +907,11 @@ class Net::IMAP < ::Net::Protocol # # Related: #authenticate, #auth_capable?, #capabilities # - # source://net-imap//lib/net/imap.rb#1010 + # source://net-imap//lib/net/imap.rb#1042 def auth_mechanisms; end # :call-seq: - # authenticate(mechanism, *, sasl_ir: true, registry: Net::IMAP::SASL.authenticators, **, &) -> ok_resp + # authenticate(mechanism, *, sasl_ir: config.sasl_ir, registry: Net::IMAP::SASL.authenticators, **, &) -> ok_resp # # Sends an {AUTHENTICATE command [IMAP4rev1 §6.2.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.2] # to authenticate the client. If successful, the connection enters the @@ -893,7 +920,8 @@ class Net::IMAP < ::Net::Protocol # +mechanism+ is the name of the \SASL authentication mechanism to be used. # # +sasl_ir+ allows or disallows sending an "initial response" (see the - # +SASL-IR+ capability, below). + # +SASL-IR+ capability, below). Defaults to the #config value for + # {sasl_ir}[rdoc-ref:Config#sasl_ir], which defaults to +true+. # # All other arguments are forwarded to the registered SASL authenticator for # the requested mechanism. The documentation for each individual @@ -990,7 +1018,7 @@ class Net::IMAP < ::Net::Protocol # completes. If the TaggedResponse to #authenticate includes updated # capabilities, they will be cached. # - # source://net-imap//lib/net/imap.rb#1306 + # source://net-imap//lib/net/imap.rb#1339 def authenticate(mechanism, *creds, sasl_ir: T.unsafe(nil), **props, &callback); end # Returns the server capabilities. When available, cached capabilities are @@ -1005,7 +1033,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #capable?, #auth_capable?, #auth_mechanisms, #capability, #enable # - # source://net-imap//lib/net/imap.rb#986 + # source://net-imap//lib/net/imap.rb#1018 def capabilities; end # Returns whether capabilities have been cached. When true, #capable? and @@ -1017,7 +1045,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap//lib/net/imap.rb#1037 + # source://net-imap//lib/net/imap.rb#1069 def capabilities_cached?; end # Sends a {CAPABILITY command [IMAP4rev1 §6.1.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.1] @@ -1039,7 +1067,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #capable?, #auth_capable?, #capability, #enable # - # source://net-imap//lib/net/imap.rb#1075 + # source://net-imap//lib/net/imap.rb#1107 def capability; end # Returns whether the server supports a given +capability+. When available, @@ -1055,7 +1083,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap//lib/net/imap.rb#972 + # source://net-imap//lib/net/imap.rb#1004 def capability?(capability); end # Returns whether the server supports a given +capability+. When available, @@ -1071,7 +1099,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap//lib/net/imap.rb#972 + # source://net-imap//lib/net/imap.rb#1004 def capable?(capability); end # Sends a {CHECK command [IMAP4rev1 §6.4.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.1] @@ -1081,7 +1109,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #idle, #noop # - # source://net-imap//lib/net/imap.rb#1847 + # source://net-imap//lib/net/imap.rb#1882 def check; end # Clears capabilities that have been remembered by the Net::IMAP client. @@ -1094,7 +1122,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #capable?, #capability, #capabilities_cached? # - # source://net-imap//lib/net/imap.rb#1050 + # source://net-imap//lib/net/imap.rb#1082 def clear_cached_capabilities; end # :call-seq: @@ -1109,10 +1137,10 @@ class Net::IMAP < ::Net::Protocol # # Related: #responses, #response_handlers # - # source://net-imap//lib/net/imap.rb#2520 + # source://net-imap//lib/net/imap.rb#2571 def clear_responses(type = T.unsafe(nil)); end - # source://net-imap//lib/net/imap.rb#925 + # source://net-imap//lib/net/imap.rb#957 def client_thread; end # Sends a {CLOSE command [IMAP4rev1 §6.4.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.2] @@ -1122,9 +1150,17 @@ class Net::IMAP < ::Net::Protocol # # Related: #unselect # - # source://net-imap//lib/net/imap.rb#1857 + # source://net-imap//lib/net/imap.rb#1892 def close; end + # The client configuration. See Net::IMAP::Config. + # + # By default, the client's local configuration inherits from the global + # Net::IMAP.config. + # + # source://net-imap//lib/net/imap.rb#772 + def config; end + # Sends a {COPY command [IMAP4rev1 §6.4.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.7] # to copy the specified message(s) to the end of the specified destination # +mailbox+. The +set+ parameter is a number, an array of numbers, or a @@ -1140,7 +1176,7 @@ class Net::IMAP < ::Net::Protocol # mailbox, the UID set of the source messages, and the assigned UID set of # the moved messages. # - # source://net-imap//lib/net/imap.rb#2162 + # source://net-imap//lib/net/imap.rb#2197 def copy(set, mailbox); end # Sends a {CREATE command [IMAP4rev1 §6.3.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.3] @@ -1151,7 +1187,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #rename, #delete # - # source://net-imap//lib/net/imap.rb#1431 + # source://net-imap//lib/net/imap.rb#1466 def create(mailbox); end # Sends a {DELETE command [IMAP4rev1 §6.3.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.4] @@ -1163,14 +1199,14 @@ class Net::IMAP < ::Net::Protocol # # Related: #create, #rename # - # source://net-imap//lib/net/imap.rb#1443 + # source://net-imap//lib/net/imap.rb#1478 def delete(mailbox); end # Disconnects from the server. # # Related: #logout, #logout! # - # source://net-imap//lib/net/imap.rb#933 + # source://net-imap//lib/net/imap.rb#965 def disconnect; end # Returns true if disconnected from the server. @@ -1179,7 +1215,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap//lib/net/imap.rb#958 + # source://net-imap//lib/net/imap.rb#990 def disconnected?; end # Sends an {ENABLE command [RFC5161 §3.2]}[https://www.rfc-editor.org/rfc/rfc5161#section-3.1] @@ -1255,7 +1291,7 @@ class Net::IMAP < ::Net::Protocol # # Caution is advised. # - # source://net-imap//lib/net/imap.rb#2373 + # source://net-imap//lib/net/imap.rb#2408 def enable(*capabilities); end # Sends a {EXAMINE command [IMAP4rev1 §6.3.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.2] @@ -1268,7 +1304,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #select # - # source://net-imap//lib/net/imap.rb#1415 + # source://net-imap//lib/net/imap.rb#1450 def examine(mailbox, condstore: T.unsafe(nil)); end # Sends an {EXPUNGE command [IMAP4rev1 §6.4.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.3] @@ -1277,7 +1313,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #uid_expunge # - # source://net-imap//lib/net/imap.rb#1882 + # source://net-imap//lib/net/imap.rb#1917 def expunge; end # :call-seq: @@ -1333,7 +1369,7 @@ class Net::IMAP < ::Net::Protocol # +changedsince+ argument. Using +changedsince+ implicitly enables the # +CONDSTORE+ extension. # - # source://net-imap//lib/net/imap.rb#2057 + # source://net-imap//lib/net/imap.rb#2092 def fetch(set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end # Sends a {GETACL command [RFC4314 §3.3]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.3] @@ -1347,7 +1383,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +ACL+ # [RFC4314[https://tools.ietf.org/html/rfc4314]]. # - # source://net-imap//lib/net/imap.rb#1711 + # source://net-imap//lib/net/imap.rb#1746 def getacl(mailbox); end # Sends a {GETQUOTA command [RFC2087 §4.2]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.2] @@ -1362,7 +1398,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +QUOTA+ # [RFC2087[https://tools.ietf.org/html/rfc2087]]. # - # source://net-imap//lib/net/imap.rb#1655 + # source://net-imap//lib/net/imap.rb#1690 def getquota(mailbox); end # Sends a {GETQUOTAROOT command [RFC2087 §4.3]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.3] @@ -1377,17 +1413,17 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +QUOTA+ # [RFC2087[https://tools.ietf.org/html/rfc2087]]. # - # source://net-imap//lib/net/imap.rb#1634 + # source://net-imap//lib/net/imap.rb#1669 def getquotaroot(mailbox); end # Returns the initial greeting the server, an UntaggedResponse. # - # source://net-imap//lib/net/imap.rb#765 + # source://net-imap//lib/net/imap.rb#766 def greeting; end # The hostname this client connected to # - # source://net-imap//lib/net/imap.rb#776 + # source://net-imap//lib/net/imap.rb#783 def host; end # Sends an {ID command [RFC2971 §3.1]}[https://www.rfc-editor.org/rfc/rfc2971#section-3.1] @@ -1413,7 +1449,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +ID+ # [RFC2971[https://tools.ietf.org/html/rfc2971]]. # - # source://net-imap//lib/net/imap.rb#1104 + # source://net-imap//lib/net/imap.rb#1136 def id(client_id = T.unsafe(nil)); end # Sends an {IDLE command [RFC2177 §3]}[https://www.rfc-editor.org/rfc/rfc6851#section-3] @@ -1428,11 +1464,17 @@ class Net::IMAP < ::Net::Protocol # checks the connection for each 60 seconds. # # loop do - # imap.idle(60) do |res| - # ... + # imap.idle(60) do |response| + # do_something_with(response) + # imap.idle_done if some_condition?(response) # end # end # + # Returns the server's response to indicate the IDLE state has ended. + # Returns +nil+ if the server does not respond to #idle_done within + # {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout] + # seconds. + # # Related: #idle_done, #noop, #check # # ===== Capabilities @@ -1442,19 +1484,23 @@ class Net::IMAP < ::Net::Protocol # # @raise [LocalJumpError] # - # source://net-imap//lib/net/imap.rb#2411 + # source://net-imap//lib/net/imap.rb#2452 def idle(timeout = T.unsafe(nil), &response_handler); end - # Leaves IDLE. + # Leaves IDLE, allowing #idle to return. + # + # If the server does not respond within + # {config.idle_response_timeout}[rdoc-ref:Config#idle_response_timeout] + # seconds, #idle will return +nil+. # # Related: #idle # - # source://net-imap//lib/net/imap.rb#2443 + # source://net-imap//lib/net/imap.rb#2488 def idle_done; end # Seconds to wait until an IDLE response is received. # - # source://net-imap//lib/net/imap.rb#773 + # source://net-imap//lib/net/imap.rb#780 def idle_response_timeout; end # Sends a {LIST command [IMAP4rev1 §6.3.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.8] @@ -1488,7 +1534,7 @@ class Net::IMAP < ::Net::Protocol # TODO: support LIST-EXTENDED extension [RFC5258]. Needed for IMAP4rev2. # ++ # - # source://net-imap//lib/net/imap.rb#1515 + # source://net-imap//lib/net/imap.rb#1550 def list(refname, mailbox); end # Sends a {LOGIN command [IMAP4rev1 §6.2.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.3] @@ -1521,7 +1567,7 @@ class Net::IMAP < ::Net::Protocol # The TaggedResponse to #login may include updated capabilities in its # ResponseCode. # - # source://net-imap//lib/net/imap.rb#1359 + # source://net-imap//lib/net/imap.rb#1394 def login(user, password); end # Sends a {LOGOUT command [IMAP4rev1 §6.1.3]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.3] @@ -1530,7 +1576,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #disconnect, #logout! # - # source://net-imap//lib/net/imap.rb#1132 + # source://net-imap//lib/net/imap.rb#1164 def logout; end # Calls #logout then, after receiving the TaggedResponse for the +LOGOUT+, @@ -1547,7 +1593,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #logout, #disconnect # - # source://net-imap//lib/net/imap.rb#1149 + # source://net-imap//lib/net/imap.rb#1181 def logout!; end # Sends a {LSUB command [IMAP4rev1 §6.3.9]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.9] @@ -1559,7 +1605,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #subscribe, #unsubscribe, #list, MailboxList # - # source://net-imap//lib/net/imap.rb#1726 + # source://net-imap//lib/net/imap.rb#1761 def lsub(refname, mailbox); end # Sends a {MOVE command [RFC6851 §3.1]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.1] @@ -1581,7 +1627,7 @@ class Net::IMAP < ::Net::Protocol # mailbox, the UID set of the source messages, and the assigned UID set of # the moved messages. # - # source://net-imap//lib/net/imap.rb#2198 + # source://net-imap//lib/net/imap.rb#2233 def move(set, mailbox); end # Sends a {NAMESPACE command [RFC2342 §5]}[https://www.rfc-editor.org/rfc/rfc2342#section-5] @@ -1635,7 +1681,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +NAMESPACE+ # [RFC2342[https://tools.ietf.org/html/rfc2342]]. # - # source://net-imap//lib/net/imap.rb#1572 + # source://net-imap//lib/net/imap.rb#1607 def namespace; end # Sends a {NOOP command [IMAP4rev1 §6.1.2]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.1.2] @@ -1651,26 +1697,26 @@ class Net::IMAP < ::Net::Protocol # # Related: #idle, #check # - # source://net-imap//lib/net/imap.rb#1123 + # source://net-imap//lib/net/imap.rb#1155 def noop; end # Seconds to wait until a connection is opened. # If the IMAP object cannot open a connection within this time, # it raises a Net::OpenTimeout exception. The default value is 30 seconds. # - # source://net-imap//lib/net/imap.rb#770 + # source://net-imap//lib/net/imap.rb#777 def open_timeout; end # The port this client connected to # - # source://net-imap//lib/net/imap.rb#779 + # source://net-imap//lib/net/imap.rb#786 def port; end # Removes the response handler. # # Related: #add_response_handler, #response_handlers # - # source://net-imap//lib/net/imap.rb#2573 + # source://net-imap//lib/net/imap.rb#2624 def remove_response_handler(handler); end # Sends a {RENAME command [IMAP4rev1 §6.3.5]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.5] @@ -1683,7 +1729,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #create, #delete # - # source://net-imap//lib/net/imap.rb#1456 + # source://net-imap//lib/net/imap.rb#1491 def rename(mailbox, newname); end # Returns all response handlers, including those that are added internally @@ -1700,7 +1746,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #add_response_handler, #remove_response_handler # - # source://net-imap//lib/net/imap.rb#2546 + # source://net-imap//lib/net/imap.rb#2597 def response_handlers; end # :call-seq: @@ -1731,6 +1777,7 @@ class Net::IMAP < ::Net::Protocol # # Calling without a block is unsafe and deprecated. Future releases will # raise ArgumentError unless a block is given. + # See Config#responses_without_block. # # Previously unhandled responses are automatically cleared before entering a # mailbox with #select or #examine. Long-lived connections can receive many @@ -1750,7 +1797,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #clear_responses, #response_handlers, #greeting # - # source://net-imap//lib/net/imap.rb#2498 + # source://net-imap//lib/net/imap.rb#2544 def responses(type = T.unsafe(nil)); end # Sends a {SEARCH command [IMAP4rev1 §6.4.4]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.4] @@ -1821,7 +1868,7 @@ class Net::IMAP < ::Net::Protocol # #=> Net::IMAP::SearchResult[1, 6, 7, 8, modseq: 5594] # result.modseq # => 5594 # - # source://net-imap//lib/net/imap.rb#1988 + # source://net-imap//lib/net/imap.rb#2023 def search(keys, charset = T.unsafe(nil)); end # Sends a {SELECT command [IMAP4rev1 §6.3.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.1] @@ -1858,7 +1905,7 @@ class Net::IMAP < ::Net::Protocol # imap.select("mbox", condstore: true) # modseq = imap.responses("HIGHESTMODSEQ", &:last) # - # source://net-imap//lib/net/imap.rb#1397 + # source://net-imap//lib/net/imap.rb#1432 def select(mailbox, condstore: T.unsafe(nil)); end # Sends a {SETACL command [RFC4314 §3.1]}[https://www.rfc-editor.org/rfc/rfc4314#section-3.1] @@ -1873,7 +1920,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +ACL+ # [RFC4314[https://tools.ietf.org/html/rfc4314]]. # - # source://net-imap//lib/net/imap.rb#1693 + # source://net-imap//lib/net/imap.rb#1728 def setacl(mailbox, user, rights); end # Sends a {SETQUOTA command [RFC2087 §4.1]}[https://www.rfc-editor.org/rfc/rfc2087#section-4.1] @@ -1888,7 +1935,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +QUOTA+ # [RFC2087[https://tools.ietf.org/html/rfc2087]]. # - # source://net-imap//lib/net/imap.rb#1673 + # source://net-imap//lib/net/imap.rb#1708 def setquota(mailbox, quota); end # Sends a {SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -1914,7 +1961,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +SORT+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap//lib/net/imap.rb#2242 + # source://net-imap//lib/net/imap.rb#2277 def sort(sort_keys, search_keys, charset); end # Returns the @@ -1924,7 +1971,7 @@ class Net::IMAP < ::Net::Protocol # # Returns +nil+ for a plaintext connection. # - # source://net-imap//lib/net/imap.rb#787 + # source://net-imap//lib/net/imap.rb#794 def ssl_ctx; end # Returns the parameters that were sent to #ssl_ctx @@ -1933,7 +1980,7 @@ class Net::IMAP < ::Net::Protocol # # Returns +false+ for a plaintext connection. # - # source://net-imap//lib/net/imap.rb#794 + # source://net-imap//lib/net/imap.rb#801 def ssl_ctx_params; end # Sends a {STARTTLS command [IMAP4rev1 §6.2.1]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.2.1] @@ -2030,7 +2077,7 @@ class Net::IMAP < ::Net::Protocol # +MAILBOXID+ requires the server's capabilities to include +OBJECTID+ # {[RFC8474]}[https://www.rfc-editor.org/rfc/rfc8474.html]. # - # source://net-imap//lib/net/imap.rb#1793 + # source://net-imap//lib/net/imap.rb#1828 def status(mailbox, attr); end # :call-seq: @@ -2077,7 +2124,7 @@ class Net::IMAP < ::Net::Protocol # +unchangedsince+ argument. Using +unchangedsince+ implicitly enables the # +CONDSTORE+ extension. # - # source://net-imap//lib/net/imap.rb#2126 + # source://net-imap//lib/net/imap.rb#2161 def store(set, attr, flags, unchangedsince: T.unsafe(nil)); end # Sends a {SUBSCRIBE command [IMAP4rev1 §6.3.6]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.6] @@ -2089,7 +2136,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #unsubscribe, #lsub, #list # - # source://net-imap//lib/net/imap.rb#1468 + # source://net-imap//lib/net/imap.rb#1503 def subscribe(mailbox); end # Sends a {THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -2114,7 +2161,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +THREAD+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap//lib/net/imap.rb#2282 + # source://net-imap//lib/net/imap.rb#2317 def thread(algorithm, search_keys, charset); end # Returns true after the TLS negotiation has completed and the remote @@ -2123,7 +2170,7 @@ class Net::IMAP < ::Net::Protocol # # @return [Boolean] # - # source://net-imap//lib/net/imap.rb#923 + # source://net-imap//lib/net/imap.rb#955 def tls_verified?; end # Sends a {UID COPY command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] @@ -2136,7 +2183,7 @@ class Net::IMAP < ::Net::Protocol # # +UIDPLUS+ affects #uid_copy the same way it affects #copy. # - # source://net-imap//lib/net/imap.rb#2175 + # source://net-imap//lib/net/imap.rb#2210 def uid_copy(set, mailbox); end # Sends a {UID EXPUNGE command [RFC4315 §2.1]}[https://www.rfc-editor.org/rfc/rfc4315#section-2.1] @@ -2165,7 +2212,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +UIDPLUS+ # [RFC4315[https://www.rfc-editor.org/rfc/rfc4315.html]]. # - # source://net-imap//lib/net/imap.rb#1914 + # source://net-imap//lib/net/imap.rb#1949 def uid_expunge(uid_set); end # :call-seq: @@ -2187,7 +2234,7 @@ class Net::IMAP < ::Net::Protocol # ===== Capabilities # Same as #fetch. # - # source://net-imap//lib/net/imap.rb#2079 + # source://net-imap//lib/net/imap.rb#2114 def uid_fetch(set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end # Sends a {UID MOVE command [RFC6851 §3.2]}[https://www.rfc-editor.org/rfc/rfc6851#section-3.2] @@ -2205,7 +2252,7 @@ class Net::IMAP < ::Net::Protocol # [RFC6851[https://tools.ietf.org/html/rfc6851]]. +UIDPLUS+ also affects # #uid_move the same way it affects #move. # - # source://net-imap//lib/net/imap.rb#2216 + # source://net-imap//lib/net/imap.rb#2251 def uid_move(set, mailbox); end # Sends a {UID SEARCH command [IMAP4rev1 §6.4.8]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.4.8] @@ -2218,7 +2265,7 @@ class Net::IMAP < ::Net::Protocol # # See #search for documentation of search criteria. # - # source://net-imap//lib/net/imap.rb#2001 + # source://net-imap//lib/net/imap.rb#2036 def uid_search(keys, charset = T.unsafe(nil)); end # Sends a {UID SORT command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -2233,7 +2280,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +SORT+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap//lib/net/imap.rb#2257 + # source://net-imap//lib/net/imap.rb#2292 def uid_sort(sort_keys, search_keys, charset); end # :call-seq: @@ -2251,7 +2298,7 @@ class Net::IMAP < ::Net::Protocol # ===== Capabilities # Same as #store. # - # source://net-imap//lib/net/imap.rb#2144 + # source://net-imap//lib/net/imap.rb#2179 def uid_store(set, attr, flags, unchangedsince: T.unsafe(nil)); end # Sends a {UID THREAD command [RFC5256 §3]}[https://www.rfc-editor.org/rfc/rfc5256#section-3] @@ -2265,7 +2312,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +THREAD+ # [RFC5256[https://tools.ietf.org/html/rfc5256]]. # - # source://net-imap//lib/net/imap.rb#2296 + # source://net-imap//lib/net/imap.rb#2331 def uid_thread(algorithm, search_keys, charset); end # Sends an {UNSELECT command [RFC3691 §2]}[https://www.rfc-editor.org/rfc/rfc3691#section-3] @@ -2281,7 +2328,7 @@ class Net::IMAP < ::Net::Protocol # The server's capabilities must include +UNSELECT+ # [RFC3691[https://tools.ietf.org/html/rfc3691]]. # - # source://net-imap//lib/net/imap.rb#1873 + # source://net-imap//lib/net/imap.rb#1908 def unselect; end # Sends an {UNSUBSCRIBE command [IMAP4rev1 §6.3.7]}[https://www.rfc-editor.org/rfc/rfc3501#section-6.3.7] @@ -2294,7 +2341,7 @@ class Net::IMAP < ::Net::Protocol # # Related: #subscribe, #lsub, #list # - # source://net-imap//lib/net/imap.rb#1481 + # source://net-imap//lib/net/imap.rb#1516 def unsubscribe(mailbox); end # Sends a XLIST command, and returns a subset of names from @@ -2335,72 +2382,72 @@ class Net::IMAP < ::Net::Protocol # unless the SPECIAL-USE return option is supplied. # ++ # - # source://net-imap//lib/net/imap.rb#1616 + # source://net-imap//lib/net/imap.rb#1651 def xlist(refname, mailbox); end private - # source://net-imap//lib/net/imap.rb#2915 + # source://net-imap//lib/net/imap.rb#2964 def build_ssl_ctx(ssl); end # NOTE: only call this for greeting, login, and authenticate # - # source://net-imap//lib/net/imap.rb#2754 + # source://net-imap//lib/net/imap.rb#2803 def capabilities_from_resp_code(resp); end - # source://net-imap//lib/net/imap.rb#2876 + # source://net-imap//lib/net/imap.rb#2925 def copy_internal(cmd, set, mailbox); end - # source://net-imap//lib/net/imap.rb#2839 + # source://net-imap//lib/net/imap.rb#2888 def fetch_internal(cmd, set, attr, mod = T.unsafe(nil), changedsince: T.unsafe(nil)); end - # source://net-imap//lib/net/imap.rb#2803 + # source://net-imap//lib/net/imap.rb#2852 def generate_tag; end - # source://net-imap//lib/net/imap.rb#2717 + # source://net-imap//lib/net/imap.rb#2766 def get_response; end # @raise [Error] # - # source://net-imap//lib/net/imap.rb#2596 + # source://net-imap//lib/net/imap.rb#2645 def get_server_greeting; end - # source://net-imap//lib/net/imap.rb#2689 + # source://net-imap//lib/net/imap.rb#2738 def get_tagged_response(tag, cmd, timeout = T.unsafe(nil)); end - # source://net-imap//lib/net/imap.rb#2904 + # source://net-imap//lib/net/imap.rb#2953 def normalize_searching_criteria(keys); end - # source://net-imap//lib/net/imap.rb#2808 + # source://net-imap//lib/net/imap.rb#2857 def put_string(str); end - # source://net-imap//lib/net/imap.rb#2622 + # source://net-imap//lib/net/imap.rb#2671 def receive_responses; end # store name => [..., data] # - # source://net-imap//lib/net/imap.rb#2741 + # source://net-imap//lib/net/imap.rb#2790 def record_untagged_response(resp); end # store code.name => [..., code.data] # - # source://net-imap//lib/net/imap.rb#2747 + # source://net-imap//lib/net/imap.rb#2796 def record_untagged_response_code(resp); end - # source://net-imap//lib/net/imap.rb#2944 + # source://net-imap//lib/net/imap.rb#2993 def sasl_adapter; end - # source://net-imap//lib/net/imap.rb#2823 + # source://net-imap//lib/net/imap.rb#2872 def search_internal(cmd, keys, charset); end - # source://net-imap//lib/net/imap.rb#2775 + # source://net-imap//lib/net/imap.rb#2824 def send_command(cmd, *args, &block); end # Calls send_command, yielding the text of each ContinuationRequest and # responding with each block result. Returns TaggedResponse. Raises # NoResponseError or BadResponseError. # - # source://net-imap//lib/net/imap.rb#2766 + # source://net-imap//lib/net/imap.rb#2815 def send_command_with_continuations(cmd, *args); end # source://net-imap//lib/net/imap/command_data.rb#33 @@ -2430,39 +2477,44 @@ class Net::IMAP < ::Net::Protocol # source://net-imap//lib/net/imap/command_data.rb#116 def send_time_data(time); end - # source://net-imap//lib/net/imap.rb#2880 + # source://net-imap//lib/net/imap.rb#2929 def sort_internal(cmd, sort_keys, search_keys, charset); end - # source://net-imap//lib/net/imap.rb#2587 + # source://net-imap//lib/net/imap.rb#2636 def start_imap_connection; end - # source://net-imap//lib/net/imap.rb#2604 + # source://net-imap//lib/net/imap.rb#2653 def start_receiver_thread; end - # source://net-imap//lib/net/imap.rb#2930 + # source://net-imap//lib/net/imap.rb#2979 def start_tls_session; end - # source://net-imap//lib/net/imap.rb#2864 + # source://net-imap//lib/net/imap.rb#2913 def store_internal(cmd, set, attr, flags, unchangedsince: T.unsafe(nil)); end - # source://net-imap//lib/net/imap.rb#2613 + # source://net-imap//lib/net/imap.rb#2662 def tcp_socket(host, port); end - # source://net-imap//lib/net/imap.rb#2892 + # source://net-imap//lib/net/imap.rb#2941 def thread_internal(cmd, algorithm, search_keys, charset); end # source://net-imap//lib/net/imap/command_data.rb#12 def validate_data(data); end class << self - # Returns the debug mode. + # Returns the global Config object # # source://net-imap//lib/net/imap.rb#739 + def config; end + + # Returns the global debug mode. + # + # source://net-imap//lib/net/imap.rb#742 def debug; end - # Sets the debug mode. + # Sets the global debug mode. # - # source://net-imap//lib/net/imap.rb#744 + # source://net-imap//lib/net/imap.rb#745 def debug=(val); end # :call-seq: decode_date(string) -> Date @@ -2512,27 +2564,27 @@ class Net::IMAP < ::Net::Protocol # The default port for IMAP connections, port 143 # - # source://net-imap//lib/net/imap.rb#749 + # source://net-imap//lib/net/imap.rb#750 def default_imap_port; end # The default port for IMAPS connections, port 993 # - # source://net-imap//lib/net/imap.rb#754 + # source://net-imap//lib/net/imap.rb#755 def default_imaps_port; end # The default port for IMAP connections, port 143 # - # source://net-imap//lib/net/imap.rb#749 + # source://net-imap//lib/net/imap.rb#750 def default_port; end # The default port for IMAPS connections, port 993 # - # source://net-imap//lib/net/imap.rb#754 + # source://net-imap//lib/net/imap.rb#755 def default_ssl_port; end # The default port for IMAPS connections, port 993 # - # source://net-imap//lib/net/imap.rb#754 + # source://net-imap//lib/net/imap.rb#755 def default_tls_port; end # Formats +time+ as an IMAP4 date. @@ -2622,7 +2674,7 @@ class Net::IMAP < ::Net::Protocol # ++ # Delegates to Net::IMAP::StringPrep::SASLprep#saslprep. # - # source://net-imap//lib/net/imap.rb#2954 + # source://net-imap//lib/net/imap.rb#3003 def saslprep(string, **opts); end end end @@ -2701,7 +2753,7 @@ module Net::IMAP::BodyStructure; end # === Bug Analysis # # \IMAP body structures are parenthesized lists and assign their fields -# positionally, so missing fields change the intepretation of all +# positionally, so missing fields change the interpretation of all # following fields. Additionally, different body types have a different # number of required fields, followed by optional "extension" fields. # @@ -2716,7 +2768,7 @@ module Net::IMAP::BodyStructure; end # Normally, +envelope+ and +md5+ are incompatible, but Net::IMAP leniently # allowed buggy servers to send +NIL+ for +envelope+. As a result, when a # server sent a message/rfc822 part with +NIL+ for +md5+ and a -# non-NIL +dsp+, Net::IMAP mis-interpreted the +# non-NIL +dsp+, Net::IMAP misinterpreted the # Content-Disposition as if it were a strange body type. In all # reported cases, the Content-Disposition was "attachment", so # BodyTypeAttachment was created as the workaround. @@ -2724,7 +2776,7 @@ module Net::IMAP::BodyStructure; end # === Current behavior # # When interpreted strictly, +envelope+ and +md5+ are incompatible. So the -# current parsing algorithm peeks ahead after it has recieved the seventh +# current parsing algorithm peeks ahead after it has received the seventh # body field. If the next token is not the start of an +envelope+, we assume # the server has incorrectly sent us a body-type-basic and return # BodyTypeBasic. As a result, what was previously BodyTypeMessage#body => @@ -2918,6 +2970,511 @@ class Net::IMAP::ClientID def validate_internal(client_id); end end +# Net::IMAP::Config stores configuration options for Net::IMAP clients. +# The global configuration can be seen at either Net::IMAP.config or +# Net::IMAP::Config.global, and the client-specific configuration can be +# seen at Net::IMAP#config. +# +# When creating a new client, all unhandled keyword arguments to +# Net::IMAP.new are delegated to Config.new. Every client has its own +# config. +# +# debug_client = Net::IMAP.new(hostname, debug: true) +# quiet_client = Net::IMAP.new(hostname, debug: false) +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# == Inheritance +# +# Configs have a parent[rdoc-ref:Config::AttrInheritance#parent] config, and +# any attributes which have not been set locally will inherit the parent's +# value. Every client creates its own specific config. By default, client +# configs inherit from Config.global. +# +# plain_client = Net::IMAP.new(hostname) +# debug_client = Net::IMAP.new(hostname, debug: true) +# quiet_client = Net::IMAP.new(hostname, debug: false) +# +# plain_client.config.inherited?(:debug) # => true +# debug_client.config.inherited?(:debug) # => false +# quiet_client.config.inherited?(:debug) # => false +# +# plain_client.config.debug? # => false +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# # Net::IMAP.debug is delegated to Net::IMAP::Config.global.debug +# Net::IMAP.debug = true +# plain_client.config.debug? # => true +# debug_client.config.debug? # => true +# quiet_client.config.debug? # => false +# +# Net::IMAP.debug = false +# plain_client.config.debug = true +# plain_client.config.inherited?(:debug) # => false +# plain_client.config.debug? # => true +# plain_client.config.reset(:debug) +# plain_client.config.inherited?(:debug) # => true +# plain_client.config.debug? # => false +# +# == Versioned defaults +# +# The effective default configuration for a specific +x.y+ version of +# +net-imap+ can be loaded with the +config+ keyword argument to +# Net::IMAP.new. Requesting default configurations for previous versions +# enables extra backward compatibility with those versions: +# +# client = Net::IMAP.new(hostname, config: 0.3) +# client.config.sasl_ir # => false +# client.config.responses_without_block # => :silence_deprecation_warning +# +# client = Net::IMAP.new(hostname, config: 0.4) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :silence_deprecation_warning +# +# client = Net::IMAP.new(hostname, config: 0.5) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :warn +# +# client = Net::IMAP.new(hostname, config: :future) +# client.config.sasl_ir # => true +# client.config.responses_without_block # => :raise +# +# The versioned default configs inherit certain specific config options from +# Config.global, for example #debug: +# +# client = Net::IMAP.new(hostname, config: 0.4) +# Net::IMAP.debug = false +# client.config.debug? # => false +# +# Net::IMAP.debug = true +# client.config.debug? # => true +# +# Use #load_defaults to globally behave like a specific version: +# client = Net::IMAP.new(hostname) +# client.config.sasl_ir # => true +# Net::IMAP.config.load_defaults 0.3 +# client.config.sasl_ir # => false +# +# === Named defaults +# In addition to +x.y+ version numbers, the following aliases are supported: +# +# [+:default+] +# An alias for +:current+. +# +# >>> +# *NOTE*: This is _not_ the same as Config.default. It inherits some +# attributes from Config.global, for example: #debug. +# [+:current+] +# An alias for the current +x.y+ version's defaults. +# [+:next+] +# The _planned_ config for the next +x.y+ version. +# [+:future+] +# The _planned_ eventual config for some future +x.y+ version. +# +# For example, to raise exceptions for all current deprecations: +# client = Net::IMAP.new(hostname, config: :future) +# client.responses # raises an ArgumentError +# +# == Thread Safety +# +# *NOTE:* Updates to config objects are not synchronized for thread-safety. +# +# source://net-imap//lib/net/imap/config/attr_accessors.rb#7 +class Net::IMAP::Config + include ::Net::IMAP::Config::AttrAccessors + include ::Net::IMAP::Config::AttrInheritance + include ::Net::IMAP::Config::AttrTypeCoercion + extend ::Net::IMAP::Config::AttrAccessors::Macros + extend ::Net::IMAP::Config::AttrInheritance::Macros + extend ::Net::IMAP::Config::AttrTypeCoercion::Macros + + # Creates a new config object and initialize its attribute with +attrs+. + # + # If +parent+ is not given, the global config is used by default. + # + # If a block is given, the new config object is yielded to it. + # + # @return [Config] a new instance of Config + # @yield [_self] + # @yieldparam _self [Net::IMAP::Config] the object that the method was called on + # + # source://net-imap//lib/net/imap/config.rb#236 + def initialize(parent = T.unsafe(nil), **attrs); end + + # :call-seq: load_defaults(version) -> self + # + # Resets the current config to behave like the versioned default + # configuration for +version+. #parent will not be changed. + # + # Some config attributes default to inheriting from their #parent (which + # is usually Config.global) and are left unchanged, for example: #debug. + # + # See Config@Versioned+defaults and Config@Named+defaults. + # + # source://net-imap//lib/net/imap/config.rb#287 + def load_defaults(version); end + + # :call-seq: to_h -> hash + # + # Returns all config attributes in a hash. + # + # source://net-imap//lib/net/imap/config.rb#296 + def to_h; end + + # :call-seq: update(**attrs) -> self + # + # Assigns all of the provided +attrs+ to this config, and returns +self+. + # + # An ArgumentError is raised unless every key in +attrs+ matches an + # assignment method on Config. + # + # >>> + # *NOTE:* #update is not atomic. If an exception is raised due to an + # invalid attribute value, +attrs+ may be partially applied. + # + # source://net-imap//lib/net/imap/config.rb#252 + def update(**attrs); end + + # :call-seq: + # with(**attrs) -> config + # with(**attrs) {|config| } -> result + # + # Without a block, returns a new config which inherits from self. With a + # block, yields the new config and returns the block's result. + # + # If no keyword arguments are given, an ArgumentError will be raised. + # + # If +self+ is frozen, the copy will also be frozen. + # + # source://net-imap//lib/net/imap/config.rb#270 + def with(**attrs); end + + protected + + # source://net-imap//lib/net/imap/config.rb#300 + def defaults_hash; end + + class << self + # :call-seq: + # Net::IMAP::Config[number] -> versioned config + # Net::IMAP::Config[symbol] -> named config + # Net::IMAP::Config[hash] -> new frozen config + # Net::IMAP::Config[config] -> same config + # + # Given a version number, returns the default configuration for the target + # version. See Config@Versioned+defaults. + # + # Given a version name, returns the default configuration for the target + # version. See Config@Named+defaults. + # + # Given a Hash, creates a new _frozen_ config which inherits from + # Config.global. Use Config.new for an unfrozen config. + # + # Given a config, returns that same config. + # + # source://net-imap//lib/net/imap/config.rb#151 + def [](config); end + + # The default config, which is hardcoded and frozen. + # + # source://net-imap//lib/net/imap/config.rb#126 + def default; end + + # The global config object. Also available from Net::IMAP.config. + # + # source://net-imap//lib/net/imap/config.rb#129 + def global; end + + # A hash of hard-coded configurations, indexed by version number. + # + # source://net-imap//lib/net/imap/config.rb#132 + def version_defaults; end + end +end + +# >>> +# *NOTE:* This module is an internal implementation detail, with no +# guarantee of backward compatibility. +# +# +attr_accessor+ values are stored in a struct rather than ivars, making +# it simpler to ensure that all config objects share a single object +# shape. This also simplifies iteration over all defined attributes. +# +# source://net-imap//lib/net/imap/config/attr_accessors.rb#15 +module Net::IMAP::Config::AttrAccessors + extend ::Forwardable + + mixes_in_class_methods ::Net::IMAP::Config::AttrAccessors::Macros + + # :notnew: + # + # source://net-imap//lib/net/imap/config/attr_accessors.rb#45 + def initialize; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def debug(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def debug=(*args, **_arg1, &block); end + + # Freezes the internal attributes struct, in addition to +self+. + # + # source://net-imap//lib/net/imap/config/attr_accessors.rb#51 + def freeze; end + + # source://forwardable/1.3.3/forwardable.rb#231 + def idle_response_timeout(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def idle_response_timeout=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def open_timeout(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def open_timeout=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def responses_without_block(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def responses_without_block=(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def sasl_ir(*args, **_arg1, &block); end + + # source://forwardable/1.3.3/forwardable.rb#231 + def sasl_ir=(*args, **_arg1, &block); end + + protected + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#58 + def data; end + + private + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#62 + def initialize_clone(other); end + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#67 + def initialize_dup(other); end + + class << self + # source://net-imap//lib/net/imap/config/attr_accessors.rb#28 + def attr_accessor(name); end + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#38 + def struct; end + + private + + # source://net-imap//lib/net/imap/config/attr_accessors.rb#33 + def attributes; end + + # @private + # + # source://net-imap//lib/net/imap/config/attr_accessors.rb#21 + def included(mod); end + end +end + +# source://net-imap//lib/net/imap/config/attr_accessors.rb#16 +module Net::IMAP::Config::AttrAccessors::Macros + # source://net-imap//lib/net/imap/config/attr_accessors.rb#17 + def attr_accessor(name); end +end + +# source://net-imap//lib/net/imap/config.rb#0 +class Net::IMAP::Config::AttrAccessors::Struct < ::Struct + def debug; end + def debug=(_); end + def idle_response_timeout; end + def idle_response_timeout=(_); end + def open_timeout; end + def open_timeout=(_); end + def responses_without_block; end + def responses_without_block=(_); end + def sasl_ir; end + def sasl_ir=(_); end + + class << self + def [](*_arg0); end + def inspect; end + def keyword_init?; end + def members; end + def new(*_arg0); end + end +end + +# >>> +# *NOTE:* The public methods on this module are part of the stable +# public API of Net::IMAP::Config. But the module itself is an internal +# implementation detail, with no guarantee of backward compatibility. +# +# +attr_accessor+ methods will delegate to their #parent when the local +# value does not contain an override. Inheritance forms a singly linked +# list, so lookup will be O(n) on the number of ancestors. In +# practice, the ancestor chain is not expected to be long. Without +# customization, it is only three deep: +# >>> +# IMAP#config → Config.global → Config.default +# +# When creating a client with the +config+ keyword, for example to use +# the appropriate defaults for an application or a library while still +# relying on global for configuration of +debug+ or +logger+, most likely +# the ancestor chain is still only four deep: +# >>> +# IMAP#config → alternate defaults → Config.global → Config.default +# +# source://net-imap//lib/net/imap/config/attr_inheritance.rb#25 +module Net::IMAP::Config::AttrInheritance + mixes_in_class_methods ::Net::IMAP::Config::AttrInheritance::Macros + + # :notnew: + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#48 + def initialize(parent = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def debug; end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def idle_response_timeout; end + + # Returns +true+ if +attr+ is inherited from #parent and not overridden + # by this config. + # + # @return [Boolean] + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#59 + def inherited?(attr); end + + # Creates a new config, which inherits from +self+. + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#55 + def new(**attrs); end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def open_timeout; end + + # The parent Config object + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#46 + def parent; end + + # :call-seq: + # reset -> self + # reset(attr) -> attribute value + # + # Resets an +attr+ to inherit from the #parent config. + # + # When +attr+ is nil or not given, all attributes are reset. + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#68 + def reset(attr = T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def responses_without_block; end + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#41 + def sasl_ir; end + + private + + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#82 + def initialize_copy(other); end + + class << self + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#39 + def attr_accessor(name); end + + private + + # @private + # + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#34 + def included(mod); end + end +end + +# source://net-imap//lib/net/imap/config/attr_inheritance.rb#26 +module Net::IMAP::Config::AttrInheritance::INHERITED; end + +# source://net-imap//lib/net/imap/config/attr_inheritance.rb#29 +module Net::IMAP::Config::AttrInheritance::Macros + # source://net-imap//lib/net/imap/config/attr_inheritance.rb#30 + def attr_accessor(name); end +end + +# >>> +# *NOTE:* This module is an internal implementation detail, with no +# guarantee of backward compatibility. +# +# Adds a +type+ keyword parameter to +attr_accessor+, to enforce that +# config attributes have valid types, for example: boolean, numeric, +# enumeration, non-nullable, etc. +# +# source://net-imap//lib/net/imap/config/attr_type_coercion.rb#13 +module Net::IMAP::Config::AttrTypeCoercion + mixes_in_class_methods ::Net::IMAP::Config::AttrTypeCoercion::Macros + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#39 + def debug=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#40 + def debug?; end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#44 + def idle_response_timeout=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#44 + def open_timeout=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#50 + def responses_without_block=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#39 + def sasl_ir=(val); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#40 + def sasl_ir?; end + + class << self + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#29 + def attr_accessor(attr, type: T.unsafe(nil)); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#38 + def boolean(attr); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#47 + def enum(attr, enum); end + + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#43 + def integer(attr); end + + private + + # @private + # + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#24 + def included(mod); end + end +end + +# :stopdoc: internal APIs only +# +# source://net-imap//lib/net/imap/config/attr_type_coercion.rb#16 +module Net::IMAP::Config::AttrTypeCoercion::Macros + # source://net-imap//lib/net/imap/config/attr_type_coercion.rb#17 + def attr_accessor(attr, type: T.unsafe(nil)); end +end + +# Array of attribute names that are _not_ loaded by #load_defaults. +# +# source://net-imap//lib/net/imap/config.rb#122 +Net::IMAP::Config::DEFAULT_TO_INHERIT = T.let(T.unsafe(nil), Array) + # Mailbox attribute indicating that this mailbox is used to hold draft # messages -- typically, messages that are being composed but have not yet # been sent. In some server implementations, this might be a virtual @@ -2942,11 +3499,11 @@ module Net::IMAP::DeprecatedClientOptions # # ==== Obsolete arguments # - # Using obsolete arguments does not a warning. Obsolete arguments will be - # deprecated by a future release. + # Use of obsolete arguments does not print a warning. Obsolete arguments + # will be deprecated by a future release. # # If a second positional argument is given and it is a hash (or is - # convertable via +#to_hash+), it is converted to keyword arguments. + # convertible via +#to_hash+), it is converted to keyword arguments. # # # Obsolete: # Net::IMAP.new("imap.example.com", options_hash) @@ -3632,7 +4189,7 @@ Net::IMAP::HAS_NO_CHILDREN = T.let(T.unsafe(nil), Symbol) # Net::IMAP::IgnoredResponse represents intentionally ignored responses. # -# This includes untagged response "NOOP" sent by eg. Zimbra to avoid +# This includes untagged response "NOOP" sent by e.g. Zimbra to avoid # some clients to close the connection. # # It matches no IMAP standard. @@ -3904,8 +4461,8 @@ class Net::IMAP::ResponseParser # # @return [ResponseParser] a new instance of ResponseParser # - # source://net-imap//lib/net/imap/response_parser.rb#15 - def initialize; end + # source://net-imap//lib/net/imap/response_parser.rb#17 + def initialize(config: T.unsafe(nil)); end # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#104 def CRLF!; end @@ -3968,6 +4525,11 @@ class Net::IMAP::ResponseParser # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#96 def case_insensitive__string?; end + # Returns the value of attribute config. + # + # source://net-imap//lib/net/imap/response_parser.rb#14 + def config; end + # date-time = DQUOTE date-day-fixed "-" date-month "-" date-year # SP time SP zone DQUOTE # @@ -4122,7 +4684,7 @@ class Net::IMAP::ResponseParser # # Raises ResponseParseError for unparsable strings. # - # source://net-imap//lib/net/imap/response_parser.rb#28 + # source://net-imap//lib/net/imap/response_parser.rb#31 def parse(str); end # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#30 @@ -4236,32 +4798,32 @@ class Net::IMAP::ResponseParser # # This advances @pos directly so it's safe before changing @lex_state. # - # source://net-imap//lib/net/imap/response_parser.rb#2023 + # source://net-imap//lib/net/imap/response_parser.rb#2027 def accept_spaces; end # acl-data = "ACL" SP mailbox *(SP identifier SP rights) # - # source://net-imap//lib/net/imap/response_parser.rb#1424 + # source://net-imap//lib/net/imap/response_parser.rb#1428 def acl_data; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def addr_adl; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def addr_host; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def addr_mailbox; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def addr_name; end # address = "(" addr-name SP addr-adl SP addr-mailbox SP @@ -4271,38 +4833,38 @@ class Net::IMAP::ResponseParser # addr-mailbox = nstring # addr-name = nstring # - # source://net-imap//lib/net/imap/response_parser.rb#1892 + # source://net-imap//lib/net/imap/response_parser.rb#1896 def address; end # astring = 1*ASTRING-CHAR / string # - # source://net-imap//lib/net/imap/response_parser.rb#503 + # source://net-imap//lib/net/imap/response_parser.rb#506 def astring; end # @return [Boolean] # - # source://net-imap//lib/net/imap/response_parser.rb#507 + # source://net-imap//lib/net/imap/response_parser.rb#510 def astring?; end - # source://net-imap//lib/net/imap/response_parser.rb#488 + # source://net-imap//lib/net/imap/response_parser.rb#491 def astring_chars; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer # - # source://net-imap//lib/net/imap/response_parser.rb#487 + # source://net-imap//lib/net/imap/response_parser.rb#490 def atom; end # the #accept version of #atom # # @return [Boolean] # - # source://net-imap//lib/net/imap/response_parser.rb#492 + # source://net-imap//lib/net/imap/response_parser.rb#495 def atom?; end # RFC-3501 & RFC-9051: # body = "(" (body-type-1part / body-type-mpart) ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1009 + # source://net-imap//lib/net/imap/response_parser.rb#1012 def body; end # RFC2060 @@ -4317,7 +4879,7 @@ class Net::IMAP::ResponseParser # ; MUST NOT be returned on non-extensible # ; "BODY" fetch # - # source://net-imap//lib/net/imap/response_parser.rb#1180 + # source://net-imap//lib/net/imap/response_parser.rb#1184 def body_ext_1part; end # RFC-2060: @@ -4331,7 +4893,7 @@ class Net::IMAP::ResponseParser # ; MUST NOT be returned on non-extensible # ; "BODY" fetch # - # source://net-imap//lib/net/imap/response_parser.rb#1199 + # source://net-imap//lib/net/imap/response_parser.rb#1203 def body_ext_mpart; end # body-extension = nstring / number / number64 / @@ -4343,93 +4905,93 @@ class Net::IMAP::ResponseParser # ; future Standard or Standards Track # ; revisions of this specification. # - # source://net-imap//lib/net/imap/response_parser.rb#1256 + # source://net-imap//lib/net/imap/response_parser.rb#1260 def body_extension; end # body-extension *(SP body-extension) # - # source://net-imap//lib/net/imap/response_parser.rb#1242 + # source://net-imap//lib/net/imap/response_parser.rb#1246 def body_extensions; end # RFC-3501 & RFC-9051: # body-fields = body-fld-param SP body-fld-id SP body-fld-desc SP # body-fld-enc SP body-fld-octets # - # source://net-imap//lib/net/imap/response_parser.rb#1145 + # source://net-imap//lib/net/imap/response_parser.rb#1148 def body_fields; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def body_fld_desc; end # body-fld-dsp = "(" string SP body-fld-param ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#1221 + # source://net-imap//lib/net/imap/response_parser.rb#1225 def body_fld_dsp; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def body_fld_id; end # body-fld-lang = nstring / "(" string *(SP string) ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1230 + # source://net-imap//lib/net/imap/response_parser.rb#1234 def body_fld_lang; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def body_fld_loc; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def body_fld_md5; end # RFC3501, RFC9051: # body-fld-param = "(" string SP string *(SP string SP string) ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#1157 + # source://net-imap//lib/net/imap/response_parser.rb#1160 def body_fld_param; end # RFC-3501 & RFC9051: # body-type-1part = (body-type-basic / body-type-msg / body-type-text) # [SP body-ext-1part] # - # source://net-imap//lib/net/imap/response_parser.rb#1021 + # source://net-imap//lib/net/imap/response_parser.rb#1024 def body_type_1part; end # RFC-3501 & RFC9051: # body-type-basic = media-basic SP body-fields # - # source://net-imap//lib/net/imap/response_parser.rb#1045 + # source://net-imap//lib/net/imap/response_parser.rb#1048 def body_type_basic; end # This is a malformed body-type-mpart with no subparts. # - # source://net-imap//lib/net/imap/response_parser.rb#1094 + # source://net-imap//lib/net/imap/response_parser.rb#1097 def body_type_mixed; end # RFC-3501 & RFC-9051: # body-type-mpart = 1*body SP media-subtype # [SP body-ext-mpart] # - # source://net-imap//lib/net/imap/response_parser.rb#1104 + # source://net-imap//lib/net/imap/response_parser.rb#1107 def body_type_mpart; end # RFC-3501 & RFC-9051: # body-type-msg = media-message SP body-fields SP envelope # SP body SP body-fld-lines # - # source://net-imap//lib/net/imap/response_parser.rb#1066 + # source://net-imap//lib/net/imap/response_parser.rb#1069 def body_type_msg; end # RFC-3501 & RFC-9051: # body-type-text = media-text SP body-fields SP body-fld-lines # - # source://net-imap//lib/net/imap/response_parser.rb#1055 + # source://net-imap//lib/net/imap/response_parser.rb#1058 def body_type_text; end # Returns atom.upcase @@ -4438,20 +5000,20 @@ class Net::IMAP::ResponseParser # ; registered with IANA as standard or # ; standards-track # - # source://net-imap//lib/net/imap/response_parser.rb#495 + # source://net-imap//lib/net/imap/response_parser.rb#498 def capability; end # Returns atom?&.upcase # # @return [Boolean] # - # source://net-imap//lib/net/imap/response_parser.rb#498 + # source://net-imap//lib/net/imap/response_parser.rb#501 def capability?; end # As a workaround for buggy servers, allow a trailing SP: # *(SP capability) [SP] # - # source://net-imap//lib/net/imap/response_parser.rb#1627 + # source://net-imap//lib/net/imap/response_parser.rb#1631 def capability__list; end # The presence of "IMAP4rev1" or "IMAP4rev2" is unenforced here. @@ -4465,39 +5027,39 @@ class Net::IMAP::ResponseParser # capability-data = "CAPABILITY" *(SP capability) SP "IMAP4rev2" # *(SP capability) # - # source://net-imap//lib/net/imap/response_parser.rb#1616 + # source://net-imap//lib/net/imap/response_parser.rb#1620 def capability_data__untagged; end # Returns atom.upcase # - # source://net-imap//lib/net/imap/response_parser.rb#495 + # source://net-imap//lib/net/imap/response_parser.rb#498 def case_insensitive__atom; end # Returns atom?&.upcase # # @return [Boolean] # - # source://net-imap//lib/net/imap/response_parser.rb#498 + # source://net-imap//lib/net/imap/response_parser.rb#501 def case_insensitive__atom?; end # use where nstring represents "LABEL" values # - # source://net-imap//lib/net/imap/response_parser.rb#556 + # source://net-imap//lib/net/imap/response_parser.rb#559 def case_insensitive__nstring; end # See https://www.rfc-editor.org/errata/rfc3501 # # charset = atom / quoted # - # source://net-imap//lib/net/imap/response_parser.rb#1963 + # source://net-imap//lib/net/imap/response_parser.rb#1967 def charset; end # "(" charset *(SP charset) ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1846 + # source://net-imap//lib/net/imap/response_parser.rb#1850 def charset__list; end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def comparator_data(klass = T.unsafe(nil)); end # RFC3501 & RFC9051: @@ -4508,12 +5070,12 @@ class Net::IMAP::ResponseParser # # continue-req = "+" (SP (resp-text)) CRLF # - # source://net-imap//lib/net/imap/response_parser.rb#673 + # source://net-imap//lib/net/imap/response_parser.rb#676 def continue_req; end # enable-data = "ENABLED" *(SP capability) # - # source://net-imap//lib/net/imap/response_parser.rb#1621 + # source://net-imap//lib/net/imap/response_parser.rb#1625 def enable_data; end # env-from = "(" 1*address ")" / nil @@ -4523,7 +5085,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#983 + # source://net-imap//lib/net/imap/response_parser.rb#986 def env_bcc; end # env-from = "(" 1*address ")" / nil @@ -4533,7 +5095,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#983 + # source://net-imap//lib/net/imap/response_parser.rb#986 def env_cc; end # nstring = string / nil @@ -4542,7 +5104,7 @@ class Net::IMAP::ResponseParser # env-in-reply-to = nstring # env-message-id = nstring # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def env_date; end # env-from = "(" 1*address ")" / nil @@ -4552,17 +5114,17 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#983 + # source://net-imap//lib/net/imap/response_parser.rb#986 def env_from; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def env_in_reply_to; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def env_message_id; end # env-from = "(" 1*address ")" / nil @@ -4572,7 +5134,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#983 + # source://net-imap//lib/net/imap/response_parser.rb#986 def env_reply_to; end # env-from = "(" 1*address ")" / nil @@ -4582,12 +5144,12 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#983 + # source://net-imap//lib/net/imap/response_parser.rb#986 def env_sender; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def env_subject; end # env-from = "(" 1*address ")" / nil @@ -4597,7 +5159,7 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#983 + # source://net-imap//lib/net/imap/response_parser.rb#986 def env_to; end # RFC3501 & RFC9051: @@ -4605,29 +5167,29 @@ class Net::IMAP::ResponseParser # env-sender SP env-reply-to SP env-to SP env-cc SP # env-bcc SP env-in-reply-to SP env-message-id ")" # - # source://net-imap//lib/net/imap/response_parser.rb#949 + # source://net-imap//lib/net/imap/response_parser.rb#952 def envelope; end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def esearch_response(klass = T.unsafe(nil)); end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def expunged_resp(klass = T.unsafe(nil)); end # flag-list = "(" [flag *(SP flag)] ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1913 + # source://net-imap//lib/net/imap/response_parser.rb#1917 def flag_list; end # "(" [flag-perm *(SP flag-perm)] ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1923 + # source://net-imap//lib/net/imap/response_parser.rb#1927 def flag_perm__list; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer # this represents the partial size for BODY or BINARY # - # source://net-imap//lib/net/imap/response_parser.rb#487 + # source://net-imap//lib/net/imap/response_parser.rb#490 def gt__number__lt; end # RFC3501 & RFC9051: @@ -4653,33 +5215,33 @@ class Net::IMAP::ResponseParser # %d59-126 ; characters not including # ; ":". # - # source://net-imap//lib/net/imap/response_parser.rb#1334 + # source://net-imap//lib/net/imap/response_parser.rb#1338 def header_fld_name; end # header-list = "(" header-fld-name *(SP header-fld-name) ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1300 + # source://net-imap//lib/net/imap/response_parser.rb#1304 def header_list; end - # source://net-imap//lib/net/imap/response_parser.rb#1640 + # source://net-imap//lib/net/imap/response_parser.rb#1644 def id_response; end # Use #label or #label_in to assert specific known labels # (+tagged-ext-label+ only, not +atom+). # - # source://net-imap//lib/net/imap/response_parser.rb#513 + # source://net-imap//lib/net/imap/response_parser.rb#516 def label(word); end # Use #label or #label_in to assert specific known labels # (+tagged-ext-label+ only, not +atom+). # - # source://net-imap//lib/net/imap/response_parser.rb#520 + # source://net-imap//lib/net/imap/response_parser.rb#523 def label_in(*labels); end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def language_data(klass = T.unsafe(nil)); end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def listrights_data(klass = T.unsafe(nil)); end # astring = 1*ASTRING-CHAR / string @@ -4692,10 +5254,10 @@ class Net::IMAP::ResponseParser # ; Refer to section 5.1 for further # ; semantic details of mailbox names. # - # source://net-imap//lib/net/imap/response_parser.rb#503 + # source://net-imap//lib/net/imap/response_parser.rb#506 def mailbox; end - # source://net-imap//lib/net/imap/response_parser.rb#832 + # source://net-imap//lib/net/imap/response_parser.rb#835 def mailbox_data__exists; end # mailbox-data = "FLAGS" SP flag-list / "LIST" SP mailbox-list / @@ -4703,16 +5265,16 @@ class Net::IMAP::ResponseParser # "STATUS" SP mailbox SP "(" [status-att-list] ")" / # number SP "EXISTS" / number SP "RECENT" # - # source://net-imap//lib/net/imap/response_parser.rb#1346 + # source://net-imap//lib/net/imap/response_parser.rb#1350 def mailbox_data__flags; end - # source://net-imap//lib/net/imap/response_parser.rb#1352 + # source://net-imap//lib/net/imap/response_parser.rb#1356 def mailbox_data__list; end - # source://net-imap//lib/net/imap/response_parser.rb#1352 + # source://net-imap//lib/net/imap/response_parser.rb#1356 def mailbox_data__lsub; end - # source://net-imap//lib/net/imap/response_parser.rb#832 + # source://net-imap//lib/net/imap/response_parser.rb#835 def mailbox_data__recent; end # RFC3501: @@ -4730,15 +5292,15 @@ class Net::IMAP::ResponseParser # mailbox-data = obsolete-search-response / ... # obsolete-search-response = "SEARCH" *(SP nz-number) # - # source://net-imap//lib/net/imap/response_parser.rb#1464 + # source://net-imap//lib/net/imap/response_parser.rb#1468 def mailbox_data__search; end # mailbox-data =/ "STATUS" SP mailbox SP "(" [status-att-list] ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1530 + # source://net-imap//lib/net/imap/response_parser.rb#1534 def mailbox_data__status; end - # source://net-imap//lib/net/imap/response_parser.rb#1352 + # source://net-imap//lib/net/imap/response_parser.rb#1356 def mailbox_data__xlist; end # mailbox-list = "(" [mbx-list-flags] ")" SP @@ -4747,12 +5309,12 @@ class Net::IMAP::ResponseParser # ; This is the list information pointed to by the ABNF # ; item "mailbox-data", which is defined above # - # source://net-imap//lib/net/imap/response_parser.rb#1365 + # source://net-imap//lib/net/imap/response_parser.rb#1369 def mailbox_list; end # See Patterns::MBX_LIST_FLAGS # - # source://net-imap//lib/net/imap/response_parser.rb#1941 + # source://net-imap//lib/net/imap/response_parser.rb#1945 def mbx_list_flags; end # n.b. this handles both type and subtype @@ -4775,7 +5337,7 @@ class Net::IMAP::ResponseParser # media-subtype = string # TODO: check types # - # source://net-imap//lib/net/imap/response_parser.rb#1128 + # source://net-imap//lib/net/imap/response_parser.rb#1131 def media_basic; end # n.b. this handles both type and subtype @@ -4798,7 +5360,7 @@ class Net::IMAP::ResponseParser # media-subtype = string # */* --- catchall # - # source://net-imap//lib/net/imap/response_parser.rb#1128 + # source://net-imap//lib/net/imap/response_parser.rb#1131 def media_message; end # n.b. this handles both type and subtype @@ -4821,7 +5383,7 @@ class Net::IMAP::ResponseParser # media-subtype = string # message/rfc822, message/global # - # source://net-imap//lib/net/imap/response_parser.rb#1128 + # source://net-imap//lib/net/imap/response_parser.rb#1131 def media_text; end # n.b. this handles both type and subtype @@ -4843,21 +5405,21 @@ class Net::IMAP::ResponseParser # media-text = DQUOTE "TEXT" DQUOTE SP media-subtype # media-subtype = string # - # source://net-imap//lib/net/imap/response_parser.rb#1128 + # source://net-imap//lib/net/imap/response_parser.rb#1131 def media_type; end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def message_data__converted(klass = T.unsafe(nil)); end - # source://net-imap//lib/net/imap/response_parser.rb#832 + # source://net-imap//lib/net/imap/response_parser.rb#835 def message_data__expunge; end # message-data = nz-number SP ("EXPUNGE" / ("FETCH" SP msg-att)) # - # source://net-imap//lib/net/imap/response_parser.rb#825 + # source://net-imap//lib/net/imap/response_parser.rb#828 def message_data__fetch; end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def metadata_resp(klass = T.unsafe(nil)); end # RFC3501 & RFC9051: @@ -4908,27 +5470,27 @@ class Net::IMAP::ResponseParser # msg-att-static =/ "BINARY" section-binary ["<" number ">"] SP # (nstring / literal8) # - # source://net-imap//lib/net/imap/response_parser.rb#889 + # source://net-imap//lib/net/imap/response_parser.rb#892 def msg_att(n); end # appends "[section]" and "" to the base label # - # source://net-imap//lib/net/imap/response_parser.rb#926 + # source://net-imap//lib/net/imap/response_parser.rb#929 def msg_att__label; end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def myrights_data(klass = T.unsafe(nil)); end # namespace = nil / "(" 1*namespace-descr ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1687 + # source://net-imap//lib/net/imap/response_parser.rb#1691 def namespace; end # namespace-descr = "(" string SP # (DQUOTE QUOTED-CHAR DQUOTE / nil) # [namespace-response-extensions] ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1698 + # source://net-imap//lib/net/imap/response_parser.rb#1702 def namespace_descr; end # namespace-response = "NAMESPACE" SP namespace @@ -4938,23 +5500,23 @@ class Net::IMAP::ResponseParser # ; Namespace(s). # ; The third Namespace is the Shared Namespace(s). # - # source://net-imap//lib/net/imap/response_parser.rb#1675 + # source://net-imap//lib/net/imap/response_parser.rb#1679 def namespace_response; end # namespace-response-extensions = *namespace-response-extension # namespace-response-extension = SP string SP # "(" string *(SP string) ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1710 + # source://net-imap//lib/net/imap/response_parser.rb#1714 def namespace_response_extensions; end - # source://net-imap//lib/net/imap/response_parser.rb#551 + # source://net-imap//lib/net/imap/response_parser.rb#554 def ndatetime; end - # source://net-imap//lib/net/imap/response_parser.rb#2030 + # source://net-imap//lib/net/imap/response_parser.rb#2034 def next_token; end - # source://net-imap//lib/net/imap/response_parser.rb#2012 + # source://net-imap//lib/net/imap/response_parser.rb#2016 def nil_atom; end # env-from = "(" 1*address ")" / nil @@ -4964,21 +5526,21 @@ class Net::IMAP::ResponseParser # env-cc = "(" 1*address ")" / nil # env-bcc = "(" 1*address ")" / nil # - # source://net-imap//lib/net/imap/response_parser.rb#983 + # source://net-imap//lib/net/imap/response_parser.rb#986 def nlist__address; end - # source://net-imap//lib/net/imap/response_parser.rb#1990 + # source://net-imap//lib/net/imap/response_parser.rb#1994 def nparens__objectid; end - # source://net-imap//lib/net/imap/response_parser.rb#551 + # source://net-imap//lib/net/imap/response_parser.rb#554 def nquoted; end # nstring = string / nil # - # source://net-imap//lib/net/imap/response_parser.rb#543 + # source://net-imap//lib/net/imap/response_parser.rb#546 def nstring; end - # source://net-imap//lib/net/imap/response_parser.rb#547 + # source://net-imap//lib/net/imap/response_parser.rb#550 def nstring8; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer @@ -4987,36 +5549,36 @@ class Net::IMAP::ResponseParser # ; characters in object identifiers are case # ; significant # - # source://net-imap//lib/net/imap/response_parser.rb#487 + # source://net-imap//lib/net/imap/response_parser.rb#490 def objectid; end - # source://net-imap//lib/net/imap/response_parser.rb#1981 + # source://net-imap//lib/net/imap/response_parser.rb#1985 def parens__modseq; end - # source://net-imap//lib/net/imap/response_parser.rb#1989 + # source://net-imap//lib/net/imap/response_parser.rb#1993 def parens__objectid; end # This allows illegal "]" in flag names (Gmail), # or "\*" in a FLAGS response (greenmail). # - # source://net-imap//lib/net/imap/response_parser.rb#1934 + # source://net-imap//lib/net/imap/response_parser.rb#1938 def quirky__flag_list(name); end - # source://net-imap//lib/net/imap/response_parser.rb#1373 + # source://net-imap//lib/net/imap/response_parser.rb#1377 def quota_response; end - # source://net-imap//lib/net/imap/response_parser.rb#1406 + # source://net-imap//lib/net/imap/response_parser.rb#1410 def quotaroot_response; end # reads all the way up until CRLF # - # source://net-imap//lib/net/imap/response_parser.rb#761 + # source://net-imap//lib/net/imap/response_parser.rb#764 def remaining_unparsed; end # As a workaround for buggy servers, allow a trailing SP: # *(SP capability) [SP] # - # source://net-imap//lib/net/imap/response_parser.rb#1627 + # source://net-imap//lib/net/imap/response_parser.rb#1631 def resp_code__capability; end # already matched: "APPENDUID" @@ -5031,14 +5593,14 @@ class Net::IMAP::ResponseParser # n.b, uniqueid ⊂ uid-set. To avoid inconsistent return types, we always # match uid_set even if that returns a single-member array. # - # source://net-imap//lib/net/imap/response_parser.rb#1862 + # source://net-imap//lib/net/imap/response_parser.rb#1866 def resp_code_apnd__data; end # already matched: "COPYUID" # # resp-code-copy = "COPYUID" SP nz-number SP uid-set SP uid-set # - # source://net-imap//lib/net/imap/response_parser.rb#1871 + # source://net-imap//lib/net/imap/response_parser.rb#1875 def resp_code_copy__data; end # resp-cond-auth = ("OK" / "PREAUTH") SP resp-text @@ -5048,14 +5610,14 @@ class Net::IMAP::ResponseParser # # resp-cond-auth = ("OK" / "PREAUTH") [SP resp-text] # - # source://net-imap//lib/net/imap/response_parser.rb#806 + # source://net-imap//lib/net/imap/response_parser.rb#809 def resp_cond_auth; end # expects "OK" or "PREAUTH" and raises InvalidResponseError on failure # # @raise [InvalidResponseError] # - # source://net-imap//lib/net/imap/response_parser.rb#527 + # source://net-imap//lib/net/imap/response_parser.rb#530 def resp_cond_auth__name; end # resp-cond-bye = "BYE" SP resp-text @@ -5065,7 +5627,7 @@ class Net::IMAP::ResponseParser # # resp-cond-bye = "BYE" [SP resp-text] # - # source://net-imap//lib/net/imap/response_parser.rb#818 + # source://net-imap//lib/net/imap/response_parser.rb#821 def resp_cond_bye; end # RFC3501 & RFC9051: @@ -5076,17 +5638,17 @@ class Net::IMAP::ResponseParser # # resp-cond-state = ("OK" / "NO" / "BAD") [SP resp-text] # - # source://net-imap//lib/net/imap/response_parser.rb#792 + # source://net-imap//lib/net/imap/response_parser.rb#795 def resp_cond_state; end # expects "OK" or "NO" or "BAD" and raises InvalidResponseError on failure # # @raise [InvalidResponseError] # - # source://net-imap//lib/net/imap/response_parser.rb#535 + # source://net-imap//lib/net/imap/response_parser.rb#538 def resp_cond_state__name; end - # source://net-imap//lib/net/imap/response_parser.rb#796 + # source://net-imap//lib/net/imap/response_parser.rb#799 def resp_cond_state__untagged; end # RFC3501: @@ -5097,7 +5659,7 @@ class Net::IMAP::ResponseParser # We leniently re-interpret this as # resp-text = ["[" resp-text-code "]" [SP [text]] / [text] # - # source://net-imap//lib/net/imap/response_parser.rb#1746 + # source://net-imap//lib/net/imap/response_parser.rb#1750 def resp_text; end # RFC3501 (See https://www.rfc-editor.org/errata/rfc3501): @@ -5156,12 +5718,12 @@ class Net::IMAP::ResponseParser # RFC8474: OBJECTID # resp-text-code =/ "MAILBOXID" SP "(" objectid ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1810 + # source://net-imap//lib/net/imap/response_parser.rb#1814 def resp_text_code; end # Returns atom.upcase # - # source://net-imap//lib/net/imap/response_parser.rb#495 + # source://net-imap//lib/net/imap/response_parser.rb#498 def resp_text_code__name; end # [RFC3501 & RFC9051:] @@ -5174,7 +5736,7 @@ class Net::IMAP::ResponseParser # # n.b: our "response-tagged" definition parses "greeting" too. # - # source://net-imap//lib/net/imap/response_parser.rb#654 + # source://net-imap//lib/net/imap/response_parser.rb#657 def response; end # [RFC3501:] @@ -5204,35 +5766,35 @@ class Net::IMAP::ResponseParser # # TODO: remove resp-cond-auth and handle greeting separately # - # source://net-imap//lib/net/imap/response_parser.rb#706 + # source://net-imap//lib/net/imap/response_parser.rb#709 def response_data; end - # source://net-imap//lib/net/imap/response_parser.rb#766 + # source://net-imap//lib/net/imap/response_parser.rb#769 def response_data__ignored; end - # source://net-imap//lib/net/imap/response_parser.rb#766 + # source://net-imap//lib/net/imap/response_parser.rb#769 def response_data__noop; end - # source://net-imap//lib/net/imap/response_parser.rb#832 + # source://net-imap//lib/net/imap/response_parser.rb#835 def response_data__simple_numeric; end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def response_data__unhandled(klass = T.unsafe(nil)); end # RFC3501 & RFC9051: # response-tagged = tag SP resp-cond-state CRLF # - # source://net-imap//lib/net/imap/response_parser.rb#781 + # source://net-imap//lib/net/imap/response_parser.rb#784 def response_tagged; end # section = "[" [section-spec] "]" # - # source://net-imap//lib/net/imap/response_parser.rb#1264 + # source://net-imap//lib/net/imap/response_parser.rb#1268 def section; end # section-binary = "[" [section-part] "]" # - # source://net-imap//lib/net/imap/response_parser.rb#1271 + # source://net-imap//lib/net/imap/response_parser.rb#1275 def section_binary; end # TODO: handle atom, astring_chars, and tag entirely inside the lexer @@ -5240,7 +5802,7 @@ class Net::IMAP::ResponseParser # ; body part reference. # ; Allows for accessing nested body parts. # - # source://net-imap//lib/net/imap/response_parser.rb#487 + # source://net-imap//lib/net/imap/response_parser.rb#490 def section_part; end # section-spec = section-msgtext / (section-part ["." section-text]) @@ -5259,7 +5821,7 @@ class Net::IMAP::ResponseParser # n.b: we could "cheat" here and just grab all text inside the brackets, # but literals would need special treatment. # - # source://net-imap//lib/net/imap/response_parser.rb#1292 + # source://net-imap//lib/net/imap/response_parser.rb#1296 def section_spec; end # sequence-set = (seq-number / seq-range) ["," sequence-set] @@ -5270,7 +5832,7 @@ class Net::IMAP::ResponseParser # # *note*: doesn't match seq-last-command # - # source://net-imap//lib/net/imap/response_parser.rb#468 + # source://net-imap//lib/net/imap/response_parser.rb#471 def sequence_set; end # RFC3501: @@ -5288,7 +5850,7 @@ class Net::IMAP::ResponseParser # mailbox-data = obsolete-search-response / ... # obsolete-search-response = "SEARCH" *(SP nz-number) # - # source://net-imap//lib/net/imap/response_parser.rb#1464 + # source://net-imap//lib/net/imap/response_parser.rb#1468 def sort_data; end # RFC3501 @@ -5296,7 +5858,7 @@ class Net::IMAP::ResponseParser # RFC4466, RFC9051, and RFC3501 Errata # status-att-list = status-att-val *(SP status-att-val) # - # source://net-imap//lib/net/imap/response_parser.rb#1541 + # source://net-imap//lib/net/imap/response_parser.rb#1545 def status_att_list; end # RFC3501 Errata: @@ -5339,10 +5901,10 @@ class Net::IMAP::ResponseParser # status-att-val =/ "MAILBOXID" SP "(" objectid ")" # ; follows tagged-ext production from [RFC4466] # - # source://net-imap//lib/net/imap/response_parser.rb#1586 + # source://net-imap//lib/net/imap/response_parser.rb#1590 def status_att_val; end - # source://net-imap//lib/net/imap/response_parser.rb#489 + # source://net-imap//lib/net/imap/response_parser.rb#492 def tag; end # tagged-ext-comp = astring / @@ -5357,7 +5919,7 @@ class Net::IMAP::ResponseParser # ; A URL should be represented as # ; a "quoted" string. # - # source://net-imap//lib/net/imap/response_parser.rb#571 + # source://net-imap//lib/net/imap/response_parser.rb#574 def tagged_ext_comp; end # tagged-ext-simple is a subset of atom @@ -5365,13 +5927,13 @@ class Net::IMAP::ResponseParser # # tagged-ext-simple = sequence-set / number / number64 # - # source://net-imap//lib/net/imap/response_parser.rb#588 + # source://net-imap//lib/net/imap/response_parser.rb#591 def tagged_ext_simple; end # tagged-ext-val = tagged-ext-simple / # "(" [tagged-ext-comp] ")" # - # source://net-imap//lib/net/imap/response_parser.rb#594 + # source://net-imap//lib/net/imap/response_parser.rb#597 def tagged_ext_val; end # TEXT-CHAR = @@ -5382,43 +5944,43 @@ class Net::IMAP::ResponseParser # ; Non-ASCII text can only be returned # ; after ENABLE IMAP4rev2 command # - # source://net-imap//lib/net/imap/response_parser.rb#1730 + # source://net-imap//lib/net/imap/response_parser.rb#1734 def text; end # an "accept" versiun of #text # # @return [Boolean] # - # source://net-imap//lib/net/imap/response_parser.rb#1735 + # source://net-imap//lib/net/imap/response_parser.rb#1739 def text?; end # 1* # - # source://net-imap//lib/net/imap/response_parser.rb#1841 + # source://net-imap//lib/net/imap/response_parser.rb#1845 def text_chars_except_rbra; end # RFC5256: THREAD # thread-data = "THREAD" [SP 1*thread-list] # - # source://net-imap//lib/net/imap/response_parser.rb#1480 + # source://net-imap//lib/net/imap/response_parser.rb#1484 def thread_data; end # RFC5256: THREAD # thread-list = "(" (thread-members / thread-nested) ")" # - # source://net-imap//lib/net/imap/response_parser.rb#1494 + # source://net-imap//lib/net/imap/response_parser.rb#1498 def thread_list; end # RFC5256: THREAD # thread-members = nz-number *(SP nz-number) [SP thread-nested] # - # source://net-imap//lib/net/imap/response_parser.rb#1507 + # source://net-imap//lib/net/imap/response_parser.rb#1511 def thread_members; end # RFC5256: THREAD # thread-nested = 2*thread-list # - # source://net-imap//lib/net/imap/response_parser.rb#1523 + # source://net-imap//lib/net/imap/response_parser.rb#1527 def thread_nested; end # RFC-4315 (UIDPLUS) or RFC9051 (IMAP4rev2): @@ -5430,30 +5992,30 @@ class Net::IMAP::ResponseParser # uniqueid = nz-number # ; Strictly ascending # - # source://net-imap//lib/net/imap/response_parser.rb#2000 + # source://net-imap//lib/net/imap/response_parser.rb#2004 def uid_set; end - # source://net-imap//lib/net/imap/response_parser.rb#748 + # source://net-imap//lib/net/imap/response_parser.rb#751 def uidfetch_resp(klass = T.unsafe(nil)); end # See https://developers.google.com/gmail/imap/imap-extensions # - # source://net-imap//lib/net/imap/response_parser.rb#1948 + # source://net-imap//lib/net/imap/response_parser.rb#1952 def x_gm_label; end # See https://developers.google.com/gmail/imap/imap-extensions # - # source://net-imap//lib/net/imap/response_parser.rb#1951 + # source://net-imap//lib/net/imap/response_parser.rb#1955 def x_gm_labels; end end # ASTRING-CHAR = ATOM-CHAR / resp-specials # resp-specials = "]" # -# source://net-imap//lib/net/imap/response_parser.rb#479 +# source://net-imap//lib/net/imap/response_parser.rb#482 Net::IMAP::ResponseParser::ASTRING_CHARS_TOKENS = T.let(T.unsafe(nil), Array) -# source://net-imap//lib/net/imap/response_parser.rb#481 +# source://net-imap//lib/net/imap/response_parser.rb#484 Net::IMAP::ResponseParser::ASTRING_TOKENS = T.let(T.unsafe(nil), Array) # basic utility methods for parsing. @@ -5476,7 +6038,7 @@ module Net::IMAP::ResponseParser::ParserUtils def accept_re(re); end # To be used conditionally: - # assert_no_lookahead if Net::IMAP.debug + # assert_no_lookahead if config.debug? # # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#158 def assert_no_lookahead; end @@ -5544,44 +6106,44 @@ Net::IMAP::ResponseParser::ParserUtils::Generator::LOOKAHEAD = T.let(T.unsafe(ni # source://net-imap//lib/net/imap/response_parser/parser_utils.rb#14 Net::IMAP::ResponseParser::ParserUtils::Generator::SHIFT_TOKEN = T.let(T.unsafe(nil), String) -# source://net-imap//lib/net/imap/response_parser.rb#77 +# source://net-imap//lib/net/imap/response_parser.rb#80 module Net::IMAP::ResponseParser::Patterns include ::Net::IMAP::ResponseParser::Patterns::RFC5234 include ::Net::IMAP::ResponseParser::Patterns::RFC3629 private - # source://net-imap//lib/net/imap/response_parser.rb#352 + # source://net-imap//lib/net/imap/response_parser.rb#355 def unescape_quoted(quoted); end - # source://net-imap//lib/net/imap/response_parser.rb#346 + # source://net-imap//lib/net/imap/response_parser.rb#349 def unescape_quoted!(quoted); end class << self - # source://net-imap//lib/net/imap/response_parser.rb#352 + # source://net-imap//lib/net/imap/response_parser.rb#355 def unescape_quoted(quoted); end - # source://net-imap//lib/net/imap/response_parser.rb#346 + # source://net-imap//lib/net/imap/response_parser.rb#349 def unescape_quoted!(quoted); end end end -# source://net-imap//lib/net/imap/response_parser.rb#174 +# source://net-imap//lib/net/imap/response_parser.rb#177 Net::IMAP::ResponseParser::Patterns::ASTRING_CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#178 +# source://net-imap//lib/net/imap/response_parser.rb#181 Net::IMAP::ResponseParser::Patterns::ASTRING_CHARS = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#172 +# source://net-imap//lib/net/imap/response_parser.rb#175 Net::IMAP::ResponseParser::Patterns::ASTRING_SPECIALS = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#177 +# source://net-imap//lib/net/imap/response_parser.rb#180 Net::IMAP::ResponseParser::Patterns::ATOM = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#179 +# source://net-imap//lib/net/imap/response_parser.rb#182 Net::IMAP::ResponseParser::Patterns::ATOMISH = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#175 +# source://net-imap//lib/net/imap/response_parser.rb#178 Net::IMAP::ResponseParser::Patterns::ATOM_CHAR = T.let(T.unsafe(nil), Regexp) # atomish = 1* @@ -5595,24 +6157,24 @@ Net::IMAP::ResponseParser::Patterns::ATOM_CHAR = T.let(T.unsafe(nil), Regexp) # ASTRING-CHAR = ATOM-CHAR / resp-specials # tag = 1* # -# source://net-imap//lib/net/imap/response_parser.rb#171 +# source://net-imap//lib/net/imap/response_parser.rb#174 Net::IMAP::ResponseParser::Patterns::ATOM_SPECIALS = T.let(T.unsafe(nil), Regexp) # CHAR8 = %x01-ff # ; any OCTET except NUL, %x00 # -# source://net-imap//lib/net/imap/response_parser.rb#151 +# source://net-imap//lib/net/imap/response_parser.rb#154 Net::IMAP::ResponseParser::Patterns::CHAR8 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#187 +# source://net-imap//lib/net/imap/response_parser.rb#190 Net::IMAP::ResponseParser::Patterns::CODE_TEXT = T.let(T.unsafe(nil), Regexp) # resp-text-code = ... / atom [SP 1*] # -# source://net-imap//lib/net/imap/response_parser.rb#186 +# source://net-imap//lib/net/imap/response_parser.rb#189 Net::IMAP::ResponseParser::Patterns::CODE_TEXT_CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#79 +# source://net-imap//lib/net/imap/response_parser.rb#82 module Net::IMAP::ResponseParser::Patterns::CharClassSubtraction; end # flag = "\Answered" / "\Flagged" / "\Deleted" / @@ -5644,13 +6206,13 @@ module Net::IMAP::ResponseParser::Patterns::CharClassSubtraction; end # ; attributes for the CHILDREN return option, at most # ; one possible per LIST response # -# source://net-imap//lib/net/imap/response_parser.rb#217 +# source://net-imap//lib/net/imap/response_parser.rb#220 Net::IMAP::ResponseParser::Patterns::FLAG = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#218 +# source://net-imap//lib/net/imap/response_parser.rb#221 Net::IMAP::ResponseParser::Patterns::FLAG_EXTENSION = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#219 +# source://net-imap//lib/net/imap/response_parser.rb#222 Net::IMAP::ResponseParser::Patterns::FLAG_KEYWORD = T.let(T.unsafe(nil), Regexp) # flag-list = "(" [flag *(SP flag)] ")" @@ -5661,18 +6223,18 @@ Net::IMAP::ResponseParser::Patterns::FLAG_KEYWORD = T.let(T.unsafe(nil), Regexp) # mbx-list-oflag *(SP mbx-list-oflag) # (Not checking for max one mbx-list-sflag in the parser.) # -# source://net-imap//lib/net/imap/response_parser.rb#230 +# source://net-imap//lib/net/imap/response_parser.rb#233 Net::IMAP::ResponseParser::Patterns::FLAG_LIST = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#220 +# source://net-imap//lib/net/imap/response_parser.rb#223 Net::IMAP::ResponseParser::Patterns::FLAG_PERM = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#231 +# source://net-imap//lib/net/imap/response_parser.rb#234 Net::IMAP::ResponseParser::Patterns::FLAG_PERM_LIST = T.let(T.unsafe(nil), Regexp) # list-wildcards = "%" / "*" # -# source://net-imap//lib/net/imap/response_parser.rb#154 +# source://net-imap//lib/net/imap/response_parser.rb#157 Net::IMAP::ResponseParser::Patterns::LIST_WILDCARDS = T.let(T.unsafe(nil), Regexp) # RFC3501: @@ -5687,7 +6249,7 @@ Net::IMAP::ResponseParser::Patterns::LIST_WILDCARDS = T.let(T.unsafe(nil), Regex # ; Non-synchronizing literals are not allowed when # ; sent from server to the client. # -# source://net-imap//lib/net/imap/response_parser.rb#332 +# source://net-imap//lib/net/imap/response_parser.rb#335 Net::IMAP::ResponseParser::Patterns::LITERAL = T.let(T.unsafe(nil), Regexp) # RFC3516 (BINARY): @@ -5699,37 +6261,37 @@ Net::IMAP::ResponseParser::Patterns::LITERAL = T.let(T.unsafe(nil), Regexp) # ; represents the number of OCTETs # ; in the response string. # -# source://net-imap//lib/net/imap/response_parser.rb#342 +# source://net-imap//lib/net/imap/response_parser.rb#345 Net::IMAP::ResponseParser::Patterns::LITERAL8 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#221 +# source://net-imap//lib/net/imap/response_parser.rb#224 Net::IMAP::ResponseParser::Patterns::MBX_FLAG = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#232 +# source://net-imap//lib/net/imap/response_parser.rb#235 Net::IMAP::ResponseParser::Patterns::MBX_LIST_FLAGS = T.let(T.unsafe(nil), Regexp) # nz-number = digit-nz *DIGIT # ; Non-zero unsigned 32-bit integer # ; (0 < n < 4,294,967,296) # -# source://net-imap//lib/net/imap/response_parser.rb#274 +# source://net-imap//lib/net/imap/response_parser.rb#277 Net::IMAP::ResponseParser::Patterns::NZ_NUMBER = T.let(T.unsafe(nil), Regexp) # Gmail allows SP and "]" in flags....... # -# source://net-imap//lib/net/imap/response_parser.rb#235 +# source://net-imap//lib/net/imap/response_parser.rb#238 Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAG = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#236 +# source://net-imap//lib/net/imap/response_parser.rb#239 Net::IMAP::ResponseParser::Patterns::QUIRKY_FLAGS_LIST = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#247 +# source://net-imap//lib/net/imap/response_parser.rb#250 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_esc = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#248 +# source://net-imap//lib/net/imap/response_parser.rb#251 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#249 +# source://net-imap//lib/net/imap/response_parser.rb#252 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev2 = T.let(T.unsafe(nil), Regexp) # RFC3501: @@ -5741,23 +6303,23 @@ Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_rev2 = T.let(T.unsafe(nil), Reg # RFC3501 & RFC9051: # quoted = DQUOTE *QUOTED-CHAR DQUOTE # -# source://net-imap//lib/net/imap/response_parser.rb#246 +# source://net-imap//lib/net/imap/response_parser.rb#249 Net::IMAP::ResponseParser::Patterns::QUOTED_CHAR_safe = T.let(T.unsafe(nil), Regexp) # quoted-specials = DQUOTE / "\" # -# source://net-imap//lib/net/imap/response_parser.rb#156 +# source://net-imap//lib/net/imap/response_parser.rb#159 Net::IMAP::ResponseParser::Patterns::QUOTED_SPECIALS = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#251 +# source://net-imap//lib/net/imap/response_parser.rb#254 Net::IMAP::ResponseParser::Patterns::QUOTED_rev1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#252 +# source://net-imap//lib/net/imap/response_parser.rb#255 Net::IMAP::ResponseParser::Patterns::QUOTED_rev2 = T.let(T.unsafe(nil), Regexp) # resp-specials = "]" # -# source://net-imap//lib/net/imap/response_parser.rb#158 +# source://net-imap//lib/net/imap/response_parser.rb#161 Net::IMAP::ResponseParser::Patterns::RESP_SPECIALS = T.let(T.unsafe(nil), Regexp) # UTF-8, a transformation format of ISO 10646 @@ -5779,30 +6341,30 @@ Net::IMAP::ResponseParser::Patterns::RESP_SPECIALS = T.let(T.unsafe(nil), Regexp # believe it is hard to support this case correctly." # See https://bugs.ruby-lang.org/issues/19104 # -# source://net-imap//lib/net/imap/response_parser.rb#131 +# source://net-imap//lib/net/imap/response_parser.rb#134 module Net::IMAP::ResponseParser::Patterns::RFC3629; end # aka ASCII 7bit # -# source://net-imap//lib/net/imap/response_parser.rb#132 +# source://net-imap//lib/net/imap/response_parser.rb#135 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#134 +# source://net-imap//lib/net/imap/response_parser.rb#137 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_2 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#135 +# source://net-imap//lib/net/imap/response_parser.rb#138 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_3 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#139 +# source://net-imap//lib/net/imap/response_parser.rb#142 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_4 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#142 +# source://net-imap//lib/net/imap/response_parser.rb#145 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#143 +# source://net-imap//lib/net/imap/response_parser.rb#146 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_OCTETS = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#133 +# source://net-imap//lib/net/imap/response_parser.rb#136 Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_TAIL = T.let(T.unsafe(nil), Regexp) # From RFC5234, "Augmented BNF for Syntax Specifications: ABNF" @@ -5821,39 +6383,39 @@ Net::IMAP::ResponseParser::Patterns::RFC3629::UTF8_TAIL = T.let(T.unsafe(nil), R # OCTET = %x00-FF # SP = %x20 # -# source://net-imap//lib/net/imap/response_parser.rb#101 +# source://net-imap//lib/net/imap/response_parser.rb#104 module Net::IMAP::ResponseParser::Patterns::RFC5234; end -# source://net-imap//lib/net/imap/response_parser.rb#102 +# source://net-imap//lib/net/imap/response_parser.rb#105 Net::IMAP::ResponseParser::Patterns::RFC5234::ALPHA = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#103 +# source://net-imap//lib/net/imap/response_parser.rb#106 Net::IMAP::ResponseParser::Patterns::RFC5234::CHAR = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#104 +# source://net-imap//lib/net/imap/response_parser.rb#107 Net::IMAP::ResponseParser::Patterns::RFC5234::CRLF = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#105 +# source://net-imap//lib/net/imap/response_parser.rb#108 Net::IMAP::ResponseParser::Patterns::RFC5234::CTL = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#106 +# source://net-imap//lib/net/imap/response_parser.rb#109 Net::IMAP::ResponseParser::Patterns::RFC5234::DIGIT = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#107 +# source://net-imap//lib/net/imap/response_parser.rb#110 Net::IMAP::ResponseParser::Patterns::RFC5234::DQUOTE = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#108 +# source://net-imap//lib/net/imap/response_parser.rb#111 Net::IMAP::ResponseParser::Patterns::RFC5234::HEXDIG = T.let(T.unsafe(nil), Regexp) # not using /./m for embedding purposes # -# source://net-imap//lib/net/imap/response_parser.rb#109 +# source://net-imap//lib/net/imap/response_parser.rb#112 Net::IMAP::ResponseParser::Patterns::RFC5234::OCTET = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#110 +# source://net-imap//lib/net/imap/response_parser.rb#113 Net::IMAP::ResponseParser::Patterns::RFC5234::SP = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#318 +# source://net-imap//lib/net/imap/response_parser.rb#321 Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET = T.let(T.unsafe(nil), Regexp) # sequence-set = (seq-number / seq-range) ["," sequence-set] @@ -5869,10 +6431,10 @@ Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET = T.let(T.unsafe(nil), Regexp) # ; be reordered and overlap coalesced to be # ; 4,5,6,7,8,9,10. # -# source://net-imap//lib/net/imap/response_parser.rb#317 +# source://net-imap//lib/net/imap/response_parser.rb#320 Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_ITEM = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#319 +# source://net-imap//lib/net/imap/response_parser.rb#322 Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_STR = T.let(T.unsafe(nil), Regexp) # seq-number = nz-number / "*" @@ -5892,7 +6454,7 @@ Net::IMAP::ResponseParser::Patterns::SEQUENCE_SET_STR = T.let(T.unsafe(nil), Reg # ; messages in the selected mailbox. This # ; includes "*" if the selected mailbox is empty. # -# source://net-imap//lib/net/imap/response_parser.rb#292 +# source://net-imap//lib/net/imap/response_parser.rb#295 Net::IMAP::ResponseParser::Patterns::SEQ_NUMBER = T.let(T.unsafe(nil), Regexp) # seq-range = seq-number ":" seq-number @@ -5905,31 +6467,31 @@ Net::IMAP::ResponseParser::Patterns::SEQ_NUMBER = T.let(T.unsafe(nil), Regexp) # ; the mailbox, even if that value is less than # ; 3291. # -# source://net-imap//lib/net/imap/response_parser.rb#303 +# source://net-imap//lib/net/imap/response_parser.rb#306 Net::IMAP::ResponseParser::Patterns::SEQ_RANGE = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#180 +# source://net-imap//lib/net/imap/response_parser.rb#183 Net::IMAP::ResponseParser::Patterns::TAG = T.let(T.unsafe(nil), Regexp) # tagged-ext-label = tagged-label-fchar *tagged-label-char # ; Is a valid RFC 3501 "atom". # -# source://net-imap//lib/net/imap/response_parser.rb#269 +# source://net-imap//lib/net/imap/response_parser.rb#272 Net::IMAP::ResponseParser::Patterns::TAGGED_EXT_LABEL = T.let(T.unsafe(nil), Regexp) # tagged-label-char = tagged-label-fchar / DIGIT / ":" # -# source://net-imap//lib/net/imap/response_parser.rb#266 +# source://net-imap//lib/net/imap/response_parser.rb#269 Net::IMAP::ResponseParser::Patterns::TAGGED_LABEL_CHAR = T.let(T.unsafe(nil), Regexp) # tagged-label-fchar = ALPHA / "-" / "_" / "." # -# source://net-imap//lib/net/imap/response_parser.rb#264 +# source://net-imap//lib/net/imap/response_parser.rb#267 Net::IMAP::ResponseParser::Patterns::TAGGED_LABEL_FCHAR = T.let(T.unsafe(nil), Regexp) # TEXT-CHAR = # -# source://net-imap//lib/net/imap/response_parser.rb#183 +# source://net-imap//lib/net/imap/response_parser.rb#186 Net::IMAP::ResponseParser::Patterns::TEXT_CHAR = T.let(T.unsafe(nil), Regexp) # RFC3501: @@ -5939,64 +6501,64 @@ Net::IMAP::ResponseParser::Patterns::TEXT_CHAR = T.let(T.unsafe(nil), Regexp) # ; Non-ASCII text can only be returned # ; after ENABLE IMAP4rev2 command # -# source://net-imap//lib/net/imap/response_parser.rb#260 +# source://net-imap//lib/net/imap/response_parser.rb#263 Net::IMAP::ResponseParser::Patterns::TEXT_rev1 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#261 +# source://net-imap//lib/net/imap/response_parser.rb#264 Net::IMAP::ResponseParser::Patterns::TEXT_rev2 = T.let(T.unsafe(nil), Regexp) -# source://net-imap//lib/net/imap/response_parser.rb#678 +# source://net-imap//lib/net/imap/response_parser.rb#681 Net::IMAP::ResponseParser::RE_RESPONSE_TYPE = T.let(T.unsafe(nil), Regexp) # end of response string # -# source://net-imap//lib/net/imap/response_parser.rb#62 +# source://net-imap//lib/net/imap/response_parser.rb#65 module Net::IMAP::ResponseParser::ResponseConditions; end -# source://net-imap//lib/net/imap/response_parser.rb#71 +# source://net-imap//lib/net/imap/response_parser.rb#74 Net::IMAP::ResponseParser::ResponseConditions::AUTH_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap//lib/net/imap/response_parser.rb#65 +# source://net-imap//lib/net/imap/response_parser.rb#68 Net::IMAP::ResponseParser::ResponseConditions::BAD = T.let(T.unsafe(nil), String) -# source://net-imap//lib/net/imap/response_parser.rb#66 +# source://net-imap//lib/net/imap/response_parser.rb#69 Net::IMAP::ResponseParser::ResponseConditions::BYE = T.let(T.unsafe(nil), String) -# source://net-imap//lib/net/imap/response_parser.rb#72 +# source://net-imap//lib/net/imap/response_parser.rb#75 Net::IMAP::ResponseParser::ResponseConditions::GREETING_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap//lib/net/imap/response_parser.rb#64 +# source://net-imap//lib/net/imap/response_parser.rb#67 Net::IMAP::ResponseParser::ResponseConditions::NO = T.let(T.unsafe(nil), String) -# source://net-imap//lib/net/imap/response_parser.rb#63 +# source://net-imap//lib/net/imap/response_parser.rb#66 Net::IMAP::ResponseParser::ResponseConditions::OK = T.let(T.unsafe(nil), String) -# source://net-imap//lib/net/imap/response_parser.rb#67 +# source://net-imap//lib/net/imap/response_parser.rb#70 Net::IMAP::ResponseParser::ResponseConditions::PREAUTH = T.let(T.unsafe(nil), String) -# source://net-imap//lib/net/imap/response_parser.rb#73 +# source://net-imap//lib/net/imap/response_parser.rb#76 Net::IMAP::ResponseParser::ResponseConditions::RESP_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap//lib/net/imap/response_parser.rb#69 +# source://net-imap//lib/net/imap/response_parser.rb#72 Net::IMAP::ResponseParser::ResponseConditions::RESP_COND_STATES = T.let(T.unsafe(nil), Array) -# source://net-imap//lib/net/imap/response_parser.rb#70 +# source://net-imap//lib/net/imap/response_parser.rb#73 Net::IMAP::ResponseParser::ResponseConditions::RESP_DATA_CONDS = T.let(T.unsafe(nil), Array) -# source://net-imap//lib/net/imap/response_parser.rb#459 +# source://net-imap//lib/net/imap/response_parser.rb#462 Net::IMAP::ResponseParser::SEQUENCE_SET_TOKENS = T.let(T.unsafe(nil), Array) -# source://net-imap//lib/net/imap/response_parser.rb#2017 +# source://net-imap//lib/net/imap/response_parser.rb#2021 Net::IMAP::ResponseParser::SPACES_REGEXP = T.let(T.unsafe(nil), Regexp) # tag = 1* # -# source://net-imap//lib/net/imap/response_parser.rb#484 +# source://net-imap//lib/net/imap/response_parser.rb#487 Net::IMAP::ResponseParser::TAG_TOKENS = T.let(T.unsafe(nil), Array) # starts with atom special # -# source://net-imap//lib/net/imap/response_parser.rb#57 +# source://net-imap//lib/net/imap/response_parser.rb#60 Net::IMAP::ResponseParser::T_LITERAL8 = T.let(T.unsafe(nil), Symbol) # Used to avoid an allocation when ResponseText is empty @@ -6038,7 +6600,7 @@ Net::IMAP::ResponseText::EMPTY = T.let(T.unsafe(nil), Net::IMAP::ResponseText) # See ExternalAuthenticator. # # Authenticates using already established credentials, such as a TLS -# certificate or IPsec. +# certificate or IPSec. # # +OAUTHBEARER+:: # See OAuthBearerAuthenticator. @@ -6697,7 +7259,7 @@ class Net::IMAP::SASL::Error < ::StandardError; end # Net::IMAP#authenticate. # # The EXTERNAL mechanism requests that the server use client credentials -# established external to SASL, for example by TLS certificate or IPsec. +# established external to SASL, for example by TLS certificate or IPSec. # # source://net-imap//lib/net/imap/sasl/external_authenticator.rb#13 class Net::IMAP::SASL::ExternalAuthenticator @@ -8628,8 +9190,8 @@ class Net::IMAP::SequenceSet # Yields each number or range in #string to the block and returns +self+. # Returns an enumerator when called without a block. # - # The entries are yielded in the same order they appear in #tring, with no - # sorting, deduplication, or coalescing. When #string is in its + # The entries are yielded in the same order they appear in #string, with + # no sorting, deduplication, or coalescing. When #string is in its # normalized form, this will yield the same values as #each_element. # # Related: #entries, #each_element diff --git a/sorbet/rbi/gems/net-smtp@0.4.0.1.rbi b/sorbet/rbi/gems/net-smtp@0.5.0.rbi similarity index 76% rename from sorbet/rbi/gems/net-smtp@0.4.0.1.rbi rename to sorbet/rbi/gems/net-smtp@0.5.0.rbi index 87c5f2e1e..94d8eab1c 100644 --- a/sorbet/rbi/gems/net-smtp@0.4.0.1.rbi +++ b/sorbet/rbi/gems/net-smtp@0.5.0.rbi @@ -4,16 +4,17 @@ # This is an autogenerated file for types exported from the `net-smtp` gem. # Please instead update this file by running `bin/tapioca gem net-smtp`. + # == What is This Library? # # This library provides functionality to send internet -# mail via SMTP, the Simple Mail Transfer Protocol. For details of -# SMTP itself, see [RFC5321] (http://www.ietf.org/rfc/rfc5321.txt). -# This library also implements SMTP authentication, which is often +# mail via \SMTP, the Simple Mail Transfer Protocol. For details of +# \SMTP itself, see [RFC5321[https://www.rfc-editor.org/rfc/rfc5321.txt]]. +# This library also implements \SMTP authentication, which is often # necessary for message composers to submit messages to their -# outgoing SMTP server, see -# [RFC6409](http://www.ietf.org/rfc/rfc6503.txt), -# and [SMTPUTF8](http://www.ietf.org/rfc/rfc6531.txt), which is +# outgoing \SMTP server, see +# [RFC6409[https://www.rfc-editor.org/rfc/rfc6409.html]], +# and [SMTPUTF8[https://www.rfc-editor.org/rfc/rfc6531.txt]], which is # necessary to send messages to/from addresses containing characters # outside the ASCII range. # @@ -21,18 +22,20 @@ # # This library does NOT provide functions to compose internet mails. # You must create them by yourself. If you want better mail support, -# try RubyMail or TMail or search for alternatives in +# try the mail[https://rubygems.org/gems/mail] or +# rmail[https://rubygems.org/gems/rmail] gems, or search for alternatives in # {RubyGems.org}[https://rubygems.org/] or {The Ruby # Toolbox}[https://www.ruby-toolbox.com/]. # -# FYI: the official specification on internet mail is: [RFC5322] (http://www.ietf.org/rfc/rfc5322.txt). +# FYI: the official specification on internet mail is: +# [RFC5322[https://www.rfc-editor.org/rfc/rfc5322.txt]]. # # == Examples # # === Sending Messages # -# You must open a connection to an SMTP server before sending messages. -# The first argument is the address of your SMTP server, and the second +# You must open a connection to an \SMTP server before sending messages. +# The first argument is the address of your \SMTP server, and the second # argument is the port number. Using SMTP.start with a block is the simplest # way to do this. This way, the SMTP connection is closed automatically # after the block is executed. @@ -42,7 +45,7 @@ # # Use the SMTP object smtp only in this block. # end # -# Replace 'your.smtp.server' with your SMTP server. Normally +# Replace 'your.smtp.server' with your \SMTP server. Normally # your system manager or internet provider supplies a server # for you. # @@ -75,7 +78,7 @@ # smtp.send_message msgstr, 'from@address', 'to@address' # smtp.finish # -# You can also use the block form of SMTP.start/SMTP#start. This closes +# You can also use the block form of SMTP.start or SMTP#start. This closes # the SMTP session automatically: # # # using block form of SMTP.start @@ -88,33 +91,36 @@ # === HELO domain # # In almost all situations, you must provide a third argument -# to SMTP.start/SMTP#start. This is the domain name which you are on +# to SMTP.start or SMTP#start. This is the domain name which you are on # (the host to send mail from). It is called the "HELO domain". -# The SMTP server will judge whether it should send or reject +# The \SMTP server will judge whether it should send or reject # the SMTP session by inspecting the HELO domain. # -# Net::SMTP.start('your.smtp.server', 25 -# helo: 'mail.from.domain') { |smtp| ... } +# Net::SMTP.start('your.smtp.server', 25, helo: 'mail.from.domain') do |smtp| +# smtp.send_message msgstr, 'from@address', 'to@address' +# end # -# === SMTP Authentication +# === \SMTP Authentication # -# The Net::SMTP class supports three authentication schemes; -# PLAIN, LOGIN and CRAM MD5. (SMTP Authentication: [RFC2554]) -# To use SMTP authentication, pass extra arguments to -# SMTP.start/SMTP#start. +# The Net::SMTP class supports the \SMTP extension for SASL Authentication +# [RFC4954[https://www.rfc-editor.org/rfc/rfc4954.html]] and the following +# SASL mechanisms: +PLAIN+, +LOGIN+ _(deprecated)_, and +CRAM-MD5+ +# _(deprecated)_. +# +# To use \SMTP authentication, pass extra arguments to +# SMTP.start or SMTP#start. # # # PLAIN -# Net::SMTP.start('your.smtp.server', 25 +# Net::SMTP.start('your.smtp.server', 25, # user: 'Your Account', secret: 'Your Password', authtype: :plain) -# # LOGIN -# Net::SMTP.start('your.smtp.server', 25 -# user: 'Your Account', secret: 'Your Password', authtype: :login) # -# # CRAM MD5 -# Net::SMTP.start('your.smtp.server', 25 -# user: 'Your Account', secret: 'Your Password', authtype: :cram_md5) +# Support for other SASL mechanisms-such as +EXTERNAL+, +OAUTHBEARER+, +# +SCRAM-SHA-256+, and +XOAUTH2+-will be added in a future release. +# +# The +LOGIN+ and +CRAM-MD5+ mechanisms are still available for backwards +# compatibility, but are deprecated and should be avoided. # -# source://net-smtp//lib/net/smtp.rb#189 +# source://net-smtp//lib/net/smtp.rb#194 class Net::SMTP < ::Net::Protocol # Creates a new Net::SMTP object. # @@ -130,43 +136,62 @@ class Net::SMTP < ::Net::Protocol # If the hostname in the server certificate is different from +address+, # it can be specified with +tls_hostname+. # - # Additional SSLContext params can be added to +ssl_context_params+ hash argument and are passed to - # +OpenSSL::SSL::SSLContext#set_params+ + # Additional SSLContext[https://ruby.github.io/openssl/OpenSSL/SSL/SSLContext.html] + # params can be added to the +ssl_context_params+ hash argument and are + # passed to {OpenSSL::SSL::SSLContext#set_params}[https://ruby.github.io/openssl/OpenSSL/SSL/SSLContext.html#method-i-set_params]. + # + # tls_verify: true is equivalent to ssl_context_params: { + # verify_mode: OpenSSL::SSL::VERIFY_PEER }. # - # +tls_verify: true+ is equivalent to +ssl_context_params: { verify_mode: OpenSSL::SSL::VERIFY_PEER }+. # This method does not open the TCP connection. You can use # SMTP.start instead of SMTP.new if you want to do everything # at once. Otherwise, follow SMTP.new with SMTP#start. # # @return [SMTP] a new instance of SMTP # - # source://net-smtp//lib/net/smtp.rb#240 + # source://net-smtp//lib/net/smtp.rb#248 def initialize(address, port = T.unsafe(nil), tls: T.unsafe(nil), starttls: T.unsafe(nil), tls_verify: T.unsafe(nil), tls_hostname: T.unsafe(nil), ssl_context_params: T.unsafe(nil)); end # The address of the SMTP server to connect to. # - # source://net-smtp//lib/net/smtp.rb#405 + # source://net-smtp//lib/net/smtp.rb#414 def address; end - # source://net-smtp//lib/net/smtp.rb#834 + # Returns whether the server advertises support for the authentication type. + # You cannot get valid result before opening SMTP session. + # + # @return [Boolean] + # + # source://net-smtp//lib/net/smtp.rb#329 + def auth_capable?(type); end + + # Authenticates with the server, using the "AUTH" command. + # + # +authtype+ is the name of a SASL authentication mechanism. + # + # All arguments-other than +authtype+-are forwarded to the authenticator. + # Different authenticators may interpret the +user+ and +secret+ + # arguments differently. + # + # source://net-smtp//lib/net/smtp.rb#872 def authenticate(user, secret, authtype = T.unsafe(nil)); end # The server capabilities by EHLO response # - # source://net-smtp//lib/net/smtp.rb#299 + # source://net-smtp//lib/net/smtp.rb#307 def capabilities; end # true if the EHLO response contains +key+. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#293 + # source://net-smtp//lib/net/smtp.rb#301 def capable?(key); end # Returns supported authentication methods on this server. # You cannot get valid value before opening SMTP session. # - # source://net-smtp//lib/net/smtp.rb#328 + # source://net-smtp//lib/net/smtp.rb#337 def capable_auth_types; end # true if server advertises AUTH CRAM-MD5. @@ -174,7 +199,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#315 + # source://net-smtp//lib/net/smtp.rb#323 def capable_cram_md5_auth?; end # true if server advertises AUTH LOGIN. @@ -182,7 +207,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#309 + # source://net-smtp//lib/net/smtp.rb#317 def capable_login_auth?; end # true if server advertises AUTH PLAIN. @@ -190,7 +215,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#303 + # source://net-smtp//lib/net/smtp.rb#311 def capable_plain_auth?; end # true if server advertises STARTTLS. @@ -198,7 +223,7 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#288 + # source://net-smtp//lib/net/smtp.rb#296 def capable_starttls?; end # This method sends a message. @@ -224,7 +249,7 @@ class Net::SMTP < ::Net::Protocol # f.puts "Check vm.c:58879." # } # - # source://net-smtp//lib/net/smtp.rb#933 + # source://net-smtp//lib/net/smtp.rb#958 def data(msgstr = T.unsafe(nil), &block); end # WARNING: This method causes serious security holes. @@ -240,37 +265,37 @@ class Net::SMTP < ::Net::Protocol # .... # end # - # source://net-smtp//lib/net/smtp.rb#441 + # source://net-smtp//lib/net/smtp.rb#450 def debug_output=(arg); end # Disables SMTP/TLS for this object. Must be called before the # connection is established to have any effect. # - # source://net-smtp//lib/net/smtp.rb#355 + # source://net-smtp//lib/net/smtp.rb#364 def disable_ssl; end # Disables SMTP/TLS (STARTTLS) for this object. Must be called # before the connection is established to have any effect. # - # source://net-smtp//lib/net/smtp.rb#399 + # source://net-smtp//lib/net/smtp.rb#408 def disable_starttls; end # Disables SMTP/TLS for this object. Must be called before the # connection is established to have any effect. # - # source://net-smtp//lib/net/smtp.rb#355 + # source://net-smtp//lib/net/smtp.rb#364 def disable_tls; end - # source://net-smtp//lib/net/smtp.rb#882 + # source://net-smtp//lib/net/smtp.rb#907 def ehlo(domain); end - # Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for + # Enables SMTP/TLS (SMTPS: \SMTP over direct TLS connection) for # this object. Must be called before the connection is established # to have any effect. +context+ is a OpenSSL::SSL::SSLContext object. # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#344 + # source://net-smtp//lib/net/smtp.rb#353 def enable_ssl(context = T.unsafe(nil)); end # Enables SMTP/TLS (STARTTLS) for this object. @@ -278,7 +303,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#381 + # source://net-smtp//lib/net/smtp.rb#390 def enable_starttls(context = T.unsafe(nil)); end # Enables SMTP/TLS (STARTTLS) for this object if server accepts. @@ -286,16 +311,16 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#390 + # source://net-smtp//lib/net/smtp.rb#399 def enable_starttls_auto(context = T.unsafe(nil)); end - # Enables SMTP/TLS (SMTPS: SMTP over direct TLS connection) for + # Enables SMTP/TLS (SMTPS: \SMTP over direct TLS connection) for # this object. Must be called before the connection is established # to have any effect. +context+ is a OpenSSL::SSL::SSLContext object. # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#344 + # source://net-smtp//lib/net/smtp.rb#353 def enable_tls(context = T.unsafe(nil)); end # Set whether to use ESMTP or not. This should be done before @@ -304,7 +329,7 @@ class Net::SMTP < ::Net::Protocol # object will automatically switch to plain SMTP mode and # retry (but not vice versa). # - # source://net-smtp//lib/net/smtp.rb#281 + # source://net-smtp//lib/net/smtp.rb#289 def esmtp; end # Set whether to use ESMTP or not. This should be done before @@ -313,7 +338,7 @@ class Net::SMTP < ::Net::Protocol # object will automatically switch to plain SMTP mode and # retry (but not vice versa). # - # source://net-smtp//lib/net/smtp.rb#281 + # source://net-smtp//lib/net/smtp.rb#289 def esmtp=(_arg0); end # Set whether to use ESMTP or not. This should be done before @@ -323,7 +348,7 @@ class Net::SMTP < ::Net::Protocol # retry (but not vice versa). # +true+ if the SMTP object uses ESMTP (which it does by default). # - # source://net-smtp//lib/net/smtp.rb#281 + # source://net-smtp//lib/net/smtp.rb#289 def esmtp?; end # Finishes the SMTP session and closes TCP connection. @@ -331,23 +356,23 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#623 + # source://net-smtp//lib/net/smtp.rb#655 def finish; end - # source://net-smtp//lib/net/smtp.rb#964 + # source://net-smtp//lib/net/smtp.rb#989 def get_response(reqline); end - # source://net-smtp//lib/net/smtp.rb#878 + # source://net-smtp//lib/net/smtp.rb#903 def helo(domain); end # Provide human-readable stringification of class state. # - # source://net-smtp//lib/net/smtp.rb#270 + # source://net-smtp//lib/net/smtp.rb#278 def inspect; end # +from_addr+ is +String+ or +Net::SMTP::Address+ # - # source://net-smtp//lib/net/smtp.rb#887 + # source://net-smtp//lib/net/smtp.rb#912 def mailfrom(from_addr); end # Opens a message writer stream and gives it to the block. @@ -395,52 +420,52 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#818 + # source://net-smtp//lib/net/smtp.rb#849 def open_message_stream(from_addr, *to_addrs, &block); end # Seconds to wait while attempting to open a connection. # If the connection cannot be opened within this time, a # Net::OpenTimeout is raised. The default value is 30 seconds. # - # source://net-smtp//lib/net/smtp.rb#413 + # source://net-smtp//lib/net/smtp.rb#422 def open_timeout; end # Seconds to wait while attempting to open a connection. # If the connection cannot be opened within this time, a # Net::OpenTimeout is raised. The default value is 30 seconds. # - # source://net-smtp//lib/net/smtp.rb#413 + # source://net-smtp//lib/net/smtp.rb#422 def open_timeout=(_arg0); end # The port number of the SMTP server to connect to. # - # source://net-smtp//lib/net/smtp.rb#408 + # source://net-smtp//lib/net/smtp.rb#417 def port; end - # source://net-smtp//lib/net/smtp.rb#960 + # source://net-smtp//lib/net/smtp.rb#985 def quit; end # +to_addr+ is +String+ or +Net::SMTP::Address+ # - # source://net-smtp//lib/net/smtp.rb#905 + # source://net-smtp//lib/net/smtp.rb#930 def rcptto(to_addr); end # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#896 + # source://net-smtp//lib/net/smtp.rb#921 def rcptto_list(to_addrs); end # Seconds to wait while reading one block (by one read(2) call). # If the read(2) call does not complete within this time, a # Net::ReadTimeout is raised. The default value is 60 seconds. # - # source://net-smtp//lib/net/smtp.rb#418 + # source://net-smtp//lib/net/smtp.rb#427 def read_timeout; end # Set the number of seconds to wait until timing-out a read(2) # call. # - # source://net-smtp//lib/net/smtp.rb#422 + # source://net-smtp//lib/net/smtp.rb#431 def read_timeout=(sec); end # Opens a message writer stream and gives it to the block. @@ -489,12 +514,12 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#818 + # source://net-smtp//lib/net/smtp.rb#849 def ready(from_addr, *to_addrs, &block); end # Aborts the current mail transaction # - # source://net-smtp//lib/net/smtp.rb#870 + # source://net-smtp//lib/net/smtp.rb#895 def rset; end # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found @@ -534,7 +559,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#763 + # source://net-smtp//lib/net/smtp.rb#794 def send_mail(msgstr, from_addr, *to_addrs); end # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found @@ -574,7 +599,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#763 + # source://net-smtp//lib/net/smtp.rb#794 def send_message(msgstr, from_addr, *to_addrs); end # Sends +msgstr+ as a message. Single CR ("\r") and LF ("\n") found @@ -615,7 +640,7 @@ class Net::SMTP < ::Net::Protocol # # @raise [IOError] # - # source://net-smtp//lib/net/smtp.rb#763 + # source://net-smtp//lib/net/smtp.rb#794 def sendmail(msgstr, from_addr, *to_addrs); end # WARNING: This method causes serious security holes. @@ -631,24 +656,24 @@ class Net::SMTP < ::Net::Protocol # .... # end # - # source://net-smtp//lib/net/smtp.rb#441 + # source://net-smtp//lib/net/smtp.rb#450 def set_debug_output(arg); end # true if this object uses SMTP/TLS (SMTPS). # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#335 + # source://net-smtp//lib/net/smtp.rb#344 def ssl?; end # Hash for additional SSLContext parameters. # - # source://net-smtp//lib/net/smtp.rb#267 + # source://net-smtp//lib/net/smtp.rb#275 def ssl_context_params; end # Hash for additional SSLContext parameters. # - # source://net-smtp//lib/net/smtp.rb#267 + # source://net-smtp//lib/net/smtp.rb#275 def ssl_context_params=(_arg0); end # :call-seq: @@ -662,11 +687,21 @@ class Net::SMTP < ::Net::Protocol # +helo+ is the _HELO_ _domain_ that you'll dispatch mails from; see # the discussion in the overview notes. # - # If both of +user+ and +secret+ are given, SMTP authentication - # will be attempted using the AUTH command. +authtype+ specifies - # the type of authentication to attempt; it must be one of - # :login, :plain, and :cram_md5. See the notes on SMTP Authentication - # in the overview. + # The remaining arguments are used for \SMTP authentication, if required or + # desired. + # + # +authtype+ is the SASL authentication mechanism. + # + # +user+ is the authentication or authorization identity. + # + # +secret+ or +password+ is your password or other authentication token. + # + # These will be sent to #authenticate as positional arguments-the exact + # semantics are dependent on the +authtype+. + # + # See the discussion of Net::SMTP@SMTP+Authentication in the overview notes. + # + # See also: Net::SMTP.start # # === Block Usage # @@ -707,17 +742,17 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#590 + # source://net-smtp//lib/net/smtp.rb#622 def start(*args, helo: T.unsafe(nil), user: T.unsafe(nil), secret: T.unsafe(nil), password: T.unsafe(nil), authtype: T.unsafe(nil)); end - # +true+ if the SMTP session has been started. + # +true+ if the \SMTP session has been started. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#531 + # source://net-smtp//lib/net/smtp.rb#553 def started?; end - # source://net-smtp//lib/net/smtp.rb#874 + # source://net-smtp//lib/net/smtp.rb#899 def starttls; end # Returns truth value if this object uses STARTTLS. @@ -726,136 +761,125 @@ class Net::SMTP < ::Net::Protocol # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#365 + # source://net-smtp//lib/net/smtp.rb#374 def starttls?; end # true if this object uses STARTTLS. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#370 + # source://net-smtp//lib/net/smtp.rb#379 def starttls_always?; end # true if this object uses STARTTLS when server advertises STARTTLS. # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#375 + # source://net-smtp//lib/net/smtp.rb#384 def starttls_auto?; end # true if this object uses SMTP/TLS (SMTPS). # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#335 + # source://net-smtp//lib/net/smtp.rb#344 def tls?; end # The hostname for verifying hostname in the server certificatate. # - # source://net-smtp//lib/net/smtp.rb#264 + # source://net-smtp//lib/net/smtp.rb#272 def tls_hostname; end # The hostname for verifying hostname in the server certificatate. # - # source://net-smtp//lib/net/smtp.rb#264 + # source://net-smtp//lib/net/smtp.rb#272 def tls_hostname=(_arg0); end # If +true+, verify th server's certificate. # - # source://net-smtp//lib/net/smtp.rb#261 + # source://net-smtp//lib/net/smtp.rb#269 def tls_verify; end # If +true+, verify th server's certificate. # - # source://net-smtp//lib/net/smtp.rb#261 + # source://net-smtp//lib/net/smtp.rb#269 def tls_verify=(_arg0); end private - # source://net-smtp//lib/net/smtp.rb#717 + # source://net-smtp//lib/net/smtp.rb#748 def any_require_smtputf8(addresses); end - # @return [Boolean] - # - # source://net-smtp//lib/net/smtp.rb#319 - def auth_capable?(type); end - - # source://net-smtp//lib/net/smtp.rb#849 - def auth_method(type); end + # source://net-smtp//lib/net/smtp.rb#880 + def check_auth_args(type, *args, **kwargs); end - # source://net-smtp//lib/net/smtp.rb#853 - def check_auth_args(user, secret, authtype = T.unsafe(nil)); end - - # source://net-smtp//lib/net/smtp.rb#843 - def check_auth_method(type); end - - # source://net-smtp//lib/net/smtp.rb#1015 + # source://net-smtp//lib/net/smtp.rb#1040 def check_continue(res); end - # source://net-smtp//lib/net/smtp.rb#1009 + # source://net-smtp//lib/net/smtp.rb#1034 def check_response(res); end - # source://net-smtp//lib/net/smtp.rb#999 + # source://net-smtp//lib/net/smtp.rb#1024 def critical; end - # source://net-smtp//lib/net/smtp.rb#700 + # source://net-smtp//lib/net/smtp.rb#731 def do_finish; end - # source://net-smtp//lib/net/smtp.rb#688 + # source://net-smtp//lib/net/smtp.rb#719 def do_helo(helo_domain); end - # source://net-smtp//lib/net/smtp.rb#634 + # source://net-smtp//lib/net/smtp.rb#666 def do_start(helo_domain, user, secret, authtype); end - # source://net-smtp//lib/net/smtp.rb#979 + # source://net-smtp//lib/net/smtp.rb#1004 def getok(reqline); end - # source://net-smtp//lib/net/smtp.rb#1100 + # source://net-smtp//lib/net/smtp.rb#1125 def logging(msg); end - # source://net-smtp//lib/net/smtp.rb#683 + # source://net-smtp//lib/net/smtp.rb#714 def new_internet_message_io(s); end - # source://net-smtp//lib/net/smtp.rb#989 + # source://net-smtp//lib/net/smtp.rb#1014 def recv_response; end - # source://net-smtp//lib/net/smtp.rb#709 + # source://net-smtp//lib/net/smtp.rb#740 def requires_smtputf8(address); end - # source://net-smtp//lib/net/smtp.rb#666 + # source://net-smtp//lib/net/smtp.rb#697 def ssl_socket(socket, context); end - # source://net-smtp//lib/net/smtp.rb#630 + # source://net-smtp//lib/net/smtp.rb#662 def tcp_socket(address, port); end - # source://net-smtp//lib/net/smtp.rb#670 + # source://net-smtp//lib/net/smtp.rb#701 def tlsconnect(s, context); end - # source://net-smtp//lib/net/smtp.rb#972 + # source://net-smtp//lib/net/smtp.rb#997 def validate_line(line); end class << self # The default SMTP port number, 25. # - # source://net-smtp//lib/net/smtp.rb#193 + # source://net-smtp//lib/net/smtp.rb#198 def default_port; end - # source://net-smtp//lib/net/smtp.rb#211 + # source://net-smtp//lib/net/smtp.rb#216 def default_ssl_context(ssl_context_params = T.unsafe(nil)); end # The default SMTPS port number, 465. # - # source://net-smtp//lib/net/smtp.rb#203 + # source://net-smtp//lib/net/smtp.rb#208 def default_ssl_port; end # The default mail submission port number, 587. # - # source://net-smtp//lib/net/smtp.rb#198 + # source://net-smtp//lib/net/smtp.rb#203 def default_submission_port; end # The default SMTPS port number, 465. # - # source://net-smtp//lib/net/smtp.rb#203 + # source://net-smtp//lib/net/smtp.rb#208 def default_tls_port; end # :call-seq: @@ -866,7 +890,10 @@ class Net::SMTP < ::Net::Protocol # # This method is equivalent to: # - # Net::SMTP.new(address, port).start(helo: helo_domain, user: account, secret: password, authtype: authtype, tls_verify: flag, tls_hostname: hostname, ssl_context_params: nil) + # Net::SMTP.new(address, port, tls_verify: flag, tls_hostname: hostname, ssl_context_params: nil) + # .start(helo: helo_domain, user: account, secret: password, authtype: authtype) + # + # See also: Net::SMTP.new, #start # # === Example # @@ -891,12 +918,6 @@ class Net::SMTP < ::Net::Protocol # +helo+ is the _HELO_ _domain_ provided by the client to the # server (see overview comments); it defaults to 'localhost'. # - # The remaining arguments are used for SMTP authentication, if required - # or desired. +user+ is the account name; +secret+ is your password - # or other authentication token; and +authtype+ is the authentication - # type, one of :plain, :login, or :cram_md5. See the discussion of - # SMTP Authentication in the overview notes. - # # If +tls+ is true, enable TLS. The default is false. # If +starttls+ is :always, enable STARTTLS, if +:auto+, use STARTTLS when the server supports it, # if false, disable STARTTLS. @@ -905,10 +926,26 @@ class Net::SMTP < ::Net::Protocol # If the hostname in the server certificate is different from +address+, # it can be specified with +tls_hostname+. # - # Additional SSLContext params can be added to +ssl_context_params+ hash argument and are passed to - # +OpenSSL::SSL::SSLContext#set_params+ + # Additional SSLContext[https://ruby.github.io/openssl/OpenSSL/SSL/SSLContext.html] + # params can be added to the +ssl_context_params+ hash argument and are + # passed to {OpenSSL::SSL::SSLContext#set_params}[https://ruby.github.io/openssl/OpenSSL/SSL/SSLContext.html#method-i-set_params]. + # + # tls_verify: true is equivalent to ssl_context_params: { + # verify_mode: OpenSSL::SSL::VERIFY_PEER }. + # + # The remaining arguments are used for \SMTP authentication, if required or + # desired. + # + # +authtype+ is the SASL authentication mechanism. + # + # +user+ is the authentication or authorization identity. # - # +tls_verify: true+ is equivalent to +ssl_context_params: { verify_mode: OpenSSL::SSL::VERIFY_PEER }+. + # +secret+ or +password+ is your password or other authentication token. + # + # These will be sent to #authenticate as positional arguments-the exact + # semantics are dependent on the +authtype+. + # + # See the discussion of Net::SMTP@SMTP+Authentication in the overview notes. # # === Errors # @@ -925,14 +962,14 @@ class Net::SMTP < ::Net::Protocol # # @raise [ArgumentError] # - # source://net-smtp//lib/net/smtp.rb#517 + # source://net-smtp//lib/net/smtp.rb#539 def start(address, port = T.unsafe(nil), *args, helo: T.unsafe(nil), user: T.unsafe(nil), secret: T.unsafe(nil), password: T.unsafe(nil), authtype: T.unsafe(nil), tls: T.unsafe(nil), starttls: T.unsafe(nil), tls_verify: T.unsafe(nil), tls_hostname: T.unsafe(nil), ssl_context_params: T.unsafe(nil), &block); end end end # Address with parametres for MAIL or RCPT command # -# source://net-smtp//lib/net/smtp.rb#1105 +# source://net-smtp//lib/net/smtp.rb#1130 class Net::SMTP::Address # :call-seq: # initialize(address, parameter, ...) @@ -942,20 +979,20 @@ class Net::SMTP::Address # # @return [Address] a new instance of Address # - # source://net-smtp//lib/net/smtp.rb#1116 + # source://net-smtp//lib/net/smtp.rb#1141 def initialize(address, *args, **kw_args); end # mail address [String] # - # source://net-smtp//lib/net/smtp.rb#1107 + # source://net-smtp//lib/net/smtp.rb#1132 def address; end # parameters [Array] # - # source://net-smtp//lib/net/smtp.rb#1109 + # source://net-smtp//lib/net/smtp.rb#1134 def parameters; end - # source://net-smtp//lib/net/smtp.rb#1127 + # source://net-smtp//lib/net/smtp.rb#1152 def to_s; end end @@ -997,40 +1034,51 @@ class Net::SMTP::AuthPlain < ::Net::SMTP::Authenticator def auth(user, secret); end end +# source://net-smtp//lib/net/smtp/auth_xoauth2.rb#2 +class Net::SMTP::AuthXoauth2 < ::Net::SMTP::Authenticator + # source://net-smtp//lib/net/smtp/auth_xoauth2.rb#5 + def auth(user, secret); end + + private + + # source://net-smtp//lib/net/smtp/auth_xoauth2.rb#13 + def xoauth2_string(user, secret); end +end + # source://net-smtp//lib/net/smtp/authenticator.rb#3 class Net::SMTP::Authenticator # @return [Authenticator] a new instance of Authenticator # - # source://net-smtp//lib/net/smtp/authenticator.rb#18 + # source://net-smtp//lib/net/smtp/authenticator.rb#29 def initialize(smtp); end # @param str [String] # @return [String] Base64 encoded string # - # source://net-smtp//lib/net/smtp/authenticator.rb#40 + # source://net-smtp//lib/net/smtp/authenticator.rb#51 def base64_encode(str); end # @param arg [String] message to server # @raise [res.exception_class] # @return [String] message from server # - # source://net-smtp//lib/net/smtp/authenticator.rb#24 + # source://net-smtp//lib/net/smtp/authenticator.rb#35 def continue(arg); end # @param arg [String] message to server # @raise [SMTPAuthenticationError] # @return [Net::SMTP::Response] response from server # - # source://net-smtp//lib/net/smtp/authenticator.rb#32 + # source://net-smtp//lib/net/smtp/authenticator.rb#43 def finish(arg); end # Returns the value of attribute smtp. # - # source://net-smtp//lib/net/smtp/authenticator.rb#16 + # source://net-smtp//lib/net/smtp/authenticator.rb#27 def smtp; end class << self - # source://net-smtp//lib/net/smtp/authenticator.rb#12 + # source://net-smtp//lib/net/smtp/authenticator.rb#13 def auth_class(type); end # source://net-smtp//lib/net/smtp/authenticator.rb#4 @@ -1038,6 +1086,9 @@ class Net::SMTP::Authenticator # source://net-smtp//lib/net/smtp/authenticator.rb#8 def auth_type(type); end + + # source://net-smtp//lib/net/smtp/authenticator.rb#18 + def check_args(user_arg = T.unsafe(nil), secret_arg = T.unsafe(nil), *_arg2, **_arg3); end end end @@ -1046,14 +1097,14 @@ end # created by the user. For more information on SMTP responses, view # {Section 4.2 of RFC 5321}[http://tools.ietf.org/html/rfc5321#section-4.2] # -# source://net-smtp//lib/net/smtp.rb#1025 +# source://net-smtp//lib/net/smtp.rb#1050 class Net::SMTP::Response # Creates a new instance of the Response class and sets the status and # string attributes # # @return [Response] a new instance of Response # - # source://net-smtp//lib/net/smtp.rb#1034 + # source://net-smtp//lib/net/smtp.rb#1059 def initialize(status, string); end # Returns a hash of the human readable reply text in the response if it @@ -1061,7 +1112,7 @@ class Net::SMTP::Response # hash is the first word the value of the hash is an array with each word # thereafter being a value in the array # - # source://net-smtp//lib/net/smtp.rb#1077 + # source://net-smtp//lib/net/smtp.rb#1102 def capabilities; end # Determines whether the response received was a Positive Intermediate @@ -1069,39 +1120,39 @@ class Net::SMTP::Response # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#1058 + # source://net-smtp//lib/net/smtp.rb#1083 def continue?; end # Creates a CRAM-MD5 challenge. You can view more information on CRAM-MD5 # on Wikipedia: https://en.wikipedia.org/wiki/CRAM-MD5 # - # source://net-smtp//lib/net/smtp.rb#1069 + # source://net-smtp//lib/net/smtp.rb#1094 def cram_md5_challenge; end # Determines whether there was an error and raises the appropriate error # based on the reply code of the response # - # source://net-smtp//lib/net/smtp.rb#1089 + # source://net-smtp//lib/net/smtp.rb#1114 def exception_class; end # The first line of the human readable reply text # - # source://net-smtp//lib/net/smtp.rb#1063 + # source://net-smtp//lib/net/smtp.rb#1088 def message; end # The three digit reply code of the SMTP response # - # source://net-smtp//lib/net/smtp.rb#1040 + # source://net-smtp//lib/net/smtp.rb#1065 def status; end # Takes the first digit of the reply code to determine the status type # - # source://net-smtp//lib/net/smtp.rb#1046 + # source://net-smtp//lib/net/smtp.rb#1071 def status_type_char; end # The human readable reply text of the SMTP response # - # source://net-smtp//lib/net/smtp.rb#1043 + # source://net-smtp//lib/net/smtp.rb#1068 def string; end # Determines whether the response received was a Positive Completion @@ -1109,19 +1160,19 @@ class Net::SMTP::Response # # @return [Boolean] # - # source://net-smtp//lib/net/smtp.rb#1052 + # source://net-smtp//lib/net/smtp.rb#1077 def success?; end class << self # Parses the received response and separates the reply code and the human # readable reply text # - # source://net-smtp//lib/net/smtp.rb#1028 + # source://net-smtp//lib/net/smtp.rb#1053 def parse(str); end end end -# source://net-smtp//lib/net/smtp.rb#190 +# source://net-smtp//lib/net/smtp.rb#195 Net::SMTP::VERSION = T.let(T.unsafe(nil), String) # source://net-smtp//lib/net/smtp.rb#49 @@ -1158,7 +1209,7 @@ end # class SMTP # -# source://net-smtp//lib/net/smtp.rb#1133 +# source://net-smtp//lib/net/smtp.rb#1158 Net::SMTPSession = Net::SMTP # source://net-smtp//lib/net/smtp.rb#59 diff --git a/sorbet/rbi/gems/nio4r@2.7.0.rbi b/sorbet/rbi/gems/nio4r@2.7.3.rbi similarity index 99% rename from sorbet/rbi/gems/nio4r@2.7.0.rbi rename to sorbet/rbi/gems/nio4r@2.7.3.rbi index 26b6d957f..1b9cda885 100644 --- a/sorbet/rbi/gems/nio4r@2.7.0.rbi +++ b/sorbet/rbi/gems/nio4r@2.7.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `nio4r` gem. # Please instead update this file by running `bin/tapioca gem nio4r`. + # New I/O for Ruby # # source://nio4r//lib/nio/version.rb#8 diff --git a/sorbet/rbi/gems/nokogiri@1.16.2.rbi b/sorbet/rbi/gems/nokogiri@1.16.6.rbi similarity index 99% rename from sorbet/rbi/gems/nokogiri@1.16.2.rbi rename to sorbet/rbi/gems/nokogiri@1.16.6.rbi index 99b6d152b..b1e6ba27c 100644 --- a/sorbet/rbi/gems/nokogiri@1.16.2.rbi +++ b/sorbet/rbi/gems/nokogiri@1.16.6.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `nokogiri` gem. # Please instead update this file by running `bin/tapioca gem nokogiri`. + # Nokogiri parses and searches XML/HTML very quickly, and also has # correctly implemented CSS3 selector support as well as XPath 1.0 # support. diff --git a/sorbet/rbi/gems/parallel@1.24.0.rbi b/sorbet/rbi/gems/parallel@1.26.3.rbi similarity index 84% rename from sorbet/rbi/gems/parallel@1.24.0.rbi rename to sorbet/rbi/gems/parallel@1.26.3.rbi index 5dd73750f..854c48709 100644 --- a/sorbet/rbi/gems/parallel@1.24.0.rbi +++ b/sorbet/rbi/gems/parallel@1.26.3.rbi @@ -4,6 +4,7 @@ # 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 @@ -24,10 +25,10 @@ module Parallel def each_with_index(array, options = T.unsafe(nil), &block); end # source://parallel//lib/parallel.rb#307 - def filter_map(*args, &block); end + def filter_map(*_arg0, **_arg1, &_arg2); end # source://parallel//lib/parallel.rb#303 - def flat_map(*args, &block); end + def flat_map(*_arg0, **_arg1, &_arg2); end # source://parallel//lib/parallel.rb#228 def in_processes(options = T.unsafe(nil), &block); end @@ -46,70 +47,80 @@ module Parallel # source://parallel//lib/parallel.rb#312 def physical_processor_count; end - # Number of processors seen by the OS, used for process scheduling + # 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#345 + # source://parallel//lib/parallel.rb#342 def processor_count; end - # source://parallel//lib/parallel.rb#350 + # 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#355 + # source://parallel//lib/parallel.rb#351 def worker_number=(worker_num); end private - # source://parallel//lib/parallel.rb#361 + # source://parallel//lib/parallel.rb#384 def add_progress_bar!(job_factory, options); end - # source://parallel//lib/parallel.rb#624 + # 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#556 + # 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#614 + # source://parallel//lib/parallel.rb#637 def extract_count_from_options(options); end - # source://parallel//lib/parallel.rb#642 + # 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#651 + # source://parallel//lib/parallel.rb#674 def instrument_finish_in_order(item, index, result, options); end - # source://parallel//lib/parallel.rb#671 + # source://parallel//lib/parallel.rb#694 def instrument_start(item, index, options); end - # source://parallel//lib/parallel.rb#590 + # 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#544 + # source://parallel//lib/parallel.rb#567 def replace_worker(job_factory, workers, index, options, blk); end - # source://parallel//lib/parallel.rb#635 + # 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#386 + # source://parallel//lib/parallel.rb#409 def work_direct(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#496 + # source://parallel//lib/parallel.rb#519 def work_in_processes(job_factory, options, &blk); end - # source://parallel//lib/parallel.rb#430 + # source://parallel//lib/parallel.rb#453 def work_in_ractors(job_factory, options); end - # source://parallel//lib/parallel.rb#405 + # source://parallel//lib/parallel.rb#428 def work_in_threads(job_factory, options, &block); end - # source://parallel//lib/parallel.rb#564 + # source://parallel//lib/parallel.rb#587 def worker(job_factory, options, &block); end end end diff --git a/sorbet/rbi/gems/parser@3.3.0.5.rbi b/sorbet/rbi/gems/parser@3.3.5.0.rbi similarity index 76% rename from sorbet/rbi/gems/parser@3.3.0.5.rbi rename to sorbet/rbi/gems/parser@3.3.5.0.rbi index 262cacf3b..a7dc6d0b9 100644 --- a/sorbet/rbi/gems/parser@3.3.0.5.rbi +++ b/sorbet/rbi/gems/parser@3.3.5.0.rbi @@ -4,6 +4,7 @@ # 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/current.rb#3 @@ -59,603 +60,605 @@ end # @api public # # source://parser//lib/parser/ast/processor.rb#9 -class Parser::AST::Processor < ::AST::Processor +class Parser::AST::Processor + include ::AST::Processor::Mixin + # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_alias(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_and(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_and_asgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_arg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_arg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_args(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#103 + # source://parser//lib/parser/ast/processor.rb#105 def on_argument(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_array_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # 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#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_back_ref(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_begin(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_block(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_block_pass(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_blockarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_blockarg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_break(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_case(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_case_match(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#87 + # source://parser//lib/parser/ast/processor.rb#89 def on_casgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_class(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#79 + # source://parser//lib/parser/ast/processor.rb#81 def on_const(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_const_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#179 + # source://parser//lib/parser/ast/processor.rb#181 def on_csend(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_cvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_cvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#158 + # source://parser//lib/parser/ast/processor.rb#160 def on_def(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_defined?(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#167 + # source://parser//lib/parser/ast/processor.rb#169 def on_defs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_dstr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_dsym(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_eflipflop(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#286 + # source://parser//lib/parser/ast/processor.rb#288 def on_empty_else(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_ensure(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_erange(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_find_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_for(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_forward_arg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_forwarded_kwrestarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_forwarded_restarg(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_gvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_gvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_hash(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_hash_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_if(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_if_guard(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_iflipflop(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_in_match(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_in_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_index(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_indexasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_irange(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_ivar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_ivasgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwargs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwbegin(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwoptarg(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_kwrestarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_kwsplat(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_lambda(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_lvar(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#56 + # source://parser//lib/parser/ast/processor.rb#58 def on_lvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_masgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_alt(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_as(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_current_line(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_pattern(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_pattern_p(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_rest(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_match_var(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_match_with_lvasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_mlhs(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_module(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_next(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_not(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#32 + # source://parser//lib/parser/ast/processor.rb#34 def on_nth_ref(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#196 + # source://parser//lib/parser/ast/processor.rb#198 def on_numblock(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#68 + # source://parser//lib/parser/ast/processor.rb#70 def on_op_asgn(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_optarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_or(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_or_asgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_pair(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_pin(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_postexe(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_preexe(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#130 + # source://parser//lib/parser/ast/processor.rb#132 def on_procarg0(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_redo(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_regexp(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_resbody(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_rescue(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_restarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_restarg_expr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_retry(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_return(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_sclass(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#179 + # source://parser//lib/parser/ast/processor.rb#181 def on_send(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#116 + # source://parser//lib/parser/ast/processor.rb#118 def on_shadowarg(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_splat(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_super(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_undef(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_unless_guard(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_until(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_until_post(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#27 + # source://parser//lib/parser/ast/processor.rb#29 def on_var(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#43 + # source://parser//lib/parser/ast/processor.rb#45 def on_vasgn(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_when(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_while(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_while_post(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_xstr(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def on_yield(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#279 + # source://parser//lib/parser/ast/processor.rb#281 def process_argument_node(node); end # @api public # - # source://parser//lib/parser/ast/processor.rb#10 + # source://parser//lib/parser/ast/processor.rb#12 def process_regular_node(node); end # @api public # @private # - # source://parser//lib/parser/ast/processor.rb#271 + # 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#263 + # source://parser//lib/parser/ast/processor.rb#265 def process_variable_node(node); end end @@ -868,7 +871,7 @@ end # @api public # -# source://parser//lib/parser.rb#77 +# source://parser//lib/parser.rb#78 module Parser::Builders; end # source://parser//lib/parser/builders/default.rb#8 @@ -3114,212 +3117,1931 @@ 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#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. +# +# source://parser//lib/parser/meta.rb#9 +Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + +# {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) + +# source://parser//lib/parser/ruby27.rb#14 +class Parser::Ruby27 < ::Parser::Base + # reduce 0 omitted + # + # source://parser//lib/parser/ruby27.rb#7908 + def _reduce_1(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7962 + def _reduce_10(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8538 + def _reduce_100(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8548 + def _reduce_101(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8554 + def _reduce_102(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8564 + def _reduce_103(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8571 + def _reduce_104(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8578 + def _reduce_105(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8584 + def _reduce_106(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8590 + def _reduce_107(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8596 + def _reduce_108(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8602 + def _reduce_109(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7968 + def _reduce_11(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8608 + def _reduce_110(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8614 + def _reduce_111(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8620 + def _reduce_112(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8627 + def _reduce_113(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8634 + def _reduce_114(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8640 + def _reduce_115(val, _values, result); end + + # reduce 116 omitted + # + # source://parser//lib/parser/ruby27.rb#8648 + def _reduce_117(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8654 + def _reduce_118(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8660 + def _reduce_119(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7985 + def _reduce_12(val, _values, result); end + + # reduce 124 omitted + # + # source://parser//lib/parser/ruby27.rb#8676 + def _reduce_125(val, _values, result); end + + # reduce 126 omitted + # + # source://parser//lib/parser/ruby27.rb#8684 + def _reduce_127(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8690 + def _reduce_128(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8696 + def _reduce_129(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7991 + def _reduce_13(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7997 + def _reduce_14(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8003 + def _reduce_15(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8009 + def _reduce_16(val, _values, result); end + + # reduce 17 omitted + # + # source://parser//lib/parser/ruby27.rb#8017 + def _reduce_18(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8023 + def _reduce_19(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7915 + def _reduce_2(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8029 + def _reduce_20(val, _values, result); end + + # reduce 200 omitted + # + # source://parser//lib/parser/ruby27.rb#8844 + def _reduce_201(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8850 + def _reduce_202(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8856 + def _reduce_203(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8865 + def _reduce_204(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8874 + def _reduce_205(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8883 + def _reduce_206(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8892 + def _reduce_207(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8900 + def _reduce_208(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8908 + def _reduce_209(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8035 + def _reduce_21(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8914 + def _reduce_210(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8920 + def _reduce_211(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8926 + def _reduce_212(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8932 + def _reduce_213(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8938 + def _reduce_214(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8944 + def _reduce_215(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8950 + def _reduce_216(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8956 + def _reduce_217(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8962 + def _reduce_218(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8968 + def _reduce_219(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8043 + def _reduce_22(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8974 + def _reduce_220(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8980 + def _reduce_221(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8986 + def _reduce_222(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8994 + def _reduce_223(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9000 + def _reduce_224(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9006 + def _reduce_225(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9012 + def _reduce_226(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9018 + def _reduce_227(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9024 + def _reduce_228(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8051 + def _reduce_23(val, _values, result); end + + # reduce 229 omitted + # + # source://parser//lib/parser/ruby27.rb#9032 + def _reduce_230(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9038 + def _reduce_231(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9044 + def _reduce_232(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9050 + def _reduce_233(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9056 + def _reduce_234(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9062 + def _reduce_235(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9068 + def _reduce_236(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9074 + def _reduce_237(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9080 + def _reduce_238(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9086 + def _reduce_239(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8057 + def _reduce_24(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9092 + def _reduce_240(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9098 + def _reduce_241(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9104 + def _reduce_242(val, _values, result); end + + # reduce 247 omitted + # + # source://parser//lib/parser/ruby27.rb#9121 + def _reduce_248(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9127 + def _reduce_249(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8063 + def _reduce_25(val, _values, result); end + + # reduce 252 omitted + # + # source://parser//lib/parser/ruby27.rb#9139 + def _reduce_253(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9145 + def _reduce_254(val, _values, result); end + + # reduce 255 omitted + # + # source://parser//lib/parser/ruby27.rb#9153 + def _reduce_256(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9163 + def _reduce_257(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9169 + def _reduce_258(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9179 + def _reduce_259(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8070 + def _reduce_26(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9189 + def _reduce_260(val, _values, result); end + + # reduce 261 omitted + # + # source://parser//lib/parser/ruby27.rb#9197 + def _reduce_262(val, _values, result); end + + # reduce 264 omitted + # + # source://parser//lib/parser/ruby27.rb#9207 + def _reduce_265(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9213 + def _reduce_266(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9219 + def _reduce_267(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9225 + def _reduce_268(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9231 + def _reduce_269(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8077 + def _reduce_27(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9238 + def _reduce_270(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9246 + def _reduce_271(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9252 + def _reduce_272(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9279 + def _reduce_273(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9300 + def _reduce_274(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9306 + def _reduce_275(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9312 + def _reduce_276(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9318 + def _reduce_277(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9324 + def _reduce_278(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9330 + def _reduce_279(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8083 + def _reduce_28(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9336 + def _reduce_280(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9342 + def _reduce_281(val, _values, result); end + + # reduce 282 omitted + # + # source://parser//lib/parser/ruby27.rb#9350 + def _reduce_283(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9356 + def _reduce_284(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9362 + def _reduce_285(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8089 + def _reduce_29(val, _values, result); end + + # reduce 295 omitted + # + # source://parser//lib/parser/ruby27.rb#9388 + def _reduce_296(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9394 + def _reduce_297(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9400 + def _reduce_298(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9408 + def _reduce_299(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7924 + def _reduce_3(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8099 + def _reduce_30(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9414 + def _reduce_300(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9420 + def _reduce_301(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9426 + def _reduce_302(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9432 + def _reduce_303(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9438 + def _reduce_304(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9444 + def _reduce_305(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9450 + def _reduce_306(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9456 + def _reduce_307(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9462 + def _reduce_308(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9468 + def _reduce_309(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9474 + def _reduce_310(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9480 + def _reduce_311(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9486 + def _reduce_312(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9493 + def _reduce_313(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9499 + def _reduce_314(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9505 + def _reduce_315(val, _values, result); end + + # reduce 316 omitted + # + # source://parser//lib/parser/ruby27.rb#9517 + def _reduce_317(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9525 + def _reduce_318(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9532 + def _reduce_319(val, _values, result); end + + # reduce 31 omitted + # + # source://parser//lib/parser/ruby27.rb#8107 + def _reduce_32(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9544 + def _reduce_320(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9553 + def _reduce_321(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9562 + def _reduce_322(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9568 + def _reduce_323(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9574 + def _reduce_324(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9584 + def _reduce_325(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9594 + def _reduce_326(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9604 + def _reduce_327(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9610 + def _reduce_328(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9617 + def _reduce_329(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8113 + def _reduce_33(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9634 + def _reduce_330(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9642 + def _reduce_331(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9654 + def _reduce_332(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9661 + def _reduce_333(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9676 + def _reduce_334(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9685 + def _reduce_335(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9696 + def _reduce_336(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9702 + def _reduce_337(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9711 + def _reduce_338(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9722 + def _reduce_339(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8120 + def _reduce_34(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9728 + def _reduce_340(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9734 + def _reduce_341(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9740 + def _reduce_342(val, _values, result); end + + # reduce 343 omitted + # + # source://parser//lib/parser/ruby27.rb#9748 + def _reduce_344(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9754 + def _reduce_345(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9760 + def _reduce_346(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9766 + def _reduce_347(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8131 + def _reduce_35(val, _values, result); end + + # reduce 349 omitted + # + # source://parser//lib/parser/ruby27.rb#9778 + def _reduce_350(val, _values, result); end + + # reduce 353 omitted + # + # source://parser//lib/parser/ruby27.rb#9790 + def _reduce_354(val, _values, result); end + + # reduce 355 omitted + # + # source://parser//lib/parser/ruby27.rb#9803 + def _reduce_356(val, _values, result); end + + # reduce 358 omitted + # + # source://parser//lib/parser/ruby27.rb#9813 + def _reduce_359(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9819 + def _reduce_360(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9825 + def _reduce_361(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9831 + def _reduce_362(val, _values, result); end + + # reduce 363 omitted + # + # source://parser//lib/parser/ruby27.rb#9839 + def _reduce_364(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9846 + def _reduce_365(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9854 + def _reduce_366(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9860 + def _reduce_367(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9866 + def _reduce_368(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9872 + def _reduce_369(val, _values, result); end + + # reduce 36 omitted + # + # source://parser//lib/parser/ruby27.rb#8139 + def _reduce_37(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9878 + def _reduce_370(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9884 + def _reduce_371(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9890 + def _reduce_372(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9896 + def _reduce_373(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9902 + def _reduce_374(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9908 + def _reduce_375(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9914 + def _reduce_376(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9920 + def _reduce_377(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9929 + def _reduce_378(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9939 + def _reduce_379(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8145 + def _reduce_38(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9947 + def _reduce_380(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9956 + def _reduce_381(val, _values, result); end + + # reduce 382 omitted + # + # source://parser//lib/parser/ruby27.rb#9966 + def _reduce_383(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9975 + def _reduce_384(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9985 + def _reduce_385(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#9993 + def _reduce_386(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10002 + def _reduce_387(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10009 + def _reduce_388(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10017 + def _reduce_389(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8151 + def _reduce_39(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10024 + def _reduce_390(val, _values, result); end + + # reduce 391 omitted + # + # source://parser//lib/parser/ruby27.rb#10034 + def _reduce_392(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10040 + def _reduce_393(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10046 + def _reduce_394(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10054 + def _reduce_395(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10062 + def _reduce_396(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10068 + def _reduce_397(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10074 + def _reduce_398(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10080 + def _reduce_399(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7930 + def _reduce_4(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8160 + def _reduce_40(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10086 + def _reduce_400(val, _values, result); end + + # reduce 401 omitted + # + # source://parser//lib/parser/ruby27.rb#10095 + def _reduce_402(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10102 + def _reduce_403(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10108 + def _reduce_404(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10119 + def _reduce_405(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10126 + def _reduce_406(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10135 + def _reduce_407(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10142 + def _reduce_408(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10149 + def _reduce_409(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8169 + def _reduce_41(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10156 + def _reduce_410(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10163 + def _reduce_411(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10170 + def _reduce_412(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10177 + def _reduce_413(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10185 + def _reduce_414(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10193 + def _reduce_415(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10205 + def _reduce_416(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10216 + def _reduce_417(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10224 + def _reduce_418(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10232 + def _reduce_419(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8178 + def _reduce_42(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10240 + def _reduce_420(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10246 + def _reduce_421(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10254 + def _reduce_422(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10262 + def _reduce_423(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10270 + def _reduce_424(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10276 + def _reduce_425(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10282 + def _reduce_426(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10289 + def _reduce_427(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10296 + def _reduce_428(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10303 + def _reduce_429(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8186 + def _reduce_43(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10310 + def _reduce_430(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10317 + def _reduce_431(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10327 + def _reduce_432(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10334 + def _reduce_433(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10340 + def _reduce_434(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10351 + def _reduce_435(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10358 + def _reduce_436(val, _values, result); end + + # reduce 437 omitted + # + # source://parser//lib/parser/ruby27.rb#10366 + def _reduce_438(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10378 + def _reduce_439(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8195 + def _reduce_44(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10386 + def _reduce_440(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10393 + def _reduce_441(val, _values, result); end + + # reduce 442 omitted + # + # source://parser//lib/parser/ruby27.rb#10401 + def _reduce_443(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10407 + def _reduce_444(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10413 + def _reduce_445(val, _values, result); end + + # reduce 446 omitted + # + # source://parser//lib/parser/ruby27.rb#10421 + def _reduce_447(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10431 + def _reduce_448(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10437 + def _reduce_449(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10443 + def _reduce_450(val, _values, result); end + + # reduce 451 omitted + # + # source://parser//lib/parser/ruby27.rb#10451 + def _reduce_452(val, _values, result); end + + # reduce 453 omitted + # + # source://parser//lib/parser/ruby27.rb#10459 + def _reduce_454(val, _values, result); end + + # reduce 455 omitted + # + # source://parser//lib/parser/ruby27.rb#10467 + def _reduce_456(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10474 + def _reduce_457(val, _values, result); end + + # reduce 458 omitted + # + # source://parser//lib/parser/ruby27.rb#10483 + def _reduce_459(val, _values, result); end + + # reduce 45 omitted + # + # source://parser//lib/parser/ruby27.rb#8203 + def _reduce_46(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10491 + def _reduce_460(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10499 + def _reduce_461(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10506 + def _reduce_462(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10514 + def _reduce_463(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10522 + def _reduce_464(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10529 + def _reduce_465(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10535 + def _reduce_466(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10542 + def _reduce_467(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10548 + def _reduce_468(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10556 + def _reduce_469(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10564 + def _reduce_470(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10570 + def _reduce_471(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10576 + def _reduce_472(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10583 + def _reduce_473(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10589 + def _reduce_474(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10595 + def _reduce_475(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10601 + def _reduce_476(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10608 + def _reduce_477(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10615 + def _reduce_478(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10621 + def _reduce_479(val, _values, result); end + + # reduce 480 omitted + # + # source://parser//lib/parser/ruby27.rb#10629 + def _reduce_481(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10639 + def _reduce_482(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10649 + def _reduce_483(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10656 + def _reduce_484(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10663 + def _reduce_485(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10670 + def _reduce_486(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10677 + def _reduce_487(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10683 + def _reduce_488(val, _values, result); end + + # reduce 48 omitted + # + # source://parser//lib/parser/ruby27.rb#8217 + def _reduce_49(val, _values, result); end + + # reduce 489 omitted + # + # source://parser//lib/parser/ruby27.rb#10691 + def _reduce_490(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10697 + def _reduce_491(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10703 + def _reduce_492(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10709 + def _reduce_493(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10715 + def _reduce_494(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10721 + def _reduce_495(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10727 + def _reduce_496(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10733 + def _reduce_497(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10739 + def _reduce_498(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10745 + def _reduce_499(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7936 + def _reduce_5(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8223 + def _reduce_50(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10751 + def _reduce_500(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10757 + def _reduce_501(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10763 + def _reduce_502(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10769 + def _reduce_503(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10775 + def _reduce_504(val, _values, result); end + + # reduce 505 omitted + # + # source://parser//lib/parser/ruby27.rb#10783 + def _reduce_506(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10789 + def _reduce_507(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10795 + def _reduce_508(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10801 + def _reduce_509(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8229 + def _reduce_51(val, _values, result); end + + # reduce 512 omitted + # + # source://parser//lib/parser/ruby27.rb#10813 + def _reduce_513(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10819 + def _reduce_514(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8235 + def _reduce_52(val, _values, result); end + + # reduce 522 omitted + # + # source://parser//lib/parser/ruby27.rb#10841 + def _reduce_523(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10847 + def _reduce_524(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10854 + def _reduce_525(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10866 + def _reduce_526(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10872 + def _reduce_527(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10884 + def _reduce_528(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10890 + def _reduce_529(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8241 + def _reduce_53(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10896 + def _reduce_530(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10902 + def _reduce_531(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10917 + def _reduce_532(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10923 + def _reduce_533(val, _values, result); end + + # reduce 535 omitted + # + # source://parser//lib/parser/ruby27.rb#10933 + def _reduce_536(val, _values, result); end + + # reduce 537 omitted + # + # source://parser//lib/parser/ruby27.rb#10941 + def _reduce_538(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8252 + def _reduce_54(val, _values, result); end + + # reduce 541 omitted + # + # source://parser//lib/parser/ruby27.rb#10953 + def _reduce_542(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10959 + def _reduce_543(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10965 + def _reduce_544(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10971 + def _reduce_545(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10978 + def _reduce_546(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10985 + def _reduce_547(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10991 + def _reduce_548(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#10998 + def _reduce_549(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11005 + def _reduce_550(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11011 + def _reduce_551(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11017 + def _reduce_552(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11023 + def _reduce_553(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11029 + def _reduce_554(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11035 + def _reduce_555(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11041 + def _reduce_556(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11047 + def _reduce_557(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11053 + def _reduce_558(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11059 + def _reduce_559(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11065 + def _reduce_560(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11071 + def _reduce_561(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11077 + def _reduce_562(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11083 + def _reduce_563(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11089 + def _reduce_564(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11095 + def _reduce_565(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11101 + def _reduce_566(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11107 + def _reduce_567(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11113 + def _reduce_568(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11119 + def _reduce_569(val, _values, result); end + + # reduce 56 omitted + # + # source://parser//lib/parser/ruby27.rb#8268 + def _reduce_57(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11125 + def _reduce_570(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11131 + def _reduce_571(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11137 + def _reduce_572(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11144 + def _reduce_573(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11153 + def _reduce_574(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11159 + def _reduce_575(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11165 + def _reduce_576(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8274 + def _reduce_58(val, _values, result); end + + # reduce 579 omitted + # + # source://parser//lib/parser/ruby27.rb#11177 + def _reduce_580(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11184 + def _reduce_581(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11191 + def _reduce_582(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11197 + def _reduce_583(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11208 + def _reduce_584(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11215 + def _reduce_585(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11222 + def _reduce_586(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11229 + def _reduce_587(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11236 + def _reduce_588(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11242 + def _reduce_589(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11248 + def _reduce_590(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11254 + def _reduce_591(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11260 + def _reduce_592(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11266 + def _reduce_593(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11272 + def _reduce_594(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11278 + def _reduce_595(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11284 + def _reduce_596(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11290 + def _reduce_597(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11296 + def _reduce_598(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11302 + def _reduce_599(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#7942 + def _reduce_6(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11308 + def _reduce_600(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11314 + def _reduce_601(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11320 + def _reduce_602(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11326 + def _reduce_603(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11332 + def _reduce_604(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11338 + def _reduce_605(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11344 + def _reduce_606(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11350 + def _reduce_607(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11356 + def _reduce_608(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11362 + def _reduce_609(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11370 + def _reduce_610(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11378 + def _reduce_611(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11387 + def _reduce_612(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11394 + def _reduce_613(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11401 + def _reduce_614(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11407 + def _reduce_615(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11413 + def _reduce_616(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11419 + def _reduce_617(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11425 + def _reduce_618(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11431 + def _reduce_619(val, _values, result); end + + # reduce 61 omitted + # + # source://parser//lib/parser/ruby27.rb#8287 + def _reduce_62(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11437 + def _reduce_620(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11443 + def _reduce_621(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11452 + def _reduce_622(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11462 + def _reduce_623(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11470 + def _reduce_624(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11479 + def _reduce_625(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11487 + def _reduce_626(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11496 + def _reduce_627(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11503 + def _reduce_628(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11511 + def _reduce_629(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8294 + def _reduce_63(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11520 + def _reduce_630(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11527 + def _reduce_631(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11535 + def _reduce_632(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11542 + def _reduce_633(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11550 + def _reduce_634(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11556 + def _reduce_635(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11562 + def _reduce_636(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11568 + def _reduce_637(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11574 + def _reduce_638(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11580 + def _reduce_639(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8301 + def _reduce_64(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11586 + def _reduce_640(val, _values, result); end + + # reduce 641 omitted + # + # source://parser//lib/parser/ruby27.rb#11594 + def _reduce_642(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11604 + def _reduce_643(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11611 + def _reduce_644(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11618 + def _reduce_645(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11624 + def _reduce_646(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11630 + def _reduce_647(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11636 + def _reduce_648(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11650 + def _reduce_649(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11657 + def _reduce_650(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11664 + def _reduce_651(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11670 + def _reduce_652(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11676 + def _reduce_653(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11682 + def _reduce_654(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11688 + def _reduce_655(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11694 + def _reduce_656(val, _values, result); end + + # reduce 658 omitted + # + # source://parser//lib/parser/ruby27.rb#11704 + def _reduce_659(val, _values, result); end + + # reduce 65 omitted + # + # source://parser//lib/parser/ruby27.rb#8310 + def _reduce_66(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11710 + def _reduce_660(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11718 + def _reduce_661(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11724 + def _reduce_662(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11731 + def _reduce_663(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11738 + def _reduce_664(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11744 + def _reduce_665(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11750 + def _reduce_666(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11756 + def _reduce_667(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8317 + def _reduce_67(val, _values, result); end + + # reduce 669 omitted + # + # source://parser//lib/parser/ruby27.rb#11766 + def _reduce_670(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11774 + def _reduce_671(val, _values, result); end + + # reduce 673 omitted + # + # source://parser//lib/parser/ruby27.rb#11784 + def _reduce_674(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11792 + def _reduce_675(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11798 + def _reduce_676(val, _values, result); end + + # reduce 677 omitted + # + # source://parser//lib/parser/ruby27.rb#11806 + def _reduce_678(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11812 + def _reduce_679(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8328 + def _reduce_68(val, _values, result); end + + # reduce 680 omitted + # + # source://parser//lib/parser/ruby27.rb#11820 + def _reduce_681(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11826 + def _reduce_682(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11832 + def _reduce_683(val, _values, result); end -# source://parser//lib/parser/lexer-strings.rb#3332 -Parser::LexerStrings::LEX_STATES = T.let(T.unsafe(nil), Hash) + # source://parser//lib/parser/ruby27.rb#11838 + def _reduce_684(val, _values, result); end -# source://parser//lib/parser/lexer-strings.rb#3293 -Parser::LexerStrings::REGEXP_META_CHARACTERS = T.let(T.unsafe(nil), Regexp) + # source://parser//lib/parser/ruby27.rb#11844 + def _reduce_685(val, _values, result); end -# 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) + # source://parser//lib/parser/ruby27.rb#11850 + def _reduce_686(val, _values, result); end -# 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 + # source://parser//lib/parser/ruby27.rb#8335 + def _reduce_69(val, _values, result); end - # @api private - # @return [Boolean] + # reduce 698 omitted # - # source://parser//lib/parser/max_numparam_stack.rb#17 - def empty?; end + # source://parser//lib/parser/ruby27.rb#11880 + def _reduce_699(val, _values, result); end - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#29 - def has_numparams?; end + # source://parser//lib/parser/ruby27.rb#7948 + def _reduce_7(val, _values, result); end - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#21 - def has_ordinary_params!; end + # source://parser//lib/parser/ruby27.rb#8346 + def _reduce_70(val, _values, result); end - # @api private - # @return [Boolean] - # - # source://parser//lib/parser/max_numparam_stack.rb#25 - def has_ordinary_params?; end + # source://parser//lib/parser/ruby27.rb#11886 + def _reduce_700(val, _values, result); end - # @api private + # reduce 704 omitted # - # source://parser//lib/parser/max_numparam_stack.rb#45 - def pop; end + # source://parser//lib/parser/ruby27.rb#11900 + def _reduce_705(val, _values, result); end - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#41 - def push(static:); end + # source://parser//lib/parser/ruby27.rb#11906 + def _reduce_706(val, _values, result); end - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#33 - def register(numparam); end + # source://parser//lib/parser/ruby27.rb#11912 + def _reduce_707(val, _values, result); end - # @api private + # source://parser//lib/parser/ruby27.rb#8353 + def _reduce_71(val, _values, result); end + + # reduce 710 omitted # - # source://parser//lib/parser/max_numparam_stack.rb#9 - def stack; end + # source://parser//lib/parser/ruby27.rb#11924 + def _reduce_711(val, _values, result); end - # @api private + # reduce 714 omitted # - # source://parser//lib/parser/max_numparam_stack.rb#37 - def top; end + # source://parser//lib/parser/ruby27.rb#11936 + def _reduce_715(val, _values, result); end - private + # source://parser//lib/parser/ruby27.rb#8364 + def _reduce_72(val, _values, result); end - # @api private - # - # source://parser//lib/parser/max_numparam_stack.rb#51 - def set(value); end -end + # source://parser//lib/parser/ruby27.rb#8371 + def _reduce_73(val, _values, result); end -# @api private -# -# source://parser//lib/parser/max_numparam_stack.rb#11 -Parser::MaxNumparamStack::ORDINARY_PARAMS = T.let(T.unsafe(nil), Integer) + # source://parser//lib/parser/ruby27.rb#8378 + def _reduce_74(val, _values, result); end -# @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 + # source://parser//lib/parser/ruby27.rb#8385 + def _reduce_75(val, _values, result); end -# Parser metadata -# -# source://parser//lib/parser/meta.rb#5 -module Parser::Meta; end + # source://parser//lib/parser/ruby27.rb#8392 + def _reduce_76(val, _values, result); end -# All node types that parser can produce. Not all parser versions -# will be able to produce every possible node. -# -# source://parser//lib/parser/meta.rb#9 -Parser::Meta::NODE_TYPES = T.let(T.unsafe(nil), Set) + # source://parser//lib/parser/ruby27.rb#8399 + def _reduce_77(val, _values, result); end -# {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 + # source://parser//lib/parser/ruby27.rb#8405 + def _reduce_78(val, _values, result); end - # @api public - # @return [Rewriter] a new instance of Rewriter - # - # source://parser//lib/parser/rewriter.rb#98 - def initialize(*_arg0); end + # source://parser//lib/parser/ruby27.rb#8411 + def _reduce_79(val, _values, result); 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 + # source://parser//lib/parser/ruby27.rb#8417 + def _reduce_80(val, _values, result); end - # Inserts new code after the given source range. - # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] + # reduce 81 omitted # - # source://parser//lib/parser/rewriter.rb#77 - def insert_after(range, content); end + # source://parser//lib/parser/ruby27.rb#8425 + def _reduce_82(val, _values, result); 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 + # source://parser//lib/parser/ruby27.rb#8432 + def _reduce_83(val, _values, result); end - # Removes the source range. - # - # @api public - # @param range [Parser::Source::Range] - # - # source://parser//lib/parser/rewriter.rb#47 - def remove(range); end + # source://parser//lib/parser/ruby27.rb#8439 + def _reduce_84(val, _values, result); 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 + # source://parser//lib/parser/ruby27.rb#8447 + def _reduce_85(val, _values, result); 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 + # source://parser//lib/parser/ruby27.rb#8454 + def _reduce_86(val, _values, result); end - # Wraps the given source range with the given values. + # source://parser//lib/parser/ruby27.rb#8462 + def _reduce_87(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8468 + def _reduce_88(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8475 + def _reduce_89(val, _values, result); end + + # reduce 8 omitted # - # @api public - # @param range [Parser::Source::Range] - # @param content [String] + # source://parser//lib/parser/ruby27.rb#7956 + def _reduce_9(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8481 + def _reduce_90(val, _values, result); end + + # reduce 91 omitted # - # source://parser//lib/parser/rewriter.rb#57 - def wrap(range, before, after); end + # source://parser//lib/parser/ruby27.rb#8490 + def _reduce_92(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8496 + def _reduce_93(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8502 + def _reduce_94(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8508 + def _reduce_95(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8514 + def _reduce_96(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8520 + def _reduce_97(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8526 + def _reduce_98(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#8532 + def _reduce_99(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#11942 + def _reduce_none(val, _values, result); end + + # source://parser//lib/parser/ruby27.rb#21 + def default_encoding; end + + # source://parser//lib/parser/ruby27.rb#32 + def local_pop; end + + # source://parser//lib/parser/ruby27.rb#25 + def local_push; end + + # source://parser//lib/parser/ruby27.rb#39 + def try_declare_numparam(node); end + + # source://parser//lib/parser/ruby27.rb#17 + def version; end end -# @api public -# -# source://parser//lib/parser/rewriter.rb#91 -Parser::Rewriter::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) +# source://parser//lib/parser/ruby27.rb#7507 +Parser::Ruby27::Racc_arg = T.let(T.unsafe(nil), Array) + +# source://parser//lib/parser/ruby27.rb#7902 +Parser::Ruby27::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) + +# source://parser//lib/parser/ruby27.rb#7524 +Parser::Ruby27::Racc_token_to_s_table = T.let(T.unsafe(nil), Array) # source://parser//lib/parser/ruby33.rb#14 class Parser::Ruby33 < ::Parser::Base @@ -5126,7 +6848,7 @@ class Parser::Source::Buffer # @api public # @return [Buffer] a new instance of Buffer # - # source://parser//lib/parser/source/buffer.rb#105 + # 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. @@ -5135,7 +6857,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [Integer] column # - # source://parser//lib/parser/source/buffer.rb#242 + # 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. @@ -5144,7 +6866,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [[Integer, Integer]] `[line, column]` # - # source://parser//lib/parser/source/buffer.rb#217 + # source://parser//lib/parser/source/buffer.rb#222 def decompose_position(position); end # First line of the buffer, 1 by default. @@ -5157,12 +6879,12 @@ class Parser::Source::Buffer # @api public # - # source://parser//lib/parser/source/buffer.rb#312 + # source://parser//lib/parser/source/buffer.rb#317 def freeze; end # @api public # - # source://parser//lib/parser/source/buffer.rb#318 + # source://parser//lib/parser/source/buffer.rb#323 def inspect; end # Number of last line in the buffer @@ -5170,7 +6892,7 @@ class Parser::Source::Buffer # @api public # @return [Integer] # - # source://parser//lib/parser/source/buffer.rb#307 + # source://parser//lib/parser/source/buffer.rb#312 def last_line; end # Convert a character index into the source to a line number. @@ -5179,7 +6901,7 @@ class Parser::Source::Buffer # @param position [Integer] # @return [Integer] line # - # source://parser//lib/parser/source/buffer.rb#231 + # 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. @@ -5189,7 +6911,7 @@ class Parser::Source::Buffer # @raise [IndexError] if `lineno` is out of bounds # @return [Range] # - # source://parser//lib/parser/source/buffer.rb#284 + # 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 @@ -5208,7 +6930,7 @@ class Parser::Source::Buffer # @raise [ArgumentError] if already populated # @return [String] # - # source://parser//lib/parser/source/buffer.rb#180 + # source://parser//lib/parser/source/buffer.rb#185 def raw_source=(input); end # Populate this buffer from correspondingly named file. @@ -5219,12 +6941,12 @@ class Parser::Source::Buffer # @raise [ArgumentError] if already populated # @return [Buffer] self # - # source://parser//lib/parser/source/buffer.rb#131 + # source://parser//lib/parser/source/buffer.rb#136 def read; end # @api public # - # source://parser//lib/parser/source/buffer.rb#194 + # source://parser//lib/parser/source/buffer.rb#199 def slice(start, length = T.unsafe(nil)); end # Source code contained in this buffer. @@ -5233,7 +6955,7 @@ class Parser::Source::Buffer # @raise [RuntimeError] if buffer is not populated yet # @return [String] source code # - # source://parser//lib/parser/source/buffer.rb#145 + # source://parser//lib/parser/source/buffer.rb#150 def source; end # Populate this buffer from a string with encoding autodetection. @@ -5245,7 +6967,7 @@ class Parser::Source::Buffer # @raise [EncodingError] if `input` includes invalid byte sequence for the encoding # @return [String] # - # source://parser//lib/parser/source/buffer.rb#162 + # source://parser//lib/parser/source/buffer.rb#167 def source=(input); end # Extract line `lineno` from source, taking `first_line` into account. @@ -5255,7 +6977,7 @@ class Parser::Source::Buffer # @raise [IndexError] if `lineno` is out of bounds # @return [String] # - # source://parser//lib/parser/source/buffer.rb#273 + # source://parser//lib/parser/source/buffer.rb#278 def source_line(lineno); end # Return an `Array` of source code lines. @@ -5263,30 +6985,30 @@ class Parser::Source::Buffer # @api public # @return [Array] # - # source://parser//lib/parser/source/buffer.rb#252 + # 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#298 + # source://parser//lib/parser/source/buffer.rb#303 def source_range; end private # @api public # - # source://parser//lib/parser/source/buffer.rb#348 + # source://parser//lib/parser/source/buffer.rb#353 def bsearch(line_begins, position); end # @api public # - # source://parser//lib/parser/source/buffer.rb#325 + # source://parser//lib/parser/source/buffer.rb#330 def line_begins; end # @api public # - # source://parser//lib/parser/source/buffer.rb#339 + # source://parser//lib/parser/source/buffer.rb#344 def line_index_for_position(position); end class << self @@ -5295,9 +7017,10 @@ class Parser::Source::Buffer # # @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#51 + # 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. @@ -5315,7 +7038,7 @@ class Parser::Source::Buffer # @raise [EncodingError] # @return [String] # - # source://parser//lib/parser/source/buffer.rb#90 + # source://parser//lib/parser/source/buffer.rb#95 def reencode_string(input); end end end @@ -6921,80 +8644,80 @@ end # 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#13 +# source://parser//lib/parser/source/tree_rewriter/action.rb#14 class Parser::Source::TreeRewriter::Action - # source://parser//lib/parser/source/tree_rewriter/action.rb#16 + # 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#28 + # source://parser//lib/parser/source/tree_rewriter/action.rb#29 def combine(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#67 + # source://parser//lib/parser/source/tree_rewriter/action.rb#68 def contract; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#33 + # source://parser//lib/parser/source/tree_rewriter/action.rb#34 def empty?; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def insert_after; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def insert_before; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#57 + # source://parser//lib/parser/source/tree_rewriter/action.rb#58 def insertion?; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#80 + # 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#49 + # source://parser//lib/parser/source/tree_rewriter/action.rb#50 def nested_actions; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#40 + # source://parser//lib/parser/source/tree_rewriter/action.rb#41 def ordered_replacements; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def range; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#14 + # source://parser//lib/parser/source/tree_rewriter/action.rb#15 def replacement; end protected - # source://parser//lib/parser/source/tree_rewriter/action.rb#158 + # source://parser//lib/parser/source/tree_rewriter/action.rb#159 def analyse_hierarchy(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#145 + # 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#224 + # 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#204 + # 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#94 + # source://parser//lib/parser/source/tree_rewriter/action.rb#95 def children; end - # source://parser//lib/parser/source/tree_rewriter/action.rb#129 + # 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#102 + # source://parser//lib/parser/source/tree_rewriter/action.rb#103 def do_combine(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#135 + # 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#215 + # source://parser//lib/parser/source/tree_rewriter/action.rb#216 def merge(action); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#110 + # 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#232 + # source://parser//lib/parser/source/tree_rewriter/action.rb#233 def swallow(children); end - # source://parser//lib/parser/source/tree_rewriter/action.rb#96 + # 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 @@ -7012,90 +8735,122 @@ Parser::Source::TreeRewriter::POLICY_TO_LEVEL = T.let(T.unsafe(nil), Hash) class Parser::StaticEnvironment # @return [StaticEnvironment] a new instance of StaticEnvironment # - # source://parser//lib/parser/static_environment.rb#11 + # source://parser//lib/parser/static_environment.rb#17 def initialize; end - # source://parser//lib/parser/static_environment.rb#40 + # source://parser//lib/parser/static_environment.rb#55 def declare(name); end - # source://parser//lib/parser/static_environment.rb#58 + # Anonymous blockarg + # + # source://parser//lib/parser/static_environment.rb#77 def declare_anonymous_blockarg; end - # source://parser//lib/parser/static_environment.rb#82 + # Anonymous kwresarg + # + # source://parser//lib/parser/static_environment.rb#113 def declare_anonymous_kwrestarg; end - # source://parser//lib/parser/static_environment.rb#70 + # Anonymous restarg + # + # source://parser//lib/parser/static_environment.rb#95 def declare_anonymous_restarg; end - # source://parser//lib/parser/static_environment.rb#50 + # Forward args + # + # source://parser//lib/parser/static_environment.rb#67 def declare_forward_args; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#46 + # source://parser//lib/parser/static_environment.rb#61 def declared?(name); end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#62 + # source://parser//lib/parser/static_environment.rb#81 def declared_anonymous_blockarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#86 + # 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#74 + # 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#54 + # 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#94 + # source://parser//lib/parser/static_environment.rb#129 def empty?; end - # source://parser//lib/parser/static_environment.rb#27 + # source://parser//lib/parser/static_environment.rb#33 def extend_dynamic; end - # source://parser//lib/parser/static_environment.rb#20 + # source://parser//lib/parser/static_environment.rb#26 def extend_static; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#66 + # source://parser//lib/parser/static_environment.rb#89 def parent_has_anonymous_blockarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#90 + # source://parser//lib/parser/static_environment.rb#125 def parent_has_anonymous_kwrestarg?; end # @return [Boolean] # - # source://parser//lib/parser/static_environment.rb#78 + # source://parser//lib/parser/static_environment.rb#107 def parent_has_anonymous_restarg?; end - # source://parser//lib/parser/static_environment.rb#15 + # source://parser//lib/parser/static_environment.rb#21 def reset; end - # source://parser//lib/parser/static_environment.rb#34 + # source://parser//lib/parser/static_environment.rb#49 def unextend; end end -# source://parser//lib/parser/static_environment.rb#7 -Parser::StaticEnvironment::ANONYMOUS_BLOCKARG = T.let(T.unsafe(nil), Symbol) +# 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_KWRESTARG = T.let(T.unsafe(nil), Symbol) +Parser::StaticEnvironment::ANONYMOUS_RESTARG_INHERITED = T.let(T.unsafe(nil), Symbol) # source://parser//lib/parser/static_environment.rb#8 -Parser::StaticEnvironment::ANONYMOUS_RESTARG = T.let(T.unsafe(nil), Symbol) +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) @@ -7235,6 +8990,17 @@ class Parser::TreeRewriter < ::Parser::AST::Processor 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) diff --git a/sorbet/rbi/gems/pg@1.5.4.rbi b/sorbet/rbi/gems/pg@1.5.6.rbi similarity index 97% rename from sorbet/rbi/gems/pg@1.5.4.rbi rename to sorbet/rbi/gems/pg@1.5.6.rbi index 1b0e4f9db..ddf44834d 100644 --- a/sorbet/rbi/gems/pg@1.5.4.rbi +++ b/sorbet/rbi/gems/pg@1.5.6.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `pg` gem. # Please instead update this file by running `bin/tapioca gem pg`. + # The top-level PG namespace. # # source://pg//lib/pg.rb#6 @@ -204,10 +205,10 @@ end # source://pg//lib/pg/basic_type_map_for_queries.rb#37 class PG::BasicTypeMapForQueries::BinaryData < ::String; end -# source://pg//lib/pg/basic_type_map_for_queries.rb#187 +# source://pg//lib/pg/basic_type_map_for_queries.rb#192 PG::BasicTypeMapForQueries::DEFAULT_ARRAY_TYPE_MAP = T.let(T.unsafe(nil), Hash) -# source://pg//lib/pg/basic_type_map_for_queries.rb#169 +# source://pg//lib/pg/basic_type_map_for_queries.rb#175 PG::BasicTypeMapForQueries::DEFAULT_TYPE_MAP = T.let(T.unsafe(nil), Hash) # source://pg//lib/pg/basic_type_map_for_queries.rb#40 @@ -469,7 +470,7 @@ class PG::BasicTypeRegistry::CoderMapsBundle def init_maps(registry, result); end end -# source://pg//lib/pg/basic_type_registry.rb#297 +# source://pg//lib/pg/basic_type_registry.rb#301 PG::BasicTypeRegistry::DEFAULT_TYPE_REGISTRY = T.let(T.unsafe(nil), PG::BasicTypeRegistry) # source://pg//lib/pg.rb#76 @@ -823,7 +824,7 @@ class PG::Connection # Returns +nil+ on success, or a string containing the # error message if a failure occurs. # - # source://pg//lib/pg/connection.rb#582 + # source://pg//lib/pg/connection.rb#587 def async_cancel; end def async_describe_portal(_arg0); end @@ -853,12 +854,9 @@ class PG::Connection # source://pg//lib/pg/connection.rb#555 def async_encrypt_password(password, username, algorithm = T.unsafe(nil)); end - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#109 - def async_exec(*args, &blk); end - + def async_exec(*_arg0); end def async_exec_params(*_arg0); end def async_exec_prepared(*_arg0); end - def async_exec_without_profiling(*_arg0); end def async_flush; end # call-seq: @@ -994,7 +992,7 @@ class PG::Connection # Returns +nil+ on success, or a string containing the # error message if a failure occurs. # - # source://pg//lib/pg/connection.rb#582 + # source://pg//lib/pg/connection.rb#587 def cancel; end # Read all pending socket input to internal memory and raise an exception in case of errors. @@ -1174,20 +1172,9 @@ class PG::Connection def escape_identifier(_arg0); end def escape_literal(_arg0); end def escape_string(_arg0); end - - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#55 - def exec(*args, &blk); end - - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#68 - def exec_params(*args, &blk); end - - def exec_params_without_profiling(*_arg0); end - - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#81 - def exec_prepared(*args, &blk); end - - def exec_prepared_without_profiling(*_arg0); end - def exec_without_profiling(*_arg0); end + def exec(*_arg0); end + def exec_params(*_arg0); end + def exec_prepared(*_arg0); end def exit_pipeline_mode; end def external_encoding; end def field_name_type; end @@ -1303,11 +1290,7 @@ class PG::Connection def pipeline_status; end def pipeline_sync; end def port; end - - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#42 - def prepare(*args, &blk); end - - def prepare_without_profiling(*_arg0); end + def prepare(*_arg0); end def protocol_version; end # call-seq: @@ -1347,9 +1330,7 @@ class PG::Connection # source://pg//lib/pg/connection.rb#525 def put_copy_end(*args); end - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#55 - def query(*args, &blk); end - + def query(*_arg0); end def quote_ident(_arg0); end # call-seq: @@ -1369,11 +1350,7 @@ class PG::Connection def send_prepare(*_arg0); end def send_query(*_arg0); end def send_query_params(*_arg0); end - - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#95 - def send_query_prepared(*args, &blk); end - - def send_query_prepared_without_profiling(*_arg0); end + def send_query_prepared(*_arg0); end def server_version; end def set_client_encoding(_arg0); end def set_default_encoding; end @@ -1465,10 +1442,11 @@ class PG::Connection private - # source://pg//lib/pg/connection.rb#637 + # source://pg//lib/pg/connection.rb#642 def async_connect_or_reset(poll_meth); end def flush_data=(_arg0); end + def reset_start2(_arg0); end class << self # Switch between sync and async libpq API. @@ -1487,7 +1465,7 @@ class PG::Connection # Do not use this method in production code. # Any issues with the default setting of async_api=true should be reported to the maintainers instead. # - # source://pg//lib/pg/connection.rb#937 + # source://pg//lib/pg/connection.rb#946 def async_api=(enable); end # call-seq: @@ -1542,7 +1520,7 @@ class PG::Connection # # Raises a PG::Error if the connection fails. # - # source://pg//lib/pg/connection.rb#758 + # source://pg//lib/pg/connection.rb#763 def async_connect(*args); end # call-seq: @@ -1569,10 +1547,10 @@ class PG::Connection # # See also check_socket for a way to check the connection without doing any server communication. # - # source://pg//lib/pg/connection.rb#858 + # source://pg//lib/pg/connection.rb#867 def async_ping(*args); end - # source://pg//lib/pg/connection.rb#914 + # source://pg//lib/pg/connection.rb#923 def async_send_api=(enable); end def conndefaults; end @@ -1637,7 +1615,7 @@ class PG::Connection # # Raises a PG::Error if the connection fails. # - # source://pg//lib/pg/connection.rb#758 + # source://pg//lib/pg/connection.rb#763 def connect(*args); end # Convert Hash options to connection String @@ -1707,7 +1685,7 @@ class PG::Connection # # Raises a PG::Error if the connection fails. # - # source://pg//lib/pg/connection.rb#758 + # source://pg//lib/pg/connection.rb#763 def new(*args); end # call-seq: @@ -1762,7 +1740,7 @@ class PG::Connection # # Raises a PG::Error if the connection fails. # - # source://pg//lib/pg/connection.rb#758 + # source://pg//lib/pg/connection.rb#763 def open(*args); end # Parse the connection +args+ into a connection-parameter string. @@ -1805,7 +1783,7 @@ class PG::Connection # # See also check_socket for a way to check the connection without doing any server communication. # - # source://pg//lib/pg/connection.rb#858 + # source://pg//lib/pg/connection.rb#867 def ping(*args); end # Quote a single +value+ for use in a connection-parameter string. @@ -1867,7 +1845,7 @@ class PG::Connection # # Raises a PG::Error if the connection fails. # - # source://pg//lib/pg/connection.rb#758 + # source://pg//lib/pg/connection.rb#763 def setdb(*args); end # call-seq: @@ -1922,7 +1900,7 @@ class PG::Connection # # Raises a PG::Error if the connection fails. # - # source://pg//lib/pg/connection.rb#758 + # source://pg//lib/pg/connection.rb#763 def setdblogin(*args); end def sync_connect(*_arg0); end @@ -1931,11 +1909,14 @@ class PG::Connection private - # source://pg//lib/pg/connection.rb#776 + # source://pg//lib/pg/connection.rb#815 def connect_to_hosts(*args); end - # source://pg//lib/pg/connection.rb#828 + # source://pg//lib/pg/connection.rb#837 def host_is_named_pipe?(host_string); end + + # source://pg//lib/pg/connection.rb#784 + def resolve_hosts(iopts); end end end @@ -2280,12 +2261,8 @@ class PG::Result def cmd_tuples; end def cmdtuples; end def column_values(_arg0); end - - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#15 - def each(*args, &blk); end - + def each; end def each_row; end - def each_without_profiling; end def error_field(_arg0); end def error_message; end def fformat(_arg0); end @@ -2331,9 +2308,6 @@ class PG::Result # source://pg//lib/pg/result.rb#16 def map_types!(type_map); end - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#22 - def mp_report_sql(&block); end - def nfields; end def nparams; end def ntuples; end @@ -2353,11 +2327,7 @@ class PG::Result def tuple_values(_arg0); end def type_map; end def type_map=(_arg0); end - - # source://rack-mini-profiler/3.1.1/lib/patches/db/pg.rb#8 - def values(*args, &blk); end - - def values_without_profiling; end + def values; end def verbose_error_message(_arg0, _arg1); end class << self diff --git a/sorbet/rbi/gems/prettier_print@1.2.1.rbi b/sorbet/rbi/gems/prettier_print@1.2.1.rbi deleted file mode 100644 index 4e8852502..000000000 --- a/sorbet/rbi/gems/prettier_print@1.2.1.rbi +++ /dev/null @@ -1,951 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `prettier_print` gem. -# Please instead update this file by running `bin/tapioca gem prettier_print`. - -# 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 is a 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 PrettierPrint.new -# * optional width argument for PrettierPrint#text -# * PrettierPrint#breakable -# -# There are several candidate uses: -# * text formatting using proportional fonts -# * multibyte characters which has columns different to number of bytes -# * non-string formatting -# -# == Usage -# -# To use this module, you will need to generate a tree of print nodes that -# represent indentation and newline behavior before it gets sent to the printer. -# Each node has different semantics, depending on the desired output. -# -# The most basic node is a Text node. This represents plain text content that -# cannot be broken up even if it doesn't fit on one line. You would create one -# of those with the text method, as in: -# -# PrettierPrint.format { |q| q.text('my content') } -# -# No matter what the desired output width is, the output for the snippet above -# will always be the same. -# -# If you want to allow the printer to break up the content on the space -# character when there isn't enough width for the full string on the same line, -# you can use the Breakable and Group nodes. For example: -# -# PrettierPrint.format do |q| -# q.group do -# q.text("my") -# q.breakable -# q.text("content") -# end -# end -# -# Now, if everything fits on one line (depending on the maximum width specified) -# then it will be the same output as the first example. If, however, there is -# not enough room on the line, then you will get two lines of output, one for -# the first string and one for the second. -# -# There are other nodes for the print tree as well, described in the -# documentation below. They control alignment, indentation, conditional -# formatting, and more. -# -# == 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/papers/prettier/prettier.pdf -# -# source://prettier_print//lib/prettier_print.rb#62 -class PrettierPrint - # 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 - # PrettierPrint#text, the first argument +separator+ of PrettierPrint#breakable, - # the first argument +newline+ of PrettierPrint.new, and the result of a given - # block for PrettierPrint.new. - # - # +maxwidth+ specifies maximum line length. If it is not specified, 80 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. ->(n) { ' ' * n } is used if it is not - # given. - # - # @return [PrettierPrint] a new instance of PrettierPrint - # - # source://prettier_print//lib/prettier_print.rb#441 - def initialize(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), &genspace); end - - # This inserts a BreakParent node into the print tree which forces the - # surrounding and all parent group nodes to break. - # - # source://prettier_print//lib/prettier_print.rb#814 - def break_parent; end - - # This says "you can break a line here if necessary", and a +width+\-column - # text +separator+ is inserted if a line is not broken at the point. - # - # If +separator+ is not specified, ' ' is used. - # - # If +width+ is not specified, +separator.length+ is used. You will have to - # specify this when +separator+ is a multibyte character, for example. - # - # By default, if the surrounding group is broken and a newline is inserted, - # the printer will indent the subsequent line up to the current level of - # indentation. You can disable this behavior with the +indent+ argument if - # that's not desired (rare). - # - # By default, when you insert a Breakable into the print tree, it only breaks - # the surrounding group when the group's contents cannot fit onto the - # remaining space of the current line. You can force it to break the - # surrounding group instead if you always want the newline with the +force+ - # argument. - # - # There are a few circumstances where you'll want to force the newline into - # the output but no insert a break parent (because you don't want to - # necessarily force the groups to break unless they need to). In this case you - # can pass `force: :skip_break_parent` to this method and it will not insert - # a break parent.` - # - # source://prettier_print//lib/prettier_print.rb#802 - def breakable(separator = T.unsafe(nil), width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end - - # Another very common breakable call you receive while formatting is an - # empty string in flat mode and a newline in break mode. Similar to - # breakable_space, this is here for avoid unnecessary calculation. - # - # source://prettier_print//lib/prettier_print.rb#646 - def breakable_empty; end - - # The final of the very common breakable calls you receive while formatting - # is the normal breakable space but with the addition of the break_parent. - # - # source://prettier_print//lib/prettier_print.rb#652 - def breakable_force; end - - # This is the same shortcut as breakable_force, except that it doesn't indent - # the next line. This is necessary if you're trying to preserve some custom - # formatting like a multi-line string. - # - # source://prettier_print//lib/prettier_print.rb#660 - def breakable_return; end - - # The vast majority of breakable calls you receive while formatting are a - # space in flat mode and a newline in break mode. Since this is so common, - # we have a method here to skip past unnecessary calculation. - # - # source://prettier_print//lib/prettier_print.rb#639 - def breakable_space; end - - # This is an output buffer that wraps the output object and provides - # additional functionality depending on its type. - # - # This defaults to Buffer::StringBuffer.new("".dup) - # - # source://prettier_print//lib/prettier_print.rb#400 - def buffer; end - - # A convenience method which is same as follows: - # - # text(",") - # breakable - # - # source://prettier_print//lib/prettier_print.rb#669 - def comma_breakable; end - - # Returns the group most recently added to the stack. - # - # Contrived example: - # out = "" - # => "" - # q = PrettierPrint.new(out) - # => # - # 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://prettier_print//lib/prettier_print.rb#484 - 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 +separator+ is inserted if a line is not broken at this point. - # - # If +separator+ is not specified, ' ' is used. - # - # If +width+ is not specified, +separator.length+ is used. You will have to - # specify this when +separator+ is a multibyte character, for example. - # - # source://prettier_print//lib/prettier_print.rb#688 - def fill_breakable(separator = T.unsafe(nil), width = T.unsafe(nil)); end - - # Flushes all of the generated print tree onto the output buffer, then clears - # the generated tree from memory. - # - # source://prettier_print//lib/prettier_print.rb#490 - def flush(base_indentation = T.unsafe(nil)); end - - # An object that responds to call that takes one argument, of an Integer, and - # returns the corresponding number of spaces. - # - # By default this is: ->(n) { ' ' * n } - # - # source://prettier_print//lib/prettier_print.rb#416 - 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_object+ is specified, text(open_object, open_width) is - # called before grouping. If +close_object+ is specified, - # text(close_object, close_width) is called after grouping. - # - # source://prettier_print//lib/prettier_print.rb#845 - def group(indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), open_width = T.unsafe(nil), close_width = T.unsafe(nil)); end - - # The stack of groups that are being printed. - # - # source://prettier_print//lib/prettier_print.rb#419 - def groups; end - - # Inserts an IfBreak node with the contents of the block being added to its - # list of nodes that should be printed if the surrounding node breaks. If it - # doesn't, then you can specify the contents to be printed with the #if_flat - # method used on the return object from this method. For example, - # - # q.if_break { q.text('do') }.if_flat { q.text('{') } - # - # In the example above, if the surrounding group is broken it will print 'do' - # and if it is not it will print '{'. - # - # source://prettier_print//lib/prettier_print.rb#917 - def if_break; end - - # This is similar to if_break in that it also inserts an IfBreak node into the - # print tree, however it's starting from the flat contents, and cannot be used - # to build the break contents. - # - # source://prettier_print//lib/prettier_print.rb#936 - def if_flat; end - - # Very similar to the #nest method, this indents the nested content by one - # level by inserting an Indent node into the print tree. The contents of the - # node are determined by the block. - # - # source://prettier_print//lib/prettier_print.rb#956 - def indent; end - - # This method calculates the position of the text relative to the current - # indentation level when the doc has been printed. It's useful for - # determining how to align text to doc nodes that are already built into the - # tree. - # - # source://prettier_print//lib/prettier_print.rb#696 - def last_position(node); end - - # Inserts a LineSuffix node into the print tree. The contents of the node are - # determined by the block. - # - # source://prettier_print//lib/prettier_print.rb#967 - def line_suffix(priority: T.unsafe(nil)); end - - # The maximum width of a line, before it is separated in to a newline - # - # This defaults to 80, and should be an Integer - # - # source://prettier_print//lib/prettier_print.rb#405 - def maxwidth; end - - # Increases left margin after newline with +indent+ for line breaks added in - # the block. - # - # source://prettier_print//lib/prettier_print.rb#977 - 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://prettier_print//lib/prettier_print.rb#410 - def newline; end - - # The output object. It represents the final destination of the contents of - # the print tree. It should respond to <<. - # - # This defaults to "".dup - # - # source://prettier_print//lib/prettier_print.rb#394 - def output; end - - # This method will remove any breakables from the list of contents so that - # no newlines are present in the output. If a newline is being forced into - # the output, the replace value will be used. - # - # source://prettier_print//lib/prettier_print.rb#721 - def remove_breaks(node, replace = T.unsafe(nil)); 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://prettier_print//lib/prettier_print.rb#760 - def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end - - # The current array of contents that calls to methods that generate print tree - # nodes will append to. - # - # source://prettier_print//lib/prettier_print.rb#423 - def target; end - - # This adds +object+ as a text of +width+ columns in width. - # - # If +width+ is not specified, object.length is used. - # - # source://prettier_print//lib/prettier_print.rb#989 - def text(object = T.unsafe(nil), width = T.unsafe(nil)); end - - # This inserts a Trim node into the print tree which, when printed, will clear - # all whitespace at the end of the output buffer. This is useful for the rare - # case where you need to delete printed indentation and force the next node - # to start at the beginning of the line. - # - # source://prettier_print//lib/prettier_print.rb#828 - def trim; end - - # A convenience method used by a lot of the print tree node builders that - # temporarily changes the target that the builders will append to. - # - # source://prettier_print//lib/prettier_print.rb#1007 - def with_target(target); end - - private - - # This method returns a boolean as to whether or not the remaining commands - # fit onto the remaining space on the current line. If we finish printing - # all of the commands or if we hit a newline, then we return true. Otherwise - # if we continue printing past the remaining space, we return false. - # - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#1019 - def fits?(next_commands, rest_commands, remaining); end - - # source://prettier_print//lib/prettier_print.rb#1091 - def remove_breaks_with(doc, replace); end - - # Resets the group stack and target array so that this pretty printer object - # can continue to be used before calling flush again if desired. - # - # source://prettier_print//lib/prettier_print.rb#1085 - def reset; end - - class << self - # This is a convenience method which is same as follows: - # - # begin - # q = PrettierPrint.new(output, maxwidth, newline, &genspace) - # ... - # q.flush - # output - # end - # - # @yield [q] - # - # source://prettier_print//lib/prettier_print.rb#377 - def format(output = T.unsafe(nil), maxwidth = T.unsafe(nil), newline = T.unsafe(nil), genspace = T.unsafe(nil), indentation = T.unsafe(nil)); end - - # This is similar to PrettierPrint::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://prettier_print//lib/prettier_print/single_line.rb#156 - def singleline_format(output = T.unsafe(nil), _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil), _genspace = T.unsafe(nil)); end - end -end - -# A node in the print tree that represents aligning nested nodes to a certain -# prefix width or string. -# -# source://prettier_print//lib/prettier_print.rb#65 -class PrettierPrint::Align - # @return [Align] a new instance of Align - # - # source://prettier_print//lib/prettier_print.rb#68 - def initialize(indent:, contents: T.unsafe(nil)); end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#66 - def contents; end - - # Returns the value of attribute indent. - # - # source://prettier_print//lib/prettier_print.rb#66 - def indent; end - - # source://prettier_print//lib/prettier_print.rb#73 - def pretty_print(q); end -end - -# source://prettier_print//lib/prettier_print.rb#126 -PrettierPrint::BREAKABLE_EMPTY = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# source://prettier_print//lib/prettier_print.rb#127 -PrettierPrint::BREAKABLE_FORCE = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# source://prettier_print//lib/prettier_print.rb#128 -PrettierPrint::BREAKABLE_RETURN = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# Below here are the most common combination of options that are created when -# creating new breakables. They are here to cut down on some allocations. -# -# source://prettier_print//lib/prettier_print.rb#125 -PrettierPrint::BREAKABLE_SPACE = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# Since there's really no difference in these instances, just using the same -# one saves on some allocations. -# -# source://prettier_print//lib/prettier_print.rb#141 -PrettierPrint::BREAK_PARENT = T.let(T.unsafe(nil), PrettierPrint::BreakParent) - -# A node in the print tree that forces the surrounding group to print out in -# the "break" mode as opposed to the "flat" mode. Useful for when you need to -# force a newline into a group. -# -# source://prettier_print//lib/prettier_print.rb#133 -class PrettierPrint::BreakParent - # source://prettier_print//lib/prettier_print.rb#134 - def pretty_print(q); end -end - -# A node in the print tree that represents a place in the buffer that the -# content can be broken onto multiple lines. -# -# source://prettier_print//lib/prettier_print.rb#82 -class PrettierPrint::Breakable - # @return [Breakable] a new instance of Breakable - # - # source://prettier_print//lib/prettier_print.rb#85 - def initialize(separator = T.unsafe(nil), width = T.unsafe(nil), force: T.unsafe(nil), indent: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#97 - def force?; end - - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#101 - def indent?; end - - # source://prettier_print//lib/prettier_print.rb#105 - def pretty_print(q); end - - # Returns the value of attribute separator. - # - # source://prettier_print//lib/prettier_print.rb#83 - def separator; end - - # Returns the value of attribute width. - # - # source://prettier_print//lib/prettier_print.rb#83 - def width; end -end - -# When building up the contents in the output buffer, it's convenient to be -# able to trim trailing whitespace before newlines. If the output object is a -# string or array or strings, then we can do this with some gsub calls. If -# not, then this effectively just wraps the output object and forwards on -# calls to <<. -# -# source://prettier_print//lib/prettier_print.rb#277 -module PrettierPrint::Buffer - class << self - # This is a switch for building the correct output buffer wrapper class for - # the given output object. - # - # source://prettier_print//lib/prettier_print.rb#336 - def for(output); end - end -end - -# This is an output buffer that wraps an array output object. It provides a -# trim! method that trims off trailing whitespace from the last element in -# the array if it's an unfrozen string using the same method as the -# StringBuffer. -# -# source://prettier_print//lib/prettier_print.rb#303 -class PrettierPrint::Buffer::ArrayBuffer - # @return [ArrayBuffer] a new instance of ArrayBuffer - # - # source://prettier_print//lib/prettier_print.rb#306 - def initialize(output = T.unsafe(nil)); end - - # source://prettier_print//lib/prettier_print.rb#310 - def <<(object); end - - # Returns the value of attribute output. - # - # source://prettier_print//lib/prettier_print.rb#304 - def output; end - - # source://prettier_print//lib/prettier_print.rb#314 - def trim!; end -end - -# This is an output buffer that wraps a string output object. It provides a -# trim! method that trims off trailing whitespace from the string using -# gsub!. -# -# source://prettier_print//lib/prettier_print.rb#281 -class PrettierPrint::Buffer::StringBuffer - # @return [StringBuffer] a new instance of StringBuffer - # - # source://prettier_print//lib/prettier_print.rb#284 - def initialize(output = T.unsafe(nil)); end - - # source://prettier_print//lib/prettier_print.rb#288 - def <<(object); end - - # Returns the value of attribute output. - # - # source://prettier_print//lib/prettier_print.rb#282 - def output; end - - # source://prettier_print//lib/prettier_print.rb#292 - def trim!; end -end - -# When generating spaces after a newline for indentation, by default we -# generate one space per character needed for indentation. You can change this -# behavior (for instance to use tabs) by passing a different genspace -# procedure. -# -# source://prettier_print//lib/prettier_print.rb#350 -PrettierPrint::DEFAULT_GENSPACE = T.let(T.unsafe(nil), Proc) - -# The default indentation for printing is zero, assuming that the code starts -# at the top level. That can be changed if desired to start from a different -# indentation level. -# -# source://prettier_print//lib/prettier_print.rb#366 -PrettierPrint::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) - -# When printing, you can optionally specify the value that should be used -# whenever a group needs to be broken onto multiple lines. In this case the -# default is \n. -# -# source://prettier_print//lib/prettier_print.rb#344 -PrettierPrint::DEFAULT_NEWLINE = T.let(T.unsafe(nil), String) - -# A node in the print tree that represents a group of items which the printer -# should try to fit onto one line. This is the basic command to tell the -# printer when to break. Groups are usually nested, and the printer will try -# to fit everything on one line, but if it doesn't fit it will break the -# outermost group first and try again. It will continue breaking groups until -# everything fits (or there are no more groups to break). -# -# source://prettier_print//lib/prettier_print.rb#149 -class PrettierPrint::Group - # @return [Group] a new instance of Group - # - # source://prettier_print//lib/prettier_print.rb#152 - def initialize(depth, contents: T.unsafe(nil)); end - - # source://prettier_print//lib/prettier_print.rb#158 - def break; end - - # @return [Boolean] - # - # source://prettier_print//lib/prettier_print.rb#162 - def break?; end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#150 - def contents; end - - # Returns the value of attribute depth. - # - # source://prettier_print//lib/prettier_print.rb#150 - def depth; end - - # source://prettier_print//lib/prettier_print.rb#166 - def pretty_print(q); end -end - -# A node in the print tree that represents printing one thing if the -# surrounding group node is broken and another thing if the surrounding group -# node is flat. -# -# source://prettier_print//lib/prettier_print.rb#176 -class PrettierPrint::IfBreak - # @return [IfBreak] a new instance of IfBreak - # - # source://prettier_print//lib/prettier_print.rb#179 - def initialize(break_contents: T.unsafe(nil), flat_contents: T.unsafe(nil)); end - - # Returns the value of attribute break_contents. - # - # source://prettier_print//lib/prettier_print.rb#177 - def break_contents; end - - # Returns the value of attribute flat_contents. - # - # source://prettier_print//lib/prettier_print.rb#177 - def flat_contents; end - - # source://prettier_print//lib/prettier_print.rb#184 - def pretty_print(q); end -end - -# A small DSL-like object used for specifying the alternative contents to be -# printed if the surrounding group doesn't break for an IfBreak node. -# -# source://prettier_print//lib/prettier_print.rb#874 -class PrettierPrint::IfBreakBuilder - # @return [IfBreakBuilder] a new instance of IfBreakBuilder - # - # source://prettier_print//lib/prettier_print.rb#877 - def initialize(q, flat_contents); end - - # Returns the value of attribute flat_contents. - # - # source://prettier_print//lib/prettier_print.rb#875 - def flat_contents; end - - # source://prettier_print//lib/prettier_print.rb#882 - def if_flat; end - - # Returns the value of attribute q. - # - # source://prettier_print//lib/prettier_print.rb#875 - def q; end -end - -# When we already know that groups are broken, we don't actually need to track -# the flat versions of the contents. So this builder version is effectively a -# no-op, but we need it to maintain the same API. The only thing this can -# impact is that if there's a forced break in the flat contents, then we need -# to propagate that break up the whole tree. -# -# source://prettier_print//lib/prettier_print.rb#892 -class PrettierPrint::IfFlatIgnore - # @return [IfFlatIgnore] a new instance of IfFlatIgnore - # - # source://prettier_print//lib/prettier_print.rb#895 - def initialize(q); end - - # source://prettier_print//lib/prettier_print.rb#899 - def if_flat; end - - # Returns the value of attribute q. - # - # source://prettier_print//lib/prettier_print.rb#893 - def q; end -end - -# A node in the print tree that is a variant of the Align node that indents -# its contents by one level. -# -# source://prettier_print//lib/prettier_print.rb#200 -class PrettierPrint::Indent - # @return [Indent] a new instance of Indent - # - # source://prettier_print//lib/prettier_print.rb#203 - def initialize(contents: T.unsafe(nil)); end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#201 - def contents; end - - # source://prettier_print//lib/prettier_print.rb#207 - def pretty_print(q); end -end - -# A node in the print tree that has its own special buffer for implementing -# content that should flush before any newline. -# -# Useful for implementating trailing content, as it's not always practical to -# constantly check where the line ends to avoid accidentally printing some -# content after a line suffix node. -# -# source://prettier_print//lib/prettier_print.rb#220 -class PrettierPrint::LineSuffix - # @return [LineSuffix] a new instance of LineSuffix - # - # source://prettier_print//lib/prettier_print.rb#225 - def initialize(priority: T.unsafe(nil), contents: T.unsafe(nil)); end - - # Returns the value of attribute contents. - # - # source://prettier_print//lib/prettier_print.rb#223 - def contents; end - - # source://prettier_print//lib/prettier_print.rb#230 - def pretty_print(q); end - - # Returns the value of attribute priority. - # - # source://prettier_print//lib/prettier_print.rb#223 - def priority; end -end - -# source://prettier_print//lib/prettier_print.rb#221 -PrettierPrint::LineSuffix::DEFAULT_PRIORITY = T.let(T.unsafe(nil), Integer) - -# There are two modes in printing, break and flat. When we're in break mode, -# any lines will use their newline, any if-breaks will use their break -# contents, etc. -# -# source://prettier_print//lib/prettier_print.rb#356 -PrettierPrint::MODE_BREAK = T.let(T.unsafe(nil), Integer) - -# This is another print mode much like MODE_BREAK. When we're in flat mode, we -# attempt to print everything on one line until we either hit a broken group, -# a forced line, or the maximum width. -# -# source://prettier_print//lib/prettier_print.rb#361 -PrettierPrint::MODE_FLAT = T.let(T.unsafe(nil), Integer) - -# PrettierPrint::SingleLine is used by PrettierPrint.singleline_format -# -# It is passed to be similar to a PrettierPrint object itself, by responding to -# all of the same print tree node builder methods, as well as the #flush -# method. -# -# The significant difference here is that there are no line breaks in the -# output. If an IfBreak node is used, only the flat contents are printed. -# LineSuffix nodes are printed at the end of the buffer when #flush is called. -# -# source://prettier_print//lib/prettier_print/single_line.rb#13 -class PrettierPrint::SingleLine - # Create a PrettierPrint::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://prettier_print//lib/prettier_print/single_line.rb#34 - def initialize(output, _maxwidth = T.unsafe(nil), _newline = T.unsafe(nil)); end - - # Here for compatibility, does nothing. - # - # source://prettier_print//lib/prettier_print/single_line.rb#64 - def break_parent; end - - # Appends +separator+ to the text to be output. By default +separator+ is - # ' ' - # - # The +width+, +indent+, and +force+ arguments are here for compatibility. - # They are all noop arguments. - # - # source://prettier_print//lib/prettier_print/single_line.rb#54 - def breakable(separator = T.unsafe(nil), _width = T.unsafe(nil), indent: T.unsafe(nil), force: T.unsafe(nil)); end - - # Appends +separator+ to the output buffer. +width+ is a noop here for - # compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#69 - def fill_breakable(separator = T.unsafe(nil), _width = T.unsafe(nil)); end - - # Flushes the line suffixes onto the output buffer. - # - # source://prettier_print//lib/prettier_print/single_line.rb#41 - 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 &block. Default is '' - # * +close_obj+ - text appended after the &block. Default is '' - # * +open_width+ - noop argument. Present for compatibility. - # * +close_width+ - noop argument. Present for compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#90 - def group(_indent = T.unsafe(nil), open_object = T.unsafe(nil), close_object = T.unsafe(nil), _open_width = T.unsafe(nil), _close_width = T.unsafe(nil)); end - - # Effectively unnecessary, but here for compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#113 - def if_break; end - - # Also effectively unnecessary, but here for compatibility. - # - # source://prettier_print//lib/prettier_print/single_line.rb#118 - def if_flat; end - - # A noop that immediately yields. - # - # source://prettier_print//lib/prettier_print/single_line.rb#122 - def indent; end - - # Changes the target output buffer to the line suffix output buffer which - # will get flushed at the end of printing. - # - # source://prettier_print//lib/prettier_print/single_line.rb#128 - def line_suffix; end - - # A buffer output that wraps any calls to line_suffix that will be flushed - # at the end of printing. - # - # source://prettier_print//lib/prettier_print/single_line.rb#23 - def line_suffixes; end - - # Takes +indent+ arg, but does nothing with it. - # - # Yields to a block. - # - # source://prettier_print//lib/prettier_print/single_line.rb#137 - def nest(_indent); end - - # The output object. It stores rendered text and should respond to <<. - # - # source://prettier_print//lib/prettier_print/single_line.rb#15 - def output; end - - # The current array of contents that the print tree builder methods should - # append to. - # - # source://prettier_print//lib/prettier_print/single_line.rb#19 - def target; end - - # Add +object+ to the text to be output. - # - # +width+ argument is here for compatibility. It is a noop argument. - # - # source://prettier_print//lib/prettier_print/single_line.rb#144 - def text(object = T.unsafe(nil), _width = T.unsafe(nil)); end - - # Immediately trims the output buffer. - # - # source://prettier_print//lib/prettier_print/single_line.rb#74 - def trim; end -end - -# A class that wraps the ability to call #if_flat. The contents of the -# #if_flat block are executed immediately, so effectively this class and the -# #if_break method that triggers it are unnecessary, but they're here to -# maintain compatibility. -# -# source://prettier_print//lib/prettier_print/single_line.rb#106 -class PrettierPrint::SingleLine::IfBreakBuilder - # source://prettier_print//lib/prettier_print/single_line.rb#107 - def if_flat; end -end - -# Since all of the instances here are the same, we can reuse the same one to -# cut down on allocations. -# -# source://prettier_print//lib/prettier_print.rb#270 -PrettierPrint::TRIM = T.let(T.unsafe(nil), PrettierPrint::Trim) - -# A node in the print tree that represents plain content that cannot be broken -# up (by default this assumes strings, but it can really be anything). -# -# source://prettier_print//lib/prettier_print.rb#239 -class PrettierPrint::Text - # @return [Text] a new instance of Text - # - # source://prettier_print//lib/prettier_print.rb#242 - def initialize; end - - # source://prettier_print//lib/prettier_print.rb#247 - def add(object: T.unsafe(nil), width: T.unsafe(nil)); end - - # Returns the value of attribute objects. - # - # source://prettier_print//lib/prettier_print.rb#240 - def objects; end - - # source://prettier_print//lib/prettier_print.rb#252 - def pretty_print(q); end - - # Returns the value of attribute width. - # - # source://prettier_print//lib/prettier_print.rb#240 - def width; end -end - -# A node in the print tree that represents trimming all of the indentation of -# the current line, in the rare case that you need to ignore the indentation -# that you've already created. This node should be placed after a Breakable. -# -# source://prettier_print//lib/prettier_print.rb#262 -class PrettierPrint::Trim - # source://prettier_print//lib/prettier_print.rb#263 - def pretty_print(q); end -end diff --git a/sorbet/rbi/gems/prism@0.30.0.rbi b/sorbet/rbi/gems/prism@1.2.0.rbi similarity index 61% rename from sorbet/rbi/gems/prism@0.30.0.rbi rename to sorbet/rbi/gems/prism@1.2.0.rbi index bdf0292ca..c6c606d9d 100644 --- a/sorbet/rbi/gems/prism@0.30.0.rbi +++ b/sorbet/rbi/gems/prism@1.2.0.rbi @@ -4,8 +4,14 @@ # This is an autogenerated file for types exported from the `prism` gem. # Please instead update this file by running `bin/tapioca gem prism`. + # typed: strict +# =begin +# This file is generated by the templates/template.rb script and should not be +# modified manually. See templates/rbi/prism/dsl.rbi.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/rbi/prism/node.rbi.erb @@ -131,28 +137,44 @@ end # Specialized version of Prism::Source for source code that includes ASCII # characters only. This class is used to apply performance optimizations that -# cannot be applied to sources that include multibyte characters. Sources that -# include multibyte characters are represented by the Prism::Source class. +# cannot be applied to sources that include multibyte characters. # -# source://prism//lib/prism/parse_result.rb#126 +# In the extremely rare case that a source includes multi-byte characters but +# is marked as binary because of a magic encoding comment and it cannot be +# 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#236 class Prism::ASCIISource < ::Prism::Source # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#133 + # source://prism//lib/prism/parse_result.rb#243 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#128 + # source://prism//lib/prism/parse_result.rb#238 sig { params(byte_offset: Integer).returns(Integer) } def character_offset(byte_offset); end + # Returns a cache that is the identity function in order to maintain the + # 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#260 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # Specialized version of `code_units_column` that does not depend on # `code_units_offset`, which is a more expensive operation. This is - # essentialy the same as `Prism::Source#column`. + # essentially the same as `Prism::Source#column`. # - # source://prism//lib/prism/parse_result.rb#150 + # source://prism//lib/prism/parse_result.rb#267 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -163,7 +185,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#143 + # source://prism//lib/prism/parse_result.rb#253 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_offset(byte_offset, encoding); end end @@ -173,77 +195,81 @@ end # alias $foo $bar # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#176 +# source://prism//lib/prism/node.rb#227 class Prism::AliasGlobalVariableNode < ::Prism::Node - # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # Initialize a new AliasGlobalVariableNode node. # # @return [AliasGlobalVariableNode] a new instance of AliasGlobalVariableNode # - # source://prism//lib/prism/node.rb#178 + # source://prism//lib/prism/node.rb#229 sig do params( source: Prism::Source, - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location ).void end - def initialize(source, new_name, old_name, keyword_loc, location); end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); 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#281 + # source://prism//lib/prism/node.rb#316 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#187 + # source://prism//lib/prism/node.rb#240 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#192 + # source://prism//lib/prism/node.rb#245 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#202 + # source://prism//lib/prism/node.rb#255 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#197 + # source://prism//lib/prism/node.rb#250 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasGlobalVariableNode + # 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#207 + # source://prism//lib/prism/node.rb#260 sig do params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + keyword_loc: Prism::Location ).returns(Prism::AliasGlobalVariableNode) end - def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#192 + # source://prism//lib/prism/node.rb#245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # 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#215 + # source://prism//lib/prism/node.rb#268 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -252,13 +278,13 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#247 + # source://prism//lib/prism/node.rb#300 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#242 + # source://prism//lib/prism/node.rb#295 sig { returns(String) } def keyword; end @@ -267,56 +293,40 @@ class Prism::AliasGlobalVariableNode < ::Prism::Node # alias $foo $bar # ^^^^^ # - # source://prism//lib/prism/node.rb#235 + # source://prism//lib/prism/node.rb#288 sig { returns(Prism::Location) } def keyword_loc; end - # Represents the new name of the global variable that can be used after aliasing. This can be either a global variable, a back reference, or a numbered reference. + # Represents the new name of the global variable that can be used after aliasing. # # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#223 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#276 + sig { returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) } def new_name; end - # Represents the old name of the global variable that could be used before aliasing. This can be either a global variable, a back reference, or a numbered reference. + # Represents the old name of the global variable that can be used before aliasing. # # alias $foo $bar # ^^^^ # - # source://prism//lib/prism/node.rb#229 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#282 + sig do + returns(T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode)) + end def old_name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#265 + # source://prism//lib/prism/node.rb#305 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#275 + # source://prism//lib/prism/node.rb#310 def type; end end end @@ -326,77 +336,81 @@ end # alias foo bar # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#293 +# source://prism//lib/prism/node.rb#328 class Prism::AliasMethodNode < ::Prism::Node - # def initialize: (Prism::node new_name, Prism::node old_name, Location keyword_loc, Location location) -> void + # Initialize a new AliasMethodNode node. # # @return [AliasMethodNode] a new instance of AliasMethodNode # - # source://prism//lib/prism/node.rb#295 + # source://prism//lib/prism/node.rb#330 sig do params( source: Prism::Source, - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location ).void end - def initialize(source, new_name, old_name, keyword_loc, location); end + def initialize(source, node_id, location, flags, new_name, old_name, keyword_loc); 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#389 + # source://prism//lib/prism/node.rb#426 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#304 + # source://prism//lib/prism/node.rb#341 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#309 + # source://prism//lib/prism/node.rb#346 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#319 + # source://prism//lib/prism/node.rb#356 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#314 + # source://prism//lib/prism/node.rb#351 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?new_name: Prism::node, ?old_name: Prism::node, ?keyword_loc: Location, ?location: Location) -> AliasMethodNode + # 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#324 + # source://prism//lib/prism/node.rb#361 sig do params( - new_name: Prism::Node, - old_name: Prism::Node, - keyword_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + keyword_loc: Prism::Location ).returns(Prism::AliasMethodNode) end - def copy(new_name: T.unsafe(nil), old_name: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#309 + # source://prism//lib/prism/node.rb#346 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { new_name: Prism::node, old_name: Prism::node, keyword_loc: Location, location: Location } + # 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#332 + # source://prism//lib/prism/node.rb#369 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -405,62 +419,64 @@ class Prism::AliasMethodNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#355 + # source://prism//lib/prism/node.rb#410 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#350 + # source://prism//lib/prism/node.rb#405 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#343 + # source://prism//lib/prism/node.rb#398 sig { returns(Prism::Location) } def keyword_loc; end - # attr_reader new_name: Prism::node + # Represents the new name of the method that will be aliased. # - # source://prism//lib/prism/node.rb#337 - sig { returns(Prism::Node) } + # alias foo bar + # ^^^ + # + # alias :foo :bar + # ^^^^ + # + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#383 + sig { returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)) } def new_name; end - # attr_reader old_name: Prism::node + # Represents the old name of the method that will be aliased. # - # source://prism//lib/prism/node.rb#340 - sig { returns(Prism::Node) } - def old_name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # alias foo bar + # ^^^ # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # alias :foo :bar + # ^^^^ # - # def type: () -> Symbol + # alias :"#{foo}" :"#{bar}" + # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#373 + # source://prism//lib/prism/node.rb#395 + sig do + returns(T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode)) + end + def old_name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#415 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#383 + # source://prism//lib/prism/node.rb#420 def type; end end end @@ -470,77 +486,81 @@ end # foo => bar | baz # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#401 +# source://prism//lib/prism/node.rb#438 class Prism::AlternationPatternNode < ::Prism::Node - # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # Initialize a new AlternationPatternNode node. # # @return [AlternationPatternNode] a new instance of AlternationPatternNode # - # source://prism//lib/prism/node.rb#403 + # source://prism//lib/prism/node.rb#440 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); 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#497 + # source://prism//lib/prism/node.rb#527 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#412 + # source://prism//lib/prism/node.rb#451 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#417 + # source://prism//lib/prism/node.rb#456 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#427 + # source://prism//lib/prism/node.rb#466 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#422 + # source://prism//lib/prism/node.rb#461 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AlternationPatternNode + # 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#432 + # source://prism//lib/prism/node.rb#471 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::AlternationPatternNode) end - def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#417 + # source://prism//lib/prism/node.rb#456 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # 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#440 + # source://prism//lib/prism/node.rb#479 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -549,62 +569,53 @@ class Prism::AlternationPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#463 + # source://prism//lib/prism/node.rb#511 sig { override.returns(String) } def inspect; end - # attr_reader left: Prism::node + # Represents the left side of the expression. # - # source://prism//lib/prism/node.rb#445 + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#487 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#458 + # source://prism//lib/prism/node.rb#506 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # Represents the alternation operator location. # - # source://prism//lib/prism/node.rb#451 + # foo => bar | baz + # ^ + # + # source://prism//lib/prism/node.rb#499 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader right: Prism::node + # Represents the right side of the expression. # - # source://prism//lib/prism/node.rb#448 + # foo => bar | baz + # ^^^ + # + # source://prism//lib/prism/node.rb#493 sig { returns(Prism::Node) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#481 + # source://prism//lib/prism/node.rb#516 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#491 + # source://prism//lib/prism/node.rb#521 def type; end end end @@ -614,77 +625,81 @@ end # left and right # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#509 +# source://prism//lib/prism/node.rb#539 class Prism::AndNode < ::Prism::Node - # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # Initialize a new AndNode node. # # @return [AndNode] a new instance of AndNode # - # source://prism//lib/prism/node.rb#511 + # source://prism//lib/prism/node.rb#541 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); 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#620 + # source://prism//lib/prism/node.rb#634 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#520 + # source://prism//lib/prism/node.rb#552 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#525 + # source://prism//lib/prism/node.rb#557 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#535 + # source://prism//lib/prism/node.rb#567 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#530 + # source://prism//lib/prism/node.rb#562 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> AndNode + # 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#540 + # source://prism//lib/prism/node.rb#572 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::AndNode) end - def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#525 + # source://prism//lib/prism/node.rb#557 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # 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#548 + # source://prism//lib/prism/node.rb#580 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -693,7 +708,7 @@ class Prism::AndNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#586 + # source://prism//lib/prism/node.rb#618 sig { override.returns(String) } def inspect; end @@ -705,13 +720,13 @@ class Prism::AndNode < ::Prism::Node # 1 && 2 # ^ # - # source://prism//lib/prism/node.rb#559 + # source://prism//lib/prism/node.rb#591 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#581 + # source://prism//lib/prism/node.rb#613 sig { returns(String) } def operator; end @@ -720,11 +735,11 @@ class Prism::AndNode < ::Prism::Node # left and right # ^^^ # - # source://prism//lib/prism/node.rb#574 + # source://prism//lib/prism/node.rb#606 sig { returns(Prism::Location) } def operator_loc; end - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # Represents the right side of the expression. # # left && right # ^^^^^ @@ -732,38 +747,20 @@ class Prism::AndNode < ::Prism::Node # 1 and 2 # ^ # - # source://prism//lib/prism/node.rb#568 + # source://prism//lib/prism/node.rb#600 sig { returns(Prism::Node) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#604 + # source://prism//lib/prism/node.rb#623 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#614 + # source://prism//lib/prism/node.rb#628 def type; end end end @@ -773,64 +770,73 @@ end # return foo, bar, baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#632 +# source://prism//lib/prism/node.rb#646 class Prism::ArgumentsNode < ::Prism::Node - # def initialize: (Integer flags, Array[Prism::node] arguments, Location location) -> void + # Initialize a new ArgumentsNode node. # # @return [ArgumentsNode] a new instance of ArgumentsNode # - # source://prism//lib/prism/node.rb#634 + # source://prism//lib/prism/node.rb#648 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - arguments: T::Array[Prism::Node], - location: Prism::Location + arguments: T::Array[Prism::Node] ).void end - def initialize(source, flags, arguments, location); end + def initialize(source, node_id, location, flags, arguments); 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#726 + # source://prism//lib/prism/node.rb#734 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#642 + # source://prism//lib/prism/node.rb#657 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: Array[Prism::node] # - # source://prism//lib/prism/node.rb#679 + # source://prism//lib/prism/node.rb#715 sig { returns(T::Array[Prism::Node]) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#647 + # source://prism//lib/prism/node.rb#662 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#657 + # source://prism//lib/prism/node.rb#672 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#652 + # source://prism//lib/prism/node.rb#667 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end + # def contains_forwarding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#690 + sig { returns(T::Boolean) } + def contains_forwarding?; end + # def contains_keyword_splat?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#687 + # source://prism//lib/prism/node.rb#700 sig { returns(T::Boolean) } def contains_keyword_splat?; end @@ -838,32 +844,49 @@ class Prism::ArgumentsNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#682 + # source://prism//lib/prism/node.rb#695 sig { returns(T::Boolean) } def contains_keywords?; end - # def copy: (?flags: Integer, ?arguments: Array[Prism::node], ?location: Location) -> ArgumentsNode + # def contains_multiple_splats?: () -> bool # - # source://prism//lib/prism/node.rb#662 + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#710 + sig { returns(T::Boolean) } + def contains_multiple_splats?; end + + # def contains_splat?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#705 + 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#677 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - arguments: T::Array[Prism::Node], - location: Prism::Location + arguments: T::Array[Prism::Node] ).returns(Prism::ArgumentsNode) end - def copy(flags: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), arguments: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#647 + # source://prism//lib/prism/node.rb#662 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, arguments: Array[Prism::node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#670 + # source://prism//lib/prism/node.rb#685 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -872,110 +895,100 @@ class Prism::ArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#692 + # source://prism//lib/prism/node.rb#718 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#710 + # source://prism//lib/prism/node.rb#723 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#675 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#720 + # source://prism//lib/prism/node.rb#728 def type; end end end # Flags for arguments nodes. # -# source://prism//lib/prism/node.rb#19127 +# source://prism//lib/prism/node.rb#16684 module Prism::ArgumentsNodeFlags; end -# if arguments contain keywords +# if the arguments contain forwarding # -# source://prism//lib/prism/node.rb#19129 +# source://prism//lib/prism/node.rb#16686 +Prism::ArgumentsNodeFlags::CONTAINS_FORWARDING = T.let(T.unsafe(nil), Integer) + +# if the arguments contain keywords +# +# source://prism//lib/prism/node.rb#16689 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORDS = T.let(T.unsafe(nil), Integer) -# if arguments contain keyword splat +# if the arguments contain a keyword splat # -# source://prism//lib/prism/node.rb#19132 +# source://prism//lib/prism/node.rb#16692 Prism::ArgumentsNodeFlags::CONTAINS_KEYWORD_SPLAT = T.let(T.unsafe(nil), Integer) +# if the arguments contain multiple splats +# +# source://prism//lib/prism/node.rb#16698 +Prism::ArgumentsNodeFlags::CONTAINS_MULTIPLE_SPLATS = T.let(T.unsafe(nil), Integer) + +# if the arguments contain a splat +# +# source://prism//lib/prism/node.rb#16695 +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. # # [1, 2, 3] # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#738 +# source://prism//lib/prism/node.rb#746 class Prism::ArrayNode < ::Prism::Node - # def initialize: (Integer flags, Array[Prism::node] elements, Location? opening_loc, Location? closing_loc, Location location) -> void + # Initialize a new ArrayNode node. # # @return [ArrayNode] a new instance of ArrayNode # - # source://prism//lib/prism/node.rb#740 + # source://prism//lib/prism/node.rb#748 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, flags, elements, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, elements, opening_loc, closing_loc); 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#875 + # source://prism//lib/prism/node.rb#862 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#750 + # source://prism//lib/prism/node.rb#759 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#755 + # source://prism//lib/prism/node.rb#764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#836 + # source://prism//lib/prism/node.rb#841 sig { returns(T.nilable(String)) } def closing; end @@ -986,19 +999,19 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # ")" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#813 + # source://prism//lib/prism/node.rb#823 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#765 + # source://prism//lib/prism/node.rb#774 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#760 + # source://prism//lib/prism/node.rb#769 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -1006,40 +1019,41 @@ class Prism::ArrayNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#826 + # source://prism//lib/prism/node.rb#792 sig { returns(T::Boolean) } def contains_splat?; end - # def copy: (?flags: Integer, ?elements: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayNode + # 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#770 + # source://prism//lib/prism/node.rb#779 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, elements: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayNode) end - def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#755 + # source://prism//lib/prism/node.rb#764 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # 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#778 + # source://prism//lib/prism/node.rb#787 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); 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#787 + # source://prism//lib/prism/node.rb#797 sig { returns(T::Array[Prism::Node]) } def elements; end @@ -1048,13 +1062,13 @@ class Prism::ArrayNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#841 + # source://prism//lib/prism/node.rb#846 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#831 + # source://prism//lib/prism/node.rb#836 sig { returns(T.nilable(String)) } def opening; end @@ -1065,58 +1079,32 @@ class Prism::ArrayNode < ::Prism::Node # %I(apple orange banana) # "%I(" # foo = 1, 2, 3 # nil # - # source://prism//lib/prism/node.rb#795 + # source://prism//lib/prism/node.rb#805 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#859 + # source://prism//lib/prism/node.rb#851 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#783 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#869 + # source://prism//lib/prism/node.rb#856 def type; end end end # Flags for array nodes. # -# source://prism//lib/prism/node.rb#19136 +# source://prism//lib/prism/node.rb#16702 module Prism::ArrayNodeFlags; end # if array contains splat nodes # -# source://prism//lib/prism/node.rb#19138 +# source://prism//lib/prism/node.rb#16704 Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # Represents an array pattern in pattern matching. @@ -1136,101 +1124,105 @@ Prism::ArrayNodeFlags::CONTAINS_SPLAT = T.let(T.unsafe(nil), Integer) # foo in Bar[1, 2, 3] # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#901 +# source://prism//lib/prism/node.rb#888 class Prism::ArrayPatternNode < ::Prism::Node - # def initialize: (Prism::node? constant, Array[Prism::node] requireds, Prism::node? rest, Array[Prism::node] posts, Location? opening_loc, Location? closing_loc, Location location) -> void + # Initialize a new ArrayPatternNode node. # # @return [ArrayPatternNode] a new instance of ArrayPatternNode # - # source://prism//lib/prism/node.rb#903 + # source://prism//lib/prism/node.rb#890 sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, requireds, rest, posts, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, requireds, rest, posts, opening_loc, closing_loc); 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#1035 + # source://prism//lib/prism/node.rb#1006 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#915 + # source://prism//lib/prism/node.rb#904 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#920 + # source://prism//lib/prism/node.rb#909 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#996 + # source://prism//lib/prism/node.rb#985 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#978 + # source://prism//lib/prism/node.rb#967 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#935 + # source://prism//lib/prism/node.rb#924 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#925 + # source://prism//lib/prism/node.rb#914 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism//lib/prism/node.rb#953 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#942 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end - # def copy: (?constant: Prism::node?, ?requireds: Array[Prism::node], ?rest: Prism::node?, ?posts: Array[Prism::node], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> ArrayPatternNode + # 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 # - # source://prism//lib/prism/node.rb#940 + # source://prism//lib/prism/node.rb#929 sig do params( - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), requireds: T::Array[Prism::Node], rest: T.nilable(Prism::Node), posts: T::Array[Prism::Node], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::ArrayPatternNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#920 + # source://prism//lib/prism/node.rb#909 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, requireds: Array[Prism::node], rest: Prism::node?, posts: Array[Prism::node], opening_loc: Location?, closing_loc: Location?, location: Location } + # 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? } # - # source://prism//lib/prism/node.rb#948 + # source://prism//lib/prism/node.rb#937 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1239,68 +1231,50 @@ class Prism::ArrayPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1001 + # source://prism//lib/prism/node.rb#990 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#991 + # source://prism//lib/prism/node.rb#980 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#965 + # source://prism//lib/prism/node.rb#954 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader posts: Array[Prism::node] # - # source://prism//lib/prism/node.rb#962 + # source://prism//lib/prism/node.rb#951 sig { returns(T::Array[Prism::Node]) } def posts; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#956 + # source://prism//lib/prism/node.rb#945 sig { returns(T::Array[Prism::Node]) } def requireds; end # attr_reader rest: Prism::node? # - # source://prism//lib/prism/node.rb#959 + # source://prism//lib/prism/node.rb#948 sig { returns(T.nilable(Prism::Node)) } def rest; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1019 + # source://prism//lib/prism/node.rb#995 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1029 + # source://prism//lib/prism/node.rb#1000 def type; end end end @@ -1310,77 +1284,81 @@ end # { a => b } # ^^^^^^ # -# source://prism//lib/prism/node.rb#1052 +# source://prism//lib/prism/node.rb#1023 class Prism::AssocNode < ::Prism::Node - # def initialize: (Prism::node key, Prism::node value, Location? operator_loc, Location location) -> void + # Initialize a new AssocNode node. # # @return [AssocNode] a new instance of AssocNode # - # source://prism//lib/prism/node.rb#1054 + # source://prism//lib/prism/node.rb#1025 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, key: Prism::Node, value: Prism::Node, - operator_loc: T.nilable(Prism::Location), - location: Prism::Location + operator_loc: T.nilable(Prism::Location) ).void end - def initialize(source, key, value, operator_loc, location); end + def initialize(source, node_id, location, flags, key, value, operator_loc); 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#1172 + # source://prism//lib/prism/node.rb#1127 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1063 + # source://prism//lib/prism/node.rb#1036 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1068 + # source://prism//lib/prism/node.rb#1041 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#1078 + # source://prism//lib/prism/node.rb#1051 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#1073 + # source://prism//lib/prism/node.rb#1046 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?key: Prism::node, ?value: Prism::node, ?operator_loc: Location?, ?location: Location) -> AssocNode + # 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#1083 + # source://prism//lib/prism/node.rb#1056 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, key: Prism::Node, value: Prism::Node, - operator_loc: T.nilable(Prism::Location), - location: Prism::Location + operator_loc: T.nilable(Prism::Location) ).returns(Prism::AssocNode) end - def copy(key: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1068 + # source://prism//lib/prism/node.rb#1041 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { key: Prism::node, value: Prism::node, operator_loc: Location?, location: Location } + # 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#1091 + # source://prism//lib/prism/node.rb#1064 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1389,7 +1367,7 @@ class Prism::AssocNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1138 + # source://prism//lib/prism/node.rb#1111 sig { override.returns(String) } def inspect; end @@ -1404,13 +1382,13 @@ class Prism::AssocNode < ::Prism::Node # { def a; end => 1 } # ^^^^^^^^^^ # - # source://prism//lib/prism/node.rb#1105 + # source://prism//lib/prism/node.rb#1078 sig { returns(Prism::Node) } def key; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#1133 + # source://prism//lib/prism/node.rb#1106 sig { returns(T.nilable(String)) } def operator; end @@ -1419,26 +1397,13 @@ class Prism::AssocNode < ::Prism::Node # { foo => bar } # ^^ # - # source://prism//lib/prism/node.rb#1120 + # source://prism//lib/prism/node.rb#1093 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1156 + # source://prism//lib/prism/node.rb#1116 sig { override.returns(Symbol) } def type; end @@ -1450,19 +1415,14 @@ class Prism::AssocNode < ::Prism::Node # { x: 1 } # ^ # - # source://prism//lib/prism/node.rb#1114 + # source://prism//lib/prism/node.rb#1087 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1166 + # source://prism//lib/prism/node.rb#1121 def type; end end end @@ -1472,75 +1432,79 @@ end # { **foo } # ^^^^^ # -# source://prism//lib/prism/node.rb#1184 +# source://prism//lib/prism/node.rb#1139 class Prism::AssocSplatNode < ::Prism::Node - # def initialize: (Prism::node? value, Location operator_loc, Location location) -> void + # Initialize a new AssocSplatNode node. # # @return [AssocSplatNode] a new instance of AssocSplatNode # - # source://prism//lib/prism/node.rb#1186 + # source://prism//lib/prism/node.rb#1141 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, operator_loc, location); end + def initialize(source, node_id, location, flags, value, operator_loc); 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#1284 + # source://prism//lib/prism/node.rb#1223 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1194 + # source://prism//lib/prism/node.rb#1151 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1199 + # source://prism//lib/prism/node.rb#1156 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#1211 + # source://prism//lib/prism/node.rb#1168 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 + # source://prism//lib/prism/node.rb#1161 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Prism::node?, ?operator_loc: Location, ?location: Location) -> AssocSplatNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node?, ?operator_loc: Location) -> AssocSplatNode # - # source://prism//lib/prism/node.rb#1216 + # source://prism//lib/prism/node.rb#1173 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::AssocSplatNode) end - def copy(value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1199 + # source://prism//lib/prism/node.rb#1156 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1224 + # source://prism//lib/prism/node.rb#1181 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1549,13 +1513,13 @@ class Prism::AssocSplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1250 + # source://prism//lib/prism/node.rb#1207 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1245 + # source://prism//lib/prism/node.rb#1202 sig { returns(String) } def operator; end @@ -1564,26 +1528,13 @@ class Prism::AssocSplatNode < ::Prism::Node # { **x } # ^^ # - # source://prism//lib/prism/node.rb#1238 + # source://prism//lib/prism/node.rb#1195 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1268 + # source://prism//lib/prism/node.rb#1212 sig { override.returns(Symbol) } def type; end @@ -1592,19 +1543,14 @@ class Prism::AssocSplatNode < ::Prism::Node # { **foo } # ^^^ # - # source://prism//lib/prism/node.rb#1232 + # source://prism//lib/prism/node.rb#1189 sig { returns(T.nilable(Prism::Node)) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1278 + # source://prism//lib/prism/node.rb#1217 def type; end end end @@ -1619,62 +1565,69 @@ Prism::BACKEND = T.let(T.unsafe(nil), Symbol) # $' # ^^ # -# source://prism//lib/prism/node.rb#1295 +# source://prism//lib/prism/node.rb#1234 class Prism::BackReferenceReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new BackReferenceReadNode node. # # @return [BackReferenceReadNode] a new instance of BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1297 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#1236 + 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#1378 + # source://prism//lib/prism/node.rb#1301 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1304 + # source://prism//lib/prism/node.rb#1245 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1309 + # source://prism//lib/prism/node.rb#1250 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#1319 + # source://prism//lib/prism/node.rb#1260 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#1314 + # source://prism//lib/prism/node.rb#1255 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> BackReferenceReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BackReferenceReadNode # - # source://prism//lib/prism/node.rb#1324 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::BackReferenceReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1265 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1309 + # source://prism//lib/prism/node.rb#1250 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1332 + # source://prism//lib/prism/node.rb#1273 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -1683,7 +1636,7 @@ class Prism::BackReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1344 + # source://prism//lib/prism/node.rb#1285 sig { override.returns(String) } def inspect; end @@ -1693,38 +1646,20 @@ class Prism::BackReferenceReadNode < ::Prism::Node # # $+ # name `:$+` # - # source://prism//lib/prism/node.rb#1341 + # source://prism//lib/prism/node.rb#1282 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1362 + # source://prism//lib/prism/node.rb#1290 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1372 + # source://prism//lib/prism/node.rb#1295 def type; end end end @@ -1763,119 +1698,123 @@ end # end # ^^^^^ # -# source://prism//lib/prism/node.rb#1390 +# source://prism//lib/prism/node.rb#1313 class Prism::BeginNode < ::Prism::Node - # def initialize: (Location? begin_keyword_loc, StatementsNode? statements, RescueNode? rescue_clause, ElseNode? else_clause, EnsureNode? ensure_clause, Location? end_keyword_loc, Location location) -> void + # Initialize a new BeginNode node. # # @return [BeginNode] a new instance of BeginNode # - # source://prism//lib/prism/node.rb#1392 + # source://prism//lib/prism/node.rb#1315 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, begin_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), rescue_clause: T.nilable(Prism::RescueNode), else_clause: T.nilable(Prism::ElseNode), ensure_clause: T.nilable(Prism::EnsureNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc); 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#1524 + # source://prism//lib/prism/node.rb#1431 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1404 + # source://prism//lib/prism/node.rb#1329 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def begin_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1480 + # source://prism//lib/prism/node.rb#1405 sig { returns(T.nilable(String)) } def begin_keyword; end # attr_reader begin_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1442 + # source://prism//lib/prism/node.rb#1367 sig { returns(T.nilable(Prism::Location)) } def begin_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1409 + # source://prism//lib/prism/node.rb#1334 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#1424 + # source://prism//lib/prism/node.rb#1349 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#1414 + # source://prism//lib/prism/node.rb#1339 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?begin_keyword_loc: Location?, ?statements: StatementsNode?, ?rescue_clause: RescueNode?, ?else_clause: ElseNode?, ?ensure_clause: EnsureNode?, ?end_keyword_loc: Location?, ?location: Location) -> BeginNode + # 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#1429 + # source://prism//lib/prism/node.rb#1354 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, begin_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), rescue_clause: T.nilable(Prism::RescueNode), else_clause: T.nilable(Prism::ElseNode), ensure_clause: T.nilable(Prism::EnsureNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::BeginNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1409 + # source://prism//lib/prism/node.rb#1334 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { begin_keyword_loc: Location?, statements: StatementsNode?, rescue_clause: RescueNode?, else_clause: ElseNode?, ensure_clause: EnsureNode?, end_keyword_loc: Location?, location: Location } + # 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#1437 + # source://prism//lib/prism/node.rb#1362 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader else_clause: ElseNode? # - # source://prism//lib/prism/node.rb#1461 + # source://prism//lib/prism/node.rb#1386 sig { returns(T.nilable(Prism::ElseNode)) } def else_clause; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#1485 + # source://prism//lib/prism/node.rb#1410 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#1467 + # source://prism//lib/prism/node.rb#1392 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # attr_reader ensure_clause: EnsureNode? # - # source://prism//lib/prism/node.rb#1464 + # source://prism//lib/prism/node.rb#1389 sig { returns(T.nilable(Prism::EnsureNode)) } def ensure_clause; end @@ -1884,137 +1823,123 @@ class Prism::BeginNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1490 + # source://prism//lib/prism/node.rb#1415 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#79 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader rescue_clause: RescueNode? # - # source://prism//lib/prism/node.rb#1458 + # source://prism//lib/prism/node.rb#1383 sig { returns(T.nilable(Prism::RescueNode)) } def rescue_clause; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#1455 + # source://prism//lib/prism/node.rb#1380 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1508 + # source://prism//lib/prism/node.rb#1420 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1518 + # source://prism//lib/prism/node.rb#1425 def type; end end end -# Represents block method arguments. +# Represents a block argument using `&`. # # bar(&args) # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1539 +# source://prism//lib/prism/node.rb#1446 class Prism::BlockArgumentNode < ::Prism::Node - # def initialize: (Prism::node? expression, Location operator_loc, Location location) -> void + # Initialize a new BlockArgumentNode node. # # @return [BlockArgumentNode] a new instance of BlockArgumentNode # - # source://prism//lib/prism/node.rb#1541 + # source://prism//lib/prism/node.rb#1448 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, expression, operator_loc, location); end + def initialize(source, node_id, location, flags, expression, operator_loc); 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#1633 + # source://prism//lib/prism/node.rb#1524 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1549 + # source://prism//lib/prism/node.rb#1458 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1554 + # source://prism//lib/prism/node.rb#1463 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#1566 + # source://prism//lib/prism/node.rb#1475 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#1559 + # source://prism//lib/prism/node.rb#1468 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?expression: Prism::node?, ?operator_loc: Location, ?location: Location) -> BlockArgumentNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?expression: Prism::node?, ?operator_loc: Location) -> BlockArgumentNode # - # source://prism//lib/prism/node.rb#1571 + # source://prism//lib/prism/node.rb#1480 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::BlockArgumentNode) end - def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1554 + # source://prism//lib/prism/node.rb#1463 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node?, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, expression: Prism::node?, operator_loc: Location } # - # source://prism//lib/prism/node.rb#1579 + # source://prism//lib/prism/node.rb#1488 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#1584 + # source://prism//lib/prism/node.rb#1493 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -2023,50 +1948,32 @@ class Prism::BlockArgumentNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1599 + # source://prism//lib/prism/node.rb#1508 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1594 + # source://prism//lib/prism/node.rb#1503 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1587 + # source://prism//lib/prism/node.rb#1496 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1617 + # source://prism//lib/prism/node.rb#1513 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1627 + # source://prism//lib/prism/node.rb#1518 def type; end end end @@ -2076,62 +1983,69 @@ end # a { |; b| } # ^ # -# source://prism//lib/prism/node.rb#1644 +# source://prism//lib/prism/node.rb#1535 class Prism::BlockLocalVariableNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location location) -> void + # Initialize a new BlockLocalVariableNode node. # # @return [BlockLocalVariableNode] a new instance of BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1646 - sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } - def initialize(source, flags, name, location); end + # source://prism//lib/prism/node.rb#1537 + 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#1733 + # source://prism//lib/prism/node.rb#1603 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1654 + # source://prism//lib/prism/node.rb#1546 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1659 + # source://prism//lib/prism/node.rb#1551 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#1669 + # source://prism//lib/prism/node.rb#1561 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#1664 + # source://prism//lib/prism/node.rb#1556 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> BlockLocalVariableNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> BlockLocalVariableNode # - # source://prism//lib/prism/node.rb#1674 - sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::BlockLocalVariableNode) } - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#1566 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1659 + # source://prism//lib/prism/node.rb#1551 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#1682 + # source://prism//lib/prism/node.rb#1574 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2140,13 +2054,13 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1699 + # source://prism//lib/prism/node.rb#1587 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#1691 + # source://prism//lib/prism/node.rb#1584 sig { returns(Symbol) } def name; end @@ -2154,46 +2068,20 @@ class Prism::BlockLocalVariableNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1694 + # source://prism//lib/prism/node.rb#1579 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#1717 + # source://prism//lib/prism/node.rb#1592 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#1687 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1727 + # source://prism//lib/prism/node.rb#1597 def type; end end end @@ -2203,99 +2091,103 @@ end # [1, 2, 3].each { |i| puts x } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#1744 +# source://prism//lib/prism/node.rb#1614 class Prism::BlockNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Prism::node? parameters, Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void + # Initialize a new BlockNode node. # # @return [BlockNode] a new instance of BlockNode # - # source://prism//lib/prism/node.rb#1746 + # source://prism//lib/prism/node.rb#1616 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, locals, parameters, body, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, locals, parameters, body, opening_loc, closing_loc); 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#1860 + # source://prism//lib/prism/node.rb#1714 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1757 + # source://prism//lib/prism/node.rb#1629 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#1799 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#1671 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1762 + # source://prism//lib/prism/node.rb#1634 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#1821 + # source://prism//lib/prism/node.rb#1693 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#1809 + # source://prism//lib/prism/node.rb#1681 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#1775 + # source://prism//lib/prism/node.rb#1647 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#1767 + # source://prism//lib/prism/node.rb#1639 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?locals: Array[Symbol], ?parameters: Prism::node?, ?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> BlockNode + # 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#1780 + # source://prism//lib/prism/node.rb#1652 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::BlockNode) end - def copy(locals: T.unsafe(nil), parameters: T.unsafe(nil), body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1762 + # source://prism//lib/prism/node.rb#1634 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], parameters: Prism::node?, body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # 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#1788 + # source://prism//lib/prism/node.rb#1660 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2304,145 +2196,129 @@ class Prism::BlockNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1826 + # source://prism//lib/prism/node.rb#1698 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#1793 + # source://prism//lib/prism/node.rb#1665 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#1816 + # source://prism//lib/prism/node.rb#1688 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#1802 + # source://prism//lib/prism/node.rb#1674 sig { returns(Prism::Location) } def opening_loc; end - # attr_reader parameters: Prism::node? + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism//lib/prism/node.rb#1796 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#1668 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1844 + # source://prism//lib/prism/node.rb#1703 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1854 + # source://prism//lib/prism/node.rb#1708 def type; end end end -# Represents a block parameter to a method, block, or lambda definition. +# Represents a block parameter of a method, block, or lambda definition. # # def a(&b) # ^^ # end # -# source://prism//lib/prism/node.rb#1876 +# source://prism//lib/prism/node.rb#1730 class Prism::BlockParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # Initialize a new BlockParameterNode node. # # @return [BlockParameterNode] a new instance of BlockParameterNode # - # source://prism//lib/prism/node.rb#1878 + # source://prism//lib/prism/node.rb#1732 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); 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#1992 + # source://prism//lib/prism/node.rb#1825 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#1888 + # source://prism//lib/prism/node.rb#1743 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1893 + # source://prism//lib/prism/node.rb#1748 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#1903 + # source://prism//lib/prism/node.rb#1758 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#1898 + # source://prism//lib/prism/node.rb#1753 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> BlockParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> BlockParameterNode # - # source://prism//lib/prism/node.rb#1908 + # source://prism//lib/prism/node.rb#1763 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::BlockParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#1893 + # source://prism//lib/prism/node.rb#1748 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # 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#1916 + # source://prism//lib/prism/node.rb#1771 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2451,31 +2327,31 @@ class Prism::BlockParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#1958 + # source://prism//lib/prism/node.rb#1809 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#1925 + # source://prism//lib/prism/node.rb#1781 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#1928 + # source://prism//lib/prism/node.rb#1784 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#1953 + # source://prism//lib/prism/node.rb#1804 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#1941 + # source://prism//lib/prism/node.rb#1797 sig { returns(Prism::Location) } def operator_loc; end @@ -2483,46 +2359,20 @@ class Prism::BlockParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#1948 + # source://prism//lib/prism/node.rb#1776 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#1976 + # source://prism//lib/prism/node.rb#1814 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#1921 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#1986 + # source://prism//lib/prism/node.rb#1819 def type; end end end @@ -2536,91 +2386,95 @@ end # ^^^^^^^^^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#2009 +# source://prism//lib/prism/node.rb#1842 class Prism::BlockParametersNode < ::Prism::Node - # def initialize: (ParametersNode? parameters, Array[BlockLocalVariableNode] locals, Location? opening_loc, Location? closing_loc, Location location) -> void + # Initialize a new BlockParametersNode node. # # @return [BlockParametersNode] a new instance of BlockParametersNode # - # source://prism//lib/prism/node.rb#2011 + # source://prism//lib/prism/node.rb#1844 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parameters: T.nilable(Prism::ParametersNode), locals: T::Array[Prism::BlockLocalVariableNode], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, parameters, locals, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, parameters, locals, opening_loc, closing_loc); 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#2133 + # source://prism//lib/prism/node.rb#1950 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2021 + # source://prism//lib/prism/node.rb#1856 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2026 + # source://prism//lib/prism/node.rb#1861 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2094 + # source://prism//lib/prism/node.rb#1929 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2076 + # source://prism//lib/prism/node.rb#1911 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2039 + # source://prism//lib/prism/node.rb#1874 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#2031 + # source://prism//lib/prism/node.rb#1866 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?parameters: ParametersNode?, ?locals: Array[BlockLocalVariableNode], ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> BlockParametersNode + # 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#2044 + # source://prism//lib/prism/node.rb#1879 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parameters: T.nilable(Prism::ParametersNode), locals: T::Array[Prism::BlockLocalVariableNode], opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::BlockParametersNode) end - def copy(parameters: T.unsafe(nil), locals: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2026 + # source://prism//lib/prism/node.rb#1861 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parameters: ParametersNode?, locals: Array[BlockLocalVariableNode], opening_loc: Location?, closing_loc: Location?, location: Location } + # 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#2052 + # source://prism//lib/prism/node.rb#1887 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2629,62 +2483,44 @@ class Prism::BlockParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2099 + # source://prism//lib/prism/node.rb#1934 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[BlockLocalVariableNode] # - # source://prism//lib/prism/node.rb#2060 + # source://prism//lib/prism/node.rb#1895 sig { returns(T::Array[Prism::BlockLocalVariableNode]) } def locals; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2089 + # source://prism//lib/prism/node.rb#1924 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2063 + # source://prism//lib/prism/node.rb#1898 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#2057 + # source://prism//lib/prism/node.rb#1892 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2117 + # source://prism//lib/prism/node.rb#1939 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2127 + # source://prism//lib/prism/node.rb#1944 def type; end end end @@ -2694,32 +2530,34 @@ end # break foo # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2147 +# source://prism//lib/prism/node.rb#1964 class Prism::BreakNode < ::Prism::Node - # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # Initialize a new BreakNode node. # # @return [BreakNode] a new instance of BreakNode # - # source://prism//lib/prism/node.rb#2149 + # source://prism//lib/prism/node.rb#1966 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, arguments, keyword_loc, location); end + def initialize(source, node_id, location, flags, arguments, keyword_loc); 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#2247 + # source://prism//lib/prism/node.rb#2048 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2157 + # source://prism//lib/prism/node.rb#1976 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2728,50 +2566,52 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^ # - # source://prism//lib/prism/node.rb#2195 + # source://prism//lib/prism/node.rb#2014 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2162 + # source://prism//lib/prism/node.rb#1981 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#2174 + # source://prism//lib/prism/node.rb#1993 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#2167 + # source://prism//lib/prism/node.rb#1986 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> BreakNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> BreakNode # - # source://prism//lib/prism/node.rb#2179 + # source://prism//lib/prism/node.rb#1998 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::BreakNode) end - def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2162 + # source://prism//lib/prism/node.rb#1981 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#2187 + # source://prism//lib/prism/node.rb#2006 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2780,13 +2620,13 @@ class Prism::BreakNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#2213 + # source://prism//lib/prism/node.rb#2032 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#2208 + # source://prism//lib/prism/node.rb#2027 sig { returns(String) } def keyword; end @@ -2795,38 +2635,20 @@ class Prism::BreakNode < ::Prism::Node # break foo # ^^^^^ # - # source://prism//lib/prism/node.rb#2201 + # source://prism//lib/prism/node.rb#2020 sig { returns(Prism::Location) } def keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2231 + # source://prism//lib/prism/node.rb#2037 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2241 + # source://prism//lib/prism/node.rb#2042 def type; end end end @@ -2836,16 +2658,18 @@ end # foo.bar &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2258 +# source://prism//lib/prism/node.rb#2059 class Prism::CallAndWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new CallAndWriteNode node. # # @return [CallAndWriteNode] a new instance of CallAndWriteNode # - # source://prism//lib/prism/node.rb#2260 + # source://prism//lib/prism/node.rb#2061 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -2853,21 +2677,20 @@ class Prism::CallAndWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, 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#2428 + # source://prism//lib/prism/node.rb#2208 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2274 + # source://prism//lib/prism/node.rb#2076 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -2875,45 +2698,47 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2369 + # source://prism//lib/prism/node.rb#2122 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2379 + # source://prism//lib/prism/node.rb#2177 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2317 + # source://prism//lib/prism/node.rb#2135 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2279 + # source://prism//lib/prism/node.rb#2081 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#2292 + # source://prism//lib/prism/node.rb#2094 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#2284 + # source://prism//lib/prism/node.rb#2086 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallAndWriteNode + # 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#2297 + # source://prism//lib/prism/node.rb#2099 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -2921,22 +2746,21 @@ class Prism::CallAndWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::CallAndWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2279 + # source://prism//lib/prism/node.rb#2081 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } + # 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#2305 + # source://prism//lib/prism/node.rb#2107 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -2947,49 +2771,49 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2374 + # source://prism//lib/prism/node.rb#2127 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2394 + # source://prism//lib/prism/node.rb#2192 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2384 + # source://prism//lib/prism/node.rb#2182 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2330 + # source://prism//lib/prism/node.rb#2148 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#2389 + # source://prism//lib/prism/node.rb#2187 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2349 + # source://prism//lib/prism/node.rb#2167 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2343 + # source://prism//lib/prism/node.rb#2161 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2314 + # source://prism//lib/prism/node.rb#2132 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -2997,32 +2821,19 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2359 + # source://prism//lib/prism/node.rb#2112 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2412 + # source://prism//lib/prism/node.rb#2197 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2356 + # source://prism//lib/prism/node.rb#2174 sig { returns(Prism::Node) } def value; end @@ -3030,33 +2841,20 @@ class Prism::CallAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2364 + # source://prism//lib/prism/node.rb#2117 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2346 + # source://prism//lib/prism/node.rb#2164 sig { returns(Symbol) } def write_name; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2310 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#2422 + # source://prism//lib/prism/node.rb#2202 def type; end end end @@ -3081,16 +2879,18 @@ end # foo&.bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#2460 +# source://prism//lib/prism/node.rb#2240 class Prism::CallNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Symbol name, Location? message_loc, Location? opening_loc, ArgumentsNode? arguments, Location? closing_loc, Prism::node? block, Location location) -> void + # Initialize a new CallNode node. # # @return [CallNode] a new instance of CallNode # - # source://prism//lib/prism/node.rb#2462 + # source://prism//lib/prism/node.rb#2242 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3099,27 +2899,26 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_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#2665 + # source://prism//lib/prism/node.rb#2424 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2477 + # source://prism//lib/prism/node.rb#2258 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#2572 + # source://prism//lib/prism/node.rb#2369 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -3127,63 +2926,65 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2601 + # source://prism//lib/prism/node.rb#2305 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism//lib/prism/node.rb#2588 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#2385 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2611 + # source://prism//lib/prism/node.rb#2388 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2530 + # source://prism//lib/prism/node.rb#2327 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2482 + # source://prism//lib/prism/node.rb#2263 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#2626 + # source://prism//lib/prism/node.rb#2403 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#2575 + # source://prism//lib/prism/node.rb#2372 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#2496 + # source://prism//lib/prism/node.rb#2277 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#2487 + # source://prism//lib/prism/node.rb#2268 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?name: Symbol, ?message_loc: Location?, ?opening_loc: Location?, ?arguments: ArgumentsNode?, ?closing_loc: Location?, ?block: Prism::node?, ?location: Location) -> 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?, ?block: BlockNode | BlockArgumentNode | nil) -> CallNode # - # source://prism//lib/prism/node.rb#2501 + # source://prism//lib/prism/node.rb#2282 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3192,22 +2993,21 @@ class Prism::CallNode < ::Prism::Node opening_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), closing_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::CallNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2482 + # source://prism//lib/prism/node.rb#2263 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, name: Symbol, message_loc: Location?, opening_loc: Location?, arguments: ArgumentsNode?, closing_loc: Location?, block: Prism::node?, location: Location } + # 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 } # - # source://prism//lib/prism/node.rb#2509 + # source://prism//lib/prism/node.rb#2290 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3224,7 +3024,7 @@ 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#315 + # source://prism//lib/prism/node_ext.rb#331 sig { returns(T.nilable(Prism::Location)) } def full_message_loc; end @@ -3232,43 +3032,43 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2606 + # source://prism//lib/prism/node.rb#2310 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2631 + # source://prism//lib/prism/node.rb#2408 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2616 + # source://prism//lib/prism/node.rb#2393 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2546 + # source://prism//lib/prism/node.rb#2343 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#2543 + # source://prism//lib/prism/node.rb#2340 sig { returns(Symbol) } def name; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#2621 + # source://prism//lib/prism/node.rb#2398 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#2559 + # source://prism//lib/prism/node.rb#2356 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end @@ -3283,7 +3083,7 @@ class Prism::CallNode < ::Prism::Node # foo + bar # ^^^ # - # source://prism//lib/prism/node.rb#2527 + # source://prism//lib/prism/node.rb#2324 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3291,26 +3091,13 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2591 + # source://prism//lib/prism/node.rb#2295 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2649 + # source://prism//lib/prism/node.rb#2413 sig { override.returns(Symbol) } def type; end @@ -3318,54 +3105,41 @@ class Prism::CallNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2596 + # source://prism//lib/prism/node.rb#2300 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2514 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2659 + # source://prism//lib/prism/node.rb#2418 def type; end end end # Flags for call nodes. # -# source://prism//lib/prism/node.rb#19142 +# source://prism//lib/prism/node.rb#16708 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#19150 +# source://prism//lib/prism/node.rb#16716 Prism::CallNodeFlags::ATTRIBUTE_WRITE = T.let(T.unsafe(nil), Integer) # a call that ignores method visibility # -# source://prism//lib/prism/node.rb#19153 +# source://prism//lib/prism/node.rb#16719 Prism::CallNodeFlags::IGNORE_VISIBILITY = T.let(T.unsafe(nil), Integer) # &. operator # -# source://prism//lib/prism/node.rb#19144 +# source://prism//lib/prism/node.rb#16710 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#19147 +# source://prism//lib/prism/node.rb#16713 Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # Represents the use of an assignment operator on a call. @@ -3373,16 +3147,18 @@ Prism::CallNodeFlags::VARIABLE_CALL = T.let(T.unsafe(nil), Integer) # foo.bar += baz # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2683 +# source://prism//lib/prism/node.rb#2442 class Prism::CallOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # Initialize a new CallOperatorWriteNode node. # # @return [CallOperatorWriteNode] a new instance of CallOperatorWriteNode # - # source://prism//lib/prism/node.rb#2685 + # source://prism//lib/prism/node.rb#2444 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3391,21 +3167,20 @@ class Prism::CallOperatorWriteNode < ::Prism::Node write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, 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#2852 + # source://prism//lib/prism/node.rb#2590 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2700 + # source://prism//lib/prism/node.rb#2460 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3413,57 +3188,59 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2798 + # source://prism//lib/prism/node.rb#2506 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#2775 + # source://prism//lib/prism/node.rb#2551 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#2778 + # source://prism//lib/prism/node.rb#2554 sig { returns(Prism::Location) } def binary_operator_loc; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2808 + # source://prism//lib/prism/node.rb#2564 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2743 + # source://prism//lib/prism/node.rb#2519 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2705 + # source://prism//lib/prism/node.rb#2465 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#2718 + # source://prism//lib/prism/node.rb#2478 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#2710 + # source://prism//lib/prism/node.rb#2470 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?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, ?location: Location) -> CallOperatorWriteNode + # 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#2723 + # source://prism//lib/prism/node.rb#2483 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3472,22 +3249,21 @@ class Prism::CallOperatorWriteNode < ::Prism::Node write_name: Symbol, binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::CallOperatorWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2705 + # source://prism//lib/prism/node.rb#2465 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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, location: Location } + # 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#2731 + # source://prism//lib/prism/node.rb#2491 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3498,49 +3274,49 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2803 + # source://prism//lib/prism/node.rb#2511 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#2818 + # source://prism//lib/prism/node.rb#2574 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2813 + # source://prism//lib/prism/node.rb#2569 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2756 + # source://prism//lib/prism/node.rb#2532 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#323 + # source://prism//lib/prism/node_ext.rb#339 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#330 + # source://prism//lib/prism/node_ext.rb#346 def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2769 + # source://prism//lib/prism/node.rb#2545 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2740 + # source://prism//lib/prism/node.rb#2516 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3548,32 +3324,19 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2788 + # source://prism//lib/prism/node.rb#2496 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2836 + # source://prism//lib/prism/node.rb#2579 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2785 + # source://prism//lib/prism/node.rb#2561 sig { returns(Prism::Node) } def value; end @@ -3581,33 +3344,20 @@ class Prism::CallOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2793 + # source://prism//lib/prism/node.rb#2501 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2772 + # source://prism//lib/prism/node.rb#2548 sig { returns(Symbol) } def write_name; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2736 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#2846 + # source://prism//lib/prism/node.rb#2584 def type; end end end @@ -3617,16 +3367,18 @@ end # foo.bar ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#2870 +# source://prism//lib/prism/node.rb#2608 class Prism::CallOrWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location? message_loc, Symbol read_name, Symbol write_name, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new CallOrWriteNode node. # # @return [CallOrWriteNode] a new instance of CallOrWriteNode # - # source://prism//lib/prism/node.rb#2872 + # source://prism//lib/prism/node.rb#2610 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3634,21 +3386,20 @@ class Prism::CallOrWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, 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#3040 + # source://prism//lib/prism/node.rb#2757 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#2886 + # source://prism//lib/prism/node.rb#2625 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3656,45 +3407,47 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2981 + # source://prism//lib/prism/node.rb#2671 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#2991 + # source://prism//lib/prism/node.rb#2726 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#2929 + # source://prism//lib/prism/node.rb#2684 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2891 + # source://prism//lib/prism/node.rb#2630 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#2904 + # source://prism//lib/prism/node.rb#2643 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#2896 + # source://prism//lib/prism/node.rb#2635 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?message_loc: Location?, ?read_name: Symbol, ?write_name: Symbol, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> CallOrWriteNode + # 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#2909 + # source://prism//lib/prism/node.rb#2648 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), @@ -3702,22 +3455,21 @@ class Prism::CallOrWriteNode < ::Prism::Node read_name: Symbol, write_name: Symbol, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::CallOrWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#2891 + # source://prism//lib/prism/node.rb#2630 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, message_loc: Location?, read_name: Symbol, write_name: Symbol, operator_loc: Location, value: Prism::node, location: Location } + # 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#2917 + # source://prism//lib/prism/node.rb#2656 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3728,49 +3480,49 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2986 + # source://prism//lib/prism/node.rb#2676 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3006 + # source://prism//lib/prism/node.rb#2741 sig { override.returns(String) } def inspect; end # def message: () -> String? # - # source://prism//lib/prism/node.rb#2996 + # source://prism//lib/prism/node.rb#2731 sig { returns(T.nilable(String)) } def message; end # attr_reader message_loc: Location? # - # source://prism//lib/prism/node.rb#2942 + # source://prism//lib/prism/node.rb#2697 sig { returns(T.nilable(Prism::Location)) } def message_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3001 + # source://prism//lib/prism/node.rb#2736 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#2961 + # source://prism//lib/prism/node.rb#2716 sig { returns(Prism::Location) } def operator_loc; end # attr_reader read_name: Symbol # - # source://prism//lib/prism/node.rb#2955 + # source://prism//lib/prism/node.rb#2710 sig { returns(Symbol) } def read_name; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#2926 + # source://prism//lib/prism/node.rb#2681 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -3778,32 +3530,19 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2971 + # source://prism//lib/prism/node.rb#2661 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3024 + # source://prism//lib/prism/node.rb#2746 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#2968 + # source://prism//lib/prism/node.rb#2723 sig { returns(Prism::Node) } def value; end @@ -3811,33 +3550,20 @@ class Prism::CallOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#2976 + # source://prism//lib/prism/node.rb#2666 sig { returns(T::Boolean) } def variable_call?; end # attr_reader write_name: Symbol # - # source://prism//lib/prism/node.rb#2958 + # source://prism//lib/prism/node.rb#2713 sig { returns(Symbol) } def write_name; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#2922 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3034 + # source://prism//lib/prism/node.rb#2751 def type; end end end @@ -3855,35 +3581,36 @@ end # for foo.bar in baz do end # ^^^^^^^ # -# source://prism//lib/prism/node.rb#3065 +# source://prism//lib/prism/node.rb#2782 class Prism::CallTargetNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node receiver, Location call_operator_loc, Symbol name, Location message_loc, Location location) -> void + # Initialize a new CallTargetNode node. # # @return [CallTargetNode] a new instance of CallTargetNode # - # source://prism//lib/prism/node.rb#3067 + # source://prism//lib/prism/node.rb#2784 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, - message_loc: Prism::Location, - location: Prism::Location + message_loc: Prism::Location ).void end - def initialize(source, flags, receiver, call_operator_loc, name, message_loc, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, name, message_loc); 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#3199 + # source://prism//lib/prism/node.rb#2895 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3078 + # source://prism//lib/prism/node.rb#2796 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -3891,65 +3618,66 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3145 + # source://prism//lib/prism/node.rb#2839 sig { returns(T::Boolean) } def attribute_write?; end # def call_operator: () -> String # - # source://prism//lib/prism/node.rb#3155 + # source://prism//lib/prism/node.rb#2869 sig { returns(String) } def call_operator; end # attr_reader call_operator_loc: Location # - # source://prism//lib/prism/node.rb#3118 + # source://prism//lib/prism/node.rb#2852 sig { returns(Prism::Location) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3083 + # source://prism//lib/prism/node.rb#2801 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#3093 + # source://prism//lib/prism/node.rb#2811 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#3088 + # source://prism//lib/prism/node.rb#2806 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node, ?call_operator_loc: Location, ?name: Symbol, ?message_loc: Location, ?location: Location) -> CallTargetNode + # 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#3098 + # source://prism//lib/prism/node.rb#2816 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, call_operator_loc: Prism::Location, name: Symbol, - message_loc: Prism::Location, - location: Prism::Location + message_loc: Prism::Location ).returns(Prism::CallTargetNode) end - def copy(flags: T.unsafe(nil), receiver: T.unsafe(nil), call_operator_loc: T.unsafe(nil), name: T.unsafe(nil), message_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3083 + # source://prism//lib/prism/node.rb#2801 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, call_operator_loc: Location, name: Symbol, message_loc: Location, location: Location } + # 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#3106 + # source://prism//lib/prism/node.rb#2824 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -3960,37 +3688,37 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3150 + # source://prism//lib/prism/node.rb#2844 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3165 + # source://prism//lib/prism/node.rb#2879 sig { override.returns(String) } def inspect; end # def message: () -> String # - # source://prism//lib/prism/node.rb#3160 + # source://prism//lib/prism/node.rb#2874 sig { returns(String) } def message; end # attr_reader message_loc: Location # - # source://prism//lib/prism/node.rb#3128 + # source://prism//lib/prism/node.rb#2862 sig { returns(Prism::Location) } def message_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3125 + # source://prism//lib/prism/node.rb#2859 sig { returns(Symbol) } def name; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#3115 + # source://prism//lib/prism/node.rb#2849 sig { returns(Prism::Node) } def receiver; end @@ -3998,26 +3726,13 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3135 + # source://prism//lib/prism/node.rb#2829 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3183 + # source://prism//lib/prism/node.rb#2884 sig { override.returns(Symbol) } def type; end @@ -4025,27 +3740,14 @@ class Prism::CallTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#3140 + # source://prism//lib/prism/node.rb#2834 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#3111 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3193 + # source://prism//lib/prism/node.rb#2889 def type; end end end @@ -4055,77 +3757,81 @@ end # foo => [bar => baz] # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3213 +# source://prism//lib/prism/node.rb#2909 class Prism::CapturePatternNode < ::Prism::Node - # def initialize: (Prism::node value, Prism::node target, Location operator_loc, Location location) -> void + # Initialize a new CapturePatternNode node. # # @return [CapturePatternNode] a new instance of CapturePatternNode # - # source://prism//lib/prism/node.rb#3215 + # source://prism//lib/prism/node.rb#2911 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location ).void end - def initialize(source, value, target, operator_loc, location); end + def initialize(source, node_id, location, flags, value, target, operator_loc); 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#3309 + # source://prism//lib/prism/node.rb#2989 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3224 + # source://prism//lib/prism/node.rb#2922 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3229 + # source://prism//lib/prism/node.rb#2927 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#3239 + # source://prism//lib/prism/node.rb#2937 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#3234 + # source://prism//lib/prism/node.rb#2932 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Prism::node, ?target: Prism::node, ?operator_loc: Location, ?location: Location) -> CapturePatternNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Prism::node, ?target: LocalVariableTargetNode, ?operator_loc: Location) -> CapturePatternNode # - # source://prism//lib/prism/node.rb#3244 + # source://prism//lib/prism/node.rb#2942 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, - target: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + target: Prism::LocalVariableTargetNode, + operator_loc: Prism::Location ).returns(Prism::CapturePatternNode) end - def copy(value: T.unsafe(nil), target: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3229 + # source://prism//lib/prism/node.rb#2927 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, target: Prism::node, operator_loc: Location, location: Location } + # 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#3252 + # source://prism//lib/prism/node.rb#2950 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -4134,62 +3840,44 @@ class Prism::CapturePatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3275 + # source://prism//lib/prism/node.rb#2973 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3270 + # source://prism//lib/prism/node.rb#2968 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3263 + # source://prism//lib/prism/node.rb#2961 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader target: Prism::node + # attr_reader target: LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#3260 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#2958 + sig { returns(Prism::LocalVariableTargetNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3293 + # source://prism//lib/prism/node.rb#2978 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3257 + # source://prism//lib/prism/node.rb#2955 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3303 + # source://prism//lib/prism/node.rb#2983 def type; end end end @@ -4201,117 +3889,127 @@ end # end # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3323 +# source://prism//lib/prism/node.rb#3003 class Prism::CaseMatchNode < ::Prism::Node - # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # Initialize a new CaseMatchNode node. # # @return [CaseMatchNode] a new instance of CaseMatchNode # - # source://prism//lib/prism/node.rb#3325 + # source://prism//lib/prism/node.rb#3005 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); 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#3440 + # source://prism//lib/prism/node.rb#3104 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3336 + # source://prism//lib/prism/node.rb#3018 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3396 + # source://prism//lib/prism/node.rb#3078 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3382 + # source://prism//lib/prism/node.rb#3064 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3341 + # source://prism//lib/prism/node.rb#3023 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#3355 + # source://prism//lib/prism/node.rb#3037 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#3346 + # source://prism//lib/prism/node.rb#3028 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Prism::node] + # attr_reader conditions: Array[InNode] # - # source://prism//lib/prism/node.rb#3376 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#3058 + sig { returns(T::Array[Prism::InNode]) } def conditions; end - # attr_reader consequent: ElseNode? + # Returns the else clause of the case match node. This method is deprecated + # in favor of #else_clause. # - # source://prism//lib/prism/node.rb#3379 - sig { returns(T.nilable(Prism::ElseNode)) } + # source://prism//lib/prism/node_ext.rb#467 def consequent; end - # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseMatchNode + # 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#3360 + # source://prism//lib/prism/node.rb#3042 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::CaseMatchNode) end - def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3341 + # source://prism//lib/prism/node.rb#3023 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # 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#3368 + # source://prism//lib/prism/node.rb#3050 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3061 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3401 + # source://prism//lib/prism/node.rb#3083 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3389 + # source://prism//lib/prism/node.rb#3071 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4320,44 +4018,26 @@ class Prism::CaseMatchNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3406 + # source://prism//lib/prism/node.rb#3088 sig { override.returns(String) } def inspect; end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3373 + # source://prism//lib/prism/node.rb#3055 sig { returns(T.nilable(Prism::Node)) } def predicate; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3424 + # source://prism//lib/prism/node.rb#3093 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3434 + # source://prism//lib/prism/node.rb#3098 def type; end end end @@ -4369,117 +4049,127 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3457 +# source://prism//lib/prism/node.rb#3121 class Prism::CaseNode < ::Prism::Node - # def initialize: (Prism::node? predicate, Array[Prism::node] conditions, ElseNode? consequent, Location case_keyword_loc, Location end_keyword_loc, Location location) -> void + # Initialize a new CaseNode node. # # @return [CaseNode] a new instance of CaseNode # - # source://prism//lib/prism/node.rb#3459 + # source://prism//lib/prism/node.rb#3123 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, predicate, conditions, else_clause, case_keyword_loc, end_keyword_loc); 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#3574 + # source://prism//lib/prism/node.rb#3222 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3470 + # source://prism//lib/prism/node.rb#3136 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def case_keyword: () -> String # - # source://prism//lib/prism/node.rb#3530 + # source://prism//lib/prism/node.rb#3196 sig { returns(String) } def case_keyword; end # attr_reader case_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3516 + # source://prism//lib/prism/node.rb#3182 sig { returns(Prism::Location) } def case_keyword_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3475 + # source://prism//lib/prism/node.rb#3141 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#3489 + # source://prism//lib/prism/node.rb#3155 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#3480 + # source://prism//lib/prism/node.rb#3146 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader conditions: Array[Prism::node] + # attr_reader conditions: Array[WhenNode] # - # source://prism//lib/prism/node.rb#3510 - sig { returns(T::Array[Prism::Node]) } + # source://prism//lib/prism/node.rb#3176 + sig { returns(T::Array[Prism::WhenNode]) } def conditions; end - # attr_reader consequent: ElseNode? + # Returns the else clause of the case node. This method is deprecated in + # favor of #else_clause. # - # source://prism//lib/prism/node.rb#3513 - sig { returns(T.nilable(Prism::ElseNode)) } + # source://prism//lib/prism/node_ext.rb#476 def consequent; end - # def copy: (?predicate: Prism::node?, ?conditions: Array[Prism::node], ?consequent: ElseNode?, ?case_keyword_loc: Location, ?end_keyword_loc: Location, ?location: Location) -> CaseNode + # 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#3494 + # source://prism//lib/prism/node.rb#3160 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, predicate: T.nilable(Prism::Node), - conditions: T::Array[Prism::Node], - consequent: T.nilable(Prism::ElseNode), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), case_keyword_loc: Prism::Location, - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::CaseNode) end - def copy(predicate: T.unsafe(nil), conditions: T.unsafe(nil), consequent: T.unsafe(nil), case_keyword_loc: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3475 + # source://prism//lib/prism/node.rb#3141 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { predicate: Prism::node?, conditions: Array[Prism::node], consequent: ElseNode?, case_keyword_loc: Location, end_keyword_loc: Location, location: Location } + # 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#3502 + # source://prism//lib/prism/node.rb#3168 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # attr_reader else_clause: ElseNode? + # + # source://prism//lib/prism/node.rb#3179 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3535 + # source://prism//lib/prism/node.rb#3201 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3523 + # source://prism//lib/prism/node.rb#3189 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4488,44 +4178,26 @@ class Prism::CaseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3540 + # source://prism//lib/prism/node.rb#3206 sig { override.returns(String) } def inspect; end # attr_reader predicate: Prism::node? # - # source://prism//lib/prism/node.rb#3507 + # source://prism//lib/prism/node.rb#3173 sig { returns(T.nilable(Prism::Node)) } def predicate; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#3558 + # source://prism//lib/prism/node.rb#3211 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3568 + # source://prism//lib/prism/node.rb#3216 def type; end end end @@ -4535,123 +4207,127 @@ end # class Foo end # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3589 +# source://prism//lib/prism/node.rb#3237 class Prism::ClassNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Prism::node constant_path, Location? inheritance_operator_loc, Prism::node? superclass, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # Initialize a new ClassNode node. # # @return [ClassNode] a new instance of ClassNode # - # source://prism//lib/prism/node.rb#3591 + # source://prism//lib/prism/node.rb#3239 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, - constant_path: Prism::Node, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), inheritance_operator_loc: T.nilable(Prism::Location), superclass: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).void end - def initialize(source, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, location); end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, 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#3733 + # source://prism//lib/prism/node.rb#3365 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3605 + # source://prism//lib/prism/node.rb#3255 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#3671 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#3321 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3610 + # source://prism//lib/prism/node.rb#3260 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#3684 + # source://prism//lib/prism/node.rb#3334 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3645 + # source://prism//lib/prism/node.rb#3295 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#3624 + # source://prism//lib/prism/node.rb#3274 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#3615 + # source://prism//lib/prism/node.rb#3265 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Prism::node + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | CallNode # - # source://prism//lib/prism/node.rb#3652 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#3302 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode)) } def constant_path; end - # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?constant_path: Prism::node, ?inheritance_operator_loc: Location?, ?superclass: Prism::node?, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ClassNode + # 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#3629 + # source://prism//lib/prism/node.rb#3279 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, - constant_path: Prism::Node, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), inheritance_operator_loc: T.nilable(Prism::Location), superclass: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).returns(Prism::ClassNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3610 + # source://prism//lib/prism/node.rb#3260 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, constant_path: Prism::node, inheritance_operator_loc: Location?, superclass: Prism::node?, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # 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#3637 + # source://prism//lib/prism/node.rb#3287 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#3694 + # source://prism//lib/prism/node.rb#3344 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#3674 + # source://prism//lib/prism/node.rb#3324 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -4660,68 +4336,50 @@ class Prism::ClassNode < ::Prism::Node # def inheritance_operator: () -> String? # - # source://prism//lib/prism/node.rb#3689 + # source://prism//lib/prism/node.rb#3339 sig { returns(T.nilable(String)) } def inheritance_operator; end # attr_reader inheritance_operator_loc: Location? # - # source://prism//lib/prism/node.rb#3655 + # source://prism//lib/prism/node.rb#3305 sig { returns(T.nilable(Prism::Location)) } def inheritance_operator_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#3699 + # source://prism//lib/prism/node.rb#3349 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#3642 + # source://prism//lib/prism/node.rb#3292 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3681 + # source://prism//lib/prism/node.rb#3331 sig { returns(Symbol) } def name; end # attr_reader superclass: Prism::node? # - # source://prism//lib/prism/node.rb#3668 + # source://prism//lib/prism/node.rb#3318 sig { returns(T.nilable(Prism::Node)) } def superclass; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3717 + # source://prism//lib/prism/node.rb#3354 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3727 + # source://prism//lib/prism/node.rb#3359 def type; end end end @@ -4731,83 +4389,87 @@ end # @@target &&= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3751 +# source://prism//lib/prism/node.rb#3383 class Prism::ClassVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ClassVariableAndWriteNode node. # # @return [ClassVariableAndWriteNode] a new instance of ClassVariableAndWriteNode # - # source://prism//lib/prism/node.rb#3753 + # source://prism//lib/prism/node.rb#3385 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#3855 + # source://prism//lib/prism/node.rb#3471 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3763 + # source://prism//lib/prism/node.rb#3397 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3768 + # source://prism//lib/prism/node.rb#3402 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#3778 + # source://prism//lib/prism/node.rb#3412 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#3773 + # source://prism//lib/prism/node.rb#3407 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableAndWriteNode + # 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#3783 + # source://prism//lib/prism/node.rb#3417 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ClassVariableAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3768 + # source://prism//lib/prism/node.rb#3402 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#3791 + # source://prism//lib/prism/node.rb#3425 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#127 + # source://prism//lib/prism/desugar_compiler.rb#164 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4815,68 +4477,50 @@ class Prism::ClassVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3821 + # source://prism//lib/prism/node.rb#3455 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3796 + # source://prism//lib/prism/node.rb#3430 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3799 + # source://prism//lib/prism/node.rb#3433 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#3816 + # source://prism//lib/prism/node.rb#3450 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#3806 + # source://prism//lib/prism/node.rb#3440 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3839 + # source://prism//lib/prism/node.rb#3460 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3813 + # source://prism//lib/prism/node.rb#3447 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3849 + # source://prism//lib/prism/node.rb#3465 def type; end end end @@ -4886,97 +4530,101 @@ end # @@target += value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3868 +# source://prism//lib/prism/node.rb#3484 class Prism::ClassVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new ClassVariableOperatorWriteNode node. # # @return [ClassVariableOperatorWriteNode] a new instance of ClassVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#3870 + # source://prism//lib/prism/node.rb#3486 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#3971 + # source://prism//lib/prism/node.rb#3571 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3881 + # source://prism//lib/prism/node.rb#3499 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#3934 + # source://prism//lib/prism/node.rb#3552 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#3924 + # source://prism//lib/prism/node.rb#3542 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3886 + # source://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#3896 + # source://prism//lib/prism/node.rb#3514 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#3891 + # source://prism//lib/prism/node.rb#3509 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ClassVariableOperatorWriteNode + # 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#3901 + # source://prism//lib/prism/node.rb#3519 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ClassVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#3886 + # source://prism//lib/prism/node.rb#3504 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # 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#3909 + # source://prism//lib/prism/node.rb#3527 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#139 + # source://prism//lib/prism/desugar_compiler.rb#176 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -4984,68 +4632,50 @@ class Prism::ClassVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#3937 + # source://prism//lib/prism/node.rb#3555 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#3914 + # source://prism//lib/prism/node.rb#3532 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#3917 + # source://prism//lib/prism/node.rb#3535 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#339 + # source://prism//lib/prism/node_ext.rb#355 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 + # source://prism//lib/prism/node_ext.rb#362 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#3955 + # source://prism//lib/prism/node.rb#3560 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#3931 + # source://prism//lib/prism/node.rb#3549 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#3965 + # source://prism//lib/prism/node.rb#3565 def type; end end end @@ -5055,83 +4685,87 @@ end # @@target ||= value # ^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#3985 +# source://prism//lib/prism/node.rb#3585 class Prism::ClassVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ClassVariableOrWriteNode node. # # @return [ClassVariableOrWriteNode] a new instance of ClassVariableOrWriteNode # - # source://prism//lib/prism/node.rb#3987 + # source://prism//lib/prism/node.rb#3587 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#4089 + # source://prism//lib/prism/node.rb#3673 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#3997 + # source://prism//lib/prism/node.rb#3599 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4002 + # source://prism//lib/prism/node.rb#3604 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#4012 + # source://prism//lib/prism/node.rb#3614 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#4007 + # source://prism//lib/prism/node.rb#3609 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ClassVariableOrWriteNode + # 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#4017 + # source://prism//lib/prism/node.rb#3619 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ClassVariableOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4002 + # source://prism//lib/prism/node.rb#3604 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#4025 + # source://prism//lib/prism/node.rb#3627 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#133 + # source://prism//lib/prism/desugar_compiler.rb#170 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -5139,68 +4773,50 @@ class Prism::ClassVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4055 + # source://prism//lib/prism/node.rb#3657 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4030 + # source://prism//lib/prism/node.rb#3632 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4033 + # source://prism//lib/prism/node.rb#3635 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4050 + # source://prism//lib/prism/node.rb#3652 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4040 + # source://prism//lib/prism/node.rb#3642 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4073 + # source://prism//lib/prism/node.rb#3662 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4047 + # source://prism//lib/prism/node.rb#3649 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4083 + # source://prism//lib/prism/node.rb#3667 def type; end end end @@ -5210,62 +4826,69 @@ end # @@foo # ^^^^^ # -# source://prism//lib/prism/node.rb#4102 +# source://prism//lib/prism/node.rb#3686 class Prism::ClassVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ClassVariableReadNode node. # # @return [ClassVariableReadNode] a new instance of ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4104 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#3688 + 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#4185 + # source://prism//lib/prism/node.rb#3753 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4111 + # source://prism//lib/prism/node.rb#3697 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4116 + # source://prism//lib/prism/node.rb#3702 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#4126 + # source://prism//lib/prism/node.rb#3712 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#4121 + # source://prism//lib/prism/node.rb#3707 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> ClassVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableReadNode # - # source://prism//lib/prism/node.rb#4131 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3717 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4116 + # source://prism//lib/prism/node.rb#3702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4139 + # source://prism//lib/prism/node.rb#3725 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5274,7 +4897,7 @@ class Prism::ClassVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4151 + # source://prism//lib/prism/node.rb#3737 sig { override.returns(String) } def inspect; end @@ -5284,38 +4907,20 @@ class Prism::ClassVariableReadNode < ::Prism::Node # # @@_test # name `:@@_test` # - # source://prism//lib/prism/node.rb#4148 + # source://prism//lib/prism/node.rb#3734 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4169 + # source://prism//lib/prism/node.rb#3742 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4179 + # source://prism//lib/prism/node.rb#3747 def type; end end end @@ -5325,62 +4930,69 @@ end # @@foo, @@bar = baz # ^^^^^ ^^^^^ # -# source://prism//lib/prism/node.rb#4195 +# source://prism//lib/prism/node.rb#3763 class Prism::ClassVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ClassVariableTargetNode node. # # @return [ClassVariableTargetNode] a new instance of ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4197 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#3765 + 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#4274 + # source://prism//lib/prism/node.rb#3826 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4204 + # source://prism//lib/prism/node.rb#3774 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4209 + # source://prism//lib/prism/node.rb#3779 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#4219 + # source://prism//lib/prism/node.rb#3789 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#4214 + # source://prism//lib/prism/node.rb#3784 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> ClassVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ClassVariableTargetNode # - # source://prism//lib/prism/node.rb#4224 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ClassVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#3794 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4209 + # source://prism//lib/prism/node.rb#3779 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#4232 + # source://prism//lib/prism/node.rb#3802 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5389,44 +5001,26 @@ class Prism::ClassVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4240 + # source://prism//lib/prism/node.rb#3810 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4237 + # source://prism//lib/prism/node.rb#3807 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4258 + # source://prism//lib/prism/node.rb#3815 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4268 + # source://prism//lib/prism/node.rb#3820 def type; end end end @@ -5436,79 +5030,83 @@ end # @@foo = 1 # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4284 +# source://prism//lib/prism/node.rb#3836 class Prism::ClassVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new ClassVariableWriteNode node. # # @return [ClassVariableWriteNode] a new instance of ClassVariableWriteNode # - # source://prism//lib/prism/node.rb#4286 + # source://prism//lib/prism/node.rb#3838 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#4404 + # source://prism//lib/prism/node.rb#3940 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4296 + # source://prism//lib/prism/node.rb#3850 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4301 + # source://prism//lib/prism/node.rb#3855 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#4311 + # source://prism//lib/prism/node.rb#3865 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#4306 + # source://prism//lib/prism/node.rb#3860 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ClassVariableWriteNode + # 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#4316 + # source://prism//lib/prism/node.rb#3870 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::ClassVariableWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4301 + # source://prism//lib/prism/node.rb#3855 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # 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#4324 + # source://prism//lib/prism/node.rb#3878 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -5517,7 +5115,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4370 + # source://prism//lib/prism/node.rb#3924 sig { override.returns(String) } def inspect; end @@ -5527,7 +5125,7 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # # @@_test = :test # name `@@_test` # - # source://prism//lib/prism/node.rb#4333 + # source://prism//lib/prism/node.rb#3887 sig { returns(Symbol) } def name; end @@ -5536,13 +5134,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^^^^^ # - # source://prism//lib/prism/node.rb#4339 + # source://prism//lib/prism/node.rb#3893 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4365 + # source://prism//lib/prism/node.rb#3919 sig { returns(String) } def operator; end @@ -5551,26 +5149,13 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@foo = :bar # ^ # - # source://prism//lib/prism/node.rb#4358 + # source://prism//lib/prism/node.rb#3912 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4388 + # source://prism//lib/prism/node.rb#3929 sig { override.returns(Symbol) } def type; end @@ -5582,27 +5167,75 @@ class Prism::ClassVariableWriteNode < ::Prism::Node # @@_xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#4352 + # source://prism//lib/prism/node.rb#3906 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4398 + # source://prism//lib/prism/node.rb#3934 def type; end end end +# A cache that can be used to quickly compute code unit offsets from byte +# offsets. It purposefully provides only a single #[] method to access the +# cache in order to minimize surface area. +# +# Note that there are some known issues here that may or may not be addressed +# in the future: +# +# * The first is that there are issues when the cache computes values that are +# not on character boundaries. This can result in subsequent computations +# being off by one or more code units. +# * The second is that this cache is currently unbounded. In theory we could +# 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#172 +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#198 + 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#212 + sig { params(byte_offset: Integer).returns(Integer) } + def [](byte_offset); end +end + +# source://prism//lib/prism/parse_result.rb#184 +class Prism::CodeUnitsCache::LengthCounter + # @return [LengthCounter] a new instance of LengthCounter + # + # source://prism//lib/prism/parse_result.rb#185 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#190 + def count(byte_offset, byte_length); end +end + +# source://prism//lib/prism/parse_result.rb#173 +class Prism::CodeUnitsCache::UTF16Counter + # @return [UTF16Counter] a new instance of UTF16Counter + # + # source://prism//lib/prism/parse_result.rb#174 + def initialize(source, encoding); end + + # source://prism//lib/prism/parse_result.rb#179 + 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#366 +# source://prism//lib/prism/parse_result.rb#507 class Prism::Comment abstract! @@ -5610,25 +5243,25 @@ class Prism::Comment # # @return [Comment] a new instance of Comment # - # source://prism//lib/prism/parse_result.rb#371 + # source://prism//lib/prism/parse_result.rb#512 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#376 + # source://prism//lib/prism/parse_result.rb#517 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#368 + # source://prism//lib/prism/parse_result.rb#509 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#381 + # source://prism//lib/prism/parse_result.rb#522 sig { returns(String) } def slice; end @@ -6585,83 +6218,87 @@ end # Target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4417 +# source://prism//lib/prism/node.rb#3953 class Prism::ConstantAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantAndWriteNode node. # # @return [ConstantAndWriteNode] a new instance of ConstantAndWriteNode # - # source://prism//lib/prism/node.rb#4419 + # source://prism//lib/prism/node.rb#3955 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#4521 + # source://prism//lib/prism/node.rb#4041 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4429 + # source://prism//lib/prism/node.rb#3967 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4434 + # source://prism//lib/prism/node.rb#3972 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#4444 + # source://prism//lib/prism/node.rb#3982 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#4439 + # source://prism//lib/prism/node.rb#3977 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantAndWriteNode + # 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#4449 + # source://prism//lib/prism/node.rb#3987 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4434 + # source://prism//lib/prism/node.rb#3972 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#4457 + # source://prism//lib/prism/node.rb#3995 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#145 + # source://prism//lib/prism/desugar_compiler.rb#182 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6669,68 +6306,50 @@ class Prism::ConstantAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4487 + # source://prism//lib/prism/node.rb#4025 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4462 + # source://prism//lib/prism/node.rb#4000 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4465 + # source://prism//lib/prism/node.rb#4003 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4482 + # source://prism//lib/prism/node.rb#4020 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4472 + # source://prism//lib/prism/node.rb#4010 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4505 + # source://prism//lib/prism/node.rb#4030 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4479 + # source://prism//lib/prism/node.rb#4017 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4515 + # source://prism//lib/prism/node.rb#4035 def type; end end end @@ -6740,97 +6359,101 @@ end # Target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4534 +# source://prism//lib/prism/node.rb#4054 class Prism::ConstantOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new ConstantOperatorWriteNode node. # # @return [ConstantOperatorWriteNode] a new instance of ConstantOperatorWriteNode # - # source://prism//lib/prism/node.rb#4536 + # source://prism//lib/prism/node.rb#4056 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#4637 + # source://prism//lib/prism/node.rb#4141 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4547 + # source://prism//lib/prism/node.rb#4069 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#4600 + # source://prism//lib/prism/node.rb#4122 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#4590 + # source://prism//lib/prism/node.rb#4112 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4552 + # source://prism//lib/prism/node.rb#4074 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#4562 + # source://prism//lib/prism/node.rb#4084 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#4557 + # source://prism//lib/prism/node.rb#4079 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantOperatorWriteNode + # 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#4567 + # source://prism//lib/prism/node.rb#4089 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ConstantOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4552 + # source://prism//lib/prism/node.rb#4074 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # 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#4575 + # source://prism//lib/prism/node.rb#4097 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#157 + # source://prism//lib/prism/desugar_compiler.rb#194 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6838,68 +6461,50 @@ class Prism::ConstantOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4603 + # source://prism//lib/prism/node.rb#4125 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4580 + # source://prism//lib/prism/node.rb#4102 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4583 + # source://prism//lib/prism/node.rb#4105 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 + # source://prism//lib/prism/node_ext.rb#371 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 + # source://prism//lib/prism/node_ext.rb#378 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4621 + # source://prism//lib/prism/node.rb#4130 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4597 + # source://prism//lib/prism/node.rb#4119 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4631 + # source://prism//lib/prism/node.rb#4135 def type; end end end @@ -6909,83 +6514,87 @@ end # Target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4651 +# source://prism//lib/prism/node.rb#4155 class Prism::ConstantOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantOrWriteNode node. # # @return [ConstantOrWriteNode] a new instance of ConstantOrWriteNode # - # source://prism//lib/prism/node.rb#4653 + # source://prism//lib/prism/node.rb#4157 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#4755 + # source://prism//lib/prism/node.rb#4243 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4663 + # source://prism//lib/prism/node.rb#4169 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4668 + # source://prism//lib/prism/node.rb#4174 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#4678 + # source://prism//lib/prism/node.rb#4184 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#4673 + # source://prism//lib/prism/node.rb#4179 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantOrWriteNode + # 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#4683 + # source://prism//lib/prism/node.rb#4189 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4668 + # source://prism//lib/prism/node.rb#4174 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#4691 + # source://prism//lib/prism/node.rb#4197 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#151 + # source://prism//lib/prism/desugar_compiler.rb#188 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -6993,68 +6602,50 @@ class Prism::ConstantOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4721 + # source://prism//lib/prism/node.rb#4227 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#4696 + # source://prism//lib/prism/node.rb#4202 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#4699 + # source://prism//lib/prism/node.rb#4205 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4716 + # source://prism//lib/prism/node.rb#4222 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4706 + # source://prism//lib/prism/node.rb#4212 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4739 + # source://prism//lib/prism/node.rb#4232 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4713 + # source://prism//lib/prism/node.rb#4219 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4749 + # source://prism//lib/prism/node.rb#4237 def type; end end end @@ -7064,77 +6655,81 @@ end # Parent::Child &&= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#4768 +# source://prism//lib/prism/node.rb#4256 class Prism::ConstantPathAndWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantPathAndWriteNode node. # # @return [ConstantPathAndWriteNode] a new instance of ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4770 + # source://prism//lib/prism/node.rb#4258 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, 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#4864 + # source://prism//lib/prism/node.rb#4336 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4779 + # source://prism//lib/prism/node.rb#4269 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4784 + # source://prism//lib/prism/node.rb#4274 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#4794 + # source://prism//lib/prism/node.rb#4284 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#4789 + # source://prism//lib/prism/node.rb#4279 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathAndWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathAndWriteNode # - # source://prism//lib/prism/node.rb#4799 + # source://prism//lib/prism/node.rb#4289 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantPathAndWriteNode) end - def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4784 + # source://prism//lib/prism/node.rb#4274 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # 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#4807 + # source://prism//lib/prism/node.rb#4297 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7143,62 +6738,44 @@ class Prism::ConstantPathAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#4830 + # source://prism//lib/prism/node.rb#4320 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#4825 + # source://prism//lib/prism/node.rb#4315 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#4815 + # source://prism//lib/prism/node.rb#4305 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#4812 + # source://prism//lib/prism/node.rb#4302 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#4848 + # source://prism//lib/prism/node.rb#4325 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#4822 + # source://prism//lib/prism/node.rb#4312 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4858 + # source://prism//lib/prism/node.rb#4330 def type; end end end @@ -7208,34 +6785,36 @@ end # Foo::Bar # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#4876 +# source://prism//lib/prism/node.rb#4348 class Prism::ConstantPathNode < ::Prism::Node - # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # Initialize a new ConstantPathNode node. # # @return [ConstantPathNode] a new instance of ConstantPathNode # - # source://prism//lib/prism/node.rb#4878 + # source://prism//lib/prism/node.rb#4350 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, parent, name, delimiter_loc, name_loc, location); end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); 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#5003 + # source://prism//lib/prism/node.rb#4459 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#4888 + # source://prism//lib/prism/node.rb#4362 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7243,57 +6822,59 @@ 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#196 + # source://prism//lib/prism/node_ext.rb#202 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4893 + # source://prism//lib/prism/node.rb#4367 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#4905 + # source://prism//lib/prism/node.rb#4379 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#4898 + # source://prism//lib/prism/node.rb#4372 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathNode + # 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#4910 + # source://prism//lib/prism/node.rb#4384 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::ConstantPathNode) end - def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#4893 + # source://prism//lib/prism/node.rb#4367 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # 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#4918 + # source://prism//lib/prism/node.rb#4392 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#4964 + # source://prism//lib/prism/node.rb#4438 sig { returns(String) } def delimiter; end @@ -7305,7 +6886,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^ # - # source://prism//lib/prism/node.rb#4944 + # source://prism//lib/prism/node.rb#4418 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7314,26 +6895,26 @@ class Prism::ConstantPathNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#189 + # source://prism//lib/prism/node_ext.rb#195 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#167 + # source://prism//lib/prism/node_ext.rb#173 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#4969 + # source://prism//lib/prism/node.rb#4443 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#4935 + # source://prism//lib/prism/node.rb#4409 sig { returns(T.nilable(Symbol)) } def name; end @@ -7345,7 +6926,7 @@ class Prism::ConstantPathNode < ::Prism::Node # One::Two # ^^^ # - # source://prism//lib/prism/node.rb#4957 + # source://prism//lib/prism/node.rb#4431 sig { returns(Prism::Location) } def name_loc; end @@ -7360,38 +6941,20 @@ class Prism::ConstantPathNode < ::Prism::Node # a.b::C # ^^^ # - # source://prism//lib/prism/node.rb#4932 + # source://prism//lib/prism/node.rb#4406 sig { returns(T.nilable(Prism::Node)) } def parent; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#4987 + # source://prism//lib/prism/node.rb#4448 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#4997 + # source://prism//lib/prism/node.rb#4453 def type; end end end @@ -7403,14 +6966,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#158 +# source://prism//lib/prism/node_ext.rb#164 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#163 +# source://prism//lib/prism/node_ext.rb#169 class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError; end # Represents assigning to a constant path using an operator that isn't `=`. @@ -7418,91 +6981,95 @@ class Prism::ConstantPathNode::MissingNodesInConstantPathError < ::StandardError # Parent::Child += value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5016 +# source://prism//lib/prism/node.rb#4472 class Prism::ConstantPathOperatorWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new ConstantPathOperatorWriteNode node. # # @return [ConstantPathOperatorWriteNode] a new instance of ConstantPathOperatorWriteNode # - # source://prism//lib/prism/node.rb#5018 + # source://prism//lib/prism/node.rb#4474 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, target, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, target, binary_operator_loc, value, binary_operator); 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#5111 + # source://prism//lib/prism/node.rb#4551 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5028 + # source://prism//lib/prism/node.rb#4486 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#5074 + # source://prism//lib/prism/node.rb#4532 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#5064 + # source://prism//lib/prism/node.rb#4522 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5033 + # source://prism//lib/prism/node.rb#4491 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#5043 + # source://prism//lib/prism/node.rb#4501 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#5038 + # source://prism//lib/prism/node.rb#4496 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?target: ConstantPathNode, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> ConstantPathOperatorWriteNode + # 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#5048 + # source://prism//lib/prism/node.rb#4506 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::ConstantPathOperatorWriteNode) end - def copy(target: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5033 + # source://prism//lib/prism/node.rb#4491 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # 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#5056 + # source://prism//lib/prism/node.rb#4514 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7511,62 +7078,44 @@ class Prism::ConstantPathOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5077 + # source://prism//lib/prism/node.rb#4535 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#371 + # source://prism//lib/prism/node_ext.rb#387 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 + # source://prism//lib/prism/node_ext.rb#394 def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5061 + # source://prism//lib/prism/node.rb#4519 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5095 + # source://prism//lib/prism/node.rb#4540 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5071 + # source://prism//lib/prism/node.rb#4529 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5105 + # source://prism//lib/prism/node.rb#4545 def type; end end end @@ -7576,77 +7125,81 @@ end # Parent::Child ||= value # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5124 +# source://prism//lib/prism/node.rb#4564 class Prism::ConstantPathOrWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantPathOrWriteNode node. # # @return [ConstantPathOrWriteNode] a new instance of ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5126 + # source://prism//lib/prism/node.rb#4566 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, 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#5220 + # source://prism//lib/prism/node.rb#4644 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5135 + # source://prism//lib/prism/node.rb#4577 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5140 + # source://prism//lib/prism/node.rb#4582 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#5150 + # source://prism//lib/prism/node.rb#4592 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#5145 + # source://prism//lib/prism/node.rb#4587 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathOrWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathOrWriteNode # - # source://prism//lib/prism/node.rb#5155 + # source://prism//lib/prism/node.rb#4597 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantPathOrWriteNode) end - def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5140 + # source://prism//lib/prism/node.rb#4582 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # 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#5163 + # source://prism//lib/prism/node.rb#4605 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7655,62 +7208,44 @@ class Prism::ConstantPathOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5186 + # source://prism//lib/prism/node.rb#4628 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5181 + # source://prism//lib/prism/node.rb#4623 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#5171 + # source://prism//lib/prism/node.rb#4613 sig { returns(Prism::Location) } def operator_loc; end # attr_reader target: ConstantPathNode # - # source://prism//lib/prism/node.rb#5168 + # source://prism//lib/prism/node.rb#4610 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5204 + # source://prism//lib/prism/node.rb#4633 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#5178 + # source://prism//lib/prism/node.rb#4620 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5214 + # source://prism//lib/prism/node.rb#4638 def type; end end end @@ -7720,34 +7255,36 @@ end # Foo::Foo, Bar::Bar = baz # ^^^^^^^^ ^^^^^^^^ # -# source://prism//lib/prism/node.rb#5232 +# source://prism//lib/prism/node.rb#4656 class Prism::ConstantPathTargetNode < ::Prism::Node - # def initialize: (Prism::node? parent, Symbol? name, Location delimiter_loc, Location name_loc, Location location) -> void + # Initialize a new ConstantPathTargetNode node. # # @return [ConstantPathTargetNode] a new instance of ConstantPathTargetNode # - # source://prism//lib/prism/node.rb#5234 + # source://prism//lib/prism/node.rb#4658 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, parent, name, delimiter_loc, name_loc, location); end + def initialize(source, node_id, location, flags, parent, name, delimiter_loc, name_loc); 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#5338 + # source://prism//lib/prism/node.rb#4746 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5244 + # source://prism//lib/prism/node.rb#4670 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -7755,63 +7292,65 @@ 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#232 + # source://prism//lib/prism/node_ext.rb#243 def child; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5249 + # source://prism//lib/prism/node.rb#4675 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#5261 + # source://prism//lib/prism/node.rb#4687 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#5254 + # source://prism//lib/prism/node.rb#4680 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?parent: Prism::node?, ?name: Symbol?, ?delimiter_loc: Location, ?name_loc: Location, ?location: Location) -> ConstantPathTargetNode + # 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#5266 + # source://prism//lib/prism/node.rb#4692 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, parent: T.nilable(Prism::Node), name: T.nilable(Symbol), delimiter_loc: Prism::Location, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::ConstantPathTargetNode) end - def copy(parent: T.unsafe(nil), name: T.unsafe(nil), delimiter_loc: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5249 + # source://prism//lib/prism/node.rb#4675 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { parent: Prism::node?, name: Symbol?, delimiter_loc: Location, name_loc: Location, location: Location } + # 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#5274 + # source://prism//lib/prism/node.rb#4700 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#5299 + # source://prism//lib/prism/node.rb#4725 sig { returns(String) } def delimiter; end # attr_reader delimiter_loc: Location # - # source://prism//lib/prism/node.rb#5285 + # source://prism//lib/prism/node.rb#4711 sig { returns(Prism::Location) } def delimiter_loc; end @@ -7820,69 +7359,51 @@ class Prism::ConstantPathTargetNode < ::Prism::Node # Returns the full name of this constant path. For example: "Foo::Bar" # - # source://prism//lib/prism/node_ext.rb#225 + # source://prism//lib/prism/node_ext.rb#236 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#205 + # source://prism//lib/prism/node_ext.rb#216 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5304 + # source://prism//lib/prism/node.rb#4730 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#5282 + # source://prism//lib/prism/node.rb#4708 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5292 + # source://prism//lib/prism/node.rb#4718 sig { returns(Prism::Location) } def name_loc; end # attr_reader parent: Prism::node? # - # source://prism//lib/prism/node.rb#5279 + # source://prism//lib/prism/node.rb#4705 sig { returns(T.nilable(Prism::Node)) } def parent; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5322 + # source://prism//lib/prism/node.rb#4735 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5332 + # source://prism//lib/prism/node.rb#4740 def type; end end end @@ -7898,77 +7419,81 @@ end # ::Foo::Bar = 1 # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5357 +# source://prism//lib/prism/node.rb#4765 class Prism::ConstantPathWriteNode < ::Prism::Node - # def initialize: (ConstantPathNode target, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new ConstantPathWriteNode node. # # @return [ConstantPathWriteNode] a new instance of ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5359 + # source://prism//lib/prism/node.rb#4767 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, target, operator_loc, value, location); end + def initialize(source, node_id, location, flags, target, operator_loc, 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#5465 + # source://prism//lib/prism/node.rb#4857 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5368 + # source://prism//lib/prism/node.rb#4778 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5373 + # source://prism//lib/prism/node.rb#4783 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#5383 + # source://prism//lib/prism/node.rb#4793 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#5378 + # source://prism//lib/prism/node.rb#4788 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> ConstantPathWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?target: ConstantPathNode, ?operator_loc: Location, ?value: Prism::node) -> ConstantPathWriteNode # - # source://prism//lib/prism/node.rb#5388 + # source://prism//lib/prism/node.rb#4798 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, target: Prism::ConstantPathNode, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::ConstantPathWriteNode) end - def copy(target: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5373 + # source://prism//lib/prism/node.rb#4783 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { target: ConstantPathNode, operator_loc: Location, value: Prism::node, location: Location } + # 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#5396 + # source://prism//lib/prism/node.rb#4806 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -7977,13 +7502,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5431 + # source://prism//lib/prism/node.rb#4841 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5426 + # source://prism//lib/prism/node.rb#4836 sig { returns(String) } def operator; end @@ -7992,7 +7517,7 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::ABC = 123 # ^ # - # source://prism//lib/prism/node.rb#5413 + # source://prism//lib/prism/node.rb#4823 sig { returns(Prism::Location) } def operator_loc; end @@ -8004,26 +7529,13 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # ::Foo = :abc # ^^^^^ # - # source://prism//lib/prism/node.rb#5407 + # source://prism//lib/prism/node.rb#4817 sig { returns(Prism::ConstantPathNode) } def target; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5449 + # source://prism//lib/prism/node.rb#4846 sig { override.returns(Symbol) } def type; end @@ -8032,19 +7544,14 @@ class Prism::ConstantPathWriteNode < ::Prism::Node # FOO::BAR = :abc # ^^^^ # - # source://prism//lib/prism/node.rb#5423 + # source://prism//lib/prism/node.rb#4833 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5459 + # source://prism//lib/prism/node.rb#4851 def type; end end end @@ -8054,62 +7561,69 @@ end # Foo # ^^^ # -# source://prism//lib/prism/node.rb#5477 +# source://prism//lib/prism/node.rb#4869 class Prism::ConstantReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ConstantReadNode node. # # @return [ConstantReadNode] a new instance of ConstantReadNode # - # source://prism//lib/prism/node.rb#5479 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#4871 + 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#5560 + # source://prism//lib/prism/node.rb#4936 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5486 + # source://prism//lib/prism/node.rb#4880 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5491 + # source://prism//lib/prism/node.rb#4885 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#5501 + # source://prism//lib/prism/node.rb#4895 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#5496 + # source://prism//lib/prism/node.rb#4890 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> ConstantReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantReadNode # - # source://prism//lib/prism/node.rb#5506 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#4900 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5491 + # source://prism//lib/prism/node.rb#4885 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#5514 + # source://prism//lib/prism/node.rb#4908 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8118,20 +7632,20 @@ class Prism::ConstantReadNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#133 + # source://prism//lib/prism/node_ext.rb#139 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#128 + # source://prism//lib/prism/node_ext.rb#134 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5526 + # source://prism//lib/prism/node.rb#4920 sig { override.returns(String) } def inspect; end @@ -8141,38 +7655,20 @@ class Prism::ConstantReadNode < ::Prism::Node # # SOME_CONSTANT # name `:SOME_CONSTANT` # - # source://prism//lib/prism/node.rb#5523 + # source://prism//lib/prism/node.rb#4917 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5544 + # source://prism//lib/prism/node.rb#4925 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5554 + # source://prism//lib/prism/node.rb#4930 def type; end end end @@ -8182,203 +7678,69 @@ end # Foo, Bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#5570 +# source://prism//lib/prism/node.rb#4946 class Prism::ConstantTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new ConstantTargetNode node. # # @return [ConstantTargetNode] a new instance of ConstantTargetNode # - # source://prism//lib/prism/node.rb#5572 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#4948 + 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#5649 + # source://prism//lib/prism/node.rb#5009 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5579 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5584 - 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#5594 - 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#5589 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?name: Symbol, ?location: Location) -> ConstantTargetNode - # - # source://prism//lib/prism/node.rb#5599 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::ConstantTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#5584 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } - # - # source://prism//lib/prism/node.rb#5607 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); 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#246 - 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#241 - sig { returns(T::Array[Symbol]) } - def full_name_parts; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#5615 - sig { override.returns(String) } - def inspect; end - - # attr_reader name: Symbol - # - # source://prism//lib/prism/node.rb#5612 - sig { returns(Symbol) } - def name; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5633 - sig { override.returns(Symbol) } - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5643 - def type; end - end -end - -# Represents writing to a constant. -# -# Foo = 1 -# ^^^^^^^ -# -# source://prism//lib/prism/node.rb#5659 -class Prism::ConstantWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void - # - # @return [ConstantWriteNode] a new instance of ConstantWriteNode - # - # source://prism//lib/prism/node.rb#5661 - sig do - params( - source: Prism::Source, - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(source, name, name_loc, value, operator_loc, location); 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#5779 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#5671 + # source://prism//lib/prism/node.rb#4957 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5676 + # source://prism//lib/prism/node.rb#4962 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#5686 + # source://prism//lib/prism/node.rb#4972 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#5681 + # source://prism//lib/prism/node.rb#4967 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> ConstantWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> ConstantTargetNode # - # source://prism//lib/prism/node.rb#5691 + # source://prism//lib/prism/node.rb#4977 sig do params( - name: Symbol, - name_loc: Prism::Location, - value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location - ).returns(Prism::ConstantWriteNode) + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol + ).returns(Prism::ConstantTargetNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), name: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5676 + # source://prism//lib/prism/node.rb#4962 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#5699 + # source://prism//lib/prism/node.rb#4985 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -8387,20 +7749,147 @@ class Prism::ConstantWriteNode < ::Prism::Node # Returns the full name of this constant. For example: "Foo" # - # source://prism//lib/prism/node_ext.rb#146 + # source://prism//lib/prism/node_ext.rb#262 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#141 + # source://prism//lib/prism/node_ext.rb#257 sig { returns(T::Array[Symbol]) } def full_name_parts; end # def inspect -> String # - # source://prism//lib/prism/node.rb#5745 + # source://prism//lib/prism/node.rb#4993 + sig { override.returns(String) } + def inspect; end + + # attr_reader name: Symbol + # + # source://prism//lib/prism/node.rb#4990 + sig { returns(Symbol) } + def name; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#4998 + 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#5003 + def type; end + end +end + +# Represents writing to a constant. +# +# Foo = 1 +# ^^^^^^^ +# +# source://prism//lib/prism/node.rb#5019 +class Prism::ConstantWriteNode < ::Prism::Node + # Initialize a new ConstantWriteNode node. + # + # @return [ConstantWriteNode] a new instance of ConstantWriteNode + # + # source://prism//lib/prism/node.rb#5021 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + operator_loc: Prism::Location + ).void + end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#5123 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#5033 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5038 + 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#5048 + 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#5043 + 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#5053 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: 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 child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#5038 + 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#5061 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); 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 + 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 + sig { returns(T::Array[Symbol]) } + def full_name_parts; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#5107 sig { override.returns(String) } def inspect; end @@ -8410,7 +7899,7 @@ class Prism::ConstantWriteNode < ::Prism::Node # # XYZ = 1 # name `:XYZ` # - # source://prism//lib/prism/node.rb#5708 + # source://prism//lib/prism/node.rb#5070 sig { returns(Symbol) } def name; end @@ -8419,13 +7908,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = 1 # ^^^ # - # source://prism//lib/prism/node.rb#5714 + # source://prism//lib/prism/node.rb#5076 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#5740 + # source://prism//lib/prism/node.rb#5102 sig { returns(String) } def operator; end @@ -8434,26 +7923,13 @@ class Prism::ConstantWriteNode < ::Prism::Node # FOO = :bar # ^ # - # source://prism//lib/prism/node.rb#5733 + # source://prism//lib/prism/node.rb#5095 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#5763 + # source://prism//lib/prism/node.rb#5112 sig { override.returns(Symbol) } def type; end @@ -8465,19 +7941,14 @@ class Prism::ConstantWriteNode < ::Prism::Node # MyClass = Class.new # ^^^^^^^^^ # - # source://prism//lib/prism/node.rb#5727 + # source://prism//lib/prism/node.rb#5089 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#5773 + # source://prism//lib/prism/node.rb#5117 def type; end end end @@ -8488,796 +7959,2636 @@ end # source = Prism::Source.for("[1]") # # Prism::ArrayNode.new( +# source, +# 0, +# Prism::Location.new(source, 0, 3), +# 0, # [ # Prism::IntegerNode.new( -# Prism::IntegerBaseFlags::DECIMAL, -# 1, +# source, +# 0, # Prism::Location.new(source, 1, 1), -# source +# Prism::IntegerBaseFlags::DECIMAL, +# 1 # ) # ], # Prism::Location.new(source, 0, 1), -# Prism::Location.new(source, 2, 1), -# source +# Prism::Location.new(source, 2, 1) # ) # # you could instead write: # -# source = Prism::Source.for("[1]") +# class Builder +# include Prism::DSL # -# ArrayNode( -# IntegerNode(Prism::IntegerBaseFlags::DECIMAL, 1, Location(source, 1, 1)), source), -# Location(source, 0, 1), -# Location(source, 2, 1), -# source -# ) +# attr_reader :default_source # -# This is mostly helpful in the context of writing tests, but can also be used -# to generate trees programmatically. +# def initialize +# @default_source = source("[1]") +# end # -# source://prism//lib/prism/dsl.rb#42 +# def build +# array_node( +# location: location(start_offset: 0, length: 3), +# elements: [ +# integer_node( +# location: location(start_offset: 1, length: 1), +# flags: integer_base_flag(:decimal), +# value: 1 +# ) +# ], +# opening_loc: location(start_offset: 0, length: 1), +# closing_loc: location(start_offset: 2, length: 1) +# ) +# end +# end +# +# This is mostly helpful in the context of generating trees programmatically. +# +# source://prism//lib/prism/dsl.rb#61 module Prism::DSL - private + extend ::Prism::DSL - # Create a new AliasGlobalVariableNode node + # Create a new AliasGlobalVariableNode node. # - # source://prism//lib/prism/dsl.rb#51 - def AliasGlobalVariableNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#77 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode), + old_name: T.any(Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::SymbolNode, Prism::MissingNode), + 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 - # Create a new AliasMethodNode node + # Create a new AliasMethodNode node. # - # source://prism//lib/prism/dsl.rb#56 - def AliasMethodNode(new_name, old_name, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#82 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + new_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode), + old_name: T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode, Prism::GlobalVariableReadNode, Prism::MissingNode), + 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 - # Create a new AlternationPatternNode node + # Create a new AlternationPatternNode node. # - # source://prism//lib/prism/dsl.rb#61 - def AlternationPatternNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#87 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + 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 - # Create a new AndNode node + # Create a new AndNode node. # - # source://prism//lib/prism/dsl.rb#66 - def AndNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#92 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + 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 - # Create a new ArgumentsNode node + # Create a new ArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#71 - def ArgumentsNode(flags, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#97 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ArrayNode node + # Retrieve the value of one of the ArgumentsNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#76 - def ArrayNode(flags, elements, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#832 + sig { params(name: Symbol).returns(Integer) } + def arguments_node_flag(name); end - # Create a new ArrayPatternNode node + # Create a new ArrayNode node. # - # source://prism//lib/prism/dsl.rb#81 - def ArrayPatternNode(constant, requireds, rest, posts, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#102 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + elements: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + 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 - # Create a new AssocNode node + # Retrieve the value of one of the ArrayNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#86 - def AssocNode(key, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#844 + sig { params(name: Symbol).returns(Integer) } + def array_node_flag(name); end - # Create a new AssocSplatNode node + # Create a new ArrayPatternNode node. # - # source://prism//lib/prism/dsl.rb#91 - def AssocSplatNode(value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#107 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + requireds: T::Array[Prism::Node], + rest: T.nilable(Prism::Node), + posts: T::Array[Prism::Node], + opening_loc: T.nilable(Prism::Location), + 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 - # Create a new BackReferenceReadNode node + # Create a new AssocNode node. # - # source://prism//lib/prism/dsl.rb#96 - def BackReferenceReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#112 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + key: Prism::Node, + value: Prism::Node, + 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 - # Create a new BeginNode node + # Create a new AssocSplatNode node. # - # source://prism//lib/prism/dsl.rb#101 - def BeginNode(begin_keyword_loc, statements, rescue_clause, else_clause, ensure_clause, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#117 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.nilable(Prism::Node), + 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 - # Create a new BlockArgumentNode node + # Create a new BackReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#106 - def BlockArgumentNode(expression, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#122 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new BlockLocalVariableNode node + # Create a new BeginNode node. # - # source://prism//lib/prism/dsl.rb#111 - def BlockLocalVariableNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#127 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + begin_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + rescue_clause: T.nilable(Prism::RescueNode), + else_clause: T.nilable(Prism::ElseNode), + ensure_clause: T.nilable(Prism::EnsureNode), + 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 - # Create a new BlockNode node + # Create a new BlockArgumentNode node. # - # source://prism//lib/prism/dsl.rb#116 - def BlockNode(locals, parameters, body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#132 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: T.nilable(Prism::Node), + 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 - # Create a new BlockParameterNode node + # Create a new BlockLocalVariableNode node. # - # source://prism//lib/prism/dsl.rb#121 - def BlockParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#137 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new BlockParametersNode node + # Create a new BlockNode node. # - # source://prism//lib/prism/dsl.rb#126 - def BlockParametersNode(parameters, locals, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#142 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + opening_loc: Prism::Location, + 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 + + # Create a new BlockParameterNode node. + # + # source://prism//lib/prism/dsl.rb#147 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + 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 + + # Create a new BlockParametersNode node. + # + # source://prism//lib/prism/dsl.rb#152 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parameters: T.nilable(Prism::ParametersNode), + locals: T::Array[Prism::BlockLocalVariableNode], + opening_loc: T.nilable(Prism::Location), + 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 + + # Create a new BreakNode node. + # + # source://prism//lib/prism/dsl.rb#157 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + 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 + + # Create a new CallAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#162 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + 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 + + # Create a new CallNode node. + # + # source://prism//lib/prism/dsl.rb#167 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + name: Symbol, + message_loc: T.nilable(Prism::Location), + opening_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + closing_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 + + # Retrieve the value of one of the CallNodeFlags flags. + # + # source://prism//lib/prism/dsl.rb#852 + sig { params(name: Symbol).returns(Integer) } + def call_node_flag(name); end + + # Create a new CallOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#172 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + 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 + + # Create a new CallOrWriteNode node. + # + # source://prism//lib/prism/dsl.rb#177 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + message_loc: T.nilable(Prism::Location), + read_name: Symbol, + write_name: Symbol, + operator_loc: Prism::Location, + 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 + + # Create a new CallTargetNode node. + # + # source://prism//lib/prism/dsl.rb#182 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + call_operator_loc: Prism::Location, + name: Symbol, + 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 + + # Create a new CapturePatternNode node. + # + # source://prism//lib/prism/dsl.rb#187 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + target: Prism::LocalVariableTargetNode, + 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 + + # Create a new CaseMatchNode node. + # + # source://prism//lib/prism/dsl.rb#192 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::InNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + 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 + + # Create a new CaseNode node. + # + # source://prism//lib/prism/dsl.rb#197 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + predicate: T.nilable(Prism::Node), + conditions: T::Array[Prism::WhenNode], + else_clause: T.nilable(Prism::ElseNode), + case_keyword_loc: Prism::Location, + 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 + + # Create a new ClassNode node. + # + # source://prism//lib/prism/dsl.rb#202 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::CallNode), + inheritance_operator_loc: T.nilable(Prism::Location), + superclass: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + 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 - # Create a new BreakNode node + # Create a new ClassVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#131 - def BreakNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#207 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 + + # Create a new ClassVariableOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#212 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new CallAndWriteNode node + # Create a new ClassVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#136 - def CallAndWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#217 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 + + # Create a new ClassVariableReadNode node. + # + # source://prism//lib/prism/dsl.rb#222 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 + + # Create a new ClassVariableTargetNode node. + # + # source://prism//lib/prism/dsl.rb#227 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 + + # Create a new ClassVariableWriteNode node. + # + # source://prism//lib/prism/dsl.rb#232 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + 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 + + # Create a new ConstantAndWriteNode node. + # + # source://prism//lib/prism/dsl.rb#237 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 + + # Create a new ConstantOperatorWriteNode node. + # + # source://prism//lib/prism/dsl.rb#242 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new CallNode node + # Create a new ConstantOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#141 - def CallNode(flags, receiver, call_operator_loc, name, message_loc, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#247 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 - # Create a new CallOperatorWriteNode node + # Create a new ConstantPathAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#146 - def CallOperatorWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#252 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + 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 - # Create a new CallOrWriteNode node + # Create a new ConstantPathNode node. # - # source://prism//lib/prism/dsl.rb#151 - def CallOrWriteNode(flags, receiver, call_operator_loc, message_loc, read_name, write_name, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#257 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + 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 - # Create a new CallTargetNode node + # Create a new ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#156 - def CallTargetNode(flags, receiver, call_operator_loc, name, message_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#262 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + binary_operator_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new CapturePatternNode node + # Create a new ConstantPathOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#161 - def CapturePatternNode(value, target, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#267 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + 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 - # Create a new CaseMatchNode node + # Create a new ConstantPathTargetNode node. # - # source://prism//lib/prism/dsl.rb#166 - def CaseMatchNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#272 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + parent: T.nilable(Prism::Node), + name: T.nilable(Symbol), + delimiter_loc: Prism::Location, + 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 - # Create a new CaseNode node + # Create a new ConstantPathWriteNode node. # - # source://prism//lib/prism/dsl.rb#171 - def CaseNode(predicate, conditions, consequent, case_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#277 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + target: Prism::ConstantPathNode, + operator_loc: Prism::Location, + 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 - # Create a new ClassNode node + # Create a new ConstantReadNode node. # - # source://prism//lib/prism/dsl.rb#176 - def ClassNode(locals, class_keyword_loc, constant_path, inheritance_operator_loc, superclass, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#282 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ClassVariableAndWriteNode node + # Create a new ConstantTargetNode node. # - # source://prism//lib/prism/dsl.rb#181 - def ClassVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#287 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ClassVariableOperatorWriteNode node + # Create a new ConstantWriteNode node. # - # source://prism//lib/prism/dsl.rb#186 - def ClassVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#292 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new ClassVariableOrWriteNode node + # Create a new DefNode node. # - # source://prism//lib/prism/dsl.rb#191 - def ClassVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#297 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + receiver: T.nilable(Prism::Node), + parameters: T.nilable(Prism::ParametersNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + locals: T::Array[Symbol], + def_keyword_loc: Prism::Location, + operator_loc: T.nilable(Prism::Location), + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + equal_loc: T.nilable(Prism::Location), + 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 - # Create a new ClassVariableReadNode node + # Create a new DefinedNode node. # - # source://prism//lib/prism/dsl.rb#196 - def ClassVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#302 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lparen_loc: T.nilable(Prism::Location), + value: Prism::Node, + rparen_loc: T.nilable(Prism::Location), + 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 - # Create a new ClassVariableTargetNode node + # Create a new ElseNode node. # - # source://prism//lib/prism/dsl.rb#201 - def ClassVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#307 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + else_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + 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 - # Create a new ClassVariableWriteNode node + # Create a new EmbeddedStatementsNode node. # - # source://prism//lib/prism/dsl.rb#206 - def ClassVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#312 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + 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 - # Create a new ConstantAndWriteNode node + # Create a new EmbeddedVariableNode node. # - # source://prism//lib/prism/dsl.rb#211 - def ConstantAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#317 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + 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 - # Create a new ConstantOperatorWriteNode node + # Retrieve the value of one of the EncodingFlags flags. # - # source://prism//lib/prism/dsl.rb#216 - def ConstantOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#863 + sig { params(name: Symbol).returns(Integer) } + def encoding_flag(name); end - # Create a new ConstantOrWriteNode node + # Create a new EnsureNode node. # - # source://prism//lib/prism/dsl.rb#221 - def ConstantOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#322 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + ensure_keyword_loc: Prism::Location, + statements: T.nilable(Prism::StatementsNode), + 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 - # Create a new ConstantPathAndWriteNode node + # Create a new FalseNode node. # - # source://prism//lib/prism/dsl.rb#226 - def ConstantPathAndWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#327 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new ConstantPathNode node + # Create a new FindPatternNode node. # - # source://prism//lib/prism/dsl.rb#231 - def ConstantPathNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#332 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, + requireds: T::Array[Prism::Node], + right: T.any(Prism::SplatNode, Prism::MissingNode), + opening_loc: T.nilable(Prism::Location), + 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 - # Create a new ConstantPathOperatorWriteNode node + # Create a new FlipFlopNode node. # - # source://prism//lib/prism/dsl.rb#236 - def ConstantPathOperatorWriteNode(target, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#337 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + 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 - # Create a new ConstantPathOrWriteNode node + # Create a new FloatNode node. # - # source://prism//lib/prism/dsl.rb#241 - def ConstantPathOrWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#342 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ConstantPathTargetNode node + # Create a new ForNode node. # - # source://prism//lib/prism/dsl.rb#246 - def ConstantPathTargetNode(parent, name, delimiter_loc, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#347 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: 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), + collection: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + for_keyword_loc: Prism::Location, + in_keyword_loc: Prism::Location, + do_keyword_loc: T.nilable(Prism::Location), + 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 - # Create a new ConstantPathWriteNode node + # Create a new ForwardingArgumentsNode node. # - # source://prism//lib/prism/dsl.rb#251 - def ConstantPathWriteNode(target, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#352 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new ConstantReadNode node + # Create a new ForwardingParameterNode node. # - # source://prism//lib/prism/dsl.rb#256 - def ConstantReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#357 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new ConstantTargetNode node + # Create a new ForwardingSuperNode node. # - # source://prism//lib/prism/dsl.rb#261 - def ConstantTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#362 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ConstantWriteNode node + # Create a new GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#266 - def ConstantWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#367 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 - # Create a new DefNode node + # Create a new GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#271 - def DefNode(name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#372 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new DefinedNode node + # Create a new GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#276 - def DefinedNode(lparen_loc, value, rparen_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#377 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 - # Create a new ElseNode node + # Create a new GlobalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#281 - def ElseNode(else_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#382 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new EmbeddedStatementsNode node + # Create a new GlobalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#286 - def EmbeddedStatementsNode(opening_loc, statements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#387 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new EmbeddedVariableNode node + # Create a new GlobalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#291 - def EmbeddedVariableNode(operator_loc, variable, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#392 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new EnsureNode node + # Create a new HashNode node. # - # source://prism//lib/prism/dsl.rb#296 - def EnsureNode(ensure_keyword_loc, statements, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#397 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], + 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 - # Create a new FalseNode node + # Create a new HashPatternNode node. # - # source://prism//lib/prism/dsl.rb#301 - def FalseNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#402 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + 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 - # Create a new FindPatternNode node + # Create a new IfNode node. # - # source://prism//lib/prism/dsl.rb#306 - def FindPatternNode(constant, left, requireds, right, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#407 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + if_keyword_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + 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 - # Create a new FlipFlopNode node + # Create a new ImaginaryNode node. # - # source://prism//lib/prism/dsl.rb#311 - def FlipFlopNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#412 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new FloatNode node + # Create a new ImplicitNode node. # - # source://prism//lib/prism/dsl.rb#316 - def FloatNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#417 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ForNode node + # Create a new ImplicitRestNode node. # - # source://prism//lib/prism/dsl.rb#321 - def ForNode(index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#422 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new ForwardingArgumentsNode node + # Create a new InNode node. # - # source://prism//lib/prism/dsl.rb#326 - def ForwardingArgumentsNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#427 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + pattern: Prism::Node, + statements: T.nilable(Prism::StatementsNode), + in_loc: Prism::Location, + 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 - # Create a new ForwardingParameterNode node + # Create a new IndexAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#331 - def ForwardingParameterNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#432 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + 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 - # Create a new ForwardingSuperNode node + # Create a new IndexOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#336 - def ForwardingSuperNode(block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#437 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + binary_operator: Symbol, + binary_operator_loc: Prism::Location, + 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 - # Create a new GlobalVariableAndWriteNode node + # Create a new IndexOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#341 - def GlobalVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#442 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: T.nilable(Prism::Node), + call_operator_loc: T.nilable(Prism::Location), + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + block: T.nilable(Prism::BlockArgumentNode), + operator_loc: Prism::Location, + 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 - # Create a new GlobalVariableOperatorWriteNode node + # Create a new IndexTargetNode node. # - # source://prism//lib/prism/dsl.rb#346 - def GlobalVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#447 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + receiver: Prism::Node, + opening_loc: Prism::Location, + arguments: T.nilable(Prism::ArgumentsNode), + closing_loc: Prism::Location, + 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 - # Create a new GlobalVariableOrWriteNode node + # Create a new InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#351 - def GlobalVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#452 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 - # Create a new GlobalVariableReadNode node + # Create a new InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#356 - def GlobalVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#457 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new GlobalVariableTargetNode node + # Create a new InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#361 - def GlobalVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#462 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 - # Create a new GlobalVariableWriteNode node + # Create a new InstanceVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#366 - def GlobalVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#467 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new HashNode node + # Create a new InstanceVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#371 - def HashNode(opening_loc, elements, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#472 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new HashPatternNode node + # Create a new InstanceVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#376 - def HashPatternNode(constant, elements, rest, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#477 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new IfNode node + # Retrieve the value of one of the IntegerBaseFlags flags. # - # source://prism//lib/prism/dsl.rb#381 - def IfNode(if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#872 + sig { params(name: Symbol).returns(Integer) } + def integer_base_flag(name); end - # Create a new ImaginaryNode node + # Create a new IntegerNode node. # - # source://prism//lib/prism/dsl.rb#386 - def ImaginaryNode(numeric, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#482 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ImplicitNode node + # Create a new InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#391 - def ImplicitNode(value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#487 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + 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 - # Create a new ImplicitRestNode node + # Create a new InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#396 - def ImplicitRestNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#492 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + 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 - # Create a new InNode node + # Create a new InterpolatedStringNode node. # - # source://prism//lib/prism/dsl.rb#401 - def InNode(pattern, statements, in_loc, then_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#497 + sig do + params( + source: Prism::Source, + 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)], + 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 - # Create a new IndexAndWriteNode node + # Retrieve the value of one of the InterpolatedStringNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#406 - def IndexAndWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#883 + sig { params(name: Symbol).returns(Integer) } + def interpolated_string_node_flag(name); end - # Create a new IndexOperatorWriteNode node + # Create a new InterpolatedSymbolNode node. # - # source://prism//lib/prism/dsl.rb#411 - def IndexOperatorWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#502 + sig do + params( + source: Prism::Source, + 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)], + 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 - # Create a new IndexOrWriteNode node + # Create a new InterpolatedXStringNode node. # - # source://prism//lib/prism/dsl.rb#416 - def IndexOrWriteNode(flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#507 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], + 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 - # Create a new IndexTargetNode node + # Create a new ItLocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#421 - def IndexTargetNode(flags, receiver, opening_loc, arguments, closing_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#512 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new InstanceVariableAndWriteNode node + # Create a new ItParametersNode node. # - # source://prism//lib/prism/dsl.rb#426 - def InstanceVariableAndWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#517 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new InstanceVariableOperatorWriteNode node + # Create a new KeywordHashNode node. # - # source://prism//lib/prism/dsl.rb#431 - def InstanceVariableOperatorWriteNode(name, name_loc, binary_operator_loc, value, binary_operator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#522 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new InstanceVariableOrWriteNode node + # Retrieve the value of one of the KeywordHashNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#436 - def InstanceVariableOrWriteNode(name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#892 + sig { params(name: Symbol).returns(Integer) } + def keyword_hash_node_flag(name); end - # Create a new InstanceVariableReadNode node + # Create a new KeywordRestParameterNode node. # - # source://prism//lib/prism/dsl.rb#441 - def InstanceVariableReadNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#527 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + 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 - # Create a new InstanceVariableTargetNode node + # Create a new LambdaNode node. # - # source://prism//lib/prism/dsl.rb#446 - def InstanceVariableTargetNode(name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#532 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + operator_loc: Prism::Location, + opening_loc: Prism::Location, + closing_loc: Prism::Location, + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + 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 - # Create a new InstanceVariableWriteNode node + # Create a new LocalVariableAndWriteNode node. # - # source://prism//lib/prism/dsl.rb#451 - def InstanceVariableWriteNode(name, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#537 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + 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 - # Create a new IntegerNode node + # Create a new LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/dsl.rb#456 - def IntegerNode(flags, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#542 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + binary_operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + binary_operator: Symbol, + 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 - # Create a new InterpolatedMatchLastLineNode node + # Create a new LocalVariableOrWriteNode node. # - # source://prism//lib/prism/dsl.rb#461 - def InterpolatedMatchLastLineNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#547 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name_loc: Prism::Location, + operator_loc: Prism::Location, + value: Prism::Node, + name: Symbol, + 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 - # Create a new InterpolatedRegularExpressionNode node + # Create a new LocalVariableReadNode node. # - # source://prism//lib/prism/dsl.rb#466 - def InterpolatedRegularExpressionNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#552 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + 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 - # Create a new InterpolatedStringNode node + # Create a new LocalVariableTargetNode node. # - # source://prism//lib/prism/dsl.rb#471 - def InterpolatedStringNode(flags, opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#557 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + 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 - # Create a new InterpolatedSymbolNode node + # Create a new LocalVariableWriteNode node. # - # source://prism//lib/prism/dsl.rb#476 - def InterpolatedSymbolNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#562 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer, + name_loc: Prism::Location, + value: Prism::Node, + 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 - # Create a new InterpolatedXStringNode node + # Create a new Location object. # - # source://prism//lib/prism/dsl.rb#481 - def InterpolatedXStringNode(opening_loc, parts, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#72 + 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 - # Create a new ItLocalVariableReadNode node + # Retrieve the value of one of the LoopFlags flags. # - # source://prism//lib/prism/dsl.rb#486 - def ItLocalVariableReadNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#900 + sig { params(name: Symbol).returns(Integer) } + def loop_flag(name); end - # Create a new ItParametersNode node + # Create a new MatchLastLineNode node. # - # source://prism//lib/prism/dsl.rb#491 - def ItParametersNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#567 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + 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 - # Create a new KeywordHashNode node + # Create a new MatchPredicateNode node. # - # source://prism//lib/prism/dsl.rb#496 - def KeywordHashNode(flags, elements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#572 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + 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 - # Create a new KeywordRestParameterNode node + # Create a new MatchRequiredNode node. # - # source://prism//lib/prism/dsl.rb#501 - def KeywordRestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#577 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Prism::Node, + pattern: Prism::Node, + 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 - # Create a new LambdaNode node + # Create a new MatchWriteNode node. # - # source://prism//lib/prism/dsl.rb#506 - def LambdaNode(locals, operator_loc, opening_loc, closing_loc, parameters, body, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#582 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + call: Prism::CallNode, + 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 - # Create a new LocalVariableAndWriteNode node + # Create a new MissingNode node. # - # source://prism//lib/prism/dsl.rb#511 - def LocalVariableAndWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#587 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new LocalVariableOperatorWriteNode node + # Create a new ModuleNode node. # - # source://prism//lib/prism/dsl.rb#516 - def LocalVariableOperatorWriteNode(name_loc, binary_operator_loc, value, name, binary_operator, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#592 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + module_keyword_loc: Prism::Location, + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location, + 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 - # Create a new LocalVariableOrWriteNode node + # Create a new MultiTargetNode node. # - # source://prism//lib/prism/dsl.rb#521 - def LocalVariableOrWriteNode(name_loc, operator_loc, value, name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#597 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: 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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: 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)], + lparen_loc: T.nilable(Prism::Location), + 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 - # Create a new LocalVariableReadNode node + # Create a new MultiWriteNode node. # - # source://prism//lib/prism/dsl.rb#526 - def LocalVariableReadNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#602 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: 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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: 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)], + lparen_loc: T.nilable(Prism::Location), + rparen_loc: T.nilable(Prism::Location), + operator_loc: Prism::Location, + 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 - # Create a new LocalVariableTargetNode node + # Create a new NextNode node. # - # source://prism//lib/prism/dsl.rb#531 - def LocalVariableTargetNode(name, depth, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#607 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + arguments: T.nilable(Prism::ArgumentsNode), + 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 - # Create a new LocalVariableWriteNode node + # Create a new NilNode node. # - # source://prism//lib/prism/dsl.rb#536 - def LocalVariableWriteNode(name, depth, name_loc, value, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#612 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new Location object + # Create a new NoKeywordsParameterNode node. # - # source://prism//lib/prism/dsl.rb#46 - def Location(source = T.unsafe(nil), start_offset = T.unsafe(nil), length = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#617 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + 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 - # Create a new MatchLastLineNode node + # Create a new NumberedParametersNode node. # - # source://prism//lib/prism/dsl.rb#541 - def MatchLastLineNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#622 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new MatchPredicateNode node + # Create a new NumberedReferenceReadNode node. # - # source://prism//lib/prism/dsl.rb#546 - def MatchPredicateNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#627 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new MatchRequiredNode node + # Create a new OptionalKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#551 - def MatchRequiredNode(value, pattern, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#632 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + 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 - # Create a new MatchWriteNode node + # Create a new OptionalParameterNode node. # - # source://prism//lib/prism/dsl.rb#556 - def MatchWriteNode(call, targets, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#637 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + name_loc: Prism::Location, + operator_loc: Prism::Location, + 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 - # Create a new MissingNode node + # Create a new OrNode node. # - # source://prism//lib/prism/dsl.rb#561 - def MissingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#642 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: Prism::Node, + right: Prism::Node, + 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 - # Create a new ModuleNode node + # Retrieve the value of one of the ParameterFlags flags. # - # source://prism//lib/prism/dsl.rb#566 - def ModuleNode(locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#908 + sig { params(name: Symbol).returns(Integer) } + def parameter_flag(name); end - # Create a new MultiTargetNode node + # Create a new ParametersNode node. # - # source://prism//lib/prism/dsl.rb#571 - def MultiTargetNode(lefts, rest, rights, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#647 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], + optionals: T::Array[Prism::OptionalParameterNode], + rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), + posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], + keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], + keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), + 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 - # Create a new MultiWriteNode node + # Create a new ParenthesesNode node. # - # source://prism//lib/prism/dsl.rb#576 - def MultiWriteNode(lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#652 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T.nilable(Prism::Node), + opening_loc: Prism::Location, + 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 - # Create a new NextNode node + # Create a new PinnedExpressionNode node. # - # source://prism//lib/prism/dsl.rb#581 - def NextNode(arguments, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#657 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + operator_loc: Prism::Location, + lparen_loc: Prism::Location, + 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 - # Create a new NilNode node + # Create a new PinnedVariableNode node. # - # source://prism//lib/prism/dsl.rb#586 - def NilNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#662 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + 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 - # Create a new NoKeywordsParameterNode node + # Create a new PostExecutionNode node. # - # source://prism//lib/prism/dsl.rb#591 - def NoKeywordsParameterNode(operator_loc, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#667 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + 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 - # Create a new NumberedParametersNode node + # Create a new PreExecutionNode node. # - # source://prism//lib/prism/dsl.rb#596 - def NumberedParametersNode(maximum, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#672 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + statements: T.nilable(Prism::StatementsNode), + keyword_loc: Prism::Location, + opening_loc: Prism::Location, + 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 - # Create a new NumberedReferenceReadNode node + # Create a new ProgramNode node. # - # source://prism//lib/prism/dsl.rb#601 - def NumberedReferenceReadNode(number, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#677 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + 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 - # Create a new OptionalKeywordParameterNode node + # Retrieve the value of one of the RangeFlags flags. # - # source://prism//lib/prism/dsl.rb#606 - def OptionalKeywordParameterNode(flags, name, name_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#916 + sig { params(name: Symbol).returns(Integer) } + def range_flag(name); end - # Create a new OptionalParameterNode node + # Create a new RangeNode node. # - # source://prism//lib/prism/dsl.rb#611 - def OptionalParameterNode(flags, name, name_loc, operator_loc, value, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#682 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + left: T.nilable(Prism::Node), + right: T.nilable(Prism::Node), + 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 - # Create a new OrNode node + # Create a new RationalNode node. # - # source://prism//lib/prism/dsl.rb#616 - def OrNode(left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#687 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + numerator: Integer, + 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 - # Create a new ParametersNode node + # Create a new RedoNode node. # - # source://prism//lib/prism/dsl.rb#621 - def ParametersNode(requireds, optionals, rest, posts, keywords, keyword_rest, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#692 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new ParenthesesNode node + # Retrieve the value of one of the RegularExpressionFlags flags. # - # source://prism//lib/prism/dsl.rb#626 - def ParenthesesNode(body, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#924 + sig { params(name: Symbol).returns(Integer) } + def regular_expression_flag(name); end - # Create a new PinnedExpressionNode node + # Create a new RegularExpressionNode node. # - # source://prism//lib/prism/dsl.rb#631 - def PinnedExpressionNode(expression, operator_loc, lparen_loc, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#697 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + 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 - # Create a new PinnedVariableNode node + # Create a new RequiredKeywordParameterNode node. # - # source://prism//lib/prism/dsl.rb#636 - def PinnedVariableNode(variable, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#702 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + 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 - # Create a new PostExecutionNode node + # Create a new RequiredParameterNode node. # - # source://prism//lib/prism/dsl.rb#641 - def PostExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#707 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new PreExecutionNode node + # Create a new RescueModifierNode node. # - # source://prism//lib/prism/dsl.rb#646 - def PreExecutionNode(statements, keyword_loc, opening_loc, closing_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#712 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + expression: Prism::Node, + keyword_loc: Prism::Location, + 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 - # Create a new ProgramNode node + # Create a new RescueNode node. # - # source://prism//lib/prism/dsl.rb#651 - def ProgramNode(locals, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#717 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + exceptions: T::Array[Prism::Node], + operator_loc: T.nilable(Prism::Location), + reference: 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)), + statements: T.nilable(Prism::StatementsNode), + 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), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end - # Create a new RangeNode node + # Create a new RestParameterNode node. # - # source://prism//lib/prism/dsl.rb#656 - def RangeNode(flags, left, right, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#722 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: T.nilable(Symbol), + name_loc: T.nilable(Prism::Location), + 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 - # Create a new RationalNode node + # Create a new RetryNode node. # - # source://prism//lib/prism/dsl.rb#661 - def RationalNode(flags, numerator, denominator, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#727 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new RedoNode node + # Create a new ReturnNode node. # - # source://prism//lib/prism/dsl.rb#666 - def RedoNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#732 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + 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 - # Create a new RegularExpressionNode node + # Create a new SelfNode node. # - # source://prism//lib/prism/dsl.rb#671 - def RegularExpressionNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#737 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new RequiredKeywordParameterNode node + # Create a new ShareableConstantNode node. # - # source://prism//lib/prism/dsl.rb#676 - def RequiredKeywordParameterNode(flags, name, name_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#742 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new RequiredParameterNode node + # Retrieve the value of one of the ShareableConstantNodeFlags flags. # - # source://prism//lib/prism/dsl.rb#681 - def RequiredParameterNode(flags, name, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#942 + sig { params(name: Symbol).returns(Integer) } + def shareable_constant_node_flag(name); end - # Create a new RescueModifierNode node + # Create a new SingletonClassNode node. # - # source://prism//lib/prism/dsl.rb#686 - def RescueModifierNode(expression, keyword_loc, rescue_expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#747 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + locals: T::Array[Symbol], + class_keyword_loc: Prism::Location, + operator_loc: Prism::Location, + expression: Prism::Node, + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + 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 - # Create a new RescueNode node + # Create a new Source object. # - # source://prism//lib/prism/dsl.rb#691 - def RescueNode(keyword_loc, exceptions, operator_loc, reference, statements, consequent, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#67 + sig { params(string: String).returns(Prism::Source) } + def source(string); end - # Create a new RestParameterNode node + # Create a new SourceEncodingNode node. # - # source://prism//lib/prism/dsl.rb#696 - def RestParameterNode(flags, name, name_loc, operator_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#752 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new RetryNode node + # Create a new SourceFileNode node. # - # source://prism//lib/prism/dsl.rb#701 - def RetryNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#757 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new ReturnNode node + # Create a new SourceLineNode node. # - # source://prism//lib/prism/dsl.rb#706 - def ReturnNode(flags, keyword_loc, arguments, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#762 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new SelfNode node + # Create a new SplatNode node. # - # source://prism//lib/prism/dsl.rb#711 - def SelfNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#767 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + operator_loc: Prism::Location, + 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 - # Create a new ShareableConstantNode node + # Create a new StatementsNode node. # - # source://prism//lib/prism/dsl.rb#716 - def ShareableConstantNode(flags, write, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#772 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 - # Create a new SingletonClassNode node + # Retrieve the value of one of the StringFlags flags. # - # source://prism//lib/prism/dsl.rb#721 - def SingletonClassNode(locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#952 + sig { params(name: Symbol).returns(Integer) } + def string_flag(name); end - # Create a new SourceEncodingNode node + # Create a new StringNode node. # - # source://prism//lib/prism/dsl.rb#726 - def SourceEncodingNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#777 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + content_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + 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 - # Create a new SourceFileNode node + # Create a new SuperNode node. # - # source://prism//lib/prism/dsl.rb#731 - def SourceFileNode(flags, filepath, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#782 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + rparen_loc: T.nilable(Prism::Location), + 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 - # Create a new SourceLineNode node + # Retrieve the value of one of the SymbolFlags flags. # - # source://prism//lib/prism/dsl.rb#736 - def SourceLineNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#963 + sig { params(name: Symbol).returns(Integer) } + def symbol_flag(name); end - # Create a new SplatNode node + # Create a new SymbolNode node. # - # source://prism//lib/prism/dsl.rb#741 - def SplatNode(operator_loc, expression, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#787 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: T.nilable(Prism::Location), + value_loc: T.nilable(Prism::Location), + closing_loc: T.nilable(Prism::Location), + 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 - # Create a new StatementsNode node + # Create a new TrueNode node. # - # source://prism//lib/prism/dsl.rb#746 - def StatementsNode(body, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#792 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + 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 - # Create a new StringNode node + # Create a new UndefNode node. # - # source://prism//lib/prism/dsl.rb#751 - def StringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#797 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + 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 - # Create a new SuperNode node + # Create a new UnlessNode node. # - # source://prism//lib/prism/dsl.rb#756 - def SuperNode(keyword_loc, lparen_loc, arguments, rparen_loc, block, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#802 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + 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 - # Create a new SymbolNode node + # Create a new UntilNode node. # - # source://prism//lib/prism/dsl.rb#761 - def SymbolNode(flags, opening_loc, value_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#807 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + 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), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - # Create a new TrueNode node + # Create a new WhenNode node. # - # source://prism//lib/prism/dsl.rb#766 - def TrueNode(source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#812 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + conditions: T::Array[Prism::Node], + then_keyword_loc: T.nilable(Prism::Location), + 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 - # Create a new UndefNode node + # Create a new WhileNode node. # - # source://prism//lib/prism/dsl.rb#771 - def UndefNode(names, keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#817 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + closing_loc: T.nilable(Prism::Location), + predicate: Prism::Node, + 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), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end - # Create a new UnlessNode node + # Create a new XStringNode node. # - # source://prism//lib/prism/dsl.rb#776 - def UnlessNode(keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#822 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + opening_loc: Prism::Location, + content_loc: Prism::Location, + closing_loc: Prism::Location, + 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 - # Create a new UntilNode node + # Create a new YieldNode node. # - # source://prism//lib/prism/dsl.rb#781 - def UntilNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#827 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + lparen_loc: T.nilable(Prism::Location), + arguments: T.nilable(Prism::ArgumentsNode), + 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 - # Create a new WhenNode node - # - # source://prism//lib/prism/dsl.rb#786 - def WhenNode(keyword_loc, conditions, then_keyword_loc, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + private - # Create a new WhileNode node + # 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#791 - def WhileNode(flags, keyword_loc, closing_loc, predicate, statements, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#982 + sig { returns(Prism::Location) } + def default_location; end - # Create a new XStringNode node + # The default node that gets attached to nodes if no node is specified for a + # required node field. # - # source://prism//lib/prism/dsl.rb#796 - def XStringNode(flags, opening_loc, content_loc, closing_loc, unescaped, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#988 + sig { params(source: Prism::Source, location: Prism::Location).returns(Prism::Node) } + def default_node(source, location); end - # Create a new YieldNode node + # The default source object that gets attached to nodes and locations if no + # source is specified. # - # source://prism//lib/prism/dsl.rb#801 - def YieldNode(keyword_loc, lparen_loc, arguments, rparen_loc, source = T.unsafe(nil), location = T.unsafe(nil)); end + # source://prism//lib/prism/dsl.rb#976 + sig { returns(Prism::Source) } + def default_source; end end # Represents a method definition. @@ -9286,137 +10597,141 @@ end # end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#5793 +# source://prism//lib/prism/node.rb#5137 class Prism::DefNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node? receiver, ParametersNode? parameters, Prism::node? body, Array[Symbol] locals, Location def_keyword_loc, Location? operator_loc, Location? lparen_loc, Location? rparen_loc, Location? equal_loc, Location? end_keyword_loc, Location location) -> void + # Initialize a new DefNode node. # # @return [DefNode] a new instance of DefNode # - # source://prism//lib/prism/node.rb#5795 + # source://prism//lib/prism/node.rb#5139 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, receiver, parameters, body, locals, def_keyword_loc, operator_loc, lparen_loc, rparen_loc, equal_loc, end_keyword_loc); 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#6008 + # source://prism//lib/prism/node.rb#5336 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#5813 + # source://prism//lib/prism/node.rb#5159 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#5866 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#5212 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5818 + # source://prism//lib/prism/node.rb#5164 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#5832 + # source://prism//lib/prism/node.rb#5178 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#5823 + # source://prism//lib/prism/node.rb#5169 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?receiver: Prism::node?, ?parameters: ParametersNode?, ?body: Prism::node?, ?locals: Array[Symbol], ?def_keyword_loc: Location, ?operator_loc: Location?, ?lparen_loc: Location?, ?rparen_loc: Location?, ?equal_loc: Location?, ?end_keyword_loc: Location?, ?location: Location) -> DefNode + # 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#5837 + # source://prism//lib/prism/node.rb#5183 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, receiver: T.nilable(Prism::Node), parameters: T.nilable(Prism::ParametersNode), - body: T.nilable(Prism::Node), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), locals: T::Array[Symbol], def_keyword_loc: Prism::Location, operator_loc: T.nilable(Prism::Location), lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), equal_loc: T.nilable(Prism::Location), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::DefNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#5818 + # source://prism//lib/prism/node.rb#5164 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, receiver: Prism::node?, parameters: ParametersNode?, body: Prism::node?, locals: Array[Symbol], def_keyword_loc: Location, operator_loc: Location?, lparen_loc: Location?, rparen_loc: Location?, equal_loc: Location?, end_keyword_loc: Location?, location: Location } + # 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#5845 + # source://prism//lib/prism/node.rb#5191 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#5944 + # source://prism//lib/prism/node.rb#5290 sig { returns(String) } def def_keyword; end # attr_reader def_keyword_loc: Location # - # source://prism//lib/prism/node.rb#5872 + # source://prism//lib/prism/node.rb#5218 sig { returns(Prism::Location) } def def_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#5969 + # source://prism//lib/prism/node.rb#5315 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#5931 + # source://prism//lib/prism/node.rb#5277 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end # def equal: () -> String? # - # source://prism//lib/prism/node.rb#5964 + # source://prism//lib/prism/node.rb#5310 sig { returns(T.nilable(String)) } def equal; end # attr_reader equal_loc: Location? # - # source://prism//lib/prism/node.rb#5918 + # source://prism//lib/prism/node.rb#5264 sig { returns(T.nilable(Prism::Location)) } def equal_loc; end @@ -9425,104 +10740,86 @@ class Prism::DefNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#5974 + # source://prism//lib/prism/node.rb#5320 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#5869 + # source://prism//lib/prism/node.rb#5215 sig { returns(T::Array[Symbol]) } def locals; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#5954 + # source://prism//lib/prism/node.rb#5300 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#5892 + # source://prism//lib/prism/node.rb#5238 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#5850 + # source://prism//lib/prism/node.rb#5196 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#5853 + # source://prism//lib/prism/node.rb#5199 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#5949 + # source://prism//lib/prism/node.rb#5295 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#5879 + # source://prism//lib/prism/node.rb#5225 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end # attr_reader parameters: ParametersNode? # - # source://prism//lib/prism/node.rb#5863 + # source://prism//lib/prism/node.rb#5209 sig { returns(T.nilable(Prism::ParametersNode)) } def parameters; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#5860 + # source://prism//lib/prism/node.rb#5206 sig { returns(T.nilable(Prism::Node)) } def receiver; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#5959 + # source://prism//lib/prism/node.rb#5305 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#5905 + # source://prism//lib/prism/node.rb#5251 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#5992 + # source://prism//lib/prism/node.rb#5325 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6002 + # source://prism//lib/prism/node.rb#5330 def type; end end end @@ -9532,79 +10829,83 @@ end # defined?(a) # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6030 +# source://prism//lib/prism/node.rb#5358 class Prism::DefinedNode < ::Prism::Node - # def initialize: (Location? lparen_loc, Prism::node value, Location? rparen_loc, Location keyword_loc, Location location) -> void + # Initialize a new DefinedNode node. # # @return [DefinedNode] a new instance of DefinedNode # - # source://prism//lib/prism/node.rb#6032 + # source://prism//lib/prism/node.rb#5360 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, lparen_loc: T.nilable(Prism::Location), value: Prism::Node, rparen_loc: T.nilable(Prism::Location), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, lparen_loc, value, rparen_loc, keyword_loc, location); end + def initialize(source, node_id, location, flags, lparen_loc, value, rparen_loc, keyword_loc); 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#6160 + # source://prism//lib/prism/node.rb#5472 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6042 + # source://prism//lib/prism/node.rb#5372 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6047 + # source://prism//lib/prism/node.rb#5377 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#6057 + # source://prism//lib/prism/node.rb#5387 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#6052 + # source://prism//lib/prism/node.rb#5382 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?lparen_loc: Location?, ?value: Prism::node, ?rparen_loc: Location?, ?keyword_loc: Location, ?location: Location) -> DefinedNode + # 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#6062 + # source://prism//lib/prism/node.rb#5392 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, lparen_loc: T.nilable(Prism::Location), value: Prism::Node, rparen_loc: T.nilable(Prism::Location), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::DefinedNode) end - def copy(lparen_loc: T.unsafe(nil), value: T.unsafe(nil), rparen_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6047 + # source://prism//lib/prism/node.rb#5377 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { lparen_loc: Location?, value: Prism::node, rparen_loc: Location?, keyword_loc: Location, location: Location } + # 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#6070 + # source://prism//lib/prism/node.rb#5400 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -9613,126 +10914,110 @@ class Prism::DefinedNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6126 + # source://prism//lib/prism/node.rb#5456 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#6121 + # source://prism//lib/prism/node.rb#5451 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#6104 + # source://prism//lib/prism/node.rb#5434 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#6111 + # source://prism//lib/prism/node.rb#5441 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#6075 + # source://prism//lib/prism/node.rb#5405 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#6116 + # source://prism//lib/prism/node.rb#5446 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#6091 + # source://prism//lib/prism/node.rb#5421 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6144 + # source://prism//lib/prism/node.rb#5461 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#6088 + # source://prism//lib/prism/node.rb#5418 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6154 + # source://prism//lib/prism/node.rb#5466 def type; end end end # source://prism//lib/prism/desugar_compiler.rb#4 class Prism::DesugarAndWriteNode + include ::Prism::DSL + # @return [DesugarAndWriteNode] a new instance of DesugarAndWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#7 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#9 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 def arguments; end # Desugar `x &&= y` to `x && x = y` # - # source://prism//lib/prism/desugar_compiler.rb#16 + # source://prism//lib/prism/desugar_compiler.rb#18 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#7 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#5 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#5 + # source://prism//lib/prism/desugar_compiler.rb#7 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#218 +# source://prism//lib/prism/desugar_compiler.rb#255 class Prism::DesugarCompiler < ::Prism::MutationCompiler # @@foo &&= bar # @@ -9740,7 +11025,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo && @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#224 + # source://prism//lib/prism/desugar_compiler.rb#261 def visit_class_variable_and_write_node(node); end # @@foo += bar @@ -9749,7 +11034,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # @@foo = @@foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#242 + # source://prism//lib/prism/desugar_compiler.rb#279 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar @@ -9758,7 +11043,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(@@foo) ? @@foo : @@foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#233 + # source://prism//lib/prism/desugar_compiler.rb#270 def visit_class_variable_or_write_node(node); end # Foo &&= bar @@ -9767,7 +11052,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo && Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#251 + # source://prism//lib/prism/desugar_compiler.rb#288 def visit_constant_and_write_node(node); end # Foo += bar @@ -9776,7 +11061,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # Foo = Foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#269 + # source://prism//lib/prism/desugar_compiler.rb#306 def visit_constant_operator_write_node(node); end # Foo ||= bar @@ -9785,7 +11070,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?(Foo) ? Foo : Foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#260 + # source://prism//lib/prism/desugar_compiler.rb#297 def visit_constant_or_write_node(node); end # $foo &&= bar @@ -9794,7 +11079,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo && $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#278 + # source://prism//lib/prism/desugar_compiler.rb#315 def visit_global_variable_and_write_node(node); end # $foo += bar @@ -9803,7 +11088,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # $foo = $foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#296 + # source://prism//lib/prism/desugar_compiler.rb#333 def visit_global_variable_operator_write_node(node); end # $foo ||= bar @@ -9812,22 +11097,22 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # defined?($foo) ? $foo : $foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#287 + # source://prism//lib/prism/desugar_compiler.rb#324 def visit_global_variable_or_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#305 + # source://prism//lib/prism/desugar_compiler.rb#342 def visit_instance_variable_and_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#323 + # source://prism//lib/prism/desugar_compiler.rb#360 def visit_instance_variable_operator_write_node(node); end # becomes # - # source://prism//lib/prism/desugar_compiler.rb#314 + # source://prism//lib/prism/desugar_compiler.rb#351 def visit_instance_variable_or_write_node(node); end # foo &&= bar @@ -9836,7 +11121,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo && foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#332 + # source://prism//lib/prism/desugar_compiler.rb#369 def visit_local_variable_and_write_node(node); end # foo += bar @@ -9845,7 +11130,7 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo = foo + bar # - # source://prism//lib/prism/desugar_compiler.rb#350 + # source://prism//lib/prism/desugar_compiler.rb#387 def visit_local_variable_operator_write_node(node); end # foo ||= bar @@ -9854,121 +11139,127 @@ class Prism::DesugarCompiler < ::Prism::MutationCompiler # # foo || foo = bar # - # source://prism//lib/prism/desugar_compiler.rb#341 + # source://prism//lib/prism/desugar_compiler.rb#378 def visit_local_variable_or_write_node(node); end end -# source://prism//lib/prism/desugar_compiler.rb#63 +# source://prism//lib/prism/desugar_compiler.rb#86 class Prism::DesugarOperatorWriteNode + include ::Prism::DSL + # @return [DesugarOperatorWriteNode] a new instance of DesugarOperatorWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#66 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#91 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def arguments; end # Desugar `x += y` to `x = x + y` # - # source://prism//lib/prism/desugar_compiler.rb#75 + # source://prism//lib/prism/desugar_compiler.rb#100 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#89 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#64 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#64 + # source://prism//lib/prism/desugar_compiler.rb#89 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#27 +# source://prism//lib/prism/desugar_compiler.rb#35 class Prism::DesugarOrWriteDefinedNode + include ::Prism::DSL + # @return [DesugarOrWriteDefinedNode] a new instance of DesugarOrWriteDefinedNode # - # source://prism//lib/prism/desugar_compiler.rb#30 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#40 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def arguments; end # Desugar `x ||= y` to `defined?(x) ? x : x = y` # - # source://prism//lib/prism/desugar_compiler.rb#39 + # source://prism//lib/prism/desugar_compiler.rb#49 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#38 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#28 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#28 + # source://prism//lib/prism/desugar_compiler.rb#38 def write_class; end end -# source://prism//lib/prism/desugar_compiler.rb#101 +# source://prism//lib/prism/desugar_compiler.rb#130 class Prism::DesugarOrWriteNode + include ::Prism::DSL + # @return [DesugarOrWriteNode] a new instance of DesugarOrWriteNode # - # source://prism//lib/prism/desugar_compiler.rb#104 - def initialize(node, source, read_class, write_class, *arguments); end + # source://prism//lib/prism/desugar_compiler.rb#135 + def initialize(node, default_source, read_class, write_class, **arguments); end # Returns the value of attribute arguments. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def arguments; end # Desugar `x ||= y` to `x || x = y` # - # source://prism//lib/prism/desugar_compiler.rb#113 + # source://prism//lib/prism/desugar_compiler.rb#144 def compile; end + # Returns the value of attribute default_source. + # + # source://prism//lib/prism/desugar_compiler.rb#133 + def default_source; end + # Returns the value of attribute node. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def node; end # Returns the value of attribute read_class. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def read_class; end - # Returns the value of attribute source. - # - # source://prism//lib/prism/desugar_compiler.rb#102 - def source; end - # Returns the value of attribute write_class. # - # source://prism//lib/prism/desugar_compiler.rb#102 + # source://prism//lib/prism/desugar_compiler.rb#133 def write_class; end end @@ -9987,7 +11278,8 @@ end # end # end # -# dispatcher = Dispatcher.new +# listener = OctalListener.new +# dispatcher = Prism::Dispatcher.new # dispatcher.register(listener, :on_integer_node_enter) # # Then, you can walk any number of trees and dispatch events to the listeners: @@ -10003,13 +11295,13 @@ end # integer = result.value.statements.body.first.receiver.receiver # dispatcher.dispatch_once(integer) # -# source://prism//lib/prism/dispatcher.rb#41 +# source://prism//lib/prism/dispatcher.rb#42 class Prism::Dispatcher < ::Prism::Visitor # Initialize a new dispatcher. # # @return [Dispatcher] a new instance of Dispatcher # - # source://prism//lib/prism/dispatcher.rb#46 + # source://prism//lib/prism/dispatcher.rb#47 def initialize; end # Walks `root` dispatching events to all registered listeners. @@ -10023,1693 +11315,1693 @@ class Prism::Dispatcher < ::Prism::Visitor # # def dispatch_once: (Node) -> void # - # source://prism//lib/prism/dispatcher.rb#65 + # source://prism//lib/prism/dispatcher.rb#66 def dispatch_once(node); end # attr_reader listeners: Hash[Symbol, Array[Listener]] # - # source://prism//lib/prism/dispatcher.rb#43 + # source://prism//lib/prism/dispatcher.rb#44 def listeners; end # Register a listener for one or more events. # # def register: (Listener, *Symbol) -> void # - # source://prism//lib/prism/dispatcher.rb#53 + # source://prism//lib/prism/dispatcher.rb#54 def register(listener, *events); end # Dispatch enter and leave events for AliasGlobalVariableNode nodes and continue # walking the tree. # - # source://prism//lib/prism/dispatcher.rb#71 + # source://prism//lib/prism/dispatcher.rb#72 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#79 + # source://prism//lib/prism/dispatcher.rb#80 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#87 + # source://prism//lib/prism/dispatcher.rb#88 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#95 + # source://prism//lib/prism/dispatcher.rb#96 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#103 + # source://prism//lib/prism/dispatcher.rb#104 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#111 + # source://prism//lib/prism/dispatcher.rb#112 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#119 + # source://prism//lib/prism/dispatcher.rb#120 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#127 + # source://prism//lib/prism/dispatcher.rb#128 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#135 + # source://prism//lib/prism/dispatcher.rb#136 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#143 + # source://prism//lib/prism/dispatcher.rb#144 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#151 + # source://prism//lib/prism/dispatcher.rb#152 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#159 + # source://prism//lib/prism/dispatcher.rb#160 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#167 + # source://prism//lib/prism/dispatcher.rb#168 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#175 + # source://prism//lib/prism/dispatcher.rb#176 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#183 + # source://prism//lib/prism/dispatcher.rb#184 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#191 + # source://prism//lib/prism/dispatcher.rb#192 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#199 + # source://prism//lib/prism/dispatcher.rb#200 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#207 + # source://prism//lib/prism/dispatcher.rb#208 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#215 + # source://prism//lib/prism/dispatcher.rb#216 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#223 + # source://prism//lib/prism/dispatcher.rb#224 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#231 + # source://prism//lib/prism/dispatcher.rb#232 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#239 + # source://prism//lib/prism/dispatcher.rb#240 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#247 + # source://prism//lib/prism/dispatcher.rb#248 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#255 + # source://prism//lib/prism/dispatcher.rb#256 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#263 + # source://prism//lib/prism/dispatcher.rb#264 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#271 + # source://prism//lib/prism/dispatcher.rb#272 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#279 + # source://prism//lib/prism/dispatcher.rb#280 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#287 + # source://prism//lib/prism/dispatcher.rb#288 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#295 + # source://prism//lib/prism/dispatcher.rb#296 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#303 + # source://prism//lib/prism/dispatcher.rb#304 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#311 + # source://prism//lib/prism/dispatcher.rb#312 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#319 + # source://prism//lib/prism/dispatcher.rb#320 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#327 + # source://prism//lib/prism/dispatcher.rb#328 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#335 + # source://prism//lib/prism/dispatcher.rb#336 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#343 + # source://prism//lib/prism/dispatcher.rb#344 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#351 + # source://prism//lib/prism/dispatcher.rb#352 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#359 + # source://prism//lib/prism/dispatcher.rb#360 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#367 + # source://prism//lib/prism/dispatcher.rb#368 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#375 + # source://prism//lib/prism/dispatcher.rb#376 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#383 + # source://prism//lib/prism/dispatcher.rb#384 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#391 + # source://prism//lib/prism/dispatcher.rb#392 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#399 + # source://prism//lib/prism/dispatcher.rb#400 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#407 + # source://prism//lib/prism/dispatcher.rb#408 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#415 + # source://prism//lib/prism/dispatcher.rb#416 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#423 + # source://prism//lib/prism/dispatcher.rb#424 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#431 + # source://prism//lib/prism/dispatcher.rb#432 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#439 + # source://prism//lib/prism/dispatcher.rb#440 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#447 + # source://prism//lib/prism/dispatcher.rb#448 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#455 + # source://prism//lib/prism/dispatcher.rb#456 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#463 + # source://prism//lib/prism/dispatcher.rb#464 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#471 + # source://prism//lib/prism/dispatcher.rb#472 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#479 + # source://prism//lib/prism/dispatcher.rb#480 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#487 + # source://prism//lib/prism/dispatcher.rb#488 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#495 + # source://prism//lib/prism/dispatcher.rb#496 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#503 + # source://prism//lib/prism/dispatcher.rb#504 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#511 + # source://prism//lib/prism/dispatcher.rb#512 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#519 + # source://prism//lib/prism/dispatcher.rb#520 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#527 + # source://prism//lib/prism/dispatcher.rb#528 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#535 + # source://prism//lib/prism/dispatcher.rb#536 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#543 + # source://prism//lib/prism/dispatcher.rb#544 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#551 + # source://prism//lib/prism/dispatcher.rb#552 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#559 + # source://prism//lib/prism/dispatcher.rb#560 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#567 + # source://prism//lib/prism/dispatcher.rb#568 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#575 + # source://prism//lib/prism/dispatcher.rb#576 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#583 + # source://prism//lib/prism/dispatcher.rb#584 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#591 + # source://prism//lib/prism/dispatcher.rb#592 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#599 + # source://prism//lib/prism/dispatcher.rb#600 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#607 + # source://prism//lib/prism/dispatcher.rb#608 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#615 + # source://prism//lib/prism/dispatcher.rb#616 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#623 + # source://prism//lib/prism/dispatcher.rb#624 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#631 + # source://prism//lib/prism/dispatcher.rb#632 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#639 + # source://prism//lib/prism/dispatcher.rb#640 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#647 + # source://prism//lib/prism/dispatcher.rb#648 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#655 + # source://prism//lib/prism/dispatcher.rb#656 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#663 + # source://prism//lib/prism/dispatcher.rb#664 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#671 + # source://prism//lib/prism/dispatcher.rb#672 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#679 + # source://prism//lib/prism/dispatcher.rb#680 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#687 + # source://prism//lib/prism/dispatcher.rb#688 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#695 + # source://prism//lib/prism/dispatcher.rb#696 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#703 + # source://prism//lib/prism/dispatcher.rb#704 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#711 + # source://prism//lib/prism/dispatcher.rb#712 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#719 + # source://prism//lib/prism/dispatcher.rb#720 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#727 + # source://prism//lib/prism/dispatcher.rb#728 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#735 + # source://prism//lib/prism/dispatcher.rb#736 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#743 + # source://prism//lib/prism/dispatcher.rb#744 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#751 + # source://prism//lib/prism/dispatcher.rb#752 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#759 + # source://prism//lib/prism/dispatcher.rb#760 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#767 + # source://prism//lib/prism/dispatcher.rb#768 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#775 + # source://prism//lib/prism/dispatcher.rb#776 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#783 + # source://prism//lib/prism/dispatcher.rb#784 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#791 + # source://prism//lib/prism/dispatcher.rb#792 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#799 + # source://prism//lib/prism/dispatcher.rb#800 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#807 + # source://prism//lib/prism/dispatcher.rb#808 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#815 + # source://prism//lib/prism/dispatcher.rb#816 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#823 + # source://prism//lib/prism/dispatcher.rb#824 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#831 + # source://prism//lib/prism/dispatcher.rb#832 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#839 + # source://prism//lib/prism/dispatcher.rb#840 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#847 + # source://prism//lib/prism/dispatcher.rb#848 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#855 + # source://prism//lib/prism/dispatcher.rb#856 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#863 + # source://prism//lib/prism/dispatcher.rb#864 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#871 + # source://prism//lib/prism/dispatcher.rb#872 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#879 + # source://prism//lib/prism/dispatcher.rb#880 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#887 + # source://prism//lib/prism/dispatcher.rb#888 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#895 + # source://prism//lib/prism/dispatcher.rb#896 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#903 + # source://prism//lib/prism/dispatcher.rb#904 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#911 + # source://prism//lib/prism/dispatcher.rb#912 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#919 + # source://prism//lib/prism/dispatcher.rb#920 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#927 + # source://prism//lib/prism/dispatcher.rb#928 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#935 + # source://prism//lib/prism/dispatcher.rb#936 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#943 + # source://prism//lib/prism/dispatcher.rb#944 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#951 + # source://prism//lib/prism/dispatcher.rb#952 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#959 + # source://prism//lib/prism/dispatcher.rb#960 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#967 + # source://prism//lib/prism/dispatcher.rb#968 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#975 + # source://prism//lib/prism/dispatcher.rb#976 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#983 + # source://prism//lib/prism/dispatcher.rb#984 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#991 + # source://prism//lib/prism/dispatcher.rb#992 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#999 + # source://prism//lib/prism/dispatcher.rb#1000 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#1007 + # source://prism//lib/prism/dispatcher.rb#1008 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#1015 + # source://prism//lib/prism/dispatcher.rb#1016 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#1023 + # source://prism//lib/prism/dispatcher.rb#1024 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#1031 + # source://prism//lib/prism/dispatcher.rb#1032 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#1039 + # source://prism//lib/prism/dispatcher.rb#1040 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#1047 + # source://prism//lib/prism/dispatcher.rb#1048 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#1055 + # source://prism//lib/prism/dispatcher.rb#1056 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#1063 + # source://prism//lib/prism/dispatcher.rb#1064 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#1071 + # source://prism//lib/prism/dispatcher.rb#1072 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#1079 + # source://prism//lib/prism/dispatcher.rb#1080 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#1087 + # source://prism//lib/prism/dispatcher.rb#1088 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#1095 + # source://prism//lib/prism/dispatcher.rb#1096 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#1103 + # source://prism//lib/prism/dispatcher.rb#1104 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#1111 + # source://prism//lib/prism/dispatcher.rb#1112 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#1119 + # source://prism//lib/prism/dispatcher.rb#1120 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#1127 + # source://prism//lib/prism/dispatcher.rb#1128 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#1135 + # source://prism//lib/prism/dispatcher.rb#1136 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#1143 + # source://prism//lib/prism/dispatcher.rb#1144 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#1151 + # source://prism//lib/prism/dispatcher.rb#1152 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#1159 + # source://prism//lib/prism/dispatcher.rb#1160 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#1167 + # source://prism//lib/prism/dispatcher.rb#1168 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#1175 + # source://prism//lib/prism/dispatcher.rb#1176 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#1183 + # source://prism//lib/prism/dispatcher.rb#1184 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#1191 + # source://prism//lib/prism/dispatcher.rb#1192 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#1199 + # source://prism//lib/prism/dispatcher.rb#1200 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#1207 + # source://prism//lib/prism/dispatcher.rb#1208 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#1215 + # source://prism//lib/prism/dispatcher.rb#1216 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#1223 + # source://prism//lib/prism/dispatcher.rb#1224 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#1231 + # source://prism//lib/prism/dispatcher.rb#1232 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#1239 + # source://prism//lib/prism/dispatcher.rb#1240 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#1247 + # source://prism//lib/prism/dispatcher.rb#1248 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#1255 + # source://prism//lib/prism/dispatcher.rb#1256 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#1263 + # source://prism//lib/prism/dispatcher.rb#1264 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#1271 + # source://prism//lib/prism/dispatcher.rb#1272 def visit_yield_node(node); end end -# source://prism//lib/prism/dispatcher.rb#1277 +# source://prism//lib/prism/dispatcher.rb#1278 class Prism::Dispatcher::DispatchOnce < ::Prism::Visitor # @return [DispatchOnce] a new instance of DispatchOnce # - # source://prism//lib/prism/dispatcher.rb#1280 + # source://prism//lib/prism/dispatcher.rb#1281 def initialize(listeners); end # Returns the value of attribute listeners. # - # source://prism//lib/prism/dispatcher.rb#1278 + # source://prism//lib/prism/dispatcher.rb#1279 def listeners; end # Dispatch enter and leave events for AliasGlobalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1285 + # source://prism//lib/prism/dispatcher.rb#1286 def visit_alias_global_variable_node(node); end # Dispatch enter and leave events for AliasMethodNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1291 + # source://prism//lib/prism/dispatcher.rb#1292 def visit_alias_method_node(node); end # Dispatch enter and leave events for AlternationPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1297 + # source://prism//lib/prism/dispatcher.rb#1298 def visit_alternation_pattern_node(node); end # Dispatch enter and leave events for AndNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1303 + # source://prism//lib/prism/dispatcher.rb#1304 def visit_and_node(node); end # Dispatch enter and leave events for ArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1309 + # source://prism//lib/prism/dispatcher.rb#1310 def visit_arguments_node(node); end # Dispatch enter and leave events for ArrayNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1315 + # source://prism//lib/prism/dispatcher.rb#1316 def visit_array_node(node); end # Dispatch enter and leave events for ArrayPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1321 + # source://prism//lib/prism/dispatcher.rb#1322 def visit_array_pattern_node(node); end # Dispatch enter and leave events for AssocNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1327 + # source://prism//lib/prism/dispatcher.rb#1328 def visit_assoc_node(node); end # Dispatch enter and leave events for AssocSplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1333 + # source://prism//lib/prism/dispatcher.rb#1334 def visit_assoc_splat_node(node); end # Dispatch enter and leave events for BackReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1339 + # source://prism//lib/prism/dispatcher.rb#1340 def visit_back_reference_read_node(node); end # Dispatch enter and leave events for BeginNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1345 + # source://prism//lib/prism/dispatcher.rb#1346 def visit_begin_node(node); end # Dispatch enter and leave events for BlockArgumentNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1351 + # source://prism//lib/prism/dispatcher.rb#1352 def visit_block_argument_node(node); end # Dispatch enter and leave events for BlockLocalVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1357 + # source://prism//lib/prism/dispatcher.rb#1358 def visit_block_local_variable_node(node); end # Dispatch enter and leave events for BlockNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1363 + # source://prism//lib/prism/dispatcher.rb#1364 def visit_block_node(node); end # Dispatch enter and leave events for BlockParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1369 + # source://prism//lib/prism/dispatcher.rb#1370 def visit_block_parameter_node(node); end # Dispatch enter and leave events for BlockParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1375 + # source://prism//lib/prism/dispatcher.rb#1376 def visit_block_parameters_node(node); end # Dispatch enter and leave events for BreakNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1381 + # source://prism//lib/prism/dispatcher.rb#1382 def visit_break_node(node); end # Dispatch enter and leave events for CallAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1387 + # source://prism//lib/prism/dispatcher.rb#1388 def visit_call_and_write_node(node); end # Dispatch enter and leave events for CallNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1393 + # source://prism//lib/prism/dispatcher.rb#1394 def visit_call_node(node); end # Dispatch enter and leave events for CallOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1399 + # source://prism//lib/prism/dispatcher.rb#1400 def visit_call_operator_write_node(node); end # Dispatch enter and leave events for CallOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1405 + # source://prism//lib/prism/dispatcher.rb#1406 def visit_call_or_write_node(node); end # Dispatch enter and leave events for CallTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1411 + # source://prism//lib/prism/dispatcher.rb#1412 def visit_call_target_node(node); end # Dispatch enter and leave events for CapturePatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1417 + # source://prism//lib/prism/dispatcher.rb#1418 def visit_capture_pattern_node(node); end # Dispatch enter and leave events for CaseMatchNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1423 + # source://prism//lib/prism/dispatcher.rb#1424 def visit_case_match_node(node); end # Dispatch enter and leave events for CaseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1429 + # source://prism//lib/prism/dispatcher.rb#1430 def visit_case_node(node); end # Dispatch enter and leave events for ClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1435 + # source://prism//lib/prism/dispatcher.rb#1436 def visit_class_node(node); end # Dispatch enter and leave events for ClassVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1441 + # source://prism//lib/prism/dispatcher.rb#1442 def visit_class_variable_and_write_node(node); end # Dispatch enter and leave events for ClassVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1447 + # source://prism//lib/prism/dispatcher.rb#1448 def visit_class_variable_operator_write_node(node); end # Dispatch enter and leave events for ClassVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1453 + # source://prism//lib/prism/dispatcher.rb#1454 def visit_class_variable_or_write_node(node); end # Dispatch enter and leave events for ClassVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1459 + # source://prism//lib/prism/dispatcher.rb#1460 def visit_class_variable_read_node(node); end # Dispatch enter and leave events for ClassVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1465 + # source://prism//lib/prism/dispatcher.rb#1466 def visit_class_variable_target_node(node); end # Dispatch enter and leave events for ClassVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1471 + # source://prism//lib/prism/dispatcher.rb#1472 def visit_class_variable_write_node(node); end # Dispatch enter and leave events for ConstantAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1477 + # source://prism//lib/prism/dispatcher.rb#1478 def visit_constant_and_write_node(node); end # Dispatch enter and leave events for ConstantOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1483 + # source://prism//lib/prism/dispatcher.rb#1484 def visit_constant_operator_write_node(node); end # Dispatch enter and leave events for ConstantOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1489 + # source://prism//lib/prism/dispatcher.rb#1490 def visit_constant_or_write_node(node); end # Dispatch enter and leave events for ConstantPathAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1495 + # source://prism//lib/prism/dispatcher.rb#1496 def visit_constant_path_and_write_node(node); end # Dispatch enter and leave events for ConstantPathNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1501 + # source://prism//lib/prism/dispatcher.rb#1502 def visit_constant_path_node(node); end # Dispatch enter and leave events for ConstantPathOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1507 + # source://prism//lib/prism/dispatcher.rb#1508 def visit_constant_path_operator_write_node(node); end # Dispatch enter and leave events for ConstantPathOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1513 + # source://prism//lib/prism/dispatcher.rb#1514 def visit_constant_path_or_write_node(node); end # Dispatch enter and leave events for ConstantPathTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1519 + # source://prism//lib/prism/dispatcher.rb#1520 def visit_constant_path_target_node(node); end # Dispatch enter and leave events for ConstantPathWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1525 + # source://prism//lib/prism/dispatcher.rb#1526 def visit_constant_path_write_node(node); end # Dispatch enter and leave events for ConstantReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1531 + # source://prism//lib/prism/dispatcher.rb#1532 def visit_constant_read_node(node); end # Dispatch enter and leave events for ConstantTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1537 + # source://prism//lib/prism/dispatcher.rb#1538 def visit_constant_target_node(node); end # Dispatch enter and leave events for ConstantWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1543 + # source://prism//lib/prism/dispatcher.rb#1544 def visit_constant_write_node(node); end # Dispatch enter and leave events for DefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1549 + # source://prism//lib/prism/dispatcher.rb#1550 def visit_def_node(node); end # Dispatch enter and leave events for DefinedNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1555 + # source://prism//lib/prism/dispatcher.rb#1556 def visit_defined_node(node); end # Dispatch enter and leave events for ElseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1561 + # source://prism//lib/prism/dispatcher.rb#1562 def visit_else_node(node); end # Dispatch enter and leave events for EmbeddedStatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1567 + # source://prism//lib/prism/dispatcher.rb#1568 def visit_embedded_statements_node(node); end # Dispatch enter and leave events for EmbeddedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1573 + # source://prism//lib/prism/dispatcher.rb#1574 def visit_embedded_variable_node(node); end # Dispatch enter and leave events for EnsureNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1579 + # source://prism//lib/prism/dispatcher.rb#1580 def visit_ensure_node(node); end # Dispatch enter and leave events for FalseNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1585 + # source://prism//lib/prism/dispatcher.rb#1586 def visit_false_node(node); end # Dispatch enter and leave events for FindPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1591 + # source://prism//lib/prism/dispatcher.rb#1592 def visit_find_pattern_node(node); end # Dispatch enter and leave events for FlipFlopNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1597 + # source://prism//lib/prism/dispatcher.rb#1598 def visit_flip_flop_node(node); end # Dispatch enter and leave events for FloatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1603 + # source://prism//lib/prism/dispatcher.rb#1604 def visit_float_node(node); end # Dispatch enter and leave events for ForNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1609 + # source://prism//lib/prism/dispatcher.rb#1610 def visit_for_node(node); end # Dispatch enter and leave events for ForwardingArgumentsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1615 + # source://prism//lib/prism/dispatcher.rb#1616 def visit_forwarding_arguments_node(node); end # Dispatch enter and leave events for ForwardingParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1621 + # source://prism//lib/prism/dispatcher.rb#1622 def visit_forwarding_parameter_node(node); end # Dispatch enter and leave events for ForwardingSuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1627 + # source://prism//lib/prism/dispatcher.rb#1628 def visit_forwarding_super_node(node); end # Dispatch enter and leave events for GlobalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1633 + # source://prism//lib/prism/dispatcher.rb#1634 def visit_global_variable_and_write_node(node); end # Dispatch enter and leave events for GlobalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1639 + # source://prism//lib/prism/dispatcher.rb#1640 def visit_global_variable_operator_write_node(node); end # Dispatch enter and leave events for GlobalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1645 + # source://prism//lib/prism/dispatcher.rb#1646 def visit_global_variable_or_write_node(node); end # Dispatch enter and leave events for GlobalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1651 + # source://prism//lib/prism/dispatcher.rb#1652 def visit_global_variable_read_node(node); end # Dispatch enter and leave events for GlobalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1657 + # source://prism//lib/prism/dispatcher.rb#1658 def visit_global_variable_target_node(node); end # Dispatch enter and leave events for GlobalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1663 + # source://prism//lib/prism/dispatcher.rb#1664 def visit_global_variable_write_node(node); end # Dispatch enter and leave events for HashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1669 + # source://prism//lib/prism/dispatcher.rb#1670 def visit_hash_node(node); end # Dispatch enter and leave events for HashPatternNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1675 + # source://prism//lib/prism/dispatcher.rb#1676 def visit_hash_pattern_node(node); end # Dispatch enter and leave events for IfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1681 + # source://prism//lib/prism/dispatcher.rb#1682 def visit_if_node(node); end # Dispatch enter and leave events for ImaginaryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1687 + # source://prism//lib/prism/dispatcher.rb#1688 def visit_imaginary_node(node); end # Dispatch enter and leave events for ImplicitNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1693 + # source://prism//lib/prism/dispatcher.rb#1694 def visit_implicit_node(node); end # Dispatch enter and leave events for ImplicitRestNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1699 + # source://prism//lib/prism/dispatcher.rb#1700 def visit_implicit_rest_node(node); end # Dispatch enter and leave events for InNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1705 + # source://prism//lib/prism/dispatcher.rb#1706 def visit_in_node(node); end # Dispatch enter and leave events for IndexAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1711 + # source://prism//lib/prism/dispatcher.rb#1712 def visit_index_and_write_node(node); end # Dispatch enter and leave events for IndexOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1717 + # source://prism//lib/prism/dispatcher.rb#1718 def visit_index_operator_write_node(node); end # Dispatch enter and leave events for IndexOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1723 + # source://prism//lib/prism/dispatcher.rb#1724 def visit_index_or_write_node(node); end # Dispatch enter and leave events for IndexTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1729 + # source://prism//lib/prism/dispatcher.rb#1730 def visit_index_target_node(node); end # Dispatch enter and leave events for InstanceVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1735 + # source://prism//lib/prism/dispatcher.rb#1736 def visit_instance_variable_and_write_node(node); end # Dispatch enter and leave events for InstanceVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1741 + # source://prism//lib/prism/dispatcher.rb#1742 def visit_instance_variable_operator_write_node(node); end # Dispatch enter and leave events for InstanceVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1747 + # source://prism//lib/prism/dispatcher.rb#1748 def visit_instance_variable_or_write_node(node); end # Dispatch enter and leave events for InstanceVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1753 + # source://prism//lib/prism/dispatcher.rb#1754 def visit_instance_variable_read_node(node); end # Dispatch enter and leave events for InstanceVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1759 + # source://prism//lib/prism/dispatcher.rb#1760 def visit_instance_variable_target_node(node); end # Dispatch enter and leave events for InstanceVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1765 + # source://prism//lib/prism/dispatcher.rb#1766 def visit_instance_variable_write_node(node); end # Dispatch enter and leave events for IntegerNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1771 + # source://prism//lib/prism/dispatcher.rb#1772 def visit_integer_node(node); end # Dispatch enter and leave events for InterpolatedMatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1777 + # source://prism//lib/prism/dispatcher.rb#1778 def visit_interpolated_match_last_line_node(node); end # Dispatch enter and leave events for InterpolatedRegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1783 + # source://prism//lib/prism/dispatcher.rb#1784 def visit_interpolated_regular_expression_node(node); end # Dispatch enter and leave events for InterpolatedStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1789 + # source://prism//lib/prism/dispatcher.rb#1790 def visit_interpolated_string_node(node); end # Dispatch enter and leave events for InterpolatedSymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1795 + # source://prism//lib/prism/dispatcher.rb#1796 def visit_interpolated_symbol_node(node); end # Dispatch enter and leave events for InterpolatedXStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1801 + # source://prism//lib/prism/dispatcher.rb#1802 def visit_interpolated_x_string_node(node); end # Dispatch enter and leave events for ItLocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1807 + # source://prism//lib/prism/dispatcher.rb#1808 def visit_it_local_variable_read_node(node); end # Dispatch enter and leave events for ItParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1813 + # source://prism//lib/prism/dispatcher.rb#1814 def visit_it_parameters_node(node); end # Dispatch enter and leave events for KeywordHashNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1819 + # source://prism//lib/prism/dispatcher.rb#1820 def visit_keyword_hash_node(node); end # Dispatch enter and leave events for KeywordRestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1825 + # source://prism//lib/prism/dispatcher.rb#1826 def visit_keyword_rest_parameter_node(node); end # Dispatch enter and leave events for LambdaNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1831 + # source://prism//lib/prism/dispatcher.rb#1832 def visit_lambda_node(node); end # Dispatch enter and leave events for LocalVariableAndWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1837 + # source://prism//lib/prism/dispatcher.rb#1838 def visit_local_variable_and_write_node(node); end # Dispatch enter and leave events for LocalVariableOperatorWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1843 + # source://prism//lib/prism/dispatcher.rb#1844 def visit_local_variable_operator_write_node(node); end # Dispatch enter and leave events for LocalVariableOrWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1849 + # source://prism//lib/prism/dispatcher.rb#1850 def visit_local_variable_or_write_node(node); end # Dispatch enter and leave events for LocalVariableReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1855 + # source://prism//lib/prism/dispatcher.rb#1856 def visit_local_variable_read_node(node); end # Dispatch enter and leave events for LocalVariableTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1861 + # source://prism//lib/prism/dispatcher.rb#1862 def visit_local_variable_target_node(node); end # Dispatch enter and leave events for LocalVariableWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1867 + # source://prism//lib/prism/dispatcher.rb#1868 def visit_local_variable_write_node(node); end # Dispatch enter and leave events for MatchLastLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1873 + # source://prism//lib/prism/dispatcher.rb#1874 def visit_match_last_line_node(node); end # Dispatch enter and leave events for MatchPredicateNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1879 + # source://prism//lib/prism/dispatcher.rb#1880 def visit_match_predicate_node(node); end # Dispatch enter and leave events for MatchRequiredNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1885 + # source://prism//lib/prism/dispatcher.rb#1886 def visit_match_required_node(node); end # Dispatch enter and leave events for MatchWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1891 + # source://prism//lib/prism/dispatcher.rb#1892 def visit_match_write_node(node); end # Dispatch enter and leave events for MissingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1897 + # source://prism//lib/prism/dispatcher.rb#1898 def visit_missing_node(node); end # Dispatch enter and leave events for ModuleNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1903 + # source://prism//lib/prism/dispatcher.rb#1904 def visit_module_node(node); end # Dispatch enter and leave events for MultiTargetNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1909 + # source://prism//lib/prism/dispatcher.rb#1910 def visit_multi_target_node(node); end # Dispatch enter and leave events for MultiWriteNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1915 + # source://prism//lib/prism/dispatcher.rb#1916 def visit_multi_write_node(node); end # Dispatch enter and leave events for NextNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1921 + # source://prism//lib/prism/dispatcher.rb#1922 def visit_next_node(node); end # Dispatch enter and leave events for NilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1927 + # source://prism//lib/prism/dispatcher.rb#1928 def visit_nil_node(node); end # Dispatch enter and leave events for NoKeywordsParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1933 + # source://prism//lib/prism/dispatcher.rb#1934 def visit_no_keywords_parameter_node(node); end # Dispatch enter and leave events for NumberedParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1939 + # source://prism//lib/prism/dispatcher.rb#1940 def visit_numbered_parameters_node(node); end # Dispatch enter and leave events for NumberedReferenceReadNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1945 + # source://prism//lib/prism/dispatcher.rb#1946 def visit_numbered_reference_read_node(node); end # Dispatch enter and leave events for OptionalKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1951 + # source://prism//lib/prism/dispatcher.rb#1952 def visit_optional_keyword_parameter_node(node); end # Dispatch enter and leave events for OptionalParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1957 + # source://prism//lib/prism/dispatcher.rb#1958 def visit_optional_parameter_node(node); end # Dispatch enter and leave events for OrNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1963 + # source://prism//lib/prism/dispatcher.rb#1964 def visit_or_node(node); end # Dispatch enter and leave events for ParametersNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1969 + # source://prism//lib/prism/dispatcher.rb#1970 def visit_parameters_node(node); end # Dispatch enter and leave events for ParenthesesNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1975 + # source://prism//lib/prism/dispatcher.rb#1976 def visit_parentheses_node(node); end # Dispatch enter and leave events for PinnedExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1981 + # source://prism//lib/prism/dispatcher.rb#1982 def visit_pinned_expression_node(node); end # Dispatch enter and leave events for PinnedVariableNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1987 + # source://prism//lib/prism/dispatcher.rb#1988 def visit_pinned_variable_node(node); end # Dispatch enter and leave events for PostExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1993 + # source://prism//lib/prism/dispatcher.rb#1994 def visit_post_execution_node(node); end # Dispatch enter and leave events for PreExecutionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#1999 + # source://prism//lib/prism/dispatcher.rb#2000 def visit_pre_execution_node(node); end # Dispatch enter and leave events for ProgramNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2005 + # source://prism//lib/prism/dispatcher.rb#2006 def visit_program_node(node); end # Dispatch enter and leave events for RangeNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2011 + # source://prism//lib/prism/dispatcher.rb#2012 def visit_range_node(node); end # Dispatch enter and leave events for RationalNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2017 + # source://prism//lib/prism/dispatcher.rb#2018 def visit_rational_node(node); end # Dispatch enter and leave events for RedoNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2023 + # source://prism//lib/prism/dispatcher.rb#2024 def visit_redo_node(node); end # Dispatch enter and leave events for RegularExpressionNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2029 + # source://prism//lib/prism/dispatcher.rb#2030 def visit_regular_expression_node(node); end # Dispatch enter and leave events for RequiredKeywordParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2035 + # source://prism//lib/prism/dispatcher.rb#2036 def visit_required_keyword_parameter_node(node); end # Dispatch enter and leave events for RequiredParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2041 + # source://prism//lib/prism/dispatcher.rb#2042 def visit_required_parameter_node(node); end # Dispatch enter and leave events for RescueModifierNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2047 + # source://prism//lib/prism/dispatcher.rb#2048 def visit_rescue_modifier_node(node); end # Dispatch enter and leave events for RescueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2053 + # source://prism//lib/prism/dispatcher.rb#2054 def visit_rescue_node(node); end # Dispatch enter and leave events for RestParameterNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2059 + # source://prism//lib/prism/dispatcher.rb#2060 def visit_rest_parameter_node(node); end # Dispatch enter and leave events for RetryNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2065 + # source://prism//lib/prism/dispatcher.rb#2066 def visit_retry_node(node); end # Dispatch enter and leave events for ReturnNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2071 + # source://prism//lib/prism/dispatcher.rb#2072 def visit_return_node(node); end # Dispatch enter and leave events for SelfNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2077 + # source://prism//lib/prism/dispatcher.rb#2078 def visit_self_node(node); end # Dispatch enter and leave events for ShareableConstantNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2083 + # source://prism//lib/prism/dispatcher.rb#2084 def visit_shareable_constant_node(node); end # Dispatch enter and leave events for SingletonClassNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2089 + # source://prism//lib/prism/dispatcher.rb#2090 def visit_singleton_class_node(node); end # Dispatch enter and leave events for SourceEncodingNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2095 + # source://prism//lib/prism/dispatcher.rb#2096 def visit_source_encoding_node(node); end # Dispatch enter and leave events for SourceFileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2101 + # source://prism//lib/prism/dispatcher.rb#2102 def visit_source_file_node(node); end # Dispatch enter and leave events for SourceLineNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2107 + # source://prism//lib/prism/dispatcher.rb#2108 def visit_source_line_node(node); end # Dispatch enter and leave events for SplatNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2113 + # source://prism//lib/prism/dispatcher.rb#2114 def visit_splat_node(node); end # Dispatch enter and leave events for StatementsNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2119 + # source://prism//lib/prism/dispatcher.rb#2120 def visit_statements_node(node); end # Dispatch enter and leave events for StringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2125 + # source://prism//lib/prism/dispatcher.rb#2126 def visit_string_node(node); end # Dispatch enter and leave events for SuperNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2131 + # source://prism//lib/prism/dispatcher.rb#2132 def visit_super_node(node); end # Dispatch enter and leave events for SymbolNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2137 + # source://prism//lib/prism/dispatcher.rb#2138 def visit_symbol_node(node); end # Dispatch enter and leave events for TrueNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2143 + # source://prism//lib/prism/dispatcher.rb#2144 def visit_true_node(node); end # Dispatch enter and leave events for UndefNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2149 + # source://prism//lib/prism/dispatcher.rb#2150 def visit_undef_node(node); end # Dispatch enter and leave events for UnlessNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2155 + # source://prism//lib/prism/dispatcher.rb#2156 def visit_unless_node(node); end # Dispatch enter and leave events for UntilNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2161 + # source://prism//lib/prism/dispatcher.rb#2162 def visit_until_node(node); end # Dispatch enter and leave events for WhenNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2167 + # source://prism//lib/prism/dispatcher.rb#2168 def visit_when_node(node); end # Dispatch enter and leave events for WhileNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2173 + # source://prism//lib/prism/dispatcher.rb#2174 def visit_while_node(node); end # Dispatch enter and leave events for XStringNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2179 + # source://prism//lib/prism/dispatcher.rb#2180 def visit_x_string_node(node); end # Dispatch enter and leave events for YieldNode nodes. # - # source://prism//lib/prism/dispatcher.rb#2185 + # source://prism//lib/prism/dispatcher.rb#2186 def visit_yield_node(node); end end @@ -12397,97 +13689,97 @@ class Prism::DotVisitor < ::Prism::Visitor # Visit a SelfNode node. # - # source://prism//lib/prism/dot_visitor.rb#4047 + # source://prism//lib/prism/dot_visitor.rb#4044 def visit_self_node(node); end # Visit a ShareableConstantNode node. # - # source://prism//lib/prism/dot_visitor.rb#4061 + # source://prism//lib/prism/dot_visitor.rb#4058 def visit_shareable_constant_node(node); end # Visit a SingletonClassNode node. # - # source://prism//lib/prism/dot_visitor.rb#4082 + # source://prism//lib/prism/dot_visitor.rb#4079 def visit_singleton_class_node(node); end # Visit a SourceEncodingNode node. # - # source://prism//lib/prism/dot_visitor.rb#4118 + # source://prism//lib/prism/dot_visitor.rb#4115 def visit_source_encoding_node(node); end # Visit a SourceFileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4132 + # source://prism//lib/prism/dot_visitor.rb#4129 def visit_source_file_node(node); end # Visit a SourceLineNode node. # - # source://prism//lib/prism/dot_visitor.rb#4152 + # source://prism//lib/prism/dot_visitor.rb#4149 def visit_source_line_node(node); end # Visit a SplatNode node. # - # source://prism//lib/prism/dot_visitor.rb#4166 + # source://prism//lib/prism/dot_visitor.rb#4163 def visit_splat_node(node); end # Visit a StatementsNode node. # - # source://prism//lib/prism/dot_visitor.rb#4189 + # source://prism//lib/prism/dot_visitor.rb#4186 def visit_statements_node(node); end # Visit a StringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4216 + # source://prism//lib/prism/dot_visitor.rb#4213 def visit_string_node(node); end # Visit a SuperNode node. # - # source://prism//lib/prism/dot_visitor.rb#4249 + # source://prism//lib/prism/dot_visitor.rb#4246 def visit_super_node(node); end # Visit a SymbolNode node. # - # source://prism//lib/prism/dot_visitor.rb#4288 + # source://prism//lib/prism/dot_visitor.rb#4285 def visit_symbol_node(node); end # Visit a TrueNode node. # - # source://prism//lib/prism/dot_visitor.rb#4323 + # source://prism//lib/prism/dot_visitor.rb#4320 def visit_true_node(node); end # Visit a UndefNode node. # - # source://prism//lib/prism/dot_visitor.rb#4337 + # source://prism//lib/prism/dot_visitor.rb#4334 def visit_undef_node(node); end # Visit a UnlessNode node. # - # source://prism//lib/prism/dot_visitor.rb#4367 + # source://prism//lib/prism/dot_visitor.rb#4364 def visit_unless_node(node); end # Visit a UntilNode node. # - # source://prism//lib/prism/dot_visitor.rb#4410 + # source://prism//lib/prism/dot_visitor.rb#4407 def visit_until_node(node); end # Visit a WhenNode node. # - # source://prism//lib/prism/dot_visitor.rb#4445 + # source://prism//lib/prism/dot_visitor.rb#4442 def visit_when_node(node); end # Visit a WhileNode node. # - # source://prism//lib/prism/dot_visitor.rb#4486 + # source://prism//lib/prism/dot_visitor.rb#4483 def visit_while_node(node); end # Visit a XStringNode node. # - # source://prism//lib/prism/dot_visitor.rb#4521 + # source://prism//lib/prism/dot_visitor.rb#4518 def visit_x_string_node(node); end # Visit a YieldNode node. # - # source://prism//lib/prism/dot_visitor.rb#4550 + # source://prism//lib/prism/dot_visitor.rb#4547 def visit_yield_node(node); end private @@ -12495,7 +13787,7 @@ 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#4596 + # source://prism//lib/prism/dot_visitor.rb#4593 def arguments_node_flags_inspect(node); end # Inspect a node that has array_node_flags flags to display the flags as a @@ -12536,7 +13828,7 @@ class Prism::DotVisitor < ::Prism::Visitor # Inspect a location to display the start and end line and column numbers. # - # source://prism//lib/prism/dot_visitor.rb#4590 + # source://prism//lib/prism/dot_visitor.rb#4587 def location_inspect(location); end # Inspect a node that has loop_flags flags to display the flags as a @@ -12547,7 +13839,7 @@ class Prism::DotVisitor < ::Prism::Visitor # Generate a unique node ID for a node throughout the digraph. # - # source://prism//lib/prism/dot_visitor.rb#4585 + # source://prism//lib/prism/dot_visitor.rb#4582 def node_id(node); end # Inspect a node that has parameter_flags flags to display the flags as a @@ -12568,28 +13860,22 @@ class Prism::DotVisitor < ::Prism::Visitor # source://prism//lib/prism/dot_visitor.rb#4685 def regular_expression_flags_inspect(node); end - # Inspect a node that has return_node_flags flags to display the flags as a - # comma-separated list. - # - # source://prism//lib/prism/dot_visitor.rb#4703 - def return_node_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#4711 + # source://prism//lib/prism/dot_visitor.rb#4703 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#4721 + # source://prism//lib/prism/dot_visitor.rb#4713 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#4732 + # source://prism//lib/prism/dot_visitor.rb#4724 def symbol_flags_inspect(node); end end @@ -12683,101 +13969,105 @@ end # if a then b else c end # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6173 +# source://prism//lib/prism/node.rb#5485 class Prism::ElseNode < ::Prism::Node - # def initialize: (Location else_keyword_loc, StatementsNode? statements, Location? end_keyword_loc, Location location) -> void + # Initialize a new ElseNode node. # # @return [ElseNode] a new instance of ElseNode # - # source://prism//lib/prism/node.rb#6175 + # source://prism//lib/prism/node.rb#5487 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, else_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, else_keyword_loc, statements, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, else_keyword_loc, statements, end_keyword_loc); 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#6286 + # source://prism//lib/prism/node.rb#5582 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6184 + # source://prism//lib/prism/node.rb#5498 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6189 + # source://prism//lib/prism/node.rb#5503 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#6201 + # source://prism//lib/prism/node.rb#5515 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#6194 + # source://prism//lib/prism/node.rb#5508 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?else_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location?, ?location: Location) -> ElseNode + # 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#6206 + # source://prism//lib/prism/node.rb#5520 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, else_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::ElseNode) end - def copy(else_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6189 + # source://prism//lib/prism/node.rb#5503 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { else_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location?, location: Location } + # 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#6214 + # source://prism//lib/prism/node.rb#5528 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def else_keyword: () -> String # - # source://prism//lib/prism/node.rb#6242 + # source://prism//lib/prism/node.rb#5556 sig { returns(String) } def else_keyword; end # attr_reader else_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6219 + # source://prism//lib/prism/node.rb#5533 sig { returns(Prism::Location) } def else_keyword_loc; end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#6247 + # source://prism//lib/prism/node.rb#5561 sig { returns(T.nilable(String)) } def end_keyword; end # attr_reader end_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#6229 + # source://prism//lib/prism/node.rb#5543 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -12786,44 +14076,26 @@ class Prism::ElseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6252 + # source://prism//lib/prism/node.rb#5566 sig { override.returns(String) } def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6226 + # source://prism//lib/prism/node.rb#5540 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6270 + # source://prism//lib/prism/node.rb#5571 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6280 + # source://prism//lib/prism/node.rb#5576 def type; end end end @@ -12831,11 +14103,11 @@ end # EmbDocComment objects correspond to comments that are surrounded by =begin # and =end. # -# source://prism//lib/prism/parse_result.rb#403 +# source://prism//lib/prism/parse_result.rb#544 class Prism::EmbDocComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#410 + # source://prism//lib/prism/parse_result.rb#551 sig { returns(String) } def inspect; end @@ -12843,7 +14115,7 @@ class Prism::EmbDocComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#405 + # source://prism//lib/prism/parse_result.rb#546 sig { override.returns(T::Boolean) } def trailing?; end end @@ -12853,89 +14125,93 @@ end # "foo #{bar}" # ^^^^^^ # -# source://prism//lib/prism/node.rb#6298 +# source://prism//lib/prism/node.rb#5594 class Prism::EmbeddedStatementsNode < ::Prism::Node - # def initialize: (Location opening_loc, StatementsNode? statements, Location closing_loc, Location location) -> void + # Initialize a new EmbeddedStatementsNode node. # # @return [EmbeddedStatementsNode] a new instance of EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6300 + # source://prism//lib/prism/node.rb#5596 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, statements, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, statements, closing_loc); 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#6405 + # source://prism//lib/prism/node.rb#5685 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6309 + # source://prism//lib/prism/node.rb#5607 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6314 + # source://prism//lib/prism/node.rb#5612 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#6366 + # source://prism//lib/prism/node.rb#5664 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#6354 + # source://prism//lib/prism/node.rb#5652 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6326 + # source://prism//lib/prism/node.rb#5624 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#6319 + # source://prism//lib/prism/node.rb#5617 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location, ?location: Location) -> EmbeddedStatementsNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location, ?statements: StatementsNode?, ?closing_loc: Location) -> EmbeddedStatementsNode # - # source://prism//lib/prism/node.rb#6331 + # source://prism//lib/prism/node.rb#5629 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::EmbeddedStatementsNode) end - def copy(opening_loc: T.unsafe(nil), statements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6314 + # source://prism//lib/prism/node.rb#5612 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, statements: StatementsNode?, closing_loc: Location, location: Location } + # 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#6339 + # source://prism//lib/prism/node.rb#5637 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -12944,56 +14220,38 @@ class Prism::EmbeddedStatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6371 + # source://prism//lib/prism/node.rb#5669 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#6361 + # source://prism//lib/prism/node.rb#5659 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#6344 + # source://prism//lib/prism/node.rb#5642 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6351 + # source://prism//lib/prism/node.rb#5649 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6389 + # source://prism//lib/prism/node.rb#5674 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6399 + # source://prism//lib/prism/node.rb#5679 def type; end end end @@ -13003,75 +14261,79 @@ end # "foo #@bar" # ^^^^^ # -# source://prism//lib/prism/node.rb#6417 +# source://prism//lib/prism/node.rb#5697 class Prism::EmbeddedVariableNode < ::Prism::Node - # def initialize: (Location operator_loc, Prism::node variable, Location location) -> void + # Initialize a new EmbeddedVariableNode node. # # @return [EmbeddedVariableNode] a new instance of EmbeddedVariableNode # - # source://prism//lib/prism/node.rb#6419 + # source://prism//lib/prism/node.rb#5699 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - variable: Prism::Node, - location: Prism::Location + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).void end - def initialize(source, operator_loc, variable, location); end + def initialize(source, node_id, location, flags, operator_loc, variable); 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#6509 + # source://prism//lib/prism/node.rb#5773 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6427 + # source://prism//lib/prism/node.rb#5709 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6432 + # source://prism//lib/prism/node.rb#5714 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#6442 + # source://prism//lib/prism/node.rb#5724 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#6437 + # source://prism//lib/prism/node.rb#5719 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?operator_loc: Location, ?variable: Prism::node, ?location: Location) -> EmbeddedVariableNode + # 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#6447 + # source://prism//lib/prism/node.rb#5729 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - variable: Prism::Node, - location: Prism::Location + variable: T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode) ).returns(Prism::EmbeddedVariableNode) end - def copy(operator_loc: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6432 + # source://prism//lib/prism/node.rb#5714 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, variable: Prism::node, location: Location } + # 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#6455 + # source://prism//lib/prism/node.rb#5737 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13080,73 +14342,57 @@ class Prism::EmbeddedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6475 + # source://prism//lib/prism/node.rb#5757 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6470 + # source://prism//lib/prism/node.rb#5752 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6460 + # source://prism//lib/prism/node.rb#5742 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6493 + # source://prism//lib/prism/node.rb#5762 sig { override.returns(Symbol) } def type; end - # attr_reader variable: Prism::node + # attr_reader variable: InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#6467 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#5749 + sig do + returns(T.any(Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode)) + end def variable; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6503 + # source://prism//lib/prism/node.rb#5767 def type; end end end # Flags for nodes that have unescaped content. # -# source://prism//lib/prism/node.rb#19157 +# source://prism//lib/prism/node.rb#16723 module Prism::EncodingFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19162 +# source://prism//lib/prism/node.rb#16728 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#19159 +# source://prism//lib/prism/node.rb#16725 Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents an `ensure` clause in a `begin` statement. @@ -13158,101 +14404,105 @@ Prism::EncodingFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # bar # end # -# source://prism//lib/prism/node.rb#6524 +# source://prism//lib/prism/node.rb#5788 class Prism::EnsureNode < ::Prism::Node - # def initialize: (Location ensure_keyword_loc, StatementsNode? statements, Location end_keyword_loc, Location location) -> void + # Initialize a new EnsureNode node. # # @return [EnsureNode] a new instance of EnsureNode # - # source://prism//lib/prism/node.rb#6526 + # source://prism//lib/prism/node.rb#5790 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, ensure_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, ensure_keyword_loc, statements, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, ensure_keyword_loc, statements, end_keyword_loc); 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#6631 + # source://prism//lib/prism/node.rb#5879 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6535 + # source://prism//lib/prism/node.rb#5801 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6540 + # source://prism//lib/prism/node.rb#5806 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#6552 + # source://prism//lib/prism/node.rb#5818 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#6545 + # source://prism//lib/prism/node.rb#5811 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?ensure_keyword_loc: Location, ?statements: StatementsNode?, ?end_keyword_loc: Location, ?location: Location) -> EnsureNode + # 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#6557 + # source://prism//lib/prism/node.rb#5823 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, ensure_keyword_loc: Prism::Location, statements: T.nilable(Prism::StatementsNode), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::EnsureNode) end - def copy(ensure_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6540 + # source://prism//lib/prism/node.rb#5806 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { ensure_keyword_loc: Location, statements: StatementsNode?, end_keyword_loc: Location, location: Location } + # 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#6565 + # source://prism//lib/prism/node.rb#5831 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#6592 + # source://prism//lib/prism/node.rb#5858 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6580 + # source://prism//lib/prism/node.rb#5846 sig { returns(Prism::Location) } def end_keyword_loc; end # def ensure_keyword: () -> String # - # source://prism//lib/prism/node.rb#6587 + # source://prism//lib/prism/node.rb#5853 sig { returns(String) } def ensure_keyword; end # attr_reader ensure_keyword_loc: Location # - # source://prism//lib/prism/node.rb#6570 + # source://prism//lib/prism/node.rb#5836 sig { returns(Prism::Location) } def ensure_keyword_loc; end @@ -13261,44 +14511,26 @@ class Prism::EnsureNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6597 + # source://prism//lib/prism/node.rb#5863 sig { override.returns(String) } def inspect; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#6577 + # source://prism//lib/prism/node.rb#5843 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6615 + # source://prism//lib/prism/node.rb#5868 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6625 + # source://prism//lib/prism/node.rb#5873 def type; end end end @@ -13308,62 +14540,62 @@ end # false # ^^^^^ # -# source://prism//lib/prism/node.rb#6643 +# source://prism//lib/prism/node.rb#5891 class Prism::FalseNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new FalseNode node. # # @return [FalseNode] a new instance of FalseNode # - # source://prism//lib/prism/node.rb#6645 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#5893 + 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#6718 + # source://prism//lib/prism/node.rb#5950 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6651 + # source://prism//lib/prism/node.rb#5901 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6656 + # source://prism//lib/prism/node.rb#5906 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#6666 + # source://prism//lib/prism/node.rb#5916 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#6661 + # source://prism//lib/prism/node.rb#5911 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> FalseNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> FalseNode # - # source://prism//lib/prism/node.rb#6671 - sig { params(location: Prism::Location).returns(Prism::FalseNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#5921 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6656 + # source://prism//lib/prism/node.rb#5906 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#6679 + # source://prism//lib/prism/node.rb#5929 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13372,38 +14604,20 @@ class Prism::FalseNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6684 + # source://prism//lib/prism/node.rb#5934 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6702 + # source://prism//lib/prism/node.rb#5939 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#6712 + # source://prism//lib/prism/node.rb#5944 def type; end end end @@ -13419,101 +14633,105 @@ end # foo in Foo(*bar, baz, *qux) # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6733 +# source://prism//lib/prism/node.rb#5965 class Prism::FindPatternNode < ::Prism::Node - # def initialize: (Prism::node? constant, Prism::node left, Array[Prism::node] requireds, Prism::node right, Location? opening_loc, Location? closing_loc, Location location) -> void + # Initialize a new FindPatternNode node. # # @return [FindPatternNode] a new instance of FindPatternNode # - # source://prism//lib/prism/node.rb#6735 + # source://prism//lib/prism/node.rb#5967 sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), - left: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, requireds: T::Array[Prism::Node], - right: Prism::Node, + right: T.any(Prism::SplatNode, Prism::MissingNode), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, left, requireds, right, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, left, requireds, right, opening_loc, closing_loc); 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#6867 + # source://prism//lib/prism/node.rb#6083 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6747 + # source://prism//lib/prism/node.rb#5981 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6752 + # source://prism//lib/prism/node.rb#5986 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#6828 + # source://prism//lib/prism/node.rb#6062 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#6810 + # source://prism//lib/prism/node.rb#6044 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#6767 + # source://prism//lib/prism/node.rb#6001 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#6757 + # source://prism//lib/prism/node.rb#5991 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism//lib/prism/node.rb#6785 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#6019 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end - # def copy: (?constant: Prism::node?, ?left: Prism::node, ?requireds: Array[Prism::node], ?right: Prism::node, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> FindPatternNode + # 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 # - # source://prism//lib/prism/node.rb#6772 + # source://prism//lib/prism/node.rb#6006 sig do params( - constant: T.nilable(Prism::Node), - left: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), + left: Prism::SplatNode, requireds: T::Array[Prism::Node], - right: Prism::Node, + right: T.any(Prism::SplatNode, Prism::MissingNode), opening_loc: T.nilable(Prism::Location), - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::FindPatternNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6752 + # source://prism//lib/prism/node.rb#5986 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, left: Prism::node, requireds: Array[Prism::node], right: Prism::node, opening_loc: Location?, closing_loc: Location?, location: Location } + # 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? } # - # source://prism//lib/prism/node.rb#6780 + # source://prism//lib/prism/node.rb#6014 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13522,68 +14740,50 @@ class Prism::FindPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6833 + # source://prism//lib/prism/node.rb#6067 sig { override.returns(String) } def inspect; end - # attr_reader left: Prism::node + # attr_reader left: SplatNode # - # source://prism//lib/prism/node.rb#6788 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#6022 + sig { returns(Prism::SplatNode) } def left; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#6823 + # source://prism//lib/prism/node.rb#6057 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#6797 + # source://prism//lib/prism/node.rb#6031 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader requireds: Array[Prism::node] # - # source://prism//lib/prism/node.rb#6791 + # source://prism//lib/prism/node.rb#6025 sig { returns(T::Array[Prism::Node]) } def requireds; end - # attr_reader right: Prism::node + # attr_reader right: SplatNode | MissingNode # - # source://prism//lib/prism/node.rb#6794 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#6028 + sig { returns(T.any(Prism::SplatNode, Prism::MissingNode)) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6851 + # source://prism//lib/prism/node.rb#6072 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6861 + # source://prism//lib/prism/node.rb#6077 def type; end end end @@ -13593,79 +14793,81 @@ end # baz if foo .. bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#6883 +# source://prism//lib/prism/node.rb#6099 class Prism::FlipFlopNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # Initialize a new FlipFlopNode node. # # @return [FlipFlopNode] a new instance of FlipFlopNode # - # source://prism//lib/prism/node.rb#6885 + # source://prism//lib/prism/node.rb#6101 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); 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#6992 + # source://prism//lib/prism/node.rb#6187 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#6895 + # source://prism//lib/prism/node.rb#6112 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6900 + # source://prism//lib/prism/node.rb#6117 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#6913 + # source://prism//lib/prism/node.rb#6130 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#6905 + # source://prism//lib/prism/node.rb#6122 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> FlipFlopNode + # 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#6918 + # source://prism//lib/prism/node.rb#6135 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::FlipFlopNode) end - def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#6900 + # source://prism//lib/prism/node.rb#6117 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # 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#6926 + # source://prism//lib/prism/node.rb#6143 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13673,7 +14875,7 @@ class Prism::FlipFlopNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#6948 + # source://prism//lib/prism/node.rb#6148 sig { returns(T::Boolean) } def exclude_end?; end @@ -13682,70 +14884,44 @@ class Prism::FlipFlopNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#6958 + # source://prism//lib/prism/node.rb#6171 sig { override.returns(String) } def inspect; end # attr_reader left: Prism::node? # - # source://prism//lib/prism/node.rb#6935 + # source://prism//lib/prism/node.rb#6153 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#6953 + # source://prism//lib/prism/node.rb#6166 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#6941 + # source://prism//lib/prism/node.rb#6159 sig { returns(Prism::Location) } def operator_loc; end # attr_reader right: Prism::node? # - # source://prism//lib/prism/node.rb#6938 + # source://prism//lib/prism/node.rb#6156 sig { returns(T.nilable(Prism::Node)) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#6976 + # source://prism//lib/prism/node.rb#6176 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#6931 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#6986 + # source://prism//lib/prism/node.rb#6181 def type; end end end @@ -13755,62 +14931,62 @@ end # 1.0 # ^^^ # -# source://prism//lib/prism/node.rb#7005 +# source://prism//lib/prism/node.rb#6200 class Prism::FloatNode < ::Prism::Node - # def initialize: (Float value, Location location) -> void + # Initialize a new FloatNode node. # # @return [FloatNode] a new instance of FloatNode # - # source://prism//lib/prism/node.rb#7007 - sig { params(source: Prism::Source, value: Float, location: Prism::Location).void } - def initialize(source, value, location); end + # source://prism//lib/prism/node.rb#6202 + 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#7084 + # source://prism//lib/prism/node.rb#6263 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7014 + # source://prism//lib/prism/node.rb#6211 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7019 + # source://prism//lib/prism/node.rb#6216 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#7029 + # source://prism//lib/prism/node.rb#6226 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#7024 + # source://prism//lib/prism/node.rb#6221 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Float, ?location: Location) -> FloatNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Float) -> FloatNode # - # source://prism//lib/prism/node.rb#7034 - sig { params(value: Float, location: Prism::Location).returns(Prism::FloatNode) } - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6231 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7019 + # source://prism//lib/prism/node.rb#6216 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Float, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Float } # - # source://prism//lib/prism/node.rb#7042 + # source://prism//lib/prism/node.rb#6239 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -13819,44 +14995,26 @@ class Prism::FloatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7050 + # source://prism//lib/prism/node.rb#6247 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7068 + # source://prism//lib/prism/node.rb#6252 sig { override.returns(Symbol) } def type; end # The value of the floating point number as a Float. # - # source://prism//lib/prism/node.rb#7047 + # source://prism//lib/prism/node.rb#6244 sig { returns(Float) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7078 + # source://prism//lib/prism/node.rb#6257 def type; end end end @@ -13866,43 +15024,45 @@ end # for i in a end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7094 +# source://prism//lib/prism/node.rb#6273 class Prism::ForNode < ::Prism::Node - # def initialize: (Prism::node index, Prism::node collection, StatementsNode? statements, Location for_keyword_loc, Location in_keyword_loc, Location? do_keyword_loc, Location end_keyword_loc, Location location) -> void + # Initialize a new ForNode node. # # @return [ForNode] a new instance of ForNode # - # source://prism//lib/prism/node.rb#7096 + # source://prism//lib/prism/node.rb#6275 sig do params( source: Prism::Source, - index: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: 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), collection: Prism::Node, statements: T.nilable(Prism::StatementsNode), for_keyword_loc: Prism::Location, in_keyword_loc: Prism::Location, do_keyword_loc: T.nilable(Prism::Location), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).void end - def initialize(source, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, index, collection, statements, for_keyword_loc, in_keyword_loc, do_keyword_loc, end_keyword_loc); 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#7266 + # source://prism//lib/prism/node.rb#6429 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7109 + # source://prism//lib/prism/node.rb#6290 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7114 + # source://prism//lib/prism/node.rb#6295 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -13911,55 +15071,57 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7155 + # source://prism//lib/prism/node.rb#6336 sig { returns(Prism::Node) } def collection; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#7128 + # source://prism//lib/prism/node.rb#6309 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#7119 + # source://prism//lib/prism/node.rb#6300 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?index: Prism::node, ?collection: Prism::node, ?statements: StatementsNode?, ?for_keyword_loc: Location, ?in_keyword_loc: Location, ?do_keyword_loc: Location?, ?end_keyword_loc: Location, ?location: Location) -> ForNode + # 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#7133 + # source://prism//lib/prism/node.rb#6314 sig do params( - index: Prism::Node, + node_id: Integer, + location: Prism::Location, + flags: Integer, + index: 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), collection: Prism::Node, statements: T.nilable(Prism::StatementsNode), for_keyword_loc: Prism::Location, in_keyword_loc: Prism::Location, do_keyword_loc: T.nilable(Prism::Location), - end_keyword_loc: Prism::Location, - location: Prism::Location + end_keyword_loc: Prism::Location ).returns(Prism::ForNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7114 + # source://prism//lib/prism/node.rb#6295 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { index: Prism::node, collection: Prism::node, statements: StatementsNode?, for_keyword_loc: Location, in_keyword_loc: Location, do_keyword_loc: Location?, end_keyword_loc: Location, location: Location } + # 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#7141 + # source://prism//lib/prism/node.rb#6322 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#7222 + # source://prism//lib/prism/node.rb#6403 sig { returns(T.nilable(String)) } def do_keyword; end @@ -13968,13 +15130,13 @@ class Prism::ForNode < ::Prism::Node # for i in a do end # ^^ # - # source://prism//lib/prism/node.rb#7189 + # source://prism//lib/prism/node.rb#6370 sig { returns(T.nilable(Prism::Location)) } def do_keyword_loc; end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#7227 + # source://prism//lib/prism/node.rb#6408 sig { returns(String) } def end_keyword; end @@ -13983,7 +15145,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7205 + # source://prism//lib/prism/node.rb#6386 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -13992,7 +15154,7 @@ class Prism::ForNode < ::Prism::Node # def for_keyword: () -> String # - # source://prism//lib/prism/node.rb#7212 + # source://prism//lib/prism/node.rb#6393 sig { returns(String) } def for_keyword; end @@ -14001,13 +15163,13 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^^ # - # source://prism//lib/prism/node.rb#7169 + # source://prism//lib/prism/node.rb#6350 sig { returns(Prism::Location) } def for_keyword_loc; end # def in_keyword: () -> String # - # source://prism//lib/prism/node.rb#7217 + # source://prism//lib/prism/node.rb#6398 sig { returns(String) } def in_keyword; end @@ -14016,7 +15178,7 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^^ # - # source://prism//lib/prism/node.rb#7179 + # source://prism//lib/prism/node.rb#6360 sig { returns(Prism::Location) } def in_keyword_loc; end @@ -14025,13 +15187,15 @@ class Prism::ForNode < ::Prism::Node # for i in a end # ^ # - # source://prism//lib/prism/node.rb#7149 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#6330 + 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 def index; end # def inspect -> String # - # source://prism//lib/prism/node.rb#7232 + # source://prism//lib/prism/node.rb#6413 sig { override.returns(String) } def inspect; end @@ -14042,38 +15206,20 @@ class Prism::ForNode < ::Prism::Node # ^^^^^^ # end # - # source://prism//lib/prism/node.rb#7163 + # source://prism//lib/prism/node.rb#6344 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7250 + # source://prism//lib/prism/node.rb#6418 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7260 + # source://prism//lib/prism/node.rb#6423 def type; end end end @@ -14085,62 +15231,62 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7284 +# source://prism//lib/prism/node.rb#6447 class Prism::ForwardingArgumentsNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ForwardingArgumentsNode node. # # @return [ForwardingArgumentsNode] a new instance of ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7286 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#6449 + 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#7359 + # source://prism//lib/prism/node.rb#6506 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7292 + # source://prism//lib/prism/node.rb#6457 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7297 + # source://prism//lib/prism/node.rb#6462 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#7307 + # source://prism//lib/prism/node.rb#6472 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#7302 + # source://prism//lib/prism/node.rb#6467 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ForwardingArgumentsNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingArgumentsNode # - # source://prism//lib/prism/node.rb#7312 - sig { params(location: Prism::Location).returns(Prism::ForwardingArgumentsNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6477 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7297 + # source://prism//lib/prism/node.rb#6462 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7320 + # source://prism//lib/prism/node.rb#6485 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14149,38 +15295,20 @@ class Prism::ForwardingArgumentsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7325 + # source://prism//lib/prism/node.rb#6490 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7343 + # source://prism//lib/prism/node.rb#6495 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7353 + # source://prism//lib/prism/node.rb#6500 def type; end end end @@ -14191,62 +15319,62 @@ end # ^^^ # end # -# source://prism//lib/prism/node.rb#7369 +# source://prism//lib/prism/node.rb#6516 class Prism::ForwardingParameterNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ForwardingParameterNode node. # # @return [ForwardingParameterNode] a new instance of ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7371 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#6518 + 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#7444 + # source://prism//lib/prism/node.rb#6575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7377 + # source://prism//lib/prism/node.rb#6526 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7382 + # source://prism//lib/prism/node.rb#6531 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#7392 + # source://prism//lib/prism/node.rb#6541 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#7387 + # source://prism//lib/prism/node.rb#6536 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ForwardingParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ForwardingParameterNode # - # source://prism//lib/prism/node.rb#7397 - sig { params(location: Prism::Location).returns(Prism::ForwardingParameterNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6546 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7382 + # source://prism//lib/prism/node.rb#6531 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#7405 + # source://prism//lib/prism/node.rb#6554 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14255,38 +15383,20 @@ class Prism::ForwardingParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7410 + # source://prism//lib/prism/node.rb#6559 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7428 + # source://prism//lib/prism/node.rb#6564 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7438 + # source://prism//lib/prism/node.rb#6569 def type; end end end @@ -14296,68 +15406,83 @@ end # super # ^^^^^ # -# source://prism//lib/prism/node.rb#7453 +# source://prism//lib/prism/node.rb#6584 class Prism::ForwardingSuperNode < ::Prism::Node - # def initialize: (BlockNode? block, Location location) -> void + # Initialize a new ForwardingSuperNode node. # # @return [ForwardingSuperNode] a new instance of ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7455 - sig { params(source: Prism::Source, block: T.nilable(Prism::BlockNode), location: Prism::Location).void } - def initialize(source, block, location); end + # source://prism//lib/prism/node.rb#6586 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + block: T.nilable(Prism::BlockNode) + ).void + end + def initialize(source, node_id, location, flags, 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#7534 + # source://prism//lib/prism/node.rb#6649 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7462 + # source://prism//lib/prism/node.rb#6595 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockNode? # - # source://prism//lib/prism/node.rb#7497 + # source://prism//lib/prism/node.rb#6630 sig { returns(T.nilable(Prism::BlockNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7467 + # source://prism//lib/prism/node.rb#6600 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#7479 + # source://prism//lib/prism/node.rb#6612 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#7472 + # source://prism//lib/prism/node.rb#6605 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?block: BlockNode?, ?location: Location) -> ForwardingSuperNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?block: BlockNode?) -> ForwardingSuperNode # - # source://prism//lib/prism/node.rb#7484 - sig { params(block: T.nilable(Prism::BlockNode), location: Prism::Location).returns(Prism::ForwardingSuperNode) } - def copy(block: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6617 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7467 + # source://prism//lib/prism/node.rb#6600 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { block: BlockNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, block: BlockNode? } # - # source://prism//lib/prism/node.rb#7492 + # source://prism//lib/prism/node.rb#6625 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14366,38 +15491,20 @@ class Prism::ForwardingSuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7500 + # source://prism//lib/prism/node.rb#6633 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7518 + # source://prism//lib/prism/node.rb#6638 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7528 + # source://prism//lib/prism/node.rb#6643 def type; end end end @@ -14407,83 +15514,87 @@ end # $target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7544 +# source://prism//lib/prism/node.rb#6659 class Prism::GlobalVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new GlobalVariableAndWriteNode node. # # @return [GlobalVariableAndWriteNode] a new instance of GlobalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#7546 + # source://prism//lib/prism/node.rb#6661 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#7648 + # source://prism//lib/prism/node.rb#6747 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7556 + # source://prism//lib/prism/node.rb#6673 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7561 + # source://prism//lib/prism/node.rb#6678 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#7571 + # source://prism//lib/prism/node.rb#6688 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#7566 + # source://prism//lib/prism/node.rb#6683 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableAndWriteNode + # 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#7576 + # source://prism//lib/prism/node.rb#6693 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::GlobalVariableAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7561 + # source://prism//lib/prism/node.rb#6678 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#7584 + # source://prism//lib/prism/node.rb#6701 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#163 + # source://prism//lib/prism/desugar_compiler.rb#200 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14491,68 +15602,50 @@ class Prism::GlobalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7614 + # source://prism//lib/prism/node.rb#6731 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7589 + # source://prism//lib/prism/node.rb#6706 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7592 + # source://prism//lib/prism/node.rb#6709 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7609 + # source://prism//lib/prism/node.rb#6726 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7599 + # source://prism//lib/prism/node.rb#6716 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7632 + # source://prism//lib/prism/node.rb#6736 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7606 + # source://prism//lib/prism/node.rb#6723 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#7642 + # source://prism//lib/prism/node.rb#6741 def type; end end end @@ -14562,97 +15655,101 @@ end # $target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7661 +# source://prism//lib/prism/node.rb#6760 class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new GlobalVariableOperatorWriteNode node. # # @return [GlobalVariableOperatorWriteNode] a new instance of GlobalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#7663 + # source://prism//lib/prism/node.rb#6762 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#7764 + # source://prism//lib/prism/node.rb#6847 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7674 + # source://prism//lib/prism/node.rb#6775 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#7727 + # source://prism//lib/prism/node.rb#6828 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#7717 + # source://prism//lib/prism/node.rb#6818 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7679 + # source://prism//lib/prism/node.rb#6780 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#7689 + # source://prism//lib/prism/node.rb#6790 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#7684 + # source://prism//lib/prism/node.rb#6785 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> GlobalVariableOperatorWriteNode + # 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#7694 + # source://prism//lib/prism/node.rb#6795 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::GlobalVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7679 + # source://prism//lib/prism/node.rb#6780 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # 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#7702 + # source://prism//lib/prism/node.rb#6803 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#175 + # source://prism//lib/prism/desugar_compiler.rb#212 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14660,68 +15757,50 @@ class Prism::GlobalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7730 + # source://prism//lib/prism/node.rb#6831 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7707 + # source://prism//lib/prism/node.rb#6808 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7710 + # source://prism//lib/prism/node.rb#6811 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#387 + # source://prism//lib/prism/node_ext.rb#403 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 + # source://prism//lib/prism/node_ext.rb#410 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7748 + # source://prism//lib/prism/node.rb#6836 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7724 + # source://prism//lib/prism/node.rb#6825 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7758 + # source://prism//lib/prism/node.rb#6841 def type; end end end @@ -14731,83 +15810,87 @@ end # $target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#7778 +# source://prism//lib/prism/node.rb#6861 class Prism::GlobalVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new GlobalVariableOrWriteNode node. # # @return [GlobalVariableOrWriteNode] a new instance of GlobalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#7780 + # source://prism//lib/prism/node.rb#6863 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#7882 + # source://prism//lib/prism/node.rb#6949 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7790 + # source://prism//lib/prism/node.rb#6875 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7795 + # source://prism//lib/prism/node.rb#6880 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#7805 + # source://prism//lib/prism/node.rb#6890 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#7800 + # source://prism//lib/prism/node.rb#6885 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> GlobalVariableOrWriteNode + # 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#7810 + # source://prism//lib/prism/node.rb#6895 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::GlobalVariableOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7795 + # source://prism//lib/prism/node.rb#6880 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#7818 + # source://prism//lib/prism/node.rb#6903 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#169 + # source://prism//lib/prism/desugar_compiler.rb#206 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -14815,68 +15898,50 @@ class Prism::GlobalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7848 + # source://prism//lib/prism/node.rb#6933 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#7823 + # source://prism//lib/prism/node.rb#6908 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#7826 + # source://prism//lib/prism/node.rb#6911 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#7843 + # source://prism//lib/prism/node.rb#6928 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#7833 + # source://prism//lib/prism/node.rb#6918 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7866 + # source://prism//lib/prism/node.rb#6938 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#7840 + # source://prism//lib/prism/node.rb#6925 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7876 + # source://prism//lib/prism/node.rb#6943 def type; end end end @@ -14886,62 +15951,69 @@ end # $foo # ^^^^ # -# source://prism//lib/prism/node.rb#7895 +# source://prism//lib/prism/node.rb#6962 class Prism::GlobalVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new GlobalVariableReadNode node. # # @return [GlobalVariableReadNode] a new instance of GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#7897 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#6964 + 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#7978 + # source://prism//lib/prism/node.rb#7029 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7904 + # source://prism//lib/prism/node.rb#6973 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7909 + # source://prism//lib/prism/node.rb#6978 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#7919 + # source://prism//lib/prism/node.rb#6988 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#7914 + # source://prism//lib/prism/node.rb#6983 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableReadNode # - # source://prism//lib/prism/node.rb#7924 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#6993 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#7909 + # source://prism//lib/prism/node.rb#6978 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#7932 + # source://prism//lib/prism/node.rb#7001 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -14950,7 +16022,7 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#7944 + # source://prism//lib/prism/node.rb#7013 sig { override.returns(String) } def inspect; end @@ -14960,38 +16032,20 @@ class Prism::GlobalVariableReadNode < ::Prism::Node # # $_Test # name `:$_Test` # - # source://prism//lib/prism/node.rb#7941 + # source://prism//lib/prism/node.rb#7010 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#7962 + # source://prism//lib/prism/node.rb#7018 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#7972 + # source://prism//lib/prism/node.rb#7023 def type; end end end @@ -15001,62 +16055,69 @@ end # $foo, $bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#7988 +# source://prism//lib/prism/node.rb#7039 class Prism::GlobalVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new GlobalVariableTargetNode node. # # @return [GlobalVariableTargetNode] a new instance of GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#7990 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#7041 + 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#8067 + # source://prism//lib/prism/node.rb#7102 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#7997 + # source://prism//lib/prism/node.rb#7050 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8002 + # source://prism//lib/prism/node.rb#7055 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#8012 + # source://prism//lib/prism/node.rb#7065 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#8007 + # source://prism//lib/prism/node.rb#7060 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> GlobalVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> GlobalVariableTargetNode # - # source://prism//lib/prism/node.rb#8017 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::GlobalVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7070 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8002 + # source://prism//lib/prism/node.rb#7055 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#8025 + # source://prism//lib/prism/node.rb#7078 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15065,44 +16126,26 @@ class Prism::GlobalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8033 + # source://prism//lib/prism/node.rb#7086 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#8030 + # source://prism//lib/prism/node.rb#7083 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8051 + # source://prism//lib/prism/node.rb#7091 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8061 + # source://prism//lib/prism/node.rb#7096 def type; end end end @@ -15112,79 +16155,83 @@ end # $foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#8077 +# source://prism//lib/prism/node.rb#7112 class Prism::GlobalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new GlobalVariableWriteNode node. # # @return [GlobalVariableWriteNode] a new instance of GlobalVariableWriteNode # - # source://prism//lib/prism/node.rb#8079 + # source://prism//lib/prism/node.rb#7114 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#8197 + # source://prism//lib/prism/node.rb#7216 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8089 + # source://prism//lib/prism/node.rb#7126 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8094 + # source://prism//lib/prism/node.rb#7131 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#8104 + # source://prism//lib/prism/node.rb#7141 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#8099 + # source://prism//lib/prism/node.rb#7136 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> GlobalVariableWriteNode + # 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#8109 + # source://prism//lib/prism/node.rb#7146 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::GlobalVariableWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8094 + # source://prism//lib/prism/node.rb#7131 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # 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#8117 + # source://prism//lib/prism/node.rb#7154 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15193,7 +16240,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8163 + # source://prism//lib/prism/node.rb#7200 sig { override.returns(String) } def inspect; end @@ -15203,7 +16250,7 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # # $_Test = 123 # name `:$_Test` # - # source://prism//lib/prism/node.rb#8126 + # source://prism//lib/prism/node.rb#7163 sig { returns(Symbol) } def name; end @@ -15212,13 +16259,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^^^^ # - # source://prism//lib/prism/node.rb#8132 + # source://prism//lib/prism/node.rb#7169 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#8158 + # source://prism//lib/prism/node.rb#7195 sig { returns(String) } def operator; end @@ -15227,26 +16274,13 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $foo = :bar # ^ # - # source://prism//lib/prism/node.rb#8151 + # source://prism//lib/prism/node.rb#7188 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8181 + # source://prism//lib/prism/node.rb#7205 sig { override.returns(Symbol) } def type; end @@ -15258,19 +16292,14 @@ class Prism::GlobalVariableWriteNode < ::Prism::Node # $-xyz = 123 # ^^^ # - # source://prism//lib/prism/node.rb#8145 + # source://prism//lib/prism/node.rb#7182 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8191 + # source://prism//lib/prism/node.rb#7210 def type; end end end @@ -15280,45 +16309,47 @@ end # { a => b } # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8210 +# source://prism//lib/prism/node.rb#7229 class Prism::HashNode < ::Prism::Node - # def initialize: (Location opening_loc, Array[AssocNode | AssocSplatNode] elements, Location closing_loc, Location location) -> void + # Initialize a new HashNode node. # # @return [HashNode] a new instance of HashNode # - # source://prism//lib/prism/node.rb#8212 + # source://prism//lib/prism/node.rb#7231 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, elements, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, elements, closing_loc); 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#8327 + # source://prism//lib/prism/node.rb#7330 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8221 + # source://prism//lib/prism/node.rb#7242 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8226 + # source://prism//lib/prism/node.rb#7247 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#8288 + # source://prism//lib/prism/node.rb#7309 sig { returns(String) } def closing; end @@ -15327,45 +16358,47 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8276 + # source://prism//lib/prism/node.rb#7297 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8236 + # source://prism//lib/prism/node.rb#7257 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#8231 + # source://prism//lib/prism/node.rb#7252 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?opening_loc: Location, ?elements: Array[AssocNode | AssocSplatNode], ?closing_loc: Location, ?location: Location) -> HashNode + # 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#8241 + # source://prism//lib/prism/node.rb#7262 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::HashNode) end - def copy(opening_loc: T.unsafe(nil), elements: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8226 + # source://prism//lib/prism/node.rb#7247 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, elements: Array[AssocNode | AssocSplatNode], closing_loc: Location, location: Location } + # 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#8249 + # source://prism//lib/prism/node.rb#7270 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15377,7 +16410,7 @@ class Prism::HashNode < ::Prism::Node # { **foo } # ^^^^^ # - # source://prism//lib/prism/node.rb#8270 + # source://prism//lib/prism/node.rb#7291 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -15386,13 +16419,13 @@ class Prism::HashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8293 + # source://prism//lib/prism/node.rb#7314 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#8283 + # source://prism//lib/prism/node.rb#7304 sig { returns(String) } def opening; end @@ -15401,38 +16434,20 @@ class Prism::HashNode < ::Prism::Node # { a => b } # ^ # - # source://prism//lib/prism/node.rb#8257 + # source://prism//lib/prism/node.rb#7278 sig { returns(Prism::Location) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8311 + # source://prism//lib/prism/node.rb#7319 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8321 + # source://prism//lib/prism/node.rb#7324 def type; end end end @@ -15445,105 +16460,109 @@ end # foo => { a: 1, b: 2, **c } # ^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8343 +# source://prism//lib/prism/node.rb#7346 class Prism::HashPatternNode < ::Prism::Node - # def initialize: (Prism::node? constant, Array[AssocNode] elements, AssocSplatNode | NoKeywordsParameterNode | nil rest, Location? opening_loc, Location? closing_loc, Location location) -> void + # Initialize a new HashPatternNode node. # # @return [HashPatternNode] a new instance of HashPatternNode # - # source://prism//lib/prism/node.rb#8345 + # source://prism//lib/prism/node.rb#7348 sig do params( source: Prism::Source, - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), 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), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, constant, elements, rest, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, constant, elements, rest, opening_loc, closing_loc); 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#8472 + # source://prism//lib/prism/node.rb#7459 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8356 + # source://prism//lib/prism/node.rb#7361 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8361 + # source://prism//lib/prism/node.rb#7366 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#8433 + # source://prism//lib/prism/node.rb#7438 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#8415 + # source://prism//lib/prism/node.rb#7420 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#8375 + # source://prism//lib/prism/node.rb#7380 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#8366 + # source://prism//lib/prism/node.rb#7371 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant: Prism::node? + # attr_reader constant: ConstantReadNode | ConstantPathNode | nil # - # source://prism//lib/prism/node.rb#8393 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#7398 + sig { returns(T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode))) } def constant; end - # def copy: (?constant: Prism::node?, ?elements: Array[AssocNode], ?rest: AssocSplatNode | NoKeywordsParameterNode | nil, ?opening_loc: Location?, ?closing_loc: Location?, ?location: Location) -> HashPatternNode + # 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 # - # source://prism//lib/prism/node.rb#8380 + # source://prism//lib/prism/node.rb#7385 sig do params( - constant: T.nilable(Prism::Node), + node_id: Integer, + location: Prism::Location, + flags: Integer, + constant: T.nilable(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode)), 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), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::HashPatternNode) end - def copy(constant: T.unsafe(nil), elements: T.unsafe(nil), rest: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8361 + # source://prism//lib/prism/node.rb#7366 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { constant: Prism::node?, elements: Array[AssocNode], rest: AssocSplatNode | NoKeywordsParameterNode | nil, opening_loc: Location?, closing_loc: Location?, location: Location } + # 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? } # - # source://prism//lib/prism/node.rb#8388 + # source://prism//lib/prism/node.rb#7393 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode] # - # source://prism//lib/prism/node.rb#8396 + # source://prism//lib/prism/node.rb#7401 sig { returns(T::Array[Prism::AssocNode]) } def elements; end @@ -15552,67 +16571,49 @@ class Prism::HashPatternNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8438 + # source://prism//lib/prism/node.rb#7443 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#8428 + # source://prism//lib/prism/node.rb#7433 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#8402 + # source://prism//lib/prism/node.rb#7407 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader rest: AssocSplatNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#8399 + # source://prism//lib/prism/node.rb#7404 sig { returns(T.nilable(T.any(Prism::AssocSplatNode, Prism::NoKeywordsParameterNode))) } def rest; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8456 + # source://prism//lib/prism/node.rb#7448 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8466 + # source://prism//lib/prism/node.rb#7453 def type; end end end -# source://prism//lib/prism/node_ext.rb#49 +# source://prism//lib/prism/node_ext.rb#52 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#51 + # source://prism//lib/prism/node_ext.rb#54 def heredoc?; end end @@ -15627,107 +16628,99 @@ end # foo ? bar : baz # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8493 +# source://prism//lib/prism/node.rb#7480 class Prism::IfNode < ::Prism::Node - # def initialize: (Location? if_keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, Prism::node? consequent, Location? end_keyword_loc, Location location) -> void + # Initialize a new IfNode node. # # @return [IfNode] a new instance of IfNode # - # source://prism//lib/prism/node.rb#8495 + # source://prism//lib/prism/node.rb#7482 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, if_keyword_loc: T.nilable(Prism::Location), predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::Node), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) ).void end - def initialize(source, if_keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, if_keyword_loc, predicate, then_keyword_loc, statements, subsequent, end_keyword_loc); 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#8687 + # source://prism//lib/prism/node.rb#7658 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8507 + # source://prism//lib/prism/node.rb#7496 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8512 + # source://prism//lib/prism/node.rb#7501 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#8526 + # source://prism//lib/prism/node.rb#7515 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#8517 + # source://prism//lib/prism/node.rb#7506 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. - # - # if foo - # bar - # elsif baz - # ^^^^^^^^^ - # qux - # ^^^ - # end - # ^^^ + # Returns the subsequent if/elsif/else clause of the if node. This method is + # deprecated in favor of #subsequent. # - # if foo then bar else baz end - # ^^^^^^^^^^^^ - # - # source://prism//lib/prism/node.rb#8617 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node_ext.rb#485 def consequent; end - # def copy: (?if_keyword_loc: Location?, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: Prism::node?, ?end_keyword_loc: Location?, ?location: Location) -> IfNode + # 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#8531 + # source://prism//lib/prism/node.rb#7520 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, if_keyword_loc: T.nilable(Prism::Location), predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::Node), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + subsequent: T.nilable(T.any(Prism::ElseNode, Prism::IfNode)), + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::IfNode) end - def copy(if_keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8512 + # source://prism//lib/prism/node.rb#7501 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { if_keyword_loc: Location?, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: Prism::node?, end_keyword_loc: Location?, location: Location } + # 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#8539 + # source://prism//lib/prism/node.rb#7528 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8648 + # source://prism//lib/prism/node.rb#7637 sig { returns(T.nilable(String)) } def end_keyword; end @@ -15738,7 +16731,7 @@ class Prism::IfNode < ::Prism::Node # end # ^^^ # - # source://prism//lib/prism/node.rb#8625 + # source://prism//lib/prism/node.rb#7614 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -15747,7 +16740,7 @@ class Prism::IfNode < ::Prism::Node # def if_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8638 + # source://prism//lib/prism/node.rb#7627 sig { returns(T.nilable(String)) } def if_keyword; end @@ -15758,18 +16751,18 @@ 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#8549 + # source://prism//lib/prism/node.rb#7538 sig { returns(T.nilable(Prism::Location)) } def if_keyword_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#8653 + # source://prism//lib/prism/node.rb#7642 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#91 - def newline!(lines); end + def newline_flag!(lines); end # The node for the condition the `IfNode` is testing. # @@ -15784,7 +16777,7 @@ class Prism::IfNode < ::Prism::Node # foo ? bar : baz # ^^^ # - # source://prism//lib/prism/node.rb#8573 + # source://prism//lib/prism/node.rb#7562 sig { returns(Prism::Node) } def predicate; end @@ -15797,13 +16790,31 @@ class Prism::IfNode < ::Prism::Node # ^^^ # end # - # source://prism//lib/prism/node.rb#8602 + # source://prism//lib/prism/node.rb#7591 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end + # Represents an `ElseNode` or an `IfNode` when there is an `else` or an `elsif` in the `if` statement. + # + # if foo + # bar + # elsif baz + # ^^^^^^^^^ + # qux + # ^^^ + # end + # ^^^ + # + # if foo then bar else baz end + # ^^^^^^^^^^^^ + # + # source://prism//lib/prism/node.rb#7606 + sig { returns(T.nilable(T.any(Prism::ElseNode, Prism::IfNode))) } + def subsequent; end + # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#8643 + # source://prism//lib/prism/node.rb#7632 sig { returns(T.nilable(String)) } def then_keyword; end @@ -15815,38 +16826,20 @@ class Prism::IfNode < ::Prism::Node # a ? b : c # ^ # - # source://prism//lib/prism/node.rb#8582 + # source://prism//lib/prism/node.rb#7571 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8671 + # source://prism//lib/prism/node.rb#7647 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8681 + # source://prism//lib/prism/node.rb#7652 def type; end end end @@ -15856,73 +16849,77 @@ end # 1.0i # ^^^^ # -# source://prism//lib/prism/node.rb#8702 +# source://prism//lib/prism/node.rb#7673 class Prism::ImaginaryNode < ::Prism::Node - # def initialize: (FloatNode | IntegerNode | RationalNode numeric, Location location) -> void + # Initialize a new ImaginaryNode node. # # @return [ImaginaryNode] a new instance of ImaginaryNode # - # source://prism//lib/prism/node.rb#8704 + # source://prism//lib/prism/node.rb#7675 sig do params( source: Prism::Source, - numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).void end - def initialize(source, numeric, location); end + def initialize(source, node_id, location, flags, numeric); 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#8781 + # source://prism//lib/prism/node.rb#7736 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8711 + # source://prism//lib/prism/node.rb#7684 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8716 + # source://prism//lib/prism/node.rb#7689 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#8726 + # source://prism//lib/prism/node.rb#7699 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#8721 + # source://prism//lib/prism/node.rb#7694 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?numeric: FloatNode | IntegerNode | RationalNode, ?location: Location) -> ImaginaryNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numeric: FloatNode | IntegerNode | RationalNode) -> ImaginaryNode # - # source://prism//lib/prism/node.rb#8731 + # source://prism//lib/prism/node.rb#7704 sig do params( - numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode), - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + numeric: T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode) ).returns(Prism::ImaginaryNode) end - def copy(numeric: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), numeric: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8716 + # source://prism//lib/prism/node.rb#7689 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { numeric: FloatNode | IntegerNode | RationalNode, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numeric: FloatNode | IntegerNode | RationalNode } # - # source://prism//lib/prism/node.rb#8739 + # source://prism//lib/prism/node.rb#7712 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -15931,50 +16928,32 @@ class Prism::ImaginaryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8747 + # source://prism//lib/prism/node.rb#7720 sig { override.returns(String) } def inspect; end # attr_reader numeric: FloatNode | IntegerNode | RationalNode # - # source://prism//lib/prism/node.rb#8744 + # source://prism//lib/prism/node.rb#7717 sig { returns(T.any(Prism::FloatNode, Prism::IntegerNode, Prism::RationalNode)) } def numeric; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8765 + # source://prism//lib/prism/node.rb#7725 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Complex. # - # source://prism//lib/prism/node_ext.rb#101 + # source://prism//lib/prism/node_ext.rb#107 sig { returns(Complex) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8775 + # source://prism//lib/prism/node.rb#7730 def type; end end end @@ -15990,62 +16969,77 @@ end # foo in { bar: } # ^^^^ # -# source://prism//lib/prism/node.rb#8797 +# source://prism//lib/prism/node.rb#7752 class Prism::ImplicitNode < ::Prism::Node - # def initialize: (Prism::node value, Location location) -> void + # Initialize a new ImplicitNode node. # # @return [ImplicitNode] a new instance of ImplicitNode # - # source://prism//lib/prism/node.rb#8799 - sig { params(source: Prism::Source, value: Prism::Node, location: Prism::Location).void } - def initialize(source, value, location); end + # source://prism//lib/prism/node.rb#7754 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode) + ).void + end + 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#8876 + # source://prism//lib/prism/node.rb#7815 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8806 + # source://prism//lib/prism/node.rb#7763 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8811 + # source://prism//lib/prism/node.rb#7768 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#8821 + # source://prism//lib/prism/node.rb#7778 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#8816 + # source://prism//lib/prism/node.rb#7773 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Prism::node, ?location: Location) -> ImplicitNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode) -> ImplicitNode # - # source://prism//lib/prism/node.rb#8826 - sig { params(value: Prism::Node, location: Prism::Location).returns(Prism::ImplicitNode) } - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7783 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8811 + # source://prism//lib/prism/node.rb#7768 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode } # - # source://prism//lib/prism/node.rb#8834 + # source://prism//lib/prism/node.rb#7791 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16054,44 +17048,28 @@ class Prism::ImplicitNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8842 + # source://prism//lib/prism/node.rb#7799 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#8860 + # source://prism//lib/prism/node.rb#7804 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # attr_reader value: LocalVariableReadNode | CallNode | ConstantReadNode | LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#8839 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#7796 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::CallNode, Prism::ConstantReadNode, Prism::LocalVariableTargetNode)) + end def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8870 + # source://prism//lib/prism/node.rb#7809 def type; end end end @@ -16110,62 +17088,62 @@ end # foo, = bar # ^ # -# source://prism//lib/prism/node.rb#8895 +# source://prism//lib/prism/node.rb#7834 class Prism::ImplicitRestNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ImplicitRestNode node. # # @return [ImplicitRestNode] a new instance of ImplicitRestNode # - # source://prism//lib/prism/node.rb#8897 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#7836 + 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#8970 + # source://prism//lib/prism/node.rb#7893 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8903 + # source://prism//lib/prism/node.rb#7844 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8908 + # source://prism//lib/prism/node.rb#7849 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#8918 + # source://prism//lib/prism/node.rb#7859 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#8913 + # source://prism//lib/prism/node.rb#7854 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ImplicitRestNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ImplicitRestNode # - # source://prism//lib/prism/node.rb#8923 - sig { params(location: Prism::Location).returns(Prism::ImplicitRestNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#7864 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8908 + # source://prism//lib/prism/node.rb#7849 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#8931 + # source://prism//lib/prism/node.rb#7872 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16174,38 +17152,20 @@ class Prism::ImplicitRestNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#8936 + # source://prism//lib/prism/node.rb#7877 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#8954 + # source://prism//lib/prism/node.rb#7882 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#8964 + # source://prism//lib/prism/node.rb#7887 def type; end end end @@ -16215,79 +17175,83 @@ end # case a; in b then c end # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#8979 +# source://prism//lib/prism/node.rb#7902 class Prism::InNode < ::Prism::Node - # def initialize: (Prism::node pattern, StatementsNode? statements, Location in_loc, Location? then_loc, Location location) -> void + # Initialize a new InNode node. # # @return [InNode] a new instance of InNode # - # source://prism//lib/prism/node.rb#8981 + # source://prism//lib/prism/node.rb#7904 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, pattern: Prism::Node, statements: T.nilable(Prism::StatementsNode), in_loc: Prism::Location, - then_loc: T.nilable(Prism::Location), - location: Prism::Location + then_loc: T.nilable(Prism::Location) ).void end - def initialize(source, pattern, statements, in_loc, then_loc, location); end + def initialize(source, node_id, location, flags, pattern, statements, in_loc, then_loc); 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#9097 + # source://prism//lib/prism/node.rb#8004 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#8991 + # source://prism//lib/prism/node.rb#7916 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8996 + # source://prism//lib/prism/node.rb#7921 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#9009 + # source://prism//lib/prism/node.rb#7934 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#9001 + # source://prism//lib/prism/node.rb#7926 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?pattern: Prism::node, ?statements: StatementsNode?, ?in_loc: Location, ?then_loc: Location?, ?location: Location) -> InNode + # 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#9014 + # source://prism//lib/prism/node.rb#7939 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, pattern: Prism::Node, statements: T.nilable(Prism::StatementsNode), in_loc: Prism::Location, - then_loc: T.nilable(Prism::Location), - location: Prism::Location + then_loc: T.nilable(Prism::Location) ).returns(Prism::InNode) end - def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), in_loc: T.unsafe(nil), then_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#8996 + # source://prism//lib/prism/node.rb#7921 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { pattern: Prism::node, statements: StatementsNode?, in_loc: Location, then_loc: Location?, location: Location } + # 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#9022 + # source://prism//lib/prism/node.rb#7947 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16296,74 +17260,56 @@ class Prism::InNode < ::Prism::Node # def in: () -> String # - # source://prism//lib/prism/node.rb#9053 + # source://prism//lib/prism/node.rb#7978 sig { returns(String) } def in; end # attr_reader in_loc: Location # - # source://prism//lib/prism/node.rb#9033 + # source://prism//lib/prism/node.rb#7958 sig { returns(Prism::Location) } def in_loc; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9063 + # source://prism//lib/prism/node.rb#7988 sig { override.returns(String) } def inspect; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#9027 + # source://prism//lib/prism/node.rb#7952 sig { returns(Prism::Node) } def pattern; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#9030 + # source://prism//lib/prism/node.rb#7955 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then: () -> String? # - # source://prism//lib/prism/node.rb#9058 + # source://prism//lib/prism/node.rb#7983 sig { returns(T.nilable(String)) } def then; end # attr_reader then_loc: Location? # - # source://prism//lib/prism/node.rb#9040 + # source://prism//lib/prism/node.rb#7965 sig { returns(T.nilable(Prism::Location)) } def then_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9081 + # source://prism//lib/prism/node.rb#7993 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9091 + # source://prism//lib/prism/node.rb#7998 def type; end end end @@ -16373,45 +17319,46 @@ end # foo.bar[baz] &&= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9110 +# source://prism//lib/prism/node.rb#8017 class Prism::IndexAndWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new IndexAndWriteNode node. # # @return [IndexAndWriteNode] a new instance of IndexAndWriteNode # - # source://prism//lib/prism/node.rb#9112 + # source://prism//lib/prism/node.rb#8019 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, 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#9289 + # source://prism//lib/prism/node.rb#8175 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9127 + # source://prism//lib/prism/node.rb#8035 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9192 + # source://prism//lib/prism/node.rb#8116 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16419,87 +17366,88 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9225 + # source://prism//lib/prism/node.rb#8083 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9202 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8126 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9235 + # source://prism//lib/prism/node.rb#8139 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9172 + # source://prism//lib/prism/node.rb#8096 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9132 + # source://prism//lib/prism/node.rb#8040 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9245 + # source://prism//lib/prism/node.rb#8149 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9195 + # source://prism//lib/prism/node.rb#8119 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9147 + # source://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#9137 + # source://prism//lib/prism/node.rb#8045 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexAndWriteNode + # 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#9152 + # source://prism//lib/prism/node.rb#8060 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::IndexAndWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9132 + # source://prism//lib/prism/node.rb#8040 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } + # 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#9160 + # source://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 @@ -16510,43 +17458,43 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9230 + # source://prism//lib/prism/node.rb#8088 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9255 + # source://prism//lib/prism/node.rb#8159 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9240 + # source://prism//lib/prism/node.rb#8144 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9185 + # source://prism//lib/prism/node.rb#8109 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9250 + # source://prism//lib/prism/node.rb#8154 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9205 + # source://prism//lib/prism/node.rb#8129 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9169 + # source://prism//lib/prism/node.rb#8093 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16554,32 +17502,19 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9215 + # source://prism//lib/prism/node.rb#8073 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9273 + # source://prism//lib/prism/node.rb#8164 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9212 + # source://prism//lib/prism/node.rb#8136 sig { returns(Prism::Node) } def value; end @@ -16587,27 +17522,14 @@ class Prism::IndexAndWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9220 + # source://prism//lib/prism/node.rb#8078 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9165 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9283 + # source://prism//lib/prism/node.rb#8169 def type; end end end @@ -16617,46 +17539,47 @@ end # foo.bar[baz] += value # ^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9307 +# source://prism//lib/prism/node.rb#8193 class Prism::IndexOperatorWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Symbol binary_operator, Location binary_operator_loc, Prism::node value, Location location) -> void + # Initialize a new IndexOperatorWriteNode node. # # @return [IndexOperatorWriteNode] a new instance of IndexOperatorWriteNode # - # source://prism//lib/prism/node.rb#9309 + # source://prism//lib/prism/node.rb#8195 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, binary_operator, binary_operator_loc, 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#9485 + # source://prism//lib/prism/node.rb#8350 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9325 + # source://prism//lib/prism/node.rb#8212 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9390 + # source://prism//lib/prism/node.rb#8293 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16664,100 +17587,101 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9426 + # source://prism//lib/prism/node.rb#8260 sig { returns(T::Boolean) } def attribute_write?; end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#9403 + # source://prism//lib/prism/node.rb#8306 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#9406 + # source://prism//lib/prism/node.rb#8309 sig { returns(Prism::Location) } def binary_operator_loc; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9400 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8303 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9436 + # source://prism//lib/prism/node.rb#8319 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9370 + # source://prism//lib/prism/node.rb#8273 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9330 + # source://prism//lib/prism/node.rb#8217 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9446 + # source://prism//lib/prism/node.rb#8329 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9393 + # source://prism//lib/prism/node.rb#8296 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9345 + # source://prism//lib/prism/node.rb#8232 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#9335 + # source://prism//lib/prism/node.rb#8222 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?binary_operator: Symbol, ?binary_operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOperatorWriteNode + # 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#9350 + # source://prism//lib/prism/node.rb#8237 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), binary_operator: Symbol, binary_operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::IndexOperatorWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9330 + # source://prism//lib/prism/node.rb#8217 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, binary_operator: Symbol, binary_operator_loc: Location, value: Prism::node, location: Location } + # 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#9358 + # source://prism//lib/prism/node.rb#8245 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -16768,43 +17692,43 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9431 + # source://prism//lib/prism/node.rb#8265 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9451 + # source://prism//lib/prism/node.rb#8334 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9441 + # source://prism//lib/prism/node.rb#8324 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9383 + # source://prism//lib/prism/node.rb#8286 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#403 + # source://prism//lib/prism/node_ext.rb#419 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 + # source://prism//lib/prism/node_ext.rb#426 def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9367 + # source://prism//lib/prism/node.rb#8270 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -16812,32 +17736,19 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9416 + # source://prism//lib/prism/node.rb#8250 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9469 + # source://prism//lib/prism/node.rb#8339 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9413 + # source://prism//lib/prism/node.rb#8316 sig { returns(Prism::Node) } def value; end @@ -16845,27 +17756,14 @@ class Prism::IndexOperatorWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9421 + # source://prism//lib/prism/node.rb#8255 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9363 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9479 + # source://prism//lib/prism/node.rb#8344 def type; end end end @@ -16875,45 +17773,46 @@ end # foo.bar[baz] ||= value # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9504 +# source://prism//lib/prism/node.rb#8369 class Prism::IndexOrWriteNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? receiver, Location? call_operator_loc, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new IndexOrWriteNode node. # # @return [IndexOrWriteNode] a new instance of IndexOrWriteNode # - # source://prism//lib/prism/node.rb#9506 + # source://prism//lib/prism/node.rb#8371 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, value, location); end + def initialize(source, node_id, location, flags, receiver, call_operator_loc, opening_loc, arguments, closing_loc, block, operator_loc, 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#9683 + # source://prism//lib/prism/node.rb#8527 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9521 + # source://prism//lib/prism/node.rb#8387 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9586 + # source://prism//lib/prism/node.rb#8468 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -16921,87 +17820,88 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9619 + # source://prism//lib/prism/node.rb#8435 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9596 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8478 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def call_operator: () -> String? # - # source://prism//lib/prism/node.rb#9629 + # source://prism//lib/prism/node.rb#8491 sig { returns(T.nilable(String)) } def call_operator; end # attr_reader call_operator_loc: Location? # - # source://prism//lib/prism/node.rb#9566 + # source://prism//lib/prism/node.rb#8448 sig { returns(T.nilable(Prism::Location)) } def call_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9526 + # source://prism//lib/prism/node.rb#8392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9639 + # source://prism//lib/prism/node.rb#8501 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9589 + # source://prism//lib/prism/node.rb#8471 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9541 + # source://prism//lib/prism/node.rb#8407 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#9531 + # source://prism//lib/prism/node.rb#8397 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node?, ?call_operator_loc: Location?, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> IndexOrWriteNode + # 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#9546 + # source://prism//lib/prism/node.rb#8412 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: T.nilable(Prism::Node), call_operator_loc: T.nilable(Prism::Location), opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), + block: T.nilable(Prism::BlockArgumentNode), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::IndexOrWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9526 + # source://prism//lib/prism/node.rb#8392 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node?, call_operator_loc: Location?, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, operator_loc: Location, value: Prism::node, location: Location } + # 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#9554 + # source://prism//lib/prism/node.rb#8420 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17012,43 +17912,43 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9624 + # source://prism//lib/prism/node.rb#8440 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9649 + # source://prism//lib/prism/node.rb#8511 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9634 + # source://prism//lib/prism/node.rb#8496 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9579 + # source://prism//lib/prism/node.rb#8461 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9644 + # source://prism//lib/prism/node.rb#8506 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9599 + # source://prism//lib/prism/node.rb#8481 sig { returns(Prism::Location) } def operator_loc; end # attr_reader receiver: Prism::node? # - # source://prism//lib/prism/node.rb#9563 + # source://prism//lib/prism/node.rb#8445 sig { returns(T.nilable(Prism::Node)) } def receiver; end @@ -17056,32 +17956,19 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9609 + # source://prism//lib/prism/node.rb#8425 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9667 + # source://prism//lib/prism/node.rb#8516 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9606 + # source://prism//lib/prism/node.rb#8488 sig { returns(Prism::Node) } def value; end @@ -17089,27 +17976,14 @@ class Prism::IndexOrWriteNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9614 + # source://prism//lib/prism/node.rb#8430 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9559 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9677 + # source://prism//lib/prism/node.rb#8521 def type; end end end @@ -17127,42 +18001,43 @@ end # for foo[bar] in baz do end # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#9709 +# source://prism//lib/prism/node.rb#8553 class Prism::IndexTargetNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node receiver, Location opening_loc, ArgumentsNode? arguments, Location closing_loc, Prism::node? block, Location location) -> void + # Initialize a new IndexTargetNode node. # # @return [IndexTargetNode] a new instance of IndexTargetNode # - # source://prism//lib/prism/node.rb#9711 + # source://prism//lib/prism/node.rb#8555 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(Prism::BlockArgumentNode) ).void end - def initialize(source, flags, receiver, opening_loc, arguments, closing_loc, block, location); end + def initialize(source, node_id, location, flags, receiver, opening_loc, arguments, closing_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#9851 + # source://prism//lib/prism/node.rb#8674 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9723 + # source://prism//lib/prism/node.rb#8568 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#9774 + # source://prism//lib/prism/node.rb#8635 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end @@ -17170,72 +18045,73 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9797 + # source://prism//lib/prism/node.rb#8615 sig { returns(T::Boolean) } def attribute_write?; end - # attr_reader block: Prism::node? + # attr_reader block: BlockArgumentNode? # - # source://prism//lib/prism/node.rb#9784 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#8645 + sig { returns(T.nilable(Prism::BlockArgumentNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9728 + # source://prism//lib/prism/node.rb#8573 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#9812 + # source://prism//lib/prism/node.rb#8653 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#9777 + # source://prism//lib/prism/node.rb#8638 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#9742 + # source://prism//lib/prism/node.rb#8587 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#9733 + # source://prism//lib/prism/node.rb#8578 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?receiver: Prism::node, ?opening_loc: Location, ?arguments: ArgumentsNode?, ?closing_loc: Location, ?block: Prism::node?, ?location: Location) -> IndexTargetNode + # 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#9747 + # source://prism//lib/prism/node.rb#8592 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, receiver: Prism::Node, opening_loc: Prism::Location, arguments: T.nilable(Prism::ArgumentsNode), closing_loc: Prism::Location, - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(Prism::BlockArgumentNode) ).returns(Prism::IndexTargetNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9728 + # source://prism//lib/prism/node.rb#8573 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, receiver: Prism::node, opening_loc: Location, arguments: ArgumentsNode?, closing_loc: Location, block: Prism::node?, location: Location } + # 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#9755 + # source://prism//lib/prism/node.rb#8600 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -17246,31 +18122,31 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9802 + # source://prism//lib/prism/node.rb#8620 sig { returns(T::Boolean) } def ignore_visibility?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#9817 + # source://prism//lib/prism/node.rb#8658 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#9807 + # source://prism//lib/prism/node.rb#8648 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#9767 + # source://prism//lib/prism/node.rb#8628 sig { returns(Prism::Location) } def opening_loc; end # attr_reader receiver: Prism::node # - # source://prism//lib/prism/node.rb#9764 + # source://prism//lib/prism/node.rb#8625 sig { returns(Prism::Node) } def receiver; end @@ -17278,26 +18154,13 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9787 + # source://prism//lib/prism/node.rb#8605 sig { returns(T::Boolean) } def safe_navigation?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#9835 + # source://prism//lib/prism/node.rb#8663 sig { override.returns(Symbol) } def type; end @@ -17305,27 +18168,14 @@ class Prism::IndexTargetNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#9792 + # source://prism//lib/prism/node.rb#8610 sig { returns(T::Boolean) } def variable_call?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#9760 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9845 + # source://prism//lib/prism/node.rb#8668 def type; end end end @@ -17333,11 +18183,11 @@ 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#388 +# source://prism//lib/prism/parse_result.rb#529 class Prism::InlineComment < ::Prism::Comment # Returns a string representation of this comment. # - # source://prism//lib/prism/parse_result.rb#396 + # source://prism//lib/prism/parse_result.rb#537 sig { returns(String) } def inspect; end @@ -17346,7 +18196,7 @@ class Prism::InlineComment < ::Prism::Comment # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#391 + # source://prism//lib/prism/parse_result.rb#532 sig { override.returns(T::Boolean) } def trailing?; end end @@ -17388,764 +18238,764 @@ class Prism::InspectVisitor < ::Prism::Visitor # Inspect a AliasMethodNode node. # - # source://prism//lib/prism/inspect_visitor.rb#87 + # source://prism//lib/prism/inspect_visitor.rb#89 def visit_alias_method_node(node); end # Inspect a AlternationPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#97 + # source://prism//lib/prism/inspect_visitor.rb#101 def visit_alternation_pattern_node(node); end # Inspect a AndNode node. # - # source://prism//lib/prism/inspect_visitor.rb#107 + # source://prism//lib/prism/inspect_visitor.rb#113 def visit_and_node(node); end # Inspect a ArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#117 + # source://prism//lib/prism/inspect_visitor.rb#125 def visit_arguments_node(node); end # Inspect a ArrayNode node. # - # source://prism//lib/prism/inspect_visitor.rb#133 + # source://prism//lib/prism/inspect_visitor.rb#141 def visit_array_node(node); end # Inspect a ArrayPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#151 + # source://prism//lib/prism/inspect_visitor.rb#159 def visit_array_pattern_node(node); end # Inspect a AssocNode node. # - # source://prism//lib/prism/inspect_visitor.rb#188 + # source://prism//lib/prism/inspect_visitor.rb#198 def visit_assoc_node(node); end # Inspect a AssocSplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#198 + # source://prism//lib/prism/inspect_visitor.rb#210 def visit_assoc_splat_node(node); end # Inspect a BackReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#210 + # source://prism//lib/prism/inspect_visitor.rb#224 def visit_back_reference_read_node(node); end # Inspect a BeginNode node. # - # source://prism//lib/prism/inspect_visitor.rb#216 + # source://prism//lib/prism/inspect_visitor.rb#232 def visit_begin_node(node); end # Inspect a BlockArgumentNode node. # - # source://prism//lib/prism/inspect_visitor.rb#247 + # source://prism//lib/prism/inspect_visitor.rb#265 def visit_block_argument_node(node); end # Inspect a BlockLocalVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#259 + # source://prism//lib/prism/inspect_visitor.rb#279 def visit_block_local_variable_node(node); end # Inspect a BlockNode node. # - # source://prism//lib/prism/inspect_visitor.rb#267 + # source://prism//lib/prism/inspect_visitor.rb#287 def visit_block_node(node); end # Inspect a BlockParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#287 + # source://prism//lib/prism/inspect_visitor.rb#309 def visit_block_parameter_node(node); end # Inspect a BlockParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#301 + # source://prism//lib/prism/inspect_visitor.rb#323 def visit_block_parameters_node(node); end # Inspect a BreakNode node. # - # source://prism//lib/prism/inspect_visitor.rb#323 + # source://prism//lib/prism/inspect_visitor.rb#347 def visit_break_node(node); end # Inspect a CallAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#335 + # source://prism//lib/prism/inspect_visitor.rb#361 def visit_call_and_write_node(node); end # Inspect a CallNode node. # - # source://prism//lib/prism/inspect_visitor.rb#355 + # source://prism//lib/prism/inspect_visitor.rb#381 def visit_call_node(node); end # Inspect a CallOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#385 + # source://prism//lib/prism/inspect_visitor.rb#411 def visit_call_operator_write_node(node); end # Inspect a CallOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#406 + # source://prism//lib/prism/inspect_visitor.rb#432 def visit_call_or_write_node(node); end # Inspect a CallTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#426 + # source://prism//lib/prism/inspect_visitor.rb#452 def visit_call_target_node(node); end # Inspect a CapturePatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#438 + # source://prism//lib/prism/inspect_visitor.rb#464 def visit_capture_pattern_node(node); end # Inspect a CaseMatchNode node. # - # source://prism//lib/prism/inspect_visitor.rb#448 + # source://prism//lib/prism/inspect_visitor.rb#476 def visit_case_match_node(node); end # Inspect a CaseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#476 + # source://prism//lib/prism/inspect_visitor.rb#506 def visit_case_node(node); end # Inspect a ClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#504 + # source://prism//lib/prism/inspect_visitor.rb#536 def visit_class_node(node); end # Inspect a ClassVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#528 + # source://prism//lib/prism/inspect_visitor.rb#562 def visit_class_variable_and_write_node(node); end # Inspect a ClassVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#538 + # source://prism//lib/prism/inspect_visitor.rb#574 def visit_class_variable_operator_write_node(node); end # Inspect a ClassVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#549 + # source://prism//lib/prism/inspect_visitor.rb#587 def visit_class_variable_or_write_node(node); end # Inspect a ClassVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#559 + # source://prism//lib/prism/inspect_visitor.rb#599 def visit_class_variable_read_node(node); end # Inspect a ClassVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#565 + # source://prism//lib/prism/inspect_visitor.rb#607 def visit_class_variable_target_node(node); end # Inspect a ClassVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#571 + # source://prism//lib/prism/inspect_visitor.rb#615 def visit_class_variable_write_node(node); end # Inspect a ConstantAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#581 + # source://prism//lib/prism/inspect_visitor.rb#627 def visit_constant_and_write_node(node); end # Inspect a ConstantOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#591 + # source://prism//lib/prism/inspect_visitor.rb#639 def visit_constant_operator_write_node(node); end # Inspect a ConstantOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#602 + # source://prism//lib/prism/inspect_visitor.rb#652 def visit_constant_or_write_node(node); end # Inspect a ConstantPathAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#612 + # source://prism//lib/prism/inspect_visitor.rb#664 def visit_constant_path_and_write_node(node); end # Inspect a ConstantPathNode node. # - # source://prism//lib/prism/inspect_visitor.rb#622 + # source://prism//lib/prism/inspect_visitor.rb#676 def visit_constant_path_node(node); end # Inspect a ConstantPathOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#640 + # source://prism//lib/prism/inspect_visitor.rb#696 def visit_constant_path_operator_write_node(node); end # Inspect a ConstantPathOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#651 + # source://prism//lib/prism/inspect_visitor.rb#709 def visit_constant_path_or_write_node(node); end # Inspect a ConstantPathTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#661 + # source://prism//lib/prism/inspect_visitor.rb#721 def visit_constant_path_target_node(node); end # Inspect a ConstantPathWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#679 + # source://prism//lib/prism/inspect_visitor.rb#741 def visit_constant_path_write_node(node); end # Inspect a ConstantReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#689 + # source://prism//lib/prism/inspect_visitor.rb#753 def visit_constant_read_node(node); end # Inspect a ConstantTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#695 + # source://prism//lib/prism/inspect_visitor.rb#761 def visit_constant_target_node(node); end # Inspect a ConstantWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#701 + # source://prism//lib/prism/inspect_visitor.rb#769 def visit_constant_write_node(node); end # Inspect a DefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#711 + # source://prism//lib/prism/inspect_visitor.rb#781 def visit_def_node(node); end # Inspect a DefinedNode node. # - # source://prism//lib/prism/inspect_visitor.rb#743 + # source://prism//lib/prism/inspect_visitor.rb#815 def visit_defined_node(node); end # Inspect a ElseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#753 + # source://prism//lib/prism/inspect_visitor.rb#827 def visit_else_node(node); end # Inspect a EmbeddedStatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#766 + # source://prism//lib/prism/inspect_visitor.rb#842 def visit_embedded_statements_node(node); end # Inspect a EmbeddedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#779 + # source://prism//lib/prism/inspect_visitor.rb#857 def visit_embedded_variable_node(node); end # Inspect a EnsureNode node. # - # source://prism//lib/prism/inspect_visitor.rb#787 + # source://prism//lib/prism/inspect_visitor.rb#867 def visit_ensure_node(node); end # Inspect a FalseNode node. # - # source://prism//lib/prism/inspect_visitor.rb#800 + # source://prism//lib/prism/inspect_visitor.rb#882 def visit_false_node(node); end # Inspect a FindPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#805 + # source://prism//lib/prism/inspect_visitor.rb#889 def visit_find_pattern_node(node); end # Inspect a FlipFlopNode node. # - # source://prism//lib/prism/inspect_visitor.rb#831 + # source://prism//lib/prism/inspect_visitor.rb#917 def visit_flip_flop_node(node); end # Inspect a FloatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#851 + # source://prism//lib/prism/inspect_visitor.rb#937 def visit_float_node(node); end # Inspect a ForNode node. # - # source://prism//lib/prism/inspect_visitor.rb#857 + # source://prism//lib/prism/inspect_visitor.rb#945 def visit_for_node(node); end # Inspect a ForwardingArgumentsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#876 + # source://prism//lib/prism/inspect_visitor.rb#966 def visit_forwarding_arguments_node(node); end # Inspect a ForwardingParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#881 + # source://prism//lib/prism/inspect_visitor.rb#973 def visit_forwarding_parameter_node(node); end # Inspect a ForwardingSuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#886 + # source://prism//lib/prism/inspect_visitor.rb#980 def visit_forwarding_super_node(node); end # Inspect a GlobalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#897 + # source://prism//lib/prism/inspect_visitor.rb#993 def visit_global_variable_and_write_node(node); end # Inspect a GlobalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#907 + # source://prism//lib/prism/inspect_visitor.rb#1005 def visit_global_variable_operator_write_node(node); end # Inspect a GlobalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#918 + # source://prism//lib/prism/inspect_visitor.rb#1018 def visit_global_variable_or_write_node(node); end # Inspect a GlobalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#928 + # source://prism//lib/prism/inspect_visitor.rb#1030 def visit_global_variable_read_node(node); end # Inspect a GlobalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#934 + # source://prism//lib/prism/inspect_visitor.rb#1038 def visit_global_variable_target_node(node); end # Inspect a GlobalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#940 + # source://prism//lib/prism/inspect_visitor.rb#1046 def visit_global_variable_write_node(node); end # Inspect a HashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#950 + # source://prism//lib/prism/inspect_visitor.rb#1058 def visit_hash_node(node); end # Inspect a HashPatternNode node. # - # source://prism//lib/prism/inspect_visitor.rb#966 + # source://prism//lib/prism/inspect_visitor.rb#1076 def visit_hash_pattern_node(node); end # Inspect a IfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#994 + # source://prism//lib/prism/inspect_visitor.rb#1106 def visit_if_node(node); end # Inspect a ImaginaryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1016 + # source://prism//lib/prism/inspect_visitor.rb#1130 def visit_imaginary_node(node); end # Inspect a ImplicitNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1023 + # source://prism//lib/prism/inspect_visitor.rb#1139 def visit_implicit_node(node); end # Inspect a ImplicitRestNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1030 + # source://prism//lib/prism/inspect_visitor.rb#1148 def visit_implicit_rest_node(node); end # Inspect a InNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1035 + # source://prism//lib/prism/inspect_visitor.rb#1155 def visit_in_node(node); end # Inspect a IndexAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1050 + # source://prism//lib/prism/inspect_visitor.rb#1172 def visit_index_and_write_node(node); end # Inspect a IndexOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1081 + # source://prism//lib/prism/inspect_visitor.rb#1203 def visit_index_operator_write_node(node); end # Inspect a IndexOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1113 + # source://prism//lib/prism/inspect_visitor.rb#1235 def visit_index_or_write_node(node); end # Inspect a IndexTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1144 + # source://prism//lib/prism/inspect_visitor.rb#1266 def visit_index_target_node(node); end # Inspect a InstanceVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1167 + # source://prism//lib/prism/inspect_visitor.rb#1289 def visit_instance_variable_and_write_node(node); end # Inspect a InstanceVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1177 + # source://prism//lib/prism/inspect_visitor.rb#1301 def visit_instance_variable_operator_write_node(node); end # Inspect a InstanceVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1188 + # source://prism//lib/prism/inspect_visitor.rb#1314 def visit_instance_variable_or_write_node(node); end # Inspect a InstanceVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1198 + # source://prism//lib/prism/inspect_visitor.rb#1326 def visit_instance_variable_read_node(node); end # Inspect a InstanceVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1204 + # source://prism//lib/prism/inspect_visitor.rb#1334 def visit_instance_variable_target_node(node); end # Inspect a InstanceVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1210 + # source://prism//lib/prism/inspect_visitor.rb#1342 def visit_instance_variable_write_node(node); end # Inspect a IntegerNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1220 + # source://prism//lib/prism/inspect_visitor.rb#1354 def visit_integer_node(node); end # Inspect a InterpolatedMatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1228 + # source://prism//lib/prism/inspect_visitor.rb#1362 def visit_interpolated_match_last_line_node(node); end # Inspect a InterpolatedRegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1246 + # source://prism//lib/prism/inspect_visitor.rb#1380 def visit_interpolated_regular_expression_node(node); end # Inspect a InterpolatedStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1264 + # source://prism//lib/prism/inspect_visitor.rb#1398 def visit_interpolated_string_node(node); end # Inspect a InterpolatedSymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1282 + # source://prism//lib/prism/inspect_visitor.rb#1416 def visit_interpolated_symbol_node(node); end # Inspect a InterpolatedXStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1298 + # source://prism//lib/prism/inspect_visitor.rb#1434 def visit_interpolated_x_string_node(node); end # Inspect a ItLocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1314 + # source://prism//lib/prism/inspect_visitor.rb#1452 def visit_it_local_variable_read_node(node); end # Inspect a ItParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1319 + # source://prism//lib/prism/inspect_visitor.rb#1459 def visit_it_parameters_node(node); end # Inspect a KeywordHashNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1324 + # source://prism//lib/prism/inspect_visitor.rb#1466 def visit_keyword_hash_node(node); end # Inspect a KeywordRestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1340 + # source://prism//lib/prism/inspect_visitor.rb#1482 def visit_keyword_rest_parameter_node(node); end # Inspect a LambdaNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1354 + # source://prism//lib/prism/inspect_visitor.rb#1496 def visit_lambda_node(node); end # Inspect a LocalVariableAndWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1375 + # source://prism//lib/prism/inspect_visitor.rb#1519 def visit_local_variable_and_write_node(node); end # Inspect a LocalVariableOperatorWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1386 + # source://prism//lib/prism/inspect_visitor.rb#1532 def visit_local_variable_operator_write_node(node); end # Inspect a LocalVariableOrWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1398 + # source://prism//lib/prism/inspect_visitor.rb#1546 def visit_local_variable_or_write_node(node); end # Inspect a LocalVariableReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1409 + # source://prism//lib/prism/inspect_visitor.rb#1559 def visit_local_variable_read_node(node); end # Inspect a LocalVariableTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1416 + # source://prism//lib/prism/inspect_visitor.rb#1568 def visit_local_variable_target_node(node); end # Inspect a LocalVariableWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1423 + # source://prism//lib/prism/inspect_visitor.rb#1577 def visit_local_variable_write_node(node); end # Inspect a MatchLastLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1434 + # source://prism//lib/prism/inspect_visitor.rb#1590 def visit_match_last_line_node(node); end # Inspect a MatchPredicateNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1445 + # source://prism//lib/prism/inspect_visitor.rb#1601 def visit_match_predicate_node(node); end # Inspect a MatchRequiredNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1455 + # source://prism//lib/prism/inspect_visitor.rb#1613 def visit_match_required_node(node); end # Inspect a MatchWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1465 + # source://prism//lib/prism/inspect_visitor.rb#1625 def visit_match_write_node(node); end # Inspect a MissingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1481 + # source://prism//lib/prism/inspect_visitor.rb#1643 def visit_missing_node(node); end # Inspect a ModuleNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1486 + # source://prism//lib/prism/inspect_visitor.rb#1650 def visit_module_node(node); end # Inspect a MultiTargetNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1503 + # source://prism//lib/prism/inspect_visitor.rb#1669 def visit_multi_target_node(node); end # Inspect a MultiWriteNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1534 + # source://prism//lib/prism/inspect_visitor.rb#1702 def visit_multi_write_node(node); end # Inspect a NextNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1568 + # source://prism//lib/prism/inspect_visitor.rb#1738 def visit_next_node(node); end # Inspect a NilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1580 + # source://prism//lib/prism/inspect_visitor.rb#1752 def visit_nil_node(node); end # Inspect a NoKeywordsParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1585 + # source://prism//lib/prism/inspect_visitor.rb#1759 def visit_no_keywords_parameter_node(node); end # Inspect a NumberedParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1592 + # source://prism//lib/prism/inspect_visitor.rb#1768 def visit_numbered_parameters_node(node); end # Inspect a NumberedReferenceReadNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1598 + # source://prism//lib/prism/inspect_visitor.rb#1776 def visit_numbered_reference_read_node(node); end # Inspect a OptionalKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1604 + # source://prism//lib/prism/inspect_visitor.rb#1784 def visit_optional_keyword_parameter_node(node); end # Inspect a OptionalParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1615 + # source://prism//lib/prism/inspect_visitor.rb#1795 def visit_optional_parameter_node(node); end # Inspect a OrNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1627 + # source://prism//lib/prism/inspect_visitor.rb#1807 def visit_or_node(node); end # Inspect a ParametersNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1637 + # source://prism//lib/prism/inspect_visitor.rb#1819 def visit_parameters_node(node); end # Inspect a ParenthesesNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1696 + # source://prism//lib/prism/inspect_visitor.rb#1880 def visit_parentheses_node(node); end # Inspect a PinnedExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1709 + # source://prism//lib/prism/inspect_visitor.rb#1895 def visit_pinned_expression_node(node); end # Inspect a PinnedVariableNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1719 + # source://prism//lib/prism/inspect_visitor.rb#1907 def visit_pinned_variable_node(node); end # Inspect a PostExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1727 + # source://prism//lib/prism/inspect_visitor.rb#1917 def visit_post_execution_node(node); end # Inspect a PreExecutionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1741 + # source://prism//lib/prism/inspect_visitor.rb#1933 def visit_pre_execution_node(node); end # Inspect a ProgramNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1755 + # source://prism//lib/prism/inspect_visitor.rb#1949 def visit_program_node(node); end # Inspect a RangeNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1763 + # source://prism//lib/prism/inspect_visitor.rb#1959 def visit_range_node(node); end # Inspect a RationalNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1783 + # source://prism//lib/prism/inspect_visitor.rb#1979 def visit_rational_node(node); end # Inspect a RedoNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1792 + # source://prism//lib/prism/inspect_visitor.rb#1988 def visit_redo_node(node); end # Inspect a RegularExpressionNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1797 + # source://prism//lib/prism/inspect_visitor.rb#1995 def visit_regular_expression_node(node); end # Inspect a RequiredKeywordParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1808 + # source://prism//lib/prism/inspect_visitor.rb#2006 def visit_required_keyword_parameter_node(node); end # Inspect a RequiredParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1817 + # source://prism//lib/prism/inspect_visitor.rb#2015 def visit_required_parameter_node(node); end # Inspect a RescueModifierNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1825 + # source://prism//lib/prism/inspect_visitor.rb#2023 def visit_rescue_modifier_node(node); end # Inspect a RescueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1835 + # source://prism//lib/prism/inspect_visitor.rb#2035 def visit_rescue_node(node); end # Inspect a RestParameterNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1869 + # source://prism//lib/prism/inspect_visitor.rb#2071 def visit_rest_parameter_node(node); end # Inspect a RetryNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1883 + # source://prism//lib/prism/inspect_visitor.rb#2085 def visit_retry_node(node); end # Inspect a ReturnNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1888 + # source://prism//lib/prism/inspect_visitor.rb#2092 def visit_return_node(node); end # Inspect a SelfNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1902 + # source://prism//lib/prism/inspect_visitor.rb#2106 def visit_self_node(node); end # Inspect a ShareableConstantNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1907 + # source://prism//lib/prism/inspect_visitor.rb#2113 def visit_shareable_constant_node(node); end # Inspect a SingletonClassNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1916 + # source://prism//lib/prism/inspect_visitor.rb#2122 def visit_singleton_class_node(node); end # Inspect a SourceEncodingNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1933 + # source://prism//lib/prism/inspect_visitor.rb#2141 def visit_source_encoding_node(node); end # Inspect a SourceFileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1938 + # source://prism//lib/prism/inspect_visitor.rb#2148 def visit_source_file_node(node); end # Inspect a SourceLineNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1946 + # source://prism//lib/prism/inspect_visitor.rb#2156 def visit_source_line_node(node); end # Inspect a SplatNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1951 + # source://prism//lib/prism/inspect_visitor.rb#2163 def visit_splat_node(node); end # Inspect a StatementsNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1963 + # source://prism//lib/prism/inspect_visitor.rb#2177 def visit_statements_node(node); end # Inspect a StringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1977 + # source://prism//lib/prism/inspect_visitor.rb#2193 def visit_string_node(node); end # Inspect a SuperNode node. # - # source://prism//lib/prism/inspect_visitor.rb#1988 + # source://prism//lib/prism/inspect_visitor.rb#2204 def visit_super_node(node); end # Inspect a SymbolNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2008 + # source://prism//lib/prism/inspect_visitor.rb#2226 def visit_symbol_node(node); end # Inspect a TrueNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2019 + # source://prism//lib/prism/inspect_visitor.rb#2237 def visit_true_node(node); end # Inspect a UndefNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2024 + # source://prism//lib/prism/inspect_visitor.rb#2244 def visit_undef_node(node); end # Inspect a UnlessNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2039 + # source://prism//lib/prism/inspect_visitor.rb#2261 def visit_unless_node(node); end # Inspect a UntilNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2061 + # source://prism//lib/prism/inspect_visitor.rb#2285 def visit_until_node(node); end # Inspect a WhenNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2078 + # source://prism//lib/prism/inspect_visitor.rb#2302 def visit_when_node(node); end # Inspect a WhileNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2100 + # source://prism//lib/prism/inspect_visitor.rb#2326 def visit_while_node(node); end # Inspect a XStringNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2117 + # source://prism//lib/prism/inspect_visitor.rb#2343 def visit_x_string_node(node); end # Inspect a YieldNode node. # - # source://prism//lib/prism/inspect_visitor.rb#2128 + # source://prism//lib/prism/inspect_visitor.rb#2354 def visit_yield_node(node); end private # Compose a string representing the given inner location field. # - # source://prism//lib/prism/inspect_visitor.rb#2150 + # source://prism//lib/prism/inspect_visitor.rb#2378 def inspect_location(location); end # Compose a header for the given node. # - # source://prism//lib/prism/inspect_visitor.rb#2144 + # source://prism//lib/prism/inspect_visitor.rb#2372 def inspect_node(name, node); end class << self @@ -18178,83 +19028,87 @@ end # @target &&= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9866 +# source://prism//lib/prism/node.rb#8689 class Prism::InstanceVariableAndWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new InstanceVariableAndWriteNode node. # # @return [InstanceVariableAndWriteNode] a new instance of InstanceVariableAndWriteNode # - # source://prism//lib/prism/node.rb#9868 + # source://prism//lib/prism/node.rb#8691 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#9970 + # source://prism//lib/prism/node.rb#8777 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9878 + # source://prism//lib/prism/node.rb#8703 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9883 + # source://prism//lib/prism/node.rb#8708 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#9893 + # source://prism//lib/prism/node.rb#8718 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#9888 + # source://prism//lib/prism/node.rb#8713 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableAndWriteNode + # 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#9898 + # source://prism//lib/prism/node.rb#8723 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::InstanceVariableAndWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#9883 + # source://prism//lib/prism/node.rb#8708 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#9906 + # source://prism//lib/prism/node.rb#8731 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#181 + # source://prism//lib/prism/desugar_compiler.rb#218 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18262,68 +19116,50 @@ class Prism::InstanceVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#9936 + # source://prism//lib/prism/node.rb#8761 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#9911 + # source://prism//lib/prism/node.rb#8736 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#9914 + # source://prism//lib/prism/node.rb#8739 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#9931 + # source://prism//lib/prism/node.rb#8756 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#9921 + # source://prism//lib/prism/node.rb#8746 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#9954 + # source://prism//lib/prism/node.rb#8766 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#9928 + # source://prism//lib/prism/node.rb#8753 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#9964 + # source://prism//lib/prism/node.rb#8771 def type; end end end @@ -18333,97 +19169,101 @@ end # @target += value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#9983 +# source://prism//lib/prism/node.rb#8790 class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location binary_operator_loc, Prism::node value, Symbol binary_operator, Location location) -> void + # Initialize a new InstanceVariableOperatorWriteNode node. # # @return [InstanceVariableOperatorWriteNode] a new instance of InstanceVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#9985 + # source://prism//lib/prism/node.rb#8792 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).void end - def initialize(source, name, name_loc, binary_operator_loc, value, binary_operator, location); end + def initialize(source, node_id, location, flags, name, name_loc, binary_operator_loc, value, binary_operator); 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#10086 + # source://prism//lib/prism/node.rb#8877 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#9996 + # source://prism//lib/prism/node.rb#8805 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#10049 + # source://prism//lib/prism/node.rb#8858 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#10039 + # source://prism//lib/prism/node.rb#8848 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10001 + # source://prism//lib/prism/node.rb#8810 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#10011 + # source://prism//lib/prism/node.rb#8820 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#10006 + # source://prism//lib/prism/node.rb#8815 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?binary_operator: Symbol, ?location: Location) -> InstanceVariableOperatorWriteNode + # 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#10016 + # source://prism//lib/prism/node.rb#8825 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, - binary_operator: Symbol, - location: Prism::Location + binary_operator: Symbol ).returns(Prism::InstanceVariableOperatorWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), binary_operator_loc: T.unsafe(nil), value: T.unsafe(nil), binary_operator: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10001 + # source://prism//lib/prism/node.rb#8810 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, binary_operator_loc: Location, value: Prism::node, binary_operator: Symbol, location: Location } + # 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#10024 + # source://prism//lib/prism/node.rb#8833 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#193 + # source://prism//lib/prism/desugar_compiler.rb#230 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18431,68 +19271,50 @@ class Prism::InstanceVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10052 + # source://prism//lib/prism/node.rb#8861 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10029 + # source://prism//lib/prism/node.rb#8838 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10032 + # source://prism//lib/prism/node.rb#8841 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#419 + # source://prism//lib/prism/node_ext.rb#435 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 + # source://prism//lib/prism/node_ext.rb#442 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10070 + # source://prism//lib/prism/node.rb#8866 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10046 + # source://prism//lib/prism/node.rb#8855 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10080 + # source://prism//lib/prism/node.rb#8871 def type; end end end @@ -18502,83 +19324,87 @@ end # @target ||= value # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10100 +# source://prism//lib/prism/node.rb#8891 class Prism::InstanceVariableOrWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new InstanceVariableOrWriteNode node. # # @return [InstanceVariableOrWriteNode] a new instance of InstanceVariableOrWriteNode # - # source://prism//lib/prism/node.rb#10102 + # source://prism//lib/prism/node.rb#8893 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#10204 + # source://prism//lib/prism/node.rb#8979 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10112 + # source://prism//lib/prism/node.rb#8905 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10117 + # source://prism//lib/prism/node.rb#8910 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#10127 + # source://prism//lib/prism/node.rb#8920 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#10122 + # source://prism//lib/prism/node.rb#8915 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> InstanceVariableOrWriteNode + # 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#10132 + # source://prism//lib/prism/node.rb#8925 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::InstanceVariableOrWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10117 + # source://prism//lib/prism/node.rb#8910 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#10140 + # source://prism//lib/prism/node.rb#8933 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#187 + # source://prism//lib/prism/desugar_compiler.rb#224 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -18586,68 +19412,50 @@ class Prism::InstanceVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10170 + # source://prism//lib/prism/node.rb#8963 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10145 + # source://prism//lib/prism/node.rb#8938 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#10148 + # source://prism//lib/prism/node.rb#8941 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10165 + # source://prism//lib/prism/node.rb#8958 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#10155 + # source://prism//lib/prism/node.rb#8948 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10188 + # source://prism//lib/prism/node.rb#8968 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#10162 + # source://prism//lib/prism/node.rb#8955 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10198 + # source://prism//lib/prism/node.rb#8973 def type; end end end @@ -18657,62 +19465,69 @@ end # @foo # ^^^^ # -# source://prism//lib/prism/node.rb#10217 +# source://prism//lib/prism/node.rb#8992 class Prism::InstanceVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new InstanceVariableReadNode node. # # @return [InstanceVariableReadNode] a new instance of InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10219 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#8994 + 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#10300 + # source://prism//lib/prism/node.rb#9059 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10226 + # source://prism//lib/prism/node.rb#9003 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10231 + # source://prism//lib/prism/node.rb#9008 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#10241 + # source://prism//lib/prism/node.rb#9018 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#10236 + # source://prism//lib/prism/node.rb#9013 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableReadNode # - # source://prism//lib/prism/node.rb#10246 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableReadNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9023 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10231 + # source://prism//lib/prism/node.rb#9008 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10254 + # source://prism//lib/prism/node.rb#9031 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18721,7 +19536,7 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10266 + # source://prism//lib/prism/node.rb#9043 sig { override.returns(String) } def inspect; end @@ -18731,38 +19546,20 @@ class Prism::InstanceVariableReadNode < ::Prism::Node # # @_test # name `:@_test` # - # source://prism//lib/prism/node.rb#10263 + # source://prism//lib/prism/node.rb#9040 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10284 + # source://prism//lib/prism/node.rb#9048 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10294 + # source://prism//lib/prism/node.rb#9053 def type; end end end @@ -18772,62 +19569,69 @@ end # @foo, @bar = baz # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#10310 +# source://prism//lib/prism/node.rb#9069 class Prism::InstanceVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Location location) -> void + # Initialize a new InstanceVariableTargetNode node. # # @return [InstanceVariableTargetNode] a new instance of InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10312 - sig { params(source: Prism::Source, name: Symbol, location: Prism::Location).void } - def initialize(source, name, location); end + # source://prism//lib/prism/node.rb#9071 + 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#10389 + # source://prism//lib/prism/node.rb#9132 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10319 + # source://prism//lib/prism/node.rb#9080 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10324 + # source://prism//lib/prism/node.rb#9085 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#10334 + # source://prism//lib/prism/node.rb#9095 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#10329 + # source://prism//lib/prism/node.rb#9090 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?location: Location) -> InstanceVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> InstanceVariableTargetNode # - # source://prism//lib/prism/node.rb#10339 - sig { params(name: Symbol, location: Prism::Location).returns(Prism::InstanceVariableTargetNode) } - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9100 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10324 + # source://prism//lib/prism/node.rb#9085 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#10347 + # source://prism//lib/prism/node.rb#9108 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18836,44 +19640,26 @@ class Prism::InstanceVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10355 + # source://prism//lib/prism/node.rb#9116 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#10352 + # source://prism//lib/prism/node.rb#9113 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#10373 + # source://prism//lib/prism/node.rb#9121 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10383 + # source://prism//lib/prism/node.rb#9126 def type; end end end @@ -18883,79 +19669,83 @@ end # @foo = 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#10399 +# source://prism//lib/prism/node.rb#9142 class Prism::InstanceVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new InstanceVariableWriteNode node. # # @return [InstanceVariableWriteNode] a new instance of InstanceVariableWriteNode # - # source://prism//lib/prism/node.rb#10401 + # source://prism//lib/prism/node.rb#9144 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, value, operator_loc); 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#10519 + # source://prism//lib/prism/node.rb#9246 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10411 + # source://prism//lib/prism/node.rb#9156 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10416 + # source://prism//lib/prism/node.rb#9161 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#10426 + # source://prism//lib/prism/node.rb#9171 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#10421 + # source://prism//lib/prism/node.rb#9166 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> InstanceVariableWriteNode + # 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#10431 + # source://prism//lib/prism/node.rb#9176 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::InstanceVariableWriteNode) end - def copy(name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10416 + # source://prism//lib/prism/node.rb#9161 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # 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#10439 + # source://prism//lib/prism/node.rb#9184 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -18964,7 +19754,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#10485 + # source://prism//lib/prism/node.rb#9230 sig { override.returns(String) } def inspect; end @@ -18974,7 +19764,7 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # # @_foo = "bar" # name `@_foo` # - # source://prism//lib/prism/node.rb#10448 + # source://prism//lib/prism/node.rb#9193 sig { returns(Symbol) } def name; end @@ -18983,13 +19773,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1 # ^^^ # - # source://prism//lib/prism/node.rb#10454 + # source://prism//lib/prism/node.rb#9199 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#10480 + # source://prism//lib/prism/node.rb#9225 sig { returns(String) } def operator; end @@ -18998,26 +19788,13 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @x = y # ^ # - # source://prism//lib/prism/node.rb#10473 + # source://prism//lib/prism/node.rb#9218 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10503 + # source://prism//lib/prism/node.rb#9235 sig { override.returns(Symbol) } def type; end @@ -19029,46 +19806,41 @@ class Prism::InstanceVariableWriteNode < ::Prism::Node # @_x = 1234 # ^^^^ # - # source://prism//lib/prism/node.rb#10467 + # source://prism//lib/prism/node.rb#9212 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10513 + # source://prism//lib/prism/node.rb#9240 def type; end end end # Flags for integer nodes that correspond to the base of the integer. # -# source://prism//lib/prism/node.rb#19166 +# source://prism//lib/prism/node.rb#16732 module Prism::IntegerBaseFlags; end # 0b prefix # -# source://prism//lib/prism/node.rb#19168 +# source://prism//lib/prism/node.rb#16734 Prism::IntegerBaseFlags::BINARY = T.let(T.unsafe(nil), Integer) # 0d or no prefix # -# source://prism//lib/prism/node.rb#19171 +# source://prism//lib/prism/node.rb#16737 Prism::IntegerBaseFlags::DECIMAL = T.let(T.unsafe(nil), Integer) # 0x prefix # -# source://prism//lib/prism/node.rb#19177 +# source://prism//lib/prism/node.rb#16743 Prism::IntegerBaseFlags::HEXADECIMAL = T.let(T.unsafe(nil), Integer) # 0o or 0 prefix # -# source://prism//lib/prism/node.rb#19174 +# source://prism//lib/prism/node.rb#16740 Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # Represents an integer number literal. @@ -19076,25 +19848,33 @@ Prism::IntegerBaseFlags::OCTAL = T.let(T.unsafe(nil), Integer) # 1 # ^ # -# source://prism//lib/prism/node.rb#10532 +# source://prism//lib/prism/node.rb#9259 class Prism::IntegerNode < ::Prism::Node - # def initialize: (Integer flags, Integer value, Location location) -> void + # Initialize a new IntegerNode node. # # @return [IntegerNode] a new instance of IntegerNode # - # source://prism//lib/prism/node.rb#10534 - sig { params(source: Prism::Source, flags: Integer, value: Integer, location: Prism::Location).void } - def initialize(source, flags, value, location); end + # source://prism//lib/prism/node.rb#9261 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + value: Integer + ).void + end + 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#10636 + # source://prism//lib/prism/node.rb#9342 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10542 + # source://prism//lib/prism/node.rb#9270 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -19102,52 +19882,59 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10582 + # source://prism//lib/prism/node.rb#9303 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10547 + # source://prism//lib/prism/node.rb#9275 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#10557 + # source://prism//lib/prism/node.rb#9285 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#10552 + # source://prism//lib/prism/node.rb#9280 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?value: Integer, ?location: Location) -> IntegerNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?value: Integer) -> IntegerNode # - # source://prism//lib/prism/node.rb#10562 - sig { params(flags: Integer, value: Integer, location: Prism::Location).returns(Prism::IntegerNode) } - def copy(flags: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#9290 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 decimal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10587 + # source://prism//lib/prism/node.rb#9308 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10547 + # source://prism//lib/prism/node.rb#9275 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, value: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, value: Integer } # - # source://prism//lib/prism/node.rb#10570 + # source://prism//lib/prism/node.rb#9298 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19158,13 +19945,13 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10597 + # source://prism//lib/prism/node.rb#9318 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10602 + # source://prism//lib/prism/node.rb#9326 sig { override.returns(String) } def inspect; end @@ -19172,52 +19959,26 @@ class Prism::IntegerNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10592 + # source://prism//lib/prism/node.rb#9313 sig { returns(T::Boolean) } def octal?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10620 + # source://prism//lib/prism/node.rb#9331 sig { override.returns(Symbol) } def type; end # The value of the integer literal as a number. # - # source://prism//lib/prism/node.rb#10579 + # source://prism//lib/prism/node.rb#9323 sig { returns(Integer) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10575 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10630 + # source://prism//lib/prism/node.rb#9336 def type; end end end @@ -19227,36 +19988,37 @@ end # if /foo #{bar} baz/ then end # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10647 +# source://prism//lib/prism/node.rb#9353 class Prism::InterpolatedMatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # Initialize a new InterpolatedMatchLastLineNode node. # # @return [InterpolatedMatchLastLineNode] a new instance of InterpolatedMatchLastLineNode # - # source://prism//lib/prism/node.rb#10649 + # source://prism//lib/prism/node.rb#9355 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#10812 + # source://prism//lib/prism/node.rb#9497 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10659 + # source://prism//lib/prism/node.rb#9366 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -19264,64 +20026,65 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10738 + # source://prism//lib/prism/node.rb#9424 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10664 + # source://prism//lib/prism/node.rb#9371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10773 + # source://prism//lib/prism/node.rb#9476 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10706 + # source://prism//lib/prism/node.rb#9464 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10674 + # source://prism//lib/prism/node.rb#9381 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#10669 + # source://prism//lib/prism/node.rb#9376 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedMatchLastLineNode + # 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#10679 + # source://prism//lib/prism/node.rb#9386 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::InterpolatedMatchLastLineNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10664 + # source://prism//lib/prism/node.rb#9371 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # 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#10687 + # source://prism//lib/prism/node.rb#9394 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19329,7 +20092,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10733 + # source://prism//lib/prism/node.rb#9419 sig { returns(T::Boolean) } def euc_jp?; end @@ -19337,7 +20100,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10718 + # source://prism//lib/prism/node.rb#9404 sig { returns(T::Boolean) } def extended?; end @@ -19348,7 +20111,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10758 + # source://prism//lib/prism/node.rb#9444 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -19356,7 +20119,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10763 + # source://prism//lib/prism/node.rb#9449 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -19364,7 +20127,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10753 + # source://prism//lib/prism/node.rb#9439 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -19372,13 +20135,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10713 + # source://prism//lib/prism/node.rb#9399 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10778 + # source://prism//lib/prism/node.rb#9481 sig { override.returns(String) } def inspect; end @@ -19386,30 +20149,30 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10723 + # source://prism//lib/prism/node.rb#9409 sig { returns(T::Boolean) } def multi_line?; end # source://prism//lib/prism/parse_result/newlines.rb#121 - def newline!(lines); end + def newline_flag!(lines); end # def once?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10728 + # source://prism//lib/prism/node.rb#9414 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10768 + # source://prism//lib/prism/node.rb#9471 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10696 + # source://prism//lib/prism/node.rb#9454 sig { returns(Prism::Location) } def opening_loc; end @@ -19418,26 +20181,13 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10703 + # source://prism//lib/prism/node.rb#9461 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10796 + # source://prism//lib/prism/node.rb#9486 sig { override.returns(Symbol) } def type; end @@ -19445,7 +20195,7 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10748 + # source://prism//lib/prism/node.rb#9434 sig { returns(T::Boolean) } def utf_8?; end @@ -19453,27 +20203,14 @@ class Prism::InterpolatedMatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10743 + # source://prism//lib/prism/node.rb#9429 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10692 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#10806 + # source://prism//lib/prism/node.rb#9491 def type; end end end @@ -19483,36 +20220,37 @@ end # /foo #{bar} baz/ # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#10826 +# source://prism//lib/prism/node.rb#9511 class Prism::InterpolatedRegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # Initialize a new InterpolatedRegularExpressionNode node. # # @return [InterpolatedRegularExpressionNode] a new instance of InterpolatedRegularExpressionNode # - # source://prism//lib/prism/node.rb#10828 + # source://prism//lib/prism/node.rb#9513 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#10991 + # source://prism//lib/prism/node.rb#9655 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#10838 + # source://prism//lib/prism/node.rb#9524 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -19520,64 +20258,65 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10917 + # source://prism//lib/prism/node.rb#9582 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10843 + # source://prism//lib/prism/node.rb#9529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#10952 + # source://prism//lib/prism/node.rb#9634 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#10885 + # source://prism//lib/prism/node.rb#9622 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#10853 + # source://prism//lib/prism/node.rb#9539 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#10848 + # source://prism//lib/prism/node.rb#9534 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedRegularExpressionNode + # 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#10858 + # source://prism//lib/prism/node.rb#9544 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::InterpolatedRegularExpressionNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#10843 + # source://prism//lib/prism/node.rb#9529 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # 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#10866 + # source://prism//lib/prism/node.rb#9552 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19585,7 +20324,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10912 + # source://prism//lib/prism/node.rb#9577 sig { returns(T::Boolean) } def euc_jp?; end @@ -19593,7 +20332,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10897 + # source://prism//lib/prism/node.rb#9562 sig { returns(T::Boolean) } def extended?; end @@ -19604,7 +20343,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10937 + # source://prism//lib/prism/node.rb#9602 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -19612,7 +20351,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10942 + # source://prism//lib/prism/node.rb#9607 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -19620,7 +20359,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10932 + # source://prism//lib/prism/node.rb#9597 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -19628,13 +20367,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10892 + # source://prism//lib/prism/node.rb#9557 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#10957 + # source://prism//lib/prism/node.rb#9639 sig { override.returns(String) } def inspect; end @@ -19642,30 +20381,30 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10902 + # source://prism//lib/prism/node.rb#9567 sig { returns(T::Boolean) } def multi_line?; end # source://prism//lib/prism/parse_result/newlines.rb#128 - def newline!(lines); end + def newline_flag!(lines); end # def once?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10907 + # source://prism//lib/prism/node.rb#9572 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#10947 + # source://prism//lib/prism/node.rb#9629 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#10875 + # source://prism//lib/prism/node.rb#9612 sig { returns(Prism::Location) } def opening_loc; end @@ -19674,26 +20413,13 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#10882 + # source://prism//lib/prism/node.rb#9619 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10975 + # source://prism//lib/prism/node.rb#9644 sig { override.returns(Symbol) } def type; end @@ -19701,7 +20427,7 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10927 + # source://prism//lib/prism/node.rb#9592 sig { returns(T::Boolean) } def utf_8?; end @@ -19709,27 +20435,14 @@ class Prism::InterpolatedRegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#10922 + # source://prism//lib/prism/node.rb#9587 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#10871 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#10985 + # source://prism//lib/prism/node.rb#9649 def type; end end end @@ -19739,93 +20452,95 @@ end # "foo #{bar} baz" # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11005 +# source://prism//lib/prism/node.rb#9669 class Prism::InterpolatedStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Integer flags, Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] parts, Location? closing_loc, Location location) -> void + # Initialize a new InterpolatedStringNode node. # # @return [InterpolatedStringNode] a new instance of InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11007 + # source://prism//lib/prism/node.rb#9671 sig do params( source: Prism::Source, + 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)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, flags, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#11137 + # source://prism//lib/prism/node.rb#9780 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11017 + # source://prism//lib/prism/node.rb#9682 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11022 + # source://prism//lib/prism/node.rb#9687 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11098 + # source://prism//lib/prism/node.rb#9759 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11070 + # source://prism//lib/prism/node.rb#9741 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11032 + # source://prism//lib/prism/node.rb#9697 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#11027 + # source://prism//lib/prism/node.rb#9692 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedStringNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], ?closing_loc: Location?) -> InterpolatedStringNode # - # source://prism//lib/prism/node.rb#11037 + # source://prism//lib/prism/node.rb#9702 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)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedStringNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11022 + # source://prism//lib/prism/node.rb#9687 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode], closing_loc: Location? } # - # source://prism//lib/prism/node.rb#11045 + # source://prism//lib/prism/node.rb#9710 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -19836,7 +20551,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11083 + # source://prism//lib/prism/node.rb#9715 sig { returns(T::Boolean) } def frozen?; end @@ -19845,7 +20560,7 @@ class Prism::InterpolatedStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11103 + # source://prism//lib/prism/node.rb#9764 sig { override.returns(String) } def inspect; end @@ -19853,82 +20568,56 @@ class Prism::InterpolatedStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11088 + # source://prism//lib/prism/node.rb#9720 sig { returns(T::Boolean) } def mutable?; end # source://prism//lib/prism/parse_result/newlines.rb#135 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11093 + # source://prism//lib/prism/node.rb#9754 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11054 + # source://prism//lib/prism/node.rb#9725 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode | InterpolatedStringNode] # - # source://prism//lib/prism/node.rb#11067 + # source://prism//lib/prism/node.rb#9738 sig do returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode, Prism::InterpolatedStringNode)]) end def parts; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11121 + # source://prism//lib/prism/node.rb#9769 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11050 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11131 + # source://prism//lib/prism/node.rb#9774 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#19181 +# source://prism//lib/prism/node.rb#16747 module Prism::InterpolatedStringNodeFlags; end -# source://prism//lib/prism/node.rb#19183 +# source://prism//lib/prism/node.rb#16749 Prism::InterpolatedStringNodeFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19186 +# source://prism//lib/prism/node.rb#16752 Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # Represents a symbol literal that contains interpolation. @@ -19936,89 +20625,93 @@ Prism::InterpolatedStringNodeFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # :"foo #{bar} baz" # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11151 +# source://prism//lib/prism/node.rb#9794 class Prism::InterpolatedSymbolNode < ::Prism::Node - # def initialize: (Location? opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location? closing_loc, Location location) -> void + # Initialize a new InterpolatedSymbolNode node. # # @return [InterpolatedSymbolNode] a new instance of InterpolatedSymbolNode # - # source://prism//lib/prism/node.rb#11153 + # source://prism//lib/prism/node.rb#9796 sig do params( source: Prism::Source, + 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)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).void end - def initialize(source, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#11268 + # source://prism//lib/prism/node.rb#9895 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11162 + # source://prism//lib/prism/node.rb#9807 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11167 + # source://prism//lib/prism/node.rb#9812 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#11229 + # source://prism//lib/prism/node.rb#9874 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#11211 + # source://prism//lib/prism/node.rb#9856 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11177 + # source://prism//lib/prism/node.rb#9822 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#11172 + # source://prism//lib/prism/node.rb#9817 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?opening_loc: Location?, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location?, ?location: Location) -> InterpolatedSymbolNode + # 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#11182 + # source://prism//lib/prism/node.rb#9827 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)], - closing_loc: T.nilable(Prism::Location), - location: Prism::Location + closing_loc: T.nilable(Prism::Location) ).returns(Prism::InterpolatedSymbolNode) end - def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11167 + # source://prism//lib/prism/node.rb#9812 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location?, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location?, location: Location } + # 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#11190 + # source://prism//lib/prism/node.rb#9835 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20027,59 +20720,41 @@ class Prism::InterpolatedSymbolNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11234 + # source://prism//lib/prism/node.rb#9879 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#142 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#11224 + # source://prism//lib/prism/node.rb#9869 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#11195 + # source://prism//lib/prism/node.rb#9840 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11208 + # source://prism//lib/prism/node.rb#9853 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11252 + # source://prism//lib/prism/node.rb#9884 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11262 + # source://prism//lib/prism/node.rb#9889 def type; end end end @@ -20089,91 +20764,95 @@ end # `foo #{bar} baz` # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11281 +# source://prism//lib/prism/node.rb#9908 class Prism::InterpolatedXStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Location opening_loc, Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] parts, Location closing_loc, Location location) -> void + # Initialize a new InterpolatedXStringNode node. # # @return [InterpolatedXStringNode] a new instance of InterpolatedXStringNode # - # source://prism//lib/prism/node.rb#11283 + # source://prism//lib/prism/node.rb#9910 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, opening_loc, parts, closing_loc, location); end + def initialize(source, node_id, location, flags, opening_loc, parts, closing_loc); 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#11386 + # source://prism//lib/prism/node.rb#9997 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11292 + # source://prism//lib/prism/node.rb#9921 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11297 + # source://prism//lib/prism/node.rb#9926 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11347 + # source://prism//lib/prism/node.rb#9976 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11335 + # source://prism//lib/prism/node.rb#9964 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11307 + # source://prism//lib/prism/node.rb#9936 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#11302 + # source://prism//lib/prism/node.rb#9931 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?opening_loc: Location, ?parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], ?closing_loc: Location, ?location: Location) -> InterpolatedXStringNode + # 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#11312 + # source://prism//lib/prism/node.rb#9941 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, opening_loc: Prism::Location, parts: T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)], - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::InterpolatedXStringNode) end - def copy(opening_loc: T.unsafe(nil), parts: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11297 + # source://prism//lib/prism/node.rb#9926 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { opening_loc: Location, parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode], closing_loc: Location, location: Location } + # 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#11320 + # source://prism//lib/prism/node.rb#9949 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20185,59 +20864,41 @@ class Prism::InterpolatedXStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11352 + # source://prism//lib/prism/node.rb#9981 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#149 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11342 + # source://prism//lib/prism/node.rb#9971 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11325 + # source://prism//lib/prism/node.rb#9954 sig { returns(Prism::Location) } def opening_loc; end # attr_reader parts: Array[StringNode | EmbeddedStatementsNode | EmbeddedVariableNode] # - # source://prism//lib/prism/node.rb#11332 + # source://prism//lib/prism/node.rb#9961 sig { returns(T::Array[T.any(Prism::StringNode, Prism::EmbeddedStatementsNode, Prism::EmbeddedVariableNode)]) } def parts; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11370 + # source://prism//lib/prism/node.rb#9986 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11380 + # source://prism//lib/prism/node.rb#9991 def type; end end end @@ -20247,62 +20908,62 @@ end # -> { it } # ^^ # -# source://prism//lib/prism/node.rb#11399 +# source://prism//lib/prism/node.rb#10010 class Prism::ItLocalVariableReadNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ItLocalVariableReadNode node. # # @return [ItLocalVariableReadNode] a new instance of ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#11401 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#10012 + 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#11474 + # source://prism//lib/prism/node.rb#10069 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11407 + # source://prism//lib/prism/node.rb#10020 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11412 + # source://prism//lib/prism/node.rb#10025 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#11422 + # source://prism//lib/prism/node.rb#10035 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#11417 + # source://prism//lib/prism/node.rb#10030 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ItLocalVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItLocalVariableReadNode # - # source://prism//lib/prism/node.rb#11427 - sig { params(location: Prism::Location).returns(Prism::ItLocalVariableReadNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10040 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11412 + # source://prism//lib/prism/node.rb#10025 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11435 + # source://prism//lib/prism/node.rb#10048 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20311,38 +20972,20 @@ class Prism::ItLocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11440 + # source://prism//lib/prism/node.rb#10053 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11458 + # source://prism//lib/prism/node.rb#10058 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11468 + # source://prism//lib/prism/node.rb#10063 def type; end end end @@ -20352,62 +20995,62 @@ end # -> { it + it } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11483 +# source://prism//lib/prism/node.rb#10078 class Prism::ItParametersNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new ItParametersNode node. # # @return [ItParametersNode] a new instance of ItParametersNode # - # source://prism//lib/prism/node.rb#11485 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#10080 + 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#11558 + # source://prism//lib/prism/node.rb#10137 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11491 + # source://prism//lib/prism/node.rb#10088 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11496 + # source://prism//lib/prism/node.rb#10093 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#11506 + # source://prism//lib/prism/node.rb#10103 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#11501 + # source://prism//lib/prism/node.rb#10098 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> ItParametersNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> ItParametersNode # - # source://prism//lib/prism/node.rb#11511 - sig { params(location: Prism::Location).returns(Prism::ItParametersNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10108 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11496 + # source://prism//lib/prism/node.rb#10093 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#11519 + # source://prism//lib/prism/node.rb#10116 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20416,38 +21059,20 @@ class Prism::ItParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11524 + # source://prism//lib/prism/node.rb#10121 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11542 + # source://prism//lib/prism/node.rb#10126 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11552 + # source://prism//lib/prism/node.rb#10131 def type; end end end @@ -20457,81 +21082,83 @@ end # foo(a: b) # ^^^^ # -# source://prism//lib/prism/node.rb#11567 +# source://prism//lib/prism/node.rb#10146 class Prism::KeywordHashNode < ::Prism::Node - # def initialize: (Integer flags, Array[AssocNode | AssocSplatNode] elements, Location location) -> void + # Initialize a new KeywordHashNode node. # # @return [KeywordHashNode] a new instance of KeywordHashNode # - # source://prism//lib/prism/node.rb#11569 + # source://prism//lib/prism/node.rb#10148 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - location: Prism::Location + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).void end - def initialize(source, flags, elements, location); end + def initialize(source, node_id, location, flags, elements); 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#11656 + # source://prism//lib/prism/node.rb#10214 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11577 + # source://prism//lib/prism/node.rb#10157 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11582 + # source://prism//lib/prism/node.rb#10162 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#11592 + # source://prism//lib/prism/node.rb#10172 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#11587 + # source://prism//lib/prism/node.rb#10167 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode], ?location: Location) -> KeywordHashNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?elements: Array[AssocNode | AssocSplatNode]) -> KeywordHashNode # - # source://prism//lib/prism/node.rb#11597 + # source://prism//lib/prism/node.rb#10177 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)], - location: Prism::Location + elements: T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)] ).returns(Prism::KeywordHashNode) end - def copy(flags: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), elements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11582 + # source://prism//lib/prism/node.rb#10162 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, elements: Array[AssocNode | AssocSplatNode], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, elements: Array[AssocNode | AssocSplatNode] } # - # source://prism//lib/prism/node.rb#11605 + # source://prism//lib/prism/node.rb#10185 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader elements: Array[AssocNode | AssocSplatNode] # - # source://prism//lib/prism/node.rb#11614 + # source://prism//lib/prism/node.rb#10195 sig { returns(T::Array[T.any(Prism::AssocNode, Prism::AssocSplatNode)]) } def elements; end @@ -20540,7 +21167,7 @@ class Prism::KeywordHashNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11622 + # source://prism//lib/prism/node.rb#10198 sig { override.returns(String) } def inspect; end @@ -20548,58 +21175,32 @@ class Prism::KeywordHashNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11617 + # source://prism//lib/prism/node.rb#10190 sig { returns(T::Boolean) } def symbol_keys?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#11640 + # source://prism//lib/prism/node.rb#10203 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11610 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11650 + # source://prism//lib/prism/node.rb#10208 def type; end end end # Flags for keyword hash nodes. # -# source://prism//lib/prism/node.rb#19190 +# source://prism//lib/prism/node.rb#16756 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#19192 +# source://prism//lib/prism/node.rb#16758 Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # Represents a keyword rest parameter to a method, block, or lambda definition. @@ -20608,79 +21209,81 @@ Prism::KeywordHashNodeFlags::SYMBOL_KEYS = T.let(T.unsafe(nil), Integer) # ^^^ # end # -# source://prism//lib/prism/node.rb#11669 +# source://prism//lib/prism/node.rb#10227 class Prism::KeywordRestParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # Initialize a new KeywordRestParameterNode node. # # @return [KeywordRestParameterNode] a new instance of KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#11671 + # source://prism//lib/prism/node.rb#10229 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); 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#11785 + # source://prism//lib/prism/node.rb#10322 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11681 + # source://prism//lib/prism/node.rb#10240 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11686 + # source://prism//lib/prism/node.rb#10245 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#11696 + # source://prism//lib/prism/node.rb#10255 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#11691 + # source://prism//lib/prism/node.rb#10250 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> KeywordRestParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> KeywordRestParameterNode # - # source://prism//lib/prism/node.rb#11701 + # source://prism//lib/prism/node.rb#10260 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::KeywordRestParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11686 + # source://prism//lib/prism/node.rb#10245 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # 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#11709 + # source://prism//lib/prism/node.rb#10268 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20689,31 +21292,31 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11751 + # source://prism//lib/prism/node.rb#10306 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#11718 + # source://prism//lib/prism/node.rb#10278 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#11721 + # source://prism//lib/prism/node.rb#10281 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11746 + # source://prism//lib/prism/node.rb#10301 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11734 + # source://prism//lib/prism/node.rb#10294 sig { returns(Prism::Location) } def operator_loc; end @@ -20721,46 +21324,20 @@ class Prism::KeywordRestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#11741 + # source://prism//lib/prism/node.rb#10273 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11769 + # source://prism//lib/prism/node.rb#10311 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#11714 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#11779 + # source://prism//lib/prism/node.rb#10316 def type; end end end @@ -20770,101 +21347,105 @@ end # ->(value) { value * 2 } # ^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11798 +# source://prism//lib/prism/node.rb#10335 class Prism::LambdaNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location operator_loc, Location opening_loc, Location closing_loc, Prism::node? parameters, Prism::node? body, Location location) -> void + # Initialize a new LambdaNode node. # # @return [LambdaNode] a new instance of LambdaNode # - # source://prism//lib/prism/node.rb#11800 + # source://prism//lib/prism/node.rb#10337 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), - location: Prism::Location + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).void end - def initialize(source, locals, operator_loc, opening_loc, closing_loc, parameters, body, location); end + def initialize(source, node_id, location, flags, locals, operator_loc, opening_loc, closing_loc, parameters, body); 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#11927 + # source://prism//lib/prism/node.rb#10448 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11812 + # source://prism//lib/prism/node.rb#10351 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#11875 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#10414 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11817 + # source://prism//lib/prism/node.rb#10356 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#11888 + # source://prism//lib/prism/node.rb#10427 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#11865 + # source://prism//lib/prism/node.rb#10404 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#11830 + # source://prism//lib/prism/node.rb#10369 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#11822 + # source://prism//lib/prism/node.rb#10361 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?locals: Array[Symbol], ?operator_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?parameters: Prism::node?, ?body: Prism::node?, ?location: Location) -> LambdaNode + # 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#11835 + # source://prism//lib/prism/node.rb#10374 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], operator_loc: Prism::Location, opening_loc: Prism::Location, closing_loc: Prism::Location, - parameters: T.nilable(Prism::Node), - body: T.nilable(Prism::Node), - location: Prism::Location + parameters: T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode)), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)) ).returns(Prism::LambdaNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11817 + # source://prism//lib/prism/node.rb#10356 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], operator_loc: Location, opening_loc: Location, closing_loc: Location, parameters: Prism::node?, body: Prism::node?, location: Location } + # 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#11843 + # source://prism//lib/prism/node.rb#10382 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -20873,74 +21454,56 @@ class Prism::LambdaNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#11893 + # source://prism//lib/prism/node.rb#10432 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#11848 + # source://prism//lib/prism/node.rb#10387 sig { returns(T::Array[Symbol]) } def locals; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#11883 + # source://prism//lib/prism/node.rb#10422 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#11858 + # source://prism//lib/prism/node.rb#10397 sig { returns(Prism::Location) } def opening_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#11878 + # source://prism//lib/prism/node.rb#10417 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11851 + # source://prism//lib/prism/node.rb#10390 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader parameters: Prism::node? + # attr_reader parameters: BlockParametersNode | NumberedParametersNode | ItParametersNode | nil # - # source://prism//lib/prism/node.rb#11872 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#10411 + sig { returns(T.nilable(T.any(Prism::BlockParametersNode, Prism::NumberedParametersNode, Prism::ItParametersNode))) } def parameters; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11911 + # source://prism//lib/prism/node.rb#10437 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#11921 + # source://prism//lib/prism/node.rb#10442 def type; end end end @@ -21196,13 +21759,13 @@ end # This is a result specific to the `lex` and `lex_file` methods. # -# source://prism//lib/prism/parse_result.rb#610 +# source://prism//lib/prism/parse_result.rb#764 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#615 + # source://prism//lib/prism/parse_result.rb#769 sig do params( value: T::Array[T.untyped], @@ -21218,13 +21781,13 @@ class Prism::LexResult < ::Prism::Result # Implement the hash pattern matching interface for LexResult. # - # source://prism//lib/prism/parse_result.rb#621 + # source://prism//lib/prism/parse_result.rb#775 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#612 + # source://prism//lib/prism/parse_result.rb#766 sig { returns(T::Array[T.untyped]) } def value; end end @@ -21256,91 +21819,95 @@ end # target &&= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#11943 +# source://prism//lib/prism/node.rb#10464 class Prism::LocalVariableAndWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableAndWriteNode node. # # @return [LocalVariableAndWriteNode] a new instance of LocalVariableAndWriteNode # - # source://prism//lib/prism/node.rb#11945 + # source://prism//lib/prism/node.rb#10466 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, operator_loc, value, name, depth, location); end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); 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#12051 + # source://prism//lib/prism/node.rb#10556 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#11956 + # source://prism//lib/prism/node.rb#10479 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11961 + # source://prism//lib/prism/node.rb#10484 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#11971 + # source://prism//lib/prism/node.rb#10494 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#11966 + # source://prism//lib/prism/node.rb#10489 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableAndWriteNode + # 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#11976 + # source://prism//lib/prism/node.rb#10499 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).returns(Prism::LocalVariableAndWriteNode) end - def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#11961 + # source://prism//lib/prism/node.rb#10484 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # 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#11984 + # source://prism//lib/prism/node.rb#10507 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#12009 + # source://prism//lib/prism/node.rb#10532 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#199 + # source://prism//lib/prism/desugar_compiler.rb#236 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21348,68 +21915,50 @@ class Prism::LocalVariableAndWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12017 + # source://prism//lib/prism/node.rb#10540 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12006 + # source://prism//lib/prism/node.rb#10529 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#11989 + # source://prism//lib/prism/node.rb#10512 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12012 + # source://prism//lib/prism/node.rb#10535 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#11996 + # source://prism//lib/prism/node.rb#10519 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12035 + # source://prism//lib/prism/node.rb#10545 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12003 + # source://prism//lib/prism/node.rb#10526 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12045 + # source://prism//lib/prism/node.rb#10550 def type; end end end @@ -21419,105 +21968,109 @@ end # target += value # ^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12065 +# source://prism//lib/prism/node.rb#10570 class Prism::LocalVariableOperatorWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location binary_operator_loc, Prism::node value, Symbol name, Symbol binary_operator, Integer depth, Location location) -> void + # Initialize a new LocalVariableOperatorWriteNode node. # # @return [LocalVariableOperatorWriteNode] a new instance of LocalVariableOperatorWriteNode # - # source://prism//lib/prism/node.rb#12067 + # source://prism//lib/prism/node.rb#10572 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, binary_operator_loc, value, name, binary_operator, depth, location); end + def initialize(source, node_id, location, flags, name_loc, binary_operator_loc, value, name, binary_operator, depth); 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#12172 + # source://prism//lib/prism/node.rb#10661 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12079 + # source://prism//lib/prism/node.rb#10586 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader binary_operator: Symbol # - # source://prism//lib/prism/node.rb#12132 + # source://prism//lib/prism/node.rb#10639 sig { returns(Symbol) } def binary_operator; end # attr_reader binary_operator_loc: Location # - # source://prism//lib/prism/node.rb#12119 + # source://prism//lib/prism/node.rb#10626 sig { returns(Prism::Location) } def binary_operator_loc; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12084 + # source://prism//lib/prism/node.rb#10591 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#12094 + # source://prism//lib/prism/node.rb#10601 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#12089 + # source://prism//lib/prism/node.rb#10596 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name_loc: Location, ?binary_operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?binary_operator: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOperatorWriteNode + # 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#12099 + # source://prism//lib/prism/node.rb#10606 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, binary_operator_loc: Prism::Location, value: Prism::Node, name: Symbol, binary_operator: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).returns(Prism::LocalVariableOperatorWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12084 + # source://prism//lib/prism/node.rb#10591 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, binary_operator_loc: Location, value: Prism::node, name: Symbol, binary_operator: Symbol, depth: Integer, location: Location } + # 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#12107 + # source://prism//lib/prism/node.rb#10614 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#12135 + # source://prism//lib/prism/node.rb#10642 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#211 + # source://prism//lib/prism/desugar_compiler.rb#248 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21525,68 +22078,50 @@ class Prism::LocalVariableOperatorWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12138 + # source://prism//lib/prism/node.rb#10645 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12129 + # source://prism//lib/prism/node.rb#10636 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12112 + # source://prism//lib/prism/node.rb#10619 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 + # source://prism//lib/prism/node_ext.rb#451 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 + # source://prism//lib/prism/node_ext.rb#458 def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12156 + # source://prism//lib/prism/node.rb#10650 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12126 + # source://prism//lib/prism/node.rb#10633 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12166 + # source://prism//lib/prism/node.rb#10655 def type; end end end @@ -21596,91 +22131,95 @@ end # target ||= value # ^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12187 +# source://prism//lib/prism/node.rb#10676 class Prism::LocalVariableOrWriteNode < ::Prism::Node - # def initialize: (Location name_loc, Location operator_loc, Prism::node value, Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableOrWriteNode node. # # @return [LocalVariableOrWriteNode] a new instance of LocalVariableOrWriteNode # - # source://prism//lib/prism/node.rb#12189 + # source://prism//lib/prism/node.rb#10678 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).void end - def initialize(source, name_loc, operator_loc, value, name, depth, location); end + def initialize(source, node_id, location, flags, name_loc, operator_loc, value, name, depth); 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#12295 + # source://prism//lib/prism/node.rb#10768 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12200 + # source://prism//lib/prism/node.rb#10691 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12205 + # source://prism//lib/prism/node.rb#10696 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#12215 + # source://prism//lib/prism/node.rb#10706 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#12210 + # source://prism//lib/prism/node.rb#10701 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableOrWriteNode + # 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#12220 + # source://prism//lib/prism/node.rb#10711 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name_loc: Prism::Location, operator_loc: Prism::Location, value: Prism::Node, name: Symbol, - depth: Integer, - location: Prism::Location + depth: Integer ).returns(Prism::LocalVariableOrWriteNode) end - def copy(name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12205 + # source://prism//lib/prism/node.rb#10696 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name_loc: Location, operator_loc: Location, value: Prism::node, name: Symbol, depth: Integer, location: Location } + # 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#12228 + # source://prism//lib/prism/node.rb#10719 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#12253 + # source://prism//lib/prism/node.rb#10744 sig { returns(Integer) } def depth; end - # source://prism//lib/prism/desugar_compiler.rb#205 + # source://prism//lib/prism/desugar_compiler.rb#242 def desugar; end sig { override.returns(T::Array[Prism::Reflection::Field]) } @@ -21688,68 +22227,50 @@ class Prism::LocalVariableOrWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12261 + # source://prism//lib/prism/node.rb#10752 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12250 + # source://prism//lib/prism/node.rb#10741 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#12233 + # source://prism//lib/prism/node.rb#10724 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12256 + # source://prism//lib/prism/node.rb#10747 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12240 + # source://prism//lib/prism/node.rb#10731 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12279 + # source://prism//lib/prism/node.rb#10757 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12247 + # source://prism//lib/prism/node.rb#10738 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12289 + # source://prism//lib/prism/node.rb#10762 def type; end end end @@ -21759,62 +22280,79 @@ end # foo # ^^^ # -# source://prism//lib/prism/node.rb#12309 +# source://prism//lib/prism/node.rb#10782 class Prism::LocalVariableReadNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableReadNode node. # # @return [LocalVariableReadNode] a new instance of LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12311 - sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(source, name, depth, location); end + # source://prism//lib/prism/node.rb#10784 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); 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#12406 + # source://prism//lib/prism/node.rb#10863 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12319 + # source://prism//lib/prism/node.rb#10794 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12324 + # source://prism//lib/prism/node.rb#10799 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#12334 + # source://prism//lib/prism/node.rb#10809 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#12329 + # source://prism//lib/prism/node.rb#10804 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableReadNode # - # source://prism//lib/prism/node.rb#12339 - sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableReadNode) } - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10814 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12324 + # source://prism//lib/prism/node.rb#10799 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12347 + # source://prism//lib/prism/node.rb#10822 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -21826,7 +22364,7 @@ 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#12369 + # source://prism//lib/prism/node.rb#10844 sig { returns(Integer) } def depth; end @@ -21835,7 +22373,7 @@ class Prism::LocalVariableReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12372 + # source://prism//lib/prism/node.rb#10847 sig { override.returns(String) } def inspect; end @@ -21849,38 +22387,20 @@ class Prism::LocalVariableReadNode < ::Prism::Node # # _1 # name `:_1` # - # source://prism//lib/prism/node.rb#12360 + # source://prism//lib/prism/node.rb#10835 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#12390 + # source://prism//lib/prism/node.rb#10852 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12400 + # source://prism//lib/prism/node.rb#10857 def type; end end end @@ -21890,68 +22410,85 @@ end # foo, bar = baz # ^^^ ^^^ # -# source://prism//lib/prism/node.rb#12417 +# source://prism//lib/prism/node.rb#10874 class Prism::LocalVariableTargetNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location location) -> void + # Initialize a new LocalVariableTargetNode node. # # @return [LocalVariableTargetNode] a new instance of LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12419 - sig { params(source: Prism::Source, name: Symbol, depth: Integer, location: Prism::Location).void } - def initialize(source, name, depth, location); end + # source://prism//lib/prism/node.rb#10876 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + depth: Integer + ).void + end + def initialize(source, node_id, location, flags, name, depth); 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#12500 + # source://prism//lib/prism/node.rb#10941 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12427 + # source://prism//lib/prism/node.rb#10886 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12432 + # source://prism//lib/prism/node.rb#10891 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#12442 + # source://prism//lib/prism/node.rb#10901 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#12437 + # source://prism//lib/prism/node.rb#10896 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?depth: Integer, ?location: Location) -> LocalVariableTargetNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?depth: Integer) -> LocalVariableTargetNode # - # source://prism//lib/prism/node.rb#12447 - sig { params(name: Symbol, depth: Integer, location: Prism::Location).returns(Prism::LocalVariableTargetNode) } - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#10906 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + name: Symbol, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12432 + # source://prism//lib/prism/node.rb#10891 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, depth: Integer } # - # source://prism//lib/prism/node.rb#12455 + # source://prism//lib/prism/node.rb#10914 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#12463 + # source://prism//lib/prism/node.rb#10922 sig { returns(Integer) } def depth; end @@ -21960,44 +22497,26 @@ class Prism::LocalVariableTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12466 + # source://prism//lib/prism/node.rb#10925 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#12460 + # source://prism//lib/prism/node.rb#10919 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12484 + # source://prism//lib/prism/node.rb#10930 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#12494 + # source://prism//lib/prism/node.rb#10935 def type; end end end @@ -22007,81 +22526,85 @@ end # foo = 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#12511 +# source://prism//lib/prism/node.rb#10952 class Prism::LocalVariableWriteNode < ::Prism::Node - # def initialize: (Symbol name, Integer depth, Location name_loc, Prism::node value, Location operator_loc, Location location) -> void + # Initialize a new LocalVariableWriteNode node. # # @return [LocalVariableWriteNode] a new instance of LocalVariableWriteNode # - # source://prism//lib/prism/node.rb#12513 + # source://prism//lib/prism/node.rb#10954 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, depth: Integer, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, name, depth, name_loc, value, operator_loc, location); end + def initialize(source, node_id, location, flags, name, depth, name_loc, value, operator_loc); 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#12645 + # source://prism//lib/prism/node.rb#11070 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12524 + # source://prism//lib/prism/node.rb#10967 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12529 + # source://prism//lib/prism/node.rb#10972 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#12539 + # source://prism//lib/prism/node.rb#10982 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#12534 + # source://prism//lib/prism/node.rb#10977 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?name: Symbol, ?depth: Integer, ?name_loc: Location, ?value: Prism::node, ?operator_loc: Location, ?location: Location) -> LocalVariableWriteNode + # 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#12544 + # source://prism//lib/prism/node.rb#10987 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, name: Symbol, depth: Integer, name_loc: Prism::Location, value: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::LocalVariableWriteNode) end - def copy(name: T.unsafe(nil), depth: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12529 + # source://prism//lib/prism/node.rb#10972 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { name: Symbol, depth: Integer, name_loc: Location, value: Prism::node, operator_loc: Location, location: Location } + # 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#12552 + # source://prism//lib/prism/node.rb#10995 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22093,7 +22616,7 @@ 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#12570 + # source://prism//lib/prism/node.rb#11013 sig { returns(Integer) } def depth; end @@ -22102,7 +22625,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12611 + # source://prism//lib/prism/node.rb#11054 sig { override.returns(String) } def inspect; end @@ -22112,7 +22635,7 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # abc = 123 # name `:abc` # - # source://prism//lib/prism/node.rb#12561 + # source://prism//lib/prism/node.rb#11004 sig { returns(Symbol) } def name; end @@ -22121,13 +22644,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # foo = :bar # ^^^ # - # source://prism//lib/prism/node.rb#12576 + # source://prism//lib/prism/node.rb#11019 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12606 + # source://prism//lib/prism/node.rb#11049 sig { returns(String) } def operator; end @@ -22136,26 +22659,13 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # x = :y # ^ # - # source://prism//lib/prism/node.rb#12599 + # source://prism//lib/prism/node.rb#11042 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12629 + # source://prism//lib/prism/node.rb#11059 sig { override.returns(Symbol) } def type; end @@ -22171,39 +22681,34 @@ class Prism::LocalVariableWriteNode < ::Prism::Node # # foo = foo # - # source://prism//lib/prism/node.rb#12593 + # source://prism//lib/prism/node.rb#11036 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12639 + # source://prism//lib/prism/node.rb#11064 def type; end end end # This represents a location in the source. # -# source://prism//lib/prism/parse_result.rb#156 +# source://prism//lib/prism/parse_result.rb#273 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#171 + # source://prism//lib/prism/parse_result.rb#288 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#335 + # source://prism//lib/prism/parse_result.rb#476 sig { params(other: T.untyped).returns(T::Boolean) } def ==(other); end @@ -22211,84 +22716,128 @@ 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#354 + # source://prism//lib/prism/parse_result.rb#495 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#461 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_column(cache); end + + # 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#397 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_end_code_units_offset(cache); end + + # The start column in code units using the given cache to fetch or calculate + # the value. + # + # source://prism//lib/prism/parse_result.rb#437 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_column(cache); end + + # 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#375 + sig do + params( + cache: T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer)) + ).returns(Integer) + end + def cached_start_code_units_offset(cache); end + # Returns a new location that is the result of chopping off the last byte. # - # source://prism//lib/prism/parse_result.rb#217 + # source://prism//lib/prism/parse_result.rb#334 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#207 + # source://prism//lib/prism/parse_result.rb#324 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#212 + # source://prism//lib/prism/parse_result.rb#329 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 # Implement the hash pattern matching interface for Location. # - # source://prism//lib/prism/parse_result.rb#325 + # source://prism//lib/prism/parse_result.rb#466 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#314 + # source://prism//lib/prism/parse_result.rb#449 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#263 + # source://prism//lib/prism/parse_result.rb#386 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#320 + # source://prism//lib/prism/parse_result.rb#455 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#268 + # source://prism//lib/prism/parse_result.rb#391 sig { params(encoding: Encoding).returns(Integer) } def end_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location ends from the start of the # line. # - # source://prism//lib/prism/parse_result.rb#308 + # source://prism//lib/prism/parse_result.rb#443 sig { returns(Integer) } def end_column; end # The line number where this location ends. # - # source://prism//lib/prism/parse_result.rb#284 + # source://prism//lib/prism/parse_result.rb#413 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#257 + # source://prism//lib/prism/parse_result.rb#380 sig { returns(Integer) } def end_offset; end # Returns a string representation of this location. # - # source://prism//lib/prism/parse_result.rb#222 + # source://prism//lib/prism/parse_result.rb#339 sig { returns(String) } def inspect; end @@ -22296,38 +22845,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#344 + # source://prism//lib/prism/parse_result.rb#485 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#190 + # source://prism//lib/prism/parse_result.rb#307 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#185 + # source://prism//lib/prism/parse_result.rb#302 sig { returns(T::Array[Prism::Comment]) } def leading_comments; end # The length of this location in bytes. # - # source://prism//lib/prism/parse_result.rb#167 + # source://prism//lib/prism/parse_result.rb#284 sig { returns(Integer) } def length; end # Implement the pretty print interface for Location. # - # source://prism//lib/prism/parse_result.rb#330 + # source://prism//lib/prism/parse_result.rb#471 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#232 + # source://prism//lib/prism/parse_result.rb#349 sig { returns(String) } def slice; end @@ -22335,78 +22884,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#239 + # source://prism//lib/prism/parse_result.rb#356 def slice_lines; end # Returns all of the lines of the source code associated with this location. # - # source://prism//lib/prism/parse_result.rb#227 + # source://prism//lib/prism/parse_result.rb#344 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#296 + # source://prism//lib/prism/parse_result.rb#425 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#247 + # source://prism//lib/prism/parse_result.rb#364 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#302 + # source://prism//lib/prism/parse_result.rb#431 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_column(encoding = T.unsafe(nil)); end # The offset from the start of the file in code units of the given encoding. # - # source://prism//lib/prism/parse_result.rb#252 + # source://prism//lib/prism/parse_result.rb#369 sig { params(encoding: Encoding).returns(Integer) } def start_code_units_offset(encoding = T.unsafe(nil)); end # The column number in bytes where this location starts from the start of # the line. # - # source://prism//lib/prism/parse_result.rb#290 + # source://prism//lib/prism/parse_result.rb#419 sig { returns(Integer) } def start_column; end # The line number where this location starts. # - # source://prism//lib/prism/parse_result.rb#273 + # source://prism//lib/prism/parse_result.rb#402 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#278 + # source://prism//lib/prism/parse_result.rb#407 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#164 + # source://prism//lib/prism/parse_result.rb#281 sig { returns(Integer) } def start_offset; end # Attach a comment to the trailing comments of this location. # - # source://prism//lib/prism/parse_result.rb#201 + # source://prism//lib/prism/parse_result.rb#318 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#196 + # source://prism//lib/prism/parse_result.rb#313 sig { returns(T::Array[Prism::Comment]) } def trailing_comments; end @@ -22415,66 +22964,66 @@ 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#159 + # source://prism//lib/prism/parse_result.rb#276 sig { returns(Prism::Source) } def source; end end # Flags for while and until loop nodes. # -# source://prism//lib/prism/node.rb#19196 +# source://prism//lib/prism/node.rb#16762 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#19198 +# source://prism//lib/prism/node.rb#16764 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#416 +# source://prism//lib/prism/parse_result.rb#557 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#424 + # source://prism//lib/prism/parse_result.rb#565 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#440 + # source://prism//lib/prism/parse_result.rb#581 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#445 + # source://prism//lib/prism/parse_result.rb#586 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#430 + # source://prism//lib/prism/parse_result.rb#571 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#418 + # source://prism//lib/prism/parse_result.rb#559 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#435 + # source://prism//lib/prism/parse_result.rb#576 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#421 + # source://prism//lib/prism/parse_result.rb#562 sig { returns(Prism::Location) } def value_loc; end end @@ -22484,37 +23033,38 @@ end # if /foo/i then end # ^^^^^^ # -# source://prism//lib/prism/node.rb#12659 +# source://prism//lib/prism/node.rb#11084 class Prism::MatchLastLineNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # Initialize a new MatchLastLineNode node. # # @return [MatchLastLineNode] a new instance of MatchLastLineNode # - # source://prism//lib/prism/node.rb#12661 + # source://prism//lib/prism/node.rb#11086 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#12837 + # source://prism//lib/prism/node.rb#11241 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12672 + # source://prism//lib/prism/node.rb#11098 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -22522,77 +23072,78 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12758 + # source://prism//lib/prism/node.rb#11156 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12677 + # source://prism//lib/prism/node.rb#11103 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#12798 + # source://prism//lib/prism/node.rb#11220 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#12723 + # source://prism//lib/prism/node.rb#11200 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#12687 + # source://prism//lib/prism/node.rb#11113 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#12682 + # source://prism//lib/prism/node.rb#11108 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#12793 + # source://prism//lib/prism/node.rb#11215 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#12716 + # source://prism//lib/prism/node.rb#11193 sig { returns(Prism::Location) } def content_loc; end - # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> MatchLastLineNode + # 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#12692 + # source://prism//lib/prism/node.rb#11118 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::MatchLastLineNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12677 + # source://prism//lib/prism/node.rb#11103 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # 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#12700 + # source://prism//lib/prism/node.rb#11126 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22600,7 +23151,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12753 + # source://prism//lib/prism/node.rb#11151 sig { returns(T::Boolean) } def euc_jp?; end @@ -22608,7 +23159,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12738 + # source://prism//lib/prism/node.rb#11136 sig { returns(T::Boolean) } def extended?; end @@ -22619,7 +23170,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12778 + # source://prism//lib/prism/node.rb#11176 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -22627,7 +23178,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12783 + # source://prism//lib/prism/node.rb#11181 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -22635,7 +23186,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12773 + # source://prism//lib/prism/node.rb#11171 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -22643,13 +23194,13 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12733 + # source://prism//lib/prism/node.rb#11131 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#12803 + # source://prism//lib/prism/node.rb#11225 sig { override.returns(String) } def inspect; end @@ -22657,7 +23208,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12743 + # source://prism//lib/prism/node.rb#11141 sig { returns(T::Boolean) } def multi_line?; end @@ -22665,47 +23216,34 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12748 + # source://prism//lib/prism/node.rb#11146 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#12788 + # source://prism//lib/prism/node.rb#11210 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#12709 + # source://prism//lib/prism/node.rb#11186 sig { returns(Prism::Location) } def opening_loc; end sig { returns(Integer) } def options; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12821 + # source://prism//lib/prism/node.rb#11230 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#12730 + # source://prism//lib/prism/node.rb#11207 sig { returns(String) } def unescaped; end @@ -22713,7 +23251,7 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12768 + # source://prism//lib/prism/node.rb#11166 sig { returns(T::Boolean) } def utf_8?; end @@ -22721,27 +23259,14 @@ class Prism::MatchLastLineNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#12763 + # source://prism//lib/prism/node.rb#11161 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#12705 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12831 + # source://prism//lib/prism/node.rb#11235 def type; end end end @@ -22751,77 +23276,81 @@ end # foo in bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12851 +# source://prism//lib/prism/node.rb#11255 class Prism::MatchPredicateNode < ::Prism::Node - # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # Initialize a new MatchPredicateNode node. # # @return [MatchPredicateNode] a new instance of MatchPredicateNode # - # source://prism//lib/prism/node.rb#12853 + # source://prism//lib/prism/node.rb#11257 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, pattern, operator_loc, location); end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); 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#12947 + # source://prism//lib/prism/node.rb#11335 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12862 + # source://prism//lib/prism/node.rb#11268 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12867 + # source://prism//lib/prism/node.rb#11273 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#12877 + # source://prism//lib/prism/node.rb#11283 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#12872 + # source://prism//lib/prism/node.rb#11278 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchPredicateNode + # 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#12882 + # source://prism//lib/prism/node.rb#11288 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::MatchPredicateNode) end - def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12867 + # source://prism//lib/prism/node.rb#11273 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # 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#12890 + # source://prism//lib/prism/node.rb#11296 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22830,62 +23359,44 @@ class Prism::MatchPredicateNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#12913 + # source://prism//lib/prism/node.rb#11319 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#12908 + # source://prism//lib/prism/node.rb#11314 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#12901 + # source://prism//lib/prism/node.rb#11307 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#12898 + # source://prism//lib/prism/node.rb#11304 sig { returns(Prism::Node) } def pattern; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12931 + # source://prism//lib/prism/node.rb#11324 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#12895 + # source://prism//lib/prism/node.rb#11301 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#12941 + # source://prism//lib/prism/node.rb#11329 def type; end end end @@ -22895,77 +23406,81 @@ end # foo => bar # ^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#12959 +# source://prism//lib/prism/node.rb#11347 class Prism::MatchRequiredNode < ::Prism::Node - # def initialize: (Prism::node value, Prism::node pattern, Location operator_loc, Location location) -> void + # Initialize a new MatchRequiredNode node. # # @return [MatchRequiredNode] a new instance of MatchRequiredNode # - # source://prism//lib/prism/node.rb#12961 + # source://prism//lib/prism/node.rb#11349 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, value, pattern, operator_loc, location); end + def initialize(source, node_id, location, flags, value, pattern, operator_loc); 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#13055 + # source://prism//lib/prism/node.rb#11427 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#12970 + # source://prism//lib/prism/node.rb#11360 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12975 + # source://prism//lib/prism/node.rb#11365 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#12985 + # source://prism//lib/prism/node.rb#11375 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#12980 + # source://prism//lib/prism/node.rb#11370 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?value: Prism::node, ?pattern: Prism::node, ?operator_loc: Location, ?location: Location) -> MatchRequiredNode + # 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#12990 + # source://prism//lib/prism/node.rb#11380 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, value: Prism::Node, pattern: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::MatchRequiredNode) end - def copy(value: T.unsafe(nil), pattern: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#12975 + # source://prism//lib/prism/node.rb#11365 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { value: Prism::node, pattern: Prism::node, operator_loc: Location, location: Location } + # 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#12998 + # source://prism//lib/prism/node.rb#11388 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -22974,62 +23489,44 @@ class Prism::MatchRequiredNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13021 + # source://prism//lib/prism/node.rb#11411 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13016 + # source://prism//lib/prism/node.rb#11406 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13009 + # source://prism//lib/prism/node.rb#11399 sig { returns(Prism::Location) } def operator_loc; end # attr_reader pattern: Prism::node # - # source://prism//lib/prism/node.rb#13006 + # source://prism//lib/prism/node.rb#11396 sig { returns(Prism::Node) } def pattern; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13039 + # source://prism//lib/prism/node.rb#11416 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#13003 + # source://prism//lib/prism/node.rb#11393 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13049 + # source://prism//lib/prism/node.rb#11421 def type; end end end @@ -23039,81 +23536,85 @@ end # /(?bar)/ =~ baz # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13067 +# source://prism//lib/prism/node.rb#11439 class Prism::MatchWriteNode < ::Prism::Node - # def initialize: (CallNode call, Array[LocalVariableTargetNode] targets, Location location) -> void + # Initialize a new MatchWriteNode node. # # @return [MatchWriteNode] a new instance of MatchWriteNode # - # source://prism//lib/prism/node.rb#13069 + # source://prism//lib/prism/node.rb#11441 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, call: Prism::CallNode, - targets: T::Array[Prism::LocalVariableTargetNode], - location: Prism::Location + targets: T::Array[Prism::LocalVariableTargetNode] ).void end - def initialize(source, call, targets, location); end + def initialize(source, node_id, location, flags, call, targets); 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#13150 + # source://prism//lib/prism/node.rb#11506 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13077 + # source://prism//lib/prism/node.rb#11451 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader call: CallNode # - # source://prism//lib/prism/node.rb#13110 + # source://prism//lib/prism/node.rb#11484 sig { returns(Prism::CallNode) } def call; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13082 + # source://prism//lib/prism/node.rb#11456 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#13092 + # source://prism//lib/prism/node.rb#11466 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#13087 + # source://prism//lib/prism/node.rb#11461 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?call: CallNode, ?targets: Array[LocalVariableTargetNode], ?location: Location) -> MatchWriteNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?call: CallNode, ?targets: Array[LocalVariableTargetNode]) -> MatchWriteNode # - # source://prism//lib/prism/node.rb#13097 + # source://prism//lib/prism/node.rb#11471 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, call: Prism::CallNode, - targets: T::Array[Prism::LocalVariableTargetNode], - location: Prism::Location + targets: T::Array[Prism::LocalVariableTargetNode] ).returns(Prism::MatchWriteNode) end - def copy(call: T.unsafe(nil), targets: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13082 + # source://prism//lib/prism/node.rb#11456 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { call: CallNode, targets: Array[LocalVariableTargetNode], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, call: CallNode, targets: Array[LocalVariableTargetNode] } # - # source://prism//lib/prism/node.rb#13105 + # source://prism//lib/prism/node.rb#11479 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23122,106 +23623,88 @@ class Prism::MatchWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13116 + # source://prism//lib/prism/node.rb#11490 sig { override.returns(String) } def inspect; end # attr_reader targets: Array[LocalVariableTargetNode] # - # source://prism//lib/prism/node.rb#13113 + # source://prism//lib/prism/node.rb#11487 sig { returns(T::Array[Prism::LocalVariableTargetNode]) } def targets; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13134 + # source://prism//lib/prism/node.rb#11495 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13144 + # source://prism//lib/prism/node.rb#11500 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#13159 +# source://prism//lib/prism/node.rb#11515 class Prism::MissingNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new MissingNode node. # # @return [MissingNode] a new instance of MissingNode # - # source://prism//lib/prism/node.rb#13161 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#11517 + 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#13234 + # source://prism//lib/prism/node.rb#11574 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13167 + # source://prism//lib/prism/node.rb#11525 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13172 + # source://prism//lib/prism/node.rb#11530 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#13182 + # source://prism//lib/prism/node.rb#11540 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#13177 + # source://prism//lib/prism/node.rb#11535 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> MissingNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> MissingNode # - # source://prism//lib/prism/node.rb#13187 - sig { params(location: Prism::Location).returns(Prism::MissingNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#11545 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13172 + # source://prism//lib/prism/node.rb#11530 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13195 + # source://prism//lib/prism/node.rb#11553 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23230,38 +23713,20 @@ class Prism::MissingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13200 + # source://prism//lib/prism/node.rb#11558 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13218 + # source://prism//lib/prism/node.rb#11563 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13228 + # source://prism//lib/prism/node.rb#11568 def type; end end end @@ -23271,107 +23736,111 @@ end # module Foo end # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13243 +# source://prism//lib/prism/node.rb#11583 class Prism::ModuleNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location module_keyword_loc, Prism::node constant_path, Prism::node? body, Location end_keyword_loc, Symbol name, Location location) -> void + # Initialize a new ModuleNode node. # # @return [ModuleNode] a new instance of ModuleNode # - # source://prism//lib/prism/node.rb#13245 + # source://prism//lib/prism/node.rb#11585 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], module_keyword_loc: Prism::Location, - constant_path: Prism::Node, - body: T.nilable(Prism::Node), + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).void end - def initialize(source, locals, module_keyword_loc, constant_path, body, end_keyword_loc, name, location); end + def initialize(source, node_id, location, flags, locals, module_keyword_loc, constant_path, body, end_keyword_loc, 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#13363 + # source://prism//lib/prism/node.rb#11687 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13257 + # source://prism//lib/prism/node.rb#11599 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#13306 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#11648 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13262 + # source://prism//lib/prism/node.rb#11604 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#13275 + # source://prism//lib/prism/node.rb#11617 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#13267 + # source://prism//lib/prism/node.rb#11609 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader constant_path: Prism::node + # attr_reader constant_path: ConstantReadNode | ConstantPathNode | MissingNode # - # source://prism//lib/prism/node.rb#13303 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#11645 + sig { returns(T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode)) } def constant_path; end - # def copy: (?locals: Array[Symbol], ?module_keyword_loc: Location, ?constant_path: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?name: Symbol, ?location: Location) -> ModuleNode + # 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#13280 + # source://prism//lib/prism/node.rb#11622 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], module_keyword_loc: Prism::Location, - constant_path: Prism::Node, - body: T.nilable(Prism::Node), + constant_path: T.any(Prism::ConstantReadNode, Prism::ConstantPathNode, Prism::MissingNode), + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), end_keyword_loc: Prism::Location, - name: Symbol, - location: Prism::Location + name: Symbol ).returns(Prism::ModuleNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13262 + # source://prism//lib/prism/node.rb#11604 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], module_keyword_loc: Location, constant_path: Prism::node, body: Prism::node?, end_keyword_loc: Location, name: Symbol, location: Location } + # 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#13288 + # source://prism//lib/prism/node.rb#11630 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#13324 + # source://prism//lib/prism/node.rb#11666 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13309 + # source://prism//lib/prism/node.rb#11651 sig { returns(Prism::Location) } def end_keyword_loc; end @@ -23380,62 +23849,44 @@ class Prism::ModuleNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13329 + # source://prism//lib/prism/node.rb#11671 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#13293 + # source://prism//lib/prism/node.rb#11635 sig { returns(T::Array[Symbol]) } def locals; end # def module_keyword: () -> String # - # source://prism//lib/prism/node.rb#13319 + # source://prism//lib/prism/node.rb#11661 sig { returns(String) } def module_keyword; end # attr_reader module_keyword_loc: Location # - # source://prism//lib/prism/node.rb#13296 + # source://prism//lib/prism/node.rb#11638 sig { returns(Prism::Location) } def module_keyword_loc; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#13316 + # source://prism//lib/prism/node.rb#11658 sig { returns(Symbol) } def name; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13347 + # source://prism//lib/prism/node.rb#11676 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13357 + # source://prism//lib/prism/node.rb#11681 def type; end end end @@ -23445,81 +23896,90 @@ end # a, (b, c) = 1, 2, 3 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13379 +# This can be a part of `MultiWriteNode` as above, or the target of a `for` loop +# +# for a, b in [[1, 2], [3, 4]] +# ^^^^ +# +# source://prism//lib/prism/node.rb#11708 class Prism::MultiTargetNode < ::Prism::Node - # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] rights, Location? lparen_loc, Location? rparen_loc, Location location) -> void + # Initialize a new MultiTargetNode node. # # @return [MultiTargetNode] a new instance of MultiTargetNode # - # source://prism//lib/prism/node.rb#13381 + # source://prism//lib/prism/node.rb#11710 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, lefts: 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)], - rest: T.nilable(Prism::Node), - rights: 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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: 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)], lparen_loc: T.nilable(Prism::Location), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).void end - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, location); end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc); 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#13508 + # source://prism//lib/prism/node.rb#11851 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13392 + # source://prism//lib/prism/node.rb#11723 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13397 + # source://prism//lib/prism/node.rb#11728 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#13411 + # source://prism//lib/prism/node.rb#11742 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#13402 + # source://prism//lib/prism/node.rb#11733 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?location: Location) -> MultiTargetNode + # 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#13416 + # source://prism//lib/prism/node.rb#11747 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, lefts: 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)], - rest: T.nilable(Prism::Node), - rights: 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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: 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)], lparen_loc: T.nilable(Prism::Location), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).returns(Prism::MultiTargetNode) end - def copy(lefts: T.unsafe(nil), rest: T.unsafe(nil), rights: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13397 + # source://prism//lib/prism/node.rb#11728 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode], lparen_loc: Location?, rparen_loc: Location?, location: Location } + # 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#13424 + # source://prism//lib/prism/node.rb#11755 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23528,13 +23988,21 @@ class Prism::MultiTargetNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13474 + # source://prism//lib/prism/node.rb#11835 sig { override.returns(String) } def inspect; end - # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode | NumberedReferenceReadNode] + # Represents the targets expressions before a splat node. + # + # a, (b, c, *) = 1, 2, 3, 4, 5 + # ^^^^ # - # source://prism//lib/prism/node.rb#13429 + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, (b, c) = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11768 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 @@ -23542,70 +24010,74 @@ class Prism::MultiTargetNode < ::Prism::Node # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13464 + # source://prism//lib/prism/node.rb#11825 sig { returns(T.nilable(String)) } def lparen; end - # attr_reader lparen_loc: Location? + # The location of the opening parenthesis. # - # source://prism//lib/prism/node.rb#13438 + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11796 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end - # attr_reader rest: Prism::node? + # Represents a splat node in the target expression. # - # source://prism//lib/prism/node.rb#13432 - sig { returns(T.nilable(Prism::Node)) } + # a, (b, *c) = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, (b, *) = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, (b,) = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11784 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end - # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode | RequiredParameterNode | BackReferenceReadNode] + # Represents the targets expressions after a splat node. + # + # a, (*, b, c) = 1, 2, 3, 4, 5 + # ^^^^ # - # source://prism//lib/prism/node.rb#13435 + # source://prism//lib/prism/node.rb#11790 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)]) + 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 def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13469 + # source://prism//lib/prism/node.rb#11830 sig { returns(T.nilable(String)) } def rparen; end - # attr_reader rparen_loc: Location? + # The location of the closing parenthesis. # - # source://prism//lib/prism/node.rb#13451 + # a, (b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11812 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13492 + # source://prism//lib/prism/node.rb#11840 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13502 + # source://prism//lib/prism/node.rb#11845 def type; end end end @@ -23615,85 +24087,89 @@ end # a, b, c = 1, 2, 3 # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13524 +# source://prism//lib/prism/node.rb#11867 class Prism::MultiWriteNode < ::Prism::Node - # def initialize: (Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] lefts, Prism::node? rest, Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] rights, Location? lparen_loc, Location? rparen_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new MultiWriteNode node. # # @return [MultiWriteNode] a new instance of MultiWriteNode # - # source://prism//lib/prism/node.rb#13526 + # source://prism//lib/prism/node.rb#11869 sig do params( source: Prism::Source, - lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], - rest: T.nilable(Prism::Node), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: 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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: 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)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, lefts, rest, rights, lparen_loc, rparen_loc, operator_loc, 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#13671 + # source://prism//lib/prism/node.rb#12034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13539 + # source://prism//lib/prism/node.rb#11884 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13544 + # source://prism//lib/prism/node.rb#11889 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#13559 + # source://prism//lib/prism/node.rb#11904 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#13549 + # source://prism//lib/prism/node.rb#11894 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?rest: Prism::node?, ?rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], ?lparen_loc: Location?, ?rparen_loc: Location?, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> MultiWriteNode + # 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#13564 + # source://prism//lib/prism/node.rb#11909 sig do params( - lefts: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], - rest: T.nilable(Prism::Node), - rights: T::Array[T.any(Prism::LocalVariableTargetNode, Prism::InstanceVariableTargetNode, Prism::ClassVariableTargetNode, Prism::GlobalVariableTargetNode, Prism::ConstantTargetNode, Prism::ConstantPathTargetNode, Prism::CallTargetNode, Prism::IndexTargetNode, Prism::MultiTargetNode)], + node_id: Integer, + location: Prism::Location, + flags: Integer, + lefts: 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)], + rest: T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode)), + rights: 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)], lparen_loc: T.nilable(Prism::Location), rparen_loc: T.nilable(Prism::Location), operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::MultiWriteNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13544 + # source://prism//lib/prism/node.rb#11889 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], rest: Prism::node?, rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode], lparen_loc: Location?, rparen_loc: Location?, operator_loc: Location, value: Prism::node, location: Location } + # 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#13572 + # source://prism//lib/prism/node.rb#11917 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -23702,102 +24178,120 @@ class Prism::MultiWriteNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13637 + # source://prism//lib/prism/node.rb#12018 sig { override.returns(String) } def inspect; end - # attr_reader lefts: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # Represents the targets expressions before a splat node. + # + # a, b, * = 1, 2, 3, 4, 5 + # ^^^^ # - # source://prism//lib/prism/node.rb#13577 + # The splat node can be absent, in that case all target expressions are in the left field. + # + # a, b, c = 1, 2, 3, 4, 5 + # ^^^^^^^ + # + # source://prism//lib/prism/node.rb#11930 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)]) + 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 def lefts; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#13622 + # source://prism//lib/prism/node.rb#12003 sig { returns(T.nilable(String)) } def lparen; end - # attr_reader lparen_loc: Location? + # The location of the opening parenthesis. # - # source://prism//lib/prism/node.rb#13586 + # (a, b, c) = 1, 2, 3 + # ^ + # + # source://prism//lib/prism/node.rb#11958 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13632 + # source://prism//lib/prism/node.rb#12013 sig { returns(String) } def operator; end - # attr_reader operator_loc: Location + # The location of the operator. + # + # a, b, c = 1, 2, 3 + # ^ # - # source://prism//lib/prism/node.rb#13612 + # source://prism//lib/prism/node.rb#11990 sig { returns(Prism::Location) } def operator_loc; end - # attr_reader rest: Prism::node? + # Represents a splat node in the target expression. # - # source://prism//lib/prism/node.rb#13580 - sig { returns(T.nilable(Prism::Node)) } + # a, b, *c = 1, 2, 3, 4 + # ^^ + # + # The variable can be empty, this results in a `SplatNode` with a `nil` expression field. + # + # a, b, * = 1, 2, 3, 4 + # ^ + # + # If the `*` is omitted, this field will contain an `ImplicitRestNode` + # + # a, b, = 1, 2, 3, 4 + # ^ + # + # source://prism//lib/prism/node.rb#11946 + sig { returns(T.nilable(T.any(Prism::ImplicitRestNode, Prism::SplatNode))) } def rest; end - # attr_reader rights: Array[LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | MultiTargetNode] + # Represents the targets expressions after a splat node. # - # source://prism//lib/prism/node.rb#13583 + # a, *, b, c = 1, 2, 3, 4, 5 + # ^^^^ + # + # source://prism//lib/prism/node.rb#11952 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)]) + 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 def rights; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#13627 + # source://prism//lib/prism/node.rb#12008 sig { returns(T.nilable(String)) } def rparen; end - # attr_reader rparen_loc: Location? + # The location of the closing parenthesis. + # + # (a, b, c) = 1, 2, 3 + # ^ # - # source://prism//lib/prism/node.rb#13599 + # source://prism//lib/prism/node.rb#11974 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13655 + # source://prism//lib/prism/node.rb#12023 sig { override.returns(Symbol) } def type; end - # attr_reader value: Prism::node + # The value to write to the targets. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # + # a, b, c = 1, 2, 3 + # ^^^^^^^ # - # source://prism//lib/prism/node.rb#13619 + # source://prism//lib/prism/node.rb#12000 sig { returns(Prism::Node) } def value; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13665 + # source://prism//lib/prism/node.rb#12028 def type; end end end @@ -24569,81 +25063,85 @@ end # next 1 # ^^^^^^ # -# source://prism//lib/prism/node.rb#13689 +# source://prism//lib/prism/node.rb#12052 class Prism::NextNode < ::Prism::Node - # def initialize: (ArgumentsNode? arguments, Location keyword_loc, Location location) -> void + # Initialize a new NextNode node. # # @return [NextNode] a new instance of NextNode # - # source://prism//lib/prism/node.rb#13691 + # source://prism//lib/prism/node.rb#12054 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, arguments, keyword_loc, location); end + def initialize(source, node_id, location, flags, arguments, keyword_loc); 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#13783 + # source://prism//lib/prism/node.rb#12130 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13699 + # source://prism//lib/prism/node.rb#12064 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#13734 + # source://prism//lib/prism/node.rb#12099 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#12069 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#13716 + # source://prism//lib/prism/node.rb#12081 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#13709 + # source://prism//lib/prism/node.rb#12074 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?arguments: ArgumentsNode?, ?keyword_loc: Location, ?location: Location) -> NextNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?arguments: ArgumentsNode?, ?keyword_loc: Location) -> NextNode # - # source://prism//lib/prism/node.rb#13721 + # source://prism//lib/prism/node.rb#12086 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, arguments: T.nilable(Prism::ArgumentsNode), - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::NextNode) end - def copy(arguments: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13704 + # source://prism//lib/prism/node.rb#12069 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { arguments: ArgumentsNode?, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, arguments: ArgumentsNode?, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#13729 + # source://prism//lib/prism/node.rb#12094 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24652,50 +25150,32 @@ class Prism::NextNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13749 + # source://prism//lib/prism/node.rb#12114 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13744 + # source://prism//lib/prism/node.rb#12109 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13737 + # source://prism//lib/prism/node.rb#12102 sig { returns(Prism::Location) } def keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13767 + # source://prism//lib/prism/node.rb#12119 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13777 + # source://prism//lib/prism/node.rb#12124 def type; end end end @@ -24705,62 +25185,62 @@ end # nil # ^^^ # -# source://prism//lib/prism/node.rb#13794 +# source://prism//lib/prism/node.rb#12141 class Prism::NilNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new NilNode node. # # @return [NilNode] a new instance of NilNode # - # source://prism//lib/prism/node.rb#13796 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#12143 + 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#13869 + # source://prism//lib/prism/node.rb#12200 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13802 + # source://prism//lib/prism/node.rb#12151 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13807 + # source://prism//lib/prism/node.rb#12156 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#13817 + # source://prism//lib/prism/node.rb#12166 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#13812 + # source://prism//lib/prism/node.rb#12161 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> NilNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> NilNode # - # source://prism//lib/prism/node.rb#13822 - sig { params(location: Prism::Location).returns(Prism::NilNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12171 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13807 + # source://prism//lib/prism/node.rb#12156 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#13830 + # source://prism//lib/prism/node.rb#12179 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24769,38 +25249,20 @@ class Prism::NilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13835 + # source://prism//lib/prism/node.rb#12184 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13853 + # source://prism//lib/prism/node.rb#12189 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#13863 + # source://prism//lib/prism/node.rb#12194 def type; end end end @@ -24811,75 +25273,79 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#13879 +# source://prism//lib/prism/node.rb#12210 class Prism::NoKeywordsParameterNode < ::Prism::Node - # def initialize: (Location operator_loc, Location keyword_loc, Location location) -> void + # Initialize a new NoKeywordsParameterNode node. # # @return [NoKeywordsParameterNode] a new instance of NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#13881 + # source://prism//lib/prism/node.rb#12212 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, operator_loc, keyword_loc, location); end + def initialize(source, node_id, location, flags, operator_loc, keyword_loc); 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#13980 + # source://prism//lib/prism/node.rb#12295 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#13889 + # source://prism//lib/prism/node.rb#12222 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13894 + # source://prism//lib/prism/node.rb#12227 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#13904 + # source://prism//lib/prism/node.rb#12237 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#13899 + # source://prism//lib/prism/node.rb#12232 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?operator_loc: Location, ?keyword_loc: Location, ?location: Location) -> NoKeywordsParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?keyword_loc: Location) -> NoKeywordsParameterNode # - # source://prism//lib/prism/node.rb#13909 + # source://prism//lib/prism/node.rb#12242 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - keyword_loc: Prism::Location, - location: Prism::Location + keyword_loc: Prism::Location ).returns(Prism::NoKeywordsParameterNode) end - def copy(operator_loc: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#13894 + # source://prism//lib/prism/node.rb#12227 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, keyword_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, keyword_loc: Location } # - # source://prism//lib/prism/node.rb#13917 + # source://prism//lib/prism/node.rb#12250 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -24888,62 +25354,44 @@ class Prism::NoKeywordsParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#13946 + # source://prism//lib/prism/node.rb#12279 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#13941 + # source://prism//lib/prism/node.rb#12274 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#13929 + # source://prism//lib/prism/node.rb#12262 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#13936 + # source://prism//lib/prism/node.rb#12269 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#13922 + # source://prism//lib/prism/node.rb#12255 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13964 + # source://prism//lib/prism/node.rb#12284 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#13974 + # source://prism//lib/prism/node.rb#12289 def type; end end end @@ -24959,16 +25407,26 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#131 + # source://prism//lib/prism/node.rb#169 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 + # particular condition. + # + # node.breadth_first_search { |node| node.node_id == node_id } + # + # source://prism//lib/prism/node.rb#139 + sig { params(block: T.proc.params(node: Prism::Node).returns(T::Boolean)).returns(T.nilable(Prism::Node)) } + def breadth_first_search(&block); 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#137 + # source://prism//lib/prism/node.rb#175 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end @@ -24977,7 +25435,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#151 + # source://prism//lib/prism/node.rb#189 sig { abstract.returns(T::Array[T.any(Prism::Node, Prism::Location)]) } def comment_targets; end @@ -24986,7 +25444,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#145 + # source://prism//lib/prism/node.rb#183 sig { abstract.returns(T::Array[Prism::Node]) } def compact_child_nodes; end @@ -24995,7 +25453,7 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#137 + # source://prism//lib/prism/node.rb#175 sig { abstract.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end @@ -25005,7 +25463,7 @@ class Prism::Node # 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#34 + # source://prism//lib/prism/node.rb#40 sig { returns(Integer) } def end_offset; end @@ -25016,29 +25474,46 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#162 + # source://prism//lib/prism/node.rb#194 sig { abstract.returns(String) } def inspect; end # A Location instance that represents the location of this node in the # source. # - # source://prism//lib/prism/node.rb#19 + # source://prism//lib/prism/node.rb#25 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#72 + sig { returns(T::Boolean) } + def newline?; end + # source://prism//lib/prism/parse_result/newlines.rb#69 - def newline!(lines); end + def newline_flag!(lines); end # @return [Boolean] # # source://prism//lib/prism/parse_result/newlines.rb#65 - def newline?; end + def newline_flag?; end + + # A unique identifier for this node. This is used in a very specific + # use case where you want to keep around a reference to a node without + # 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 + 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#62 + # source://prism//lib/prism/node.rb#83 sig { params(q: T.untyped).void } def pretty_print(q); end @@ -25046,13 +25521,13 @@ class Prism::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#40 + # source://prism//lib/prism/node.rb#46 sig { returns(T::Array[String]) } def script_lines; end # Slice the location of the node from the source. # - # source://prism//lib/prism/node.rb#49 + # source://prism//lib/prism/node.rb#55 sig { returns(String) } def slice; end @@ -25060,26 +25535,34 @@ 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#56 + # source://prism//lib/prism/node.rb#62 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#40 + # source://prism//lib/prism/node.rb#46 sig { returns(T::Array[String]) } def source_lines; 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#27 + # source://prism//lib/prism/node.rb#33 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#77 + sig { returns(T::Boolean) } + def static_literal?; end + # Convert this node into a graphviz dot graph string. # - # source://prism//lib/prism/node.rb#70 + # source://prism//lib/prism/node.rb#91 sig { returns(String) } def to_dot; end @@ -25090,19 +25573,38 @@ 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#81 + # source://prism//lib/prism/node.rb#102 sig { params(line: Integer, column: Integer).returns(T::Array[Prism::Node]) } def tunnel(line, column); end - # Returns a symbol symbolizing the type of node that this represents. This - # is particularly useful for case statements and array comparisons. + # Sometimes you want to check an instance of a node against a list of + # classes to see what kind of behavior to perform. Usually this is done by + # calling `[cls1, cls2].include?(node.class)` or putting the node into a + # case statement and doing `case node; when cls1; when cls2; end`. Both of + # these approaches are relatively slow because of the constant lookups, + # method calls, and/or array allocations. + # + # Instead, you can call #type, which will return to you a symbol that you + # can use for comparison. This is faster than the other approaches because + # it uses a single integer comparison, but also because if you're on CRuby + # 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#157 + # source://prism//lib/prism/node.rb#210 sig { abstract.returns(Symbol) } def type; end + protected + + # 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#68 + sig { returns(Integer) } + def flags; end + private # A pointer to the source that this node was created from. @@ -25118,79 +25620,114 @@ class Prism::Node # # @raise [NoMethodError] # - # source://prism//lib/prism/node.rb#115 + # source://prism//lib/prism/node.rb#153 def fields; end - # Returns the type of the node as a symbol. + # Similar to #type, this method returns a symbol that you can use for + # splitting on the type of the node without having to do a long === chain. + # 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#167 + # source://prism//lib/prism/node.rb#218 def type; end end end +# The flags that are common to all nodes. +# +# source://prism//lib/prism/node.rb#16855 +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#16858 +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#16862 +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. # # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#13991 +# source://prism//lib/prism/node.rb#12306 class Prism::NumberedParametersNode < ::Prism::Node - # def initialize: (Integer maximum, Location location) -> void + # Initialize a new NumberedParametersNode node. # # @return [NumberedParametersNode] a new instance of NumberedParametersNode # - # source://prism//lib/prism/node.rb#13993 - sig { params(source: Prism::Source, maximum: Integer, location: Prism::Location).void } - def initialize(source, maximum, location); end + # source://prism//lib/prism/node.rb#12308 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + maximum: Integer + ).void + end + def initialize(source, node_id, location, flags, maximum); 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#14070 + # source://prism//lib/prism/node.rb#12369 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14000 + # source://prism//lib/prism/node.rb#12317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14005 + # source://prism//lib/prism/node.rb#12322 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#14015 + # source://prism//lib/prism/node.rb#12332 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#14010 + # source://prism//lib/prism/node.rb#12327 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?maximum: Integer, ?location: Location) -> NumberedParametersNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?maximum: Integer) -> NumberedParametersNode # - # source://prism//lib/prism/node.rb#14020 - sig { params(maximum: Integer, location: Prism::Location).returns(Prism::NumberedParametersNode) } - def copy(maximum: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12337 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14005 + # source://prism//lib/prism/node.rb#12322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { maximum: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, maximum: Integer } # - # source://prism//lib/prism/node.rb#14028 + # source://prism//lib/prism/node.rb#12345 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25199,44 +25736,26 @@ class Prism::NumberedParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14036 + # source://prism//lib/prism/node.rb#12353 sig { override.returns(String) } def inspect; end # attr_reader maximum: Integer # - # source://prism//lib/prism/node.rb#14033 + # source://prism//lib/prism/node.rb#12350 sig { returns(Integer) } def maximum; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14054 + # source://prism//lib/prism/node.rb#12358 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14064 + # source://prism//lib/prism/node.rb#12363 def type; end end end @@ -25246,62 +25765,77 @@ end # $1 # ^^ # -# source://prism//lib/prism/node.rb#14080 +# source://prism//lib/prism/node.rb#12379 class Prism::NumberedReferenceReadNode < ::Prism::Node - # def initialize: (Integer number, Location location) -> void + # Initialize a new NumberedReferenceReadNode node. # # @return [NumberedReferenceReadNode] a new instance of NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14082 - sig { params(source: Prism::Source, number: Integer, location: Prism::Location).void } - def initialize(source, number, location); end + # source://prism//lib/prism/node.rb#12381 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + number: Integer + ).void + end + def initialize(source, node_id, location, flags, number); 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#14165 + # source://prism//lib/prism/node.rb#12448 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14089 + # source://prism//lib/prism/node.rb#12390 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14094 + # source://prism//lib/prism/node.rb#12395 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#14104 + # source://prism//lib/prism/node.rb#12405 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#14099 + # source://prism//lib/prism/node.rb#12400 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?number: Integer, ?location: Location) -> NumberedReferenceReadNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?number: Integer) -> NumberedReferenceReadNode # - # source://prism//lib/prism/node.rb#14109 - sig { params(number: Integer, location: Prism::Location).returns(Prism::NumberedReferenceReadNode) } - def copy(number: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#12410 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14094 + # source://prism//lib/prism/node.rb#12395 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { number: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, number: Integer } # - # source://prism//lib/prism/node.rb#14117 + # source://prism//lib/prism/node.rb#12418 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25310,7 +25844,7 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14131 + # source://prism//lib/prism/node.rb#12432 sig { override.returns(String) } def inspect; end @@ -25322,38 +25856,20 @@ class Prism::NumberedReferenceReadNode < ::Prism::Node # # $4294967296 # number `0` # - # source://prism//lib/prism/node.rb#14128 + # source://prism//lib/prism/node.rb#12429 sig { returns(Integer) } def number; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14149 + # source://prism//lib/prism/node.rb#12437 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14159 + # source://prism//lib/prism/node.rb#12442 def type; end end end @@ -25364,79 +25880,81 @@ end # ^^^^ # end # -# source://prism//lib/prism/node.rb#14176 +# source://prism//lib/prism/node.rb#12459 class Prism::OptionalKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Prism::node value, Location location) -> void + # Initialize a new OptionalKeywordParameterNode node. # # @return [OptionalKeywordParameterNode] a new instance of OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14178 + # source://prism//lib/prism/node.rb#12461 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, name, name_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, 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#14277 + # source://prism//lib/prism/node.rb#12539 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14188 + # source://prism//lib/prism/node.rb#12472 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14193 + # source://prism//lib/prism/node.rb#12477 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#14203 + # source://prism//lib/prism/node.rb#12487 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#14198 + # source://prism//lib/prism/node.rb#12482 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalKeywordParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location, ?value: Prism::node) -> OptionalKeywordParameterNode # - # source://prism//lib/prism/node.rb#14208 + # source://prism//lib/prism/node.rb#12492 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::OptionalKeywordParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14193 + # source://prism//lib/prism/node.rb#12477 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, value: Prism::node, location: Location } + # 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#14216 + # source://prism//lib/prism/node.rb#12500 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25445,19 +25963,19 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14243 + # source://prism//lib/prism/node.rb#12523 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14225 + # source://prism//lib/prism/node.rb#12510 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14228 + # source://prism//lib/prism/node.rb#12513 sig { returns(Prism::Location) } def name_loc; end @@ -25465,52 +25983,26 @@ class Prism::OptionalKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14238 + # source://prism//lib/prism/node.rb#12505 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14261 + # source://prism//lib/prism/node.rb#12528 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14235 + # source://prism//lib/prism/node.rb#12520 sig { returns(Prism::Node) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#14221 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14271 + # source://prism//lib/prism/node.rb#12533 def type; end end end @@ -25521,81 +26013,83 @@ end # ^^^^^ # end # -# source://prism//lib/prism/node.rb#14291 +# source://prism//lib/prism/node.rb#12553 class Prism::OptionalParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location operator_loc, Prism::node value, Location location) -> void + # Initialize a new OptionalParameterNode node. # # @return [OptionalParameterNode] a new instance of OptionalParameterNode # - # source://prism//lib/prism/node.rb#14293 + # source://prism//lib/prism/node.rb#12555 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).void end - def initialize(source, flags, name, name_loc, operator_loc, value, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc, 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#14405 + # source://prism//lib/prism/node.rb#12646 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14304 + # source://prism//lib/prism/node.rb#12567 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14309 + # source://prism//lib/prism/node.rb#12572 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#14319 + # source://prism//lib/prism/node.rb#12582 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#14314 + # source://prism//lib/prism/node.rb#12577 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?operator_loc: Location, ?value: Prism::node, ?location: Location) -> OptionalParameterNode + # 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#14324 + # source://prism//lib/prism/node.rb#12587 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, name_loc: Prism::Location, operator_loc: Prism::Location, - value: Prism::Node, - location: Prism::Location + value: Prism::Node ).returns(Prism::OptionalParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14309 + # source://prism//lib/prism/node.rb#12572 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, operator_loc: Location, value: Prism::node, location: Location } + # 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#14332 + # source://prism//lib/prism/node.rb#12595 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25604,31 +26098,31 @@ class Prism::OptionalParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14371 + # source://prism//lib/prism/node.rb#12630 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#14341 + # source://prism//lib/prism/node.rb#12605 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#14344 + # source://prism//lib/prism/node.rb#12608 sig { returns(Prism::Location) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14366 + # source://prism//lib/prism/node.rb#12625 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14351 + # source://prism//lib/prism/node.rb#12615 sig { returns(Prism::Location) } def operator_loc; end @@ -25636,52 +26130,26 @@ class Prism::OptionalParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#14361 + # source://prism//lib/prism/node.rb#12600 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14389 + # source://prism//lib/prism/node.rb#12635 sig { override.returns(Symbol) } def type; end # attr_reader value: Prism::node # - # source://prism//lib/prism/node.rb#14358 + # source://prism//lib/prism/node.rb#12622 sig { returns(Prism::Node) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#14337 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14399 + # source://prism//lib/prism/node.rb#12640 def type; end end end @@ -25691,77 +26159,81 @@ end # left or right # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14419 +# source://prism//lib/prism/node.rb#12660 class Prism::OrNode < ::Prism::Node - # def initialize: (Prism::node left, Prism::node right, Location operator_loc, Location location) -> void + # Initialize a new OrNode node. # # @return [OrNode] a new instance of OrNode # - # source://prism//lib/prism/node.rb#14421 + # source://prism//lib/prism/node.rb#12662 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); 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#14530 + # source://prism//lib/prism/node.rb#12755 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14430 + # source://prism//lib/prism/node.rb#12673 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14435 + # source://prism//lib/prism/node.rb#12678 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#14445 + # source://prism//lib/prism/node.rb#12688 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#14440 + # source://prism//lib/prism/node.rb#12683 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?left: Prism::node, ?right: Prism::node, ?operator_loc: Location, ?location: Location) -> OrNode + # 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#14450 + # source://prism//lib/prism/node.rb#12693 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, left: Prism::Node, right: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::OrNode) end - def copy(left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14435 + # source://prism//lib/prism/node.rb#12678 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { left: Prism::node, right: Prism::node, operator_loc: Location, location: Location } + # 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#14458 + # source://prism//lib/prism/node.rb#12701 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -25770,7 +26242,7 @@ class Prism::OrNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14496 + # source://prism//lib/prism/node.rb#12739 sig { override.returns(String) } def inspect; end @@ -25782,13 +26254,13 @@ class Prism::OrNode < ::Prism::Node # 1 || 2 # ^ # - # source://prism//lib/prism/node.rb#14469 + # source://prism//lib/prism/node.rb#12712 sig { returns(Prism::Node) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14491 + # source://prism//lib/prism/node.rb#12734 sig { returns(String) } def operator; end @@ -25797,11 +26269,11 @@ class Prism::OrNode < ::Prism::Node # left or right # ^^ # - # source://prism//lib/prism/node.rb#14484 + # source://prism//lib/prism/node.rb#12727 sig { returns(Prism::Location) } def operator_loc; end - # Represents the right side of the expression. It can be any [non-void expression](https://github.com/ruby/prism/blob/main/docs/parsing_rules.md#non-void-expression). + # Represents the right side of the expression. # # left || right # ^^^^^ @@ -25809,38 +26281,20 @@ class Prism::OrNode < ::Prism::Node # 1 or 2 # ^ # - # source://prism//lib/prism/node.rb#14478 + # source://prism//lib/prism/node.rb#12721 sig { returns(Prism::Node) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14514 + # source://prism//lib/prism/node.rb#12744 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14524 + # source://prism//lib/prism/node.rb#12749 def type; end end end @@ -26089,12 +26543,12 @@ Prism::Pack::UTF8 = T.let(T.unsafe(nil), Symbol) # Flags for parameter nodes. # -# source://prism//lib/prism/node.rb#19202 +# source://prism//lib/prism/node.rb#16768 module Prism::ParameterFlags; end # a parameter name that has been repeated in the method signature # -# source://prism//lib/prism/node.rb#19204 +# source://prism//lib/prism/node.rb#16770 Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # Represents the list of parameters on a method, block, or lambda definition. @@ -26103,91 +26557,95 @@ Prism::ParameterFlags::REPEATED_PARAMETER = T.let(T.unsafe(nil), Integer) # ^^^^^^^ # end # -# source://prism//lib/prism/node.rb#14543 +# source://prism//lib/prism/node.rb#12768 class Prism::ParametersNode < ::Prism::Node - # def initialize: (Array[RequiredParameterNode | MultiTargetNode] requireds, Array[OptionalParameterNode] optionals, RestParameterNode | ImplicitRestNode | nil rest, Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] posts, Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] keywords, KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil keyword_rest, BlockParameterNode? block, Location location) -> void + # Initialize a new ParametersNode node. # # @return [ParametersNode] a new instance of ParametersNode # - # source://prism//lib/prism/node.rb#14545 + # source://prism//lib/prism/node.rb#12770 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), - block: T.nilable(Prism::BlockParameterNode), - location: Prism::Location + block: T.nilable(Prism::BlockParameterNode) ).void end - def initialize(source, requireds, optionals, rest, posts, keywords, keyword_rest, block, location); end + def initialize(source, node_id, location, flags, requireds, optionals, rest, posts, keywords, keyword_rest, 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#14654 + # source://prism//lib/prism/node.rb#12863 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14558 + # source://prism//lib/prism/node.rb#12785 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader block: BlockParameterNode? # - # source://prism//lib/prism/node.rb#14617 + # source://prism//lib/prism/node.rb#12844 sig { returns(T.nilable(Prism::BlockParameterNode)) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14563 + # source://prism//lib/prism/node.rb#12790 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#14581 + # source://prism//lib/prism/node.rb#12808 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#14568 + # source://prism//lib/prism/node.rb#12795 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?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?, ?location: Location) -> ParametersNode + # 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#14586 + # source://prism//lib/prism/node.rb#12813 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, requireds: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode)], optionals: T::Array[Prism::OptionalParameterNode], rest: T.nilable(T.any(Prism::RestParameterNode, Prism::ImplicitRestNode)), posts: T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)], keywords: T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)], keyword_rest: T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode)), - block: T.nilable(Prism::BlockParameterNode), - location: Prism::Location + block: T.nilable(Prism::BlockParameterNode) ).returns(Prism::ParametersNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14563 + # source://prism//lib/prism/node.rb#12790 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { 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?, location: Location } + # 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#14594 + # source://prism//lib/prism/node.rb#12821 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26196,13 +26654,13 @@ class Prism::ParametersNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14620 + # source://prism//lib/prism/node.rb#12847 sig { override.returns(String) } def inspect; end # attr_reader keyword_rest: KeywordRestParameterNode | ForwardingParameterNode | NoKeywordsParameterNode | nil # - # source://prism//lib/prism/node.rb#14614 + # source://prism//lib/prism/node.rb#12841 sig do returns(T.nilable(T.any(Prism::KeywordRestParameterNode, Prism::ForwardingParameterNode, Prism::NoKeywordsParameterNode))) end @@ -26210,19 +26668,19 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader keywords: Array[RequiredKeywordParameterNode | OptionalKeywordParameterNode] # - # source://prism//lib/prism/node.rb#14611 + # source://prism//lib/prism/node.rb#12838 sig { returns(T::Array[T.any(Prism::RequiredKeywordParameterNode, Prism::OptionalKeywordParameterNode)]) } def keywords; end # attr_reader optionals: Array[OptionalParameterNode] # - # source://prism//lib/prism/node.rb#14602 + # source://prism//lib/prism/node.rb#12829 sig { returns(T::Array[Prism::OptionalParameterNode]) } def optionals; end # attr_reader posts: Array[RequiredParameterNode | MultiTargetNode | KeywordRestParameterNode | NoKeywordsParameterNode | ForwardingParameterNode] # - # source://prism//lib/prism/node.rb#14608 + # source://prism//lib/prism/node.rb#12835 sig do returns(T::Array[T.any(Prism::RequiredParameterNode, Prism::MultiTargetNode, Prism::KeywordRestParameterNode, Prism::NoKeywordsParameterNode, Prism::ForwardingParameterNode)]) end @@ -26230,50 +26688,32 @@ class Prism::ParametersNode < ::Prism::Node # attr_reader requireds: Array[RequiredParameterNode | MultiTargetNode] # - # source://prism//lib/prism/node.rb#14599 + # source://prism//lib/prism/node.rb#12826 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#14605 + # source://prism//lib/prism/node.rb#12832 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#253 + # source://prism//lib/prism/node_ext.rb#269 sig { returns(T::Array[T.any([Symbol, Symbol], [Symbol])]) } def signature; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14638 + # source://prism//lib/prism/node.rb#12852 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14648 + # source://prism//lib/prism/node.rb#12857 def type; end end end @@ -26283,95 +26723,99 @@ end # (10 + 34) # ^^^^^^^^^ # -# source://prism//lib/prism/node.rb#14674 +# source://prism//lib/prism/node.rb#12883 class Prism::ParenthesesNode < ::Prism::Node - # def initialize: (Prism::node? body, Location opening_loc, Location closing_loc, Location location) -> void + # Initialize a new ParenthesesNode node. # # @return [ParenthesesNode] a new instance of ParenthesesNode # - # source://prism//lib/prism/node.rb#14676 + # source://prism//lib/prism/node.rb#12885 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, body: T.nilable(Prism::Node), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, body, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, body, opening_loc, closing_loc); 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#14781 + # source://prism//lib/prism/node.rb#12974 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14685 + # source://prism//lib/prism/node.rb#12896 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader body: Prism::node? # - # source://prism//lib/prism/node.rb#14720 + # source://prism//lib/prism/node.rb#12931 sig { returns(T.nilable(Prism::Node)) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14690 + # source://prism//lib/prism/node.rb#12901 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#14742 + # source://prism//lib/prism/node.rb#12953 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#14730 + # source://prism//lib/prism/node.rb#12941 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#14702 + # source://prism//lib/prism/node.rb#12913 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#14695 + # source://prism//lib/prism/node.rb#12906 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?body: Prism::node?, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> ParenthesesNode + # 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#14707 + # source://prism//lib/prism/node.rb#12918 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, body: T.nilable(Prism::Node), opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::ParenthesesNode) end - def copy(body: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14690 + # source://prism//lib/prism/node.rb#12901 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Prism::node?, opening_loc: Location, closing_loc: Location, location: Location } + # 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#14715 + # source://prism//lib/prism/node.rb#12926 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -26380,116 +26824,98 @@ class Prism::ParenthesesNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14747 + # source://prism//lib/prism/node.rb#12958 sig { override.returns(String) } def inspect; end # source://prism//lib/prism/parse_result/newlines.rb#85 - def newline!(lines); end + def newline_flag!(lines); end # def opening: () -> String # - # source://prism//lib/prism/node.rb#14737 + # source://prism//lib/prism/node.rb#12948 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#14723 + # source://prism//lib/prism/node.rb#12934 sig { returns(Prism::Location) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#14765 + # source://prism//lib/prism/node.rb#12963 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#14775 + # source://prism//lib/prism/node.rb#12968 def type; end end end # This represents an error that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#451 +# source://prism//lib/prism/parse_result.rb#592 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#466 + # source://prism//lib/prism/parse_result.rb#607 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#474 + # source://prism//lib/prism/parse_result.rb#615 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#479 + # source://prism//lib/prism/parse_result.rb#620 sig { returns(String) } def inspect; end # The level of this error. # - # source://prism//lib/prism/parse_result.rb#463 + # source://prism//lib/prism/parse_result.rb#604 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#460 + # source://prism//lib/prism/parse_result.rb#601 sig { returns(Prism::Location) } def location; end # The message associated with this error. # - # source://prism//lib/prism/parse_result.rb#457 + # source://prism//lib/prism/parse_result.rb#598 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#454 + # source://prism//lib/prism/parse_result.rb#595 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#627 +# source://prism//lib/prism/parse_result.rb#781 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#633 + # source://prism//lib/prism/parse_result.rb#787 sig do params( value: [Prism::ProgramNode, T::Array[T.untyped]], @@ -26505,27 +26931,27 @@ class Prism::ParseLexResult < ::Prism::Result # Implement the hash pattern matching interface for ParseLexResult. # - # source://prism//lib/prism/parse_result.rb#639 + # source://prism//lib/prism/parse_result.rb#793 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#630 + # source://prism//lib/prism/parse_result.rb#784 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#576 +# source://prism//lib/prism/parse_result.rb#722 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#587 + # source://prism//lib/prism/parse_result.rb#735 sig do params( value: Prism::ProgramNode, @@ -26541,24 +26967,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#598 + # source://prism//lib/prism/parse_result.rb#746 def attach_comments!; end # Implement the hash pattern matching interface for ParseResult. # - # source://prism//lib/prism/parse_result.rb#593 + # source://prism//lib/prism/parse_result.rb#741 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#758 + 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#604 + # source://prism//lib/prism/parse_result.rb#752 def mark_newlines!; end # The syntax tree that was parsed from the source code. # - # source://prism//lib/prism/parse_result.rb#584 + # source://prism//lib/prism/parse_result.rb#732 sig { returns(Prism::ProgramNode) } def value; end end @@ -26670,6 +27102,29 @@ class Prism::ParseResult::Comments::NodeTarget 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 +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 + 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 + def format; end + + # The parse result that contains the errors. + # + # source://prism//lib/prism/parse_result/errors.rb#11 + def parse_result; end +end + # The :line tracepoint event gets fired whenever the Ruby VM encounters an # expression on a new line. The types of expressions that can trigger this # event are: @@ -26728,50 +27183,50 @@ end # This represents a warning that was encountered during parsing. # -# source://prism//lib/prism/parse_result.rb#485 +# source://prism//lib/prism/parse_result.rb#626 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#500 + # source://prism//lib/prism/parse_result.rb#641 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#508 + # source://prism//lib/prism/parse_result.rb#649 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#513 + # source://prism//lib/prism/parse_result.rb#654 sig { returns(String) } def inspect; end # The level of this warning. # - # source://prism//lib/prism/parse_result.rb#497 + # source://prism//lib/prism/parse_result.rb#638 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#494 + # source://prism//lib/prism/parse_result.rb#635 sig { returns(Prism::Location) } def location; end # The message associated with this warning. # - # source://prism//lib/prism/parse_result.rb#491 + # source://prism//lib/prism/parse_result.rb#632 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#488 + # source://prism//lib/prism/parse_result.rb#629 sig { returns(Symbol) } def type; end end @@ -26942,85 +27397,89 @@ end # foo in ^(bar) # ^^^^^^ # -# source://prism//lib/prism/node.rb#14793 +# source://prism//lib/prism/node.rb#12986 class Prism::PinnedExpressionNode < ::Prism::Node - # def initialize: (Prism::node expression, Location operator_loc, Location lparen_loc, Location rparen_loc, Location location) -> void + # Initialize a new PinnedExpressionNode node. # # @return [PinnedExpressionNode] a new instance of PinnedExpressionNode # - # source://prism//lib/prism/node.rb#14795 + # source://prism//lib/prism/node.rb#12988 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, operator_loc: Prism::Location, lparen_loc: Prism::Location, - rparen_loc: Prism::Location, - location: Prism::Location + rparen_loc: Prism::Location ).void end - def initialize(source, expression, operator_loc, lparen_loc, rparen_loc, location); end + def initialize(source, node_id, location, flags, expression, operator_loc, lparen_loc, rparen_loc); 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#14911 + # source://prism//lib/prism/node.rb#13088 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14805 + # source://prism//lib/prism/node.rb#13000 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14810 + # source://prism//lib/prism/node.rb#13005 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#14820 + # source://prism//lib/prism/node.rb#13015 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#14815 + # source://prism//lib/prism/node.rb#13010 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?expression: Prism::node, ?operator_loc: Location, ?lparen_loc: Location, ?rparen_loc: Location, ?location: Location) -> PinnedExpressionNode + # 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#14825 + # source://prism//lib/prism/node.rb#13020 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, operator_loc: Prism::Location, lparen_loc: Prism::Location, - rparen_loc: Prism::Location, - location: Prism::Location + rparen_loc: Prism::Location ).returns(Prism::PinnedExpressionNode) end - def copy(expression: T.unsafe(nil), operator_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14810 + # source://prism//lib/prism/node.rb#13005 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, operator_loc: Location, lparen_loc: Location, rparen_loc: Location, location: Location } + # 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#14833 + # source://prism//lib/prism/node.rb#13028 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#14838 + # source://prism//lib/prism/node.rb#13033 sig { returns(Prism::Node) } def expression; end @@ -27029,74 +27488,56 @@ class Prism::PinnedExpressionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14877 + # source://prism//lib/prism/node.rb#13072 sig { override.returns(String) } def inspect; end # def lparen: () -> String # - # source://prism//lib/prism/node.rb#14867 + # source://prism//lib/prism/node.rb#13062 sig { returns(String) } def lparen; end # attr_reader lparen_loc: Location # - # source://prism//lib/prism/node.rb#14848 + # source://prism//lib/prism/node.rb#13043 sig { returns(Prism::Location) } def lparen_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14862 + # source://prism//lib/prism/node.rb#13057 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14841 + # source://prism//lib/prism/node.rb#13036 sig { returns(Prism::Location) } def operator_loc; end # def rparen: () -> String # - # source://prism//lib/prism/node.rb#14872 + # source://prism//lib/prism/node.rb#13067 sig { returns(String) } def rparen; end # attr_reader rparen_loc: Location # - # source://prism//lib/prism/node.rb#14855 + # source://prism//lib/prism/node.rb#13050 sig { returns(Prism::Location) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14895 + # source://prism//lib/prism/node.rb#13077 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#14905 + # source://prism//lib/prism/node.rb#13082 def type; end end end @@ -27106,75 +27547,79 @@ end # foo in ^bar # ^^^^ # -# source://prism//lib/prism/node.rb#14924 +# source://prism//lib/prism/node.rb#13101 class Prism::PinnedVariableNode < ::Prism::Node - # def initialize: (Prism::node variable, Location operator_loc, Location location) -> void + # Initialize a new PinnedVariableNode node. # # @return [PinnedVariableNode] a new instance of PinnedVariableNode # - # source://prism//lib/prism/node.rb#14926 + # source://prism//lib/prism/node.rb#13103 sig do params( source: Prism::Source, - variable: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location ).void end - def initialize(source, variable, operator_loc, location); end + def initialize(source, node_id, location, flags, variable, operator_loc); 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#15016 + # source://prism//lib/prism/node.rb#13177 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#14934 + # source://prism//lib/prism/node.rb#13113 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14939 + # source://prism//lib/prism/node.rb#13118 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#14949 + # source://prism//lib/prism/node.rb#13128 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#14944 + # source://prism//lib/prism/node.rb#13123 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?variable: Prism::node, ?operator_loc: Location, ?location: Location) -> PinnedVariableNode + # 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#14954 + # source://prism//lib/prism/node.rb#13133 sig do params( - variable: Prism::Node, - operator_loc: Prism::Location, - location: Prism::Location + node_id: Integer, + location: Prism::Location, + flags: Integer, + variable: T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode), + operator_loc: Prism::Location ).returns(Prism::PinnedVariableNode) end - def copy(variable: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#14939 + # source://prism//lib/prism/node.rb#13118 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { variable: Prism::node, operator_loc: Location, location: Location } + # 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#14962 + # source://prism//lib/prism/node.rb#13141 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27183,56 +27628,40 @@ class Prism::PinnedVariableNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#14982 + # source://prism//lib/prism/node.rb#13161 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#14977 + # source://prism//lib/prism/node.rb#13156 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#14970 + # source://prism//lib/prism/node.rb#13149 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15000 + # source://prism//lib/prism/node.rb#13166 sig { override.returns(Symbol) } def type; end - # attr_reader variable: Prism::node + # attr_reader variable: LocalVariableReadNode | InstanceVariableReadNode | ClassVariableReadNode | GlobalVariableReadNode | BackReferenceReadNode | NumberedReferenceReadNode | ItLocalVariableReadNode | MissingNode # - # source://prism//lib/prism/node.rb#14967 - sig { returns(Prism::Node) } + # source://prism//lib/prism/node.rb#13146 + sig do + returns(T.any(Prism::LocalVariableReadNode, Prism::InstanceVariableReadNode, Prism::ClassVariableReadNode, Prism::GlobalVariableReadNode, Prism::BackReferenceReadNode, Prism::NumberedReferenceReadNode, Prism::ItLocalVariableReadNode, Prism::MissingNode)) + end def variable; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15010 + # source://prism//lib/prism/node.rb#13171 def type; end end end @@ -27242,91 +27671,95 @@ end # END { foo } # ^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15027 +# source://prism//lib/prism/node.rb#13188 class Prism::PostExecutionNode < ::Prism::Node - # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # Initialize a new PostExecutionNode node. # # @return [PostExecutionNode] a new instance of PostExecutionNode # - # source://prism//lib/prism/node.rb#15029 + # source://prism//lib/prism/node.rb#13190 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); 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#15147 + # source://prism//lib/prism/node.rb#13292 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15039 + # source://prism//lib/prism/node.rb#13202 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15044 + # source://prism//lib/prism/node.rb#13207 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15108 + # source://prism//lib/prism/node.rb#13271 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15091 + # source://prism//lib/prism/node.rb#13254 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15056 + # source://prism//lib/prism/node.rb#13219 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#15049 + # source://prism//lib/prism/node.rb#13212 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PostExecutionNode + # 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#15061 + # source://prism//lib/prism/node.rb#13224 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::PostExecutionNode) end - def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15044 + # source://prism//lib/prism/node.rb#13207 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # 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#15069 + # source://prism//lib/prism/node.rb#13232 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27335,68 +27768,50 @@ class Prism::PostExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15113 + # source://prism//lib/prism/node.rb#13276 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15098 + # source://prism//lib/prism/node.rb#13261 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15077 + # source://prism//lib/prism/node.rb#13240 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15103 + # source://prism//lib/prism/node.rb#13266 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15084 + # source://prism//lib/prism/node.rb#13247 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15074 + # source://prism//lib/prism/node.rb#13237 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15131 + # source://prism//lib/prism/node.rb#13281 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15141 + # source://prism//lib/prism/node.rb#13286 def type; end end end @@ -27406,91 +27821,95 @@ end # BEGIN { foo } # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15160 +# source://prism//lib/prism/node.rb#13305 class Prism::PreExecutionNode < ::Prism::Node - # def initialize: (StatementsNode? statements, Location keyword_loc, Location opening_loc, Location closing_loc, Location location) -> void + # Initialize a new PreExecutionNode node. # # @return [PreExecutionNode] a new instance of PreExecutionNode # - # source://prism//lib/prism/node.rb#15162 + # source://prism//lib/prism/node.rb#13307 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).void end - def initialize(source, statements, keyword_loc, opening_loc, closing_loc, location); end + def initialize(source, node_id, location, flags, statements, keyword_loc, opening_loc, closing_loc); 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#15280 + # source://prism//lib/prism/node.rb#13409 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15172 + # source://prism//lib/prism/node.rb#13319 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15177 + # source://prism//lib/prism/node.rb#13324 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15241 + # source://prism//lib/prism/node.rb#13388 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15224 + # source://prism//lib/prism/node.rb#13371 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15189 + # source://prism//lib/prism/node.rb#13336 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#15182 + # source://prism//lib/prism/node.rb#13329 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?statements: StatementsNode?, ?keyword_loc: Location, ?opening_loc: Location, ?closing_loc: Location, ?location: Location) -> PreExecutionNode + # 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#15194 + # source://prism//lib/prism/node.rb#13341 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, statements: T.nilable(Prism::StatementsNode), keyword_loc: Prism::Location, opening_loc: Prism::Location, - closing_loc: Prism::Location, - location: Prism::Location + closing_loc: Prism::Location ).returns(Prism::PreExecutionNode) end - def copy(statements: T.unsafe(nil), keyword_loc: T.unsafe(nil), opening_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15177 + # source://prism//lib/prism/node.rb#13324 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { statements: StatementsNode?, keyword_loc: Location, opening_loc: Location, closing_loc: Location, location: Location } + # 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#15202 + # source://prism//lib/prism/node.rb#13349 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27499,143 +27918,129 @@ class Prism::PreExecutionNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15246 + # source://prism//lib/prism/node.rb#13393 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#15231 + # source://prism//lib/prism/node.rb#13378 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#15210 + # source://prism//lib/prism/node.rb#13357 sig { returns(Prism::Location) } def keyword_loc; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15236 + # source://prism//lib/prism/node.rb#13383 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15217 + # source://prism//lib/prism/node.rb#13364 sig { returns(Prism::Location) } def opening_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#15207 + # source://prism//lib/prism/node.rb#13354 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15264 + # source://prism//lib/prism/node.rb#13398 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15274 + # source://prism//lib/prism/node.rb#13403 def type; end end end # The top level node of any parse tree. # -# source://prism//lib/prism/node.rb#15290 +# source://prism//lib/prism/node.rb#13419 class Prism::ProgramNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, StatementsNode statements, Location location) -> void + # Initialize a new ProgramNode node. # # @return [ProgramNode] a new instance of ProgramNode # - # source://prism//lib/prism/node.rb#15292 + # source://prism//lib/prism/node.rb#13421 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - statements: Prism::StatementsNode, - location: Prism::Location + statements: Prism::StatementsNode ).void end - def initialize(source, locals, statements, location); end + def initialize(source, node_id, location, flags, locals, statements); 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#15373 + # source://prism//lib/prism/node.rb#13486 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15300 + # source://prism//lib/prism/node.rb#13431 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15305 + # source://prism//lib/prism/node.rb#13436 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#15315 + # source://prism//lib/prism/node.rb#13446 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#15310 + # source://prism//lib/prism/node.rb#13441 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?locals: Array[Symbol], ?statements: StatementsNode, ?location: Location) -> ProgramNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?locals: Array[Symbol], ?statements: StatementsNode) -> ProgramNode # - # source://prism//lib/prism/node.rb#15320 + # source://prism//lib/prism/node.rb#13451 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], - statements: Prism::StatementsNode, - location: Prism::Location + statements: Prism::StatementsNode ).returns(Prism::ProgramNode) end - def copy(locals: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15305 + # source://prism//lib/prism/node.rb#13436 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], statements: StatementsNode, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, locals: Array[Symbol], statements: StatementsNode } # - # source://prism//lib/prism/node.rb#15328 + # source://prism//lib/prism/node.rb#13459 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27644,62 +28049,44 @@ class Prism::ProgramNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15339 + # source://prism//lib/prism/node.rb#13470 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#15333 + # source://prism//lib/prism/node.rb#13464 sig { returns(T::Array[Symbol]) } def locals; end # attr_reader statements: StatementsNode # - # source://prism//lib/prism/node.rb#15336 + # source://prism//lib/prism/node.rb#13467 sig { returns(Prism::StatementsNode) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15357 + # source://prism//lib/prism/node.rb#13475 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15367 + # source://prism//lib/prism/node.rb#13480 def type; end end end # Flags for range and flip-flop nodes. # -# source://prism//lib/prism/node.rb#19208 +# source://prism//lib/prism/node.rb#16774 module Prism::RangeFlags; end # ... operator # -# source://prism//lib/prism/node.rb#19210 +# source://prism//lib/prism/node.rb#16776 Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # Represents the use of the `..` or `...` operators. @@ -27710,79 +28097,81 @@ Prism::RangeFlags::EXCLUDE_END = T.let(T.unsafe(nil), Integer) # c if a =~ /left/ ... b =~ /right/ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#15388 +# source://prism//lib/prism/node.rb#13501 class Prism::RangeNode < ::Prism::Node - # def initialize: (Integer flags, Prism::node? left, Prism::node? right, Location operator_loc, Location location) -> void + # Initialize a new RangeNode node. # # @return [RangeNode] a new instance of RangeNode # - # source://prism//lib/prism/node.rb#15390 + # source://prism//lib/prism/node.rb#13503 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, left, right, operator_loc, location); end + def initialize(source, node_id, location, flags, left, right, operator_loc); 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#15510 + # source://prism//lib/prism/node.rb#13602 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15400 + # source://prism//lib/prism/node.rb#13514 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15405 + # source://prism//lib/prism/node.rb#13519 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#15418 + # source://prism//lib/prism/node.rb#13532 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#15410 + # source://prism//lib/prism/node.rb#13524 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?left: Prism::node?, ?right: Prism::node?, ?operator_loc: Location, ?location: Location) -> RangeNode + # 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#15423 + # source://prism//lib/prism/node.rb#13537 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, left: T.nilable(Prism::Node), right: T.nilable(Prism::Node), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::RangeNode) end - def copy(flags: T.unsafe(nil), left: T.unsafe(nil), right: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15405 + # source://prism//lib/prism/node.rb#13519 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, left: Prism::node?, right: Prism::node?, operator_loc: Location, location: Location } + # 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#15431 + # source://prism//lib/prism/node.rb#13545 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27790,7 +28179,7 @@ class Prism::RangeNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15466 + # source://prism//lib/prism/node.rb#13550 sig { returns(T::Boolean) } def exclude_end?; end @@ -27799,7 +28188,7 @@ class Prism::RangeNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15476 + # source://prism//lib/prism/node.rb#13586 sig { override.returns(String) } def inspect; end @@ -27811,19 +28200,19 @@ class Prism::RangeNode < ::Prism::Node # hello...goodbye # ^^^^^ # - # source://prism//lib/prism/node.rb#15446 + # source://prism//lib/prism/node.rb#13561 sig { returns(T.nilable(Prism::Node)) } def left; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#15471 + # source://prism//lib/prism/node.rb#13581 sig { returns(String) } def operator; end # The location of the `..` or `...` operator. # - # source://prism//lib/prism/node.rb#15459 + # source://prism//lib/prism/node.rb#13574 sig { returns(Prism::Location) } def operator_loc; end @@ -27836,46 +28225,20 @@ 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#15456 + # source://prism//lib/prism/node.rb#13571 sig { returns(T.nilable(Prism::Node)) } def right; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15494 + # source://prism//lib/prism/node.rb#13591 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15436 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15504 + # source://prism//lib/prism/node.rb#13596 def type; end end end @@ -27885,33 +28248,34 @@ end # 1.0r # ^^^^ # -# source://prism//lib/prism/node.rb#15523 +# source://prism//lib/prism/node.rb#13615 class Prism::RationalNode < ::Prism::Node - # def initialize: (Integer flags, Integer numerator, Integer denominator, Location location) -> void + # Initialize a new RationalNode node. # # @return [RationalNode] a new instance of RationalNode # - # source://prism//lib/prism/node.rb#15525 + # source://prism//lib/prism/node.rb#13617 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, numerator: Integer, - denominator: Integer, - location: Prism::Location + denominator: Integer ).void end - def initialize(source, flags, numerator, denominator, location); end + def initialize(source, node_id, location, flags, numerator, denominator); 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#15635 + # source://prism//lib/prism/node.rb#13706 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15534 + # source://prism//lib/prism/node.rb#13627 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -27919,59 +28283,60 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15581 + # source://prism//lib/prism/node.rb#13660 sig { returns(T::Boolean) } def binary?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15539 + # source://prism//lib/prism/node.rb#13632 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#15549 + # source://prism//lib/prism/node.rb#13642 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#15544 + # source://prism//lib/prism/node.rb#13637 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?numerator: Integer, ?denominator: Integer, ?location: Location) -> RationalNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?numerator: Integer, ?denominator: Integer) -> RationalNode # - # source://prism//lib/prism/node.rb#15554 + # source://prism//lib/prism/node.rb#13647 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, numerator: Integer, - denominator: Integer, - location: Prism::Location + denominator: Integer ).returns(Prism::RationalNode) end - def copy(flags: T.unsafe(nil), numerator: T.unsafe(nil), denominator: T.unsafe(nil), location: T.unsafe(nil)); 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 decimal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15586 + # source://prism//lib/prism/node.rb#13665 sig { returns(T::Boolean) } def decimal?; end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15539 + # source://prism//lib/prism/node.rb#13632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, numerator: Integer, denominator: Integer, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, numerator: Integer, denominator: Integer } # - # source://prism//lib/prism/node.rb#15562 + # source://prism//lib/prism/node.rb#13655 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -27979,7 +28344,7 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # denominator 2 # - # source://prism//lib/prism/node.rb#15578 + # source://prism//lib/prism/node.rb#13687 sig { returns(Integer) } def denominator; end @@ -27990,13 +28355,13 @@ class Prism::RationalNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15596 + # source://prism//lib/prism/node.rb#13675 sig { returns(T::Boolean) } def hexadecimal?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15601 + # source://prism//lib/prism/node.rb#13690 sig { override.returns(String) } def inspect; end @@ -28004,66 +28369,40 @@ class Prism::RationalNode < ::Prism::Node # # 1.5r # numerator 3 # - # source://prism//lib/prism/node.rb#15573 + # source://prism//lib/prism/node.rb#13682 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#114 + # source://prism//lib/prism/node_ext.rb#120 def numeric; end # def octal?: () -> bool # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15591 + # source://prism//lib/prism/node.rb#13670 sig { returns(T::Boolean) } def octal?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15619 + # source://prism//lib/prism/node.rb#13695 sig { override.returns(Symbol) } def type; end # Returns the value of the node as a Ruby Rational. # - # source://prism//lib/prism/node_ext.rb#108 + # source://prism//lib/prism/node_ext.rb#114 sig { returns(Rational) } def value; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15567 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15629 + # source://prism//lib/prism/node.rb#13700 def type; end end end @@ -28073,62 +28412,62 @@ end # redo # ^^^^ # -# source://prism//lib/prism/node.rb#15647 +# source://prism//lib/prism/node.rb#13718 class Prism::RedoNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new RedoNode node. # # @return [RedoNode] a new instance of RedoNode # - # source://prism//lib/prism/node.rb#15649 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#13720 + 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#15722 + # source://prism//lib/prism/node.rb#13777 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15655 + # source://prism//lib/prism/node.rb#13728 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15660 + # source://prism//lib/prism/node.rb#13733 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#15670 + # source://prism//lib/prism/node.rb#13743 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#15665 + # source://prism//lib/prism/node.rb#13738 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> RedoNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RedoNode # - # source://prism//lib/prism/node.rb#15675 - sig { params(location: Prism::Location).returns(Prism::RedoNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#13748 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15660 + # source://prism//lib/prism/node.rb#13733 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#15683 + # source://prism//lib/prism/node.rb#13756 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28137,38 +28476,20 @@ class Prism::RedoNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15688 + # source://prism//lib/prism/node.rb#13761 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15706 + # source://prism//lib/prism/node.rb#13766 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#15716 + # source://prism//lib/prism/node.rb#13771 def type; end end end @@ -28305,62 +28626,62 @@ class Prism::Reflection::StringField < ::Prism::Reflection::Field; end # Flags for regular expression and match last line nodes. # -# source://prism//lib/prism/node.rb#19214 +# source://prism//lib/prism/node.rb#16780 module Prism::RegularExpressionFlags; end # n - forces the ASCII-8BIT encoding # -# source://prism//lib/prism/node.rb#19231 +# source://prism//lib/prism/node.rb#16797 Prism::RegularExpressionFlags::ASCII_8BIT = T.let(T.unsafe(nil), Integer) # e - forces the EUC-JP encoding # -# source://prism//lib/prism/node.rb#19228 +# source://prism//lib/prism/node.rb#16794 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#19219 +# source://prism//lib/prism/node.rb#16785 Prism::RegularExpressionFlags::EXTENDED = T.let(T.unsafe(nil), Integer) # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19243 +# source://prism//lib/prism/node.rb#16809 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#19246 +# source://prism//lib/prism/node.rb#16812 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#19240 +# source://prism//lib/prism/node.rb#16806 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#19216 +# source://prism//lib/prism/node.rb#16782 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#19222 +# source://prism//lib/prism/node.rb#16788 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#19225 +# source://prism//lib/prism/node.rb#16791 Prism::RegularExpressionFlags::ONCE = T.let(T.unsafe(nil), Integer) # u - forces the UTF-8 encoding # -# source://prism//lib/prism/node.rb#19237 +# source://prism//lib/prism/node.rb#16803 Prism::RegularExpressionFlags::UTF_8 = T.let(T.unsafe(nil), Integer) # s - forces the Windows-31J encoding # -# source://prism//lib/prism/node.rb#19234 +# source://prism//lib/prism/node.rb#16800 Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # Represents a regular expression literal with no interpolation. @@ -28368,37 +28689,38 @@ Prism::RegularExpressionFlags::WINDOWS_31J = T.let(T.unsafe(nil), Integer) # /foo/i # ^^^^^^ # -# source://prism//lib/prism/node.rb#15731 +# source://prism//lib/prism/node.rb#13786 class Prism::RegularExpressionNode < ::Prism::Node include ::Prism::RegularExpressionOptions - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # Initialize a new RegularExpressionNode node. # # @return [RegularExpressionNode] a new instance of RegularExpressionNode # - # source://prism//lib/prism/node.rb#15733 + # source://prism//lib/prism/node.rb#13788 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#15909 + # source://prism//lib/prism/node.rb#13943 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15744 + # source://prism//lib/prism/node.rb#13800 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -28406,77 +28728,78 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15830 + # source://prism//lib/prism/node.rb#13858 sig { returns(T::Boolean) } def ascii_8bit?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15749 + # source://prism//lib/prism/node.rb#13805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#15870 + # source://prism//lib/prism/node.rb#13922 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#15795 + # source://prism//lib/prism/node.rb#13902 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#15759 + # source://prism//lib/prism/node.rb#13815 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#15754 + # source://prism//lib/prism/node.rb#13810 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#15865 + # source://prism//lib/prism/node.rb#13917 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#15788 + # source://prism//lib/prism/node.rb#13895 sig { returns(Prism::Location) } def content_loc; end - # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> RegularExpressionNode + # 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#15764 + # source://prism//lib/prism/node.rb#13820 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::RegularExpressionNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15749 + # source://prism//lib/prism/node.rb#13805 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # 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#15772 + # source://prism//lib/prism/node.rb#13828 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28484,7 +28807,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15825 + # source://prism//lib/prism/node.rb#13853 sig { returns(T::Boolean) } def euc_jp?; end @@ -28492,7 +28815,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15810 + # source://prism//lib/prism/node.rb#13838 sig { returns(T::Boolean) } def extended?; end @@ -28503,7 +28826,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15850 + # source://prism//lib/prism/node.rb#13878 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -28511,7 +28834,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15855 + # source://prism//lib/prism/node.rb#13883 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -28519,7 +28842,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15845 + # source://prism//lib/prism/node.rb#13873 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -28527,13 +28850,13 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15805 + # source://prism//lib/prism/node.rb#13833 sig { returns(T::Boolean) } def ignore_case?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#15875 + # source://prism//lib/prism/node.rb#13927 sig { override.returns(String) } def inspect; end @@ -28541,7 +28864,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15815 + # source://prism//lib/prism/node.rb#13843 sig { returns(T::Boolean) } def multi_line?; end @@ -28549,47 +28872,34 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15820 + # source://prism//lib/prism/node.rb#13848 sig { returns(T::Boolean) } def once?; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#15860 + # source://prism//lib/prism/node.rb#13912 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#15781 + # source://prism//lib/prism/node.rb#13888 sig { returns(Prism::Location) } def opening_loc; end sig { returns(Integer) } def options; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#15893 + # source://prism//lib/prism/node.rb#13932 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#15802 + # source://prism//lib/prism/node.rb#13909 sig { returns(String) } def unescaped; end @@ -28597,7 +28907,7 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15840 + # source://prism//lib/prism/node.rb#13868 sig { returns(T::Boolean) } def utf_8?; end @@ -28605,27 +28915,14 @@ class Prism::RegularExpressionNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15835 + # source://prism//lib/prism/node.rb#13863 sig { returns(T::Boolean) } def windows_31j?; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15777 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#15903 + # source://prism//lib/prism/node.rb#13937 def type; end end end @@ -28645,77 +28942,79 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#15924 +# source://prism//lib/prism/node.rb#13958 class Prism::RequiredKeywordParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location name_loc, Location location) -> void + # Initialize a new RequiredKeywordParameterNode node. # # @return [RequiredKeywordParameterNode] a new instance of RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#15926 + # source://prism//lib/prism/node.rb#13960 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc); 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#16021 + # source://prism//lib/prism/node.rb#14034 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#15935 + # source://prism//lib/prism/node.rb#13970 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15940 + # source://prism//lib/prism/node.rb#13975 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#15950 + # source://prism//lib/prism/node.rb#13985 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#15945 + # source://prism//lib/prism/node.rb#13980 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?name_loc: Location, ?location: Location) -> RequiredKeywordParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol, ?name_loc: Location) -> RequiredKeywordParameterNode # - # source://prism//lib/prism/node.rb#15955 + # source://prism//lib/prism/node.rb#13990 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: Symbol, - name_loc: Prism::Location, - location: Prism::Location + name_loc: Prism::Location ).returns(Prism::RequiredKeywordParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#15940 + # source://prism//lib/prism/node.rb#13975 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, name_loc: Location, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol, name_loc: Location } # - # source://prism//lib/prism/node.rb#15963 + # source://prism//lib/prism/node.rb#13998 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28724,19 +29023,19 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#15987 + # source://prism//lib/prism/node.rb#14018 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#15972 + # source://prism//lib/prism/node.rb#14008 sig { returns(Symbol) } def name; end # attr_reader name_loc: Location # - # source://prism//lib/prism/node.rb#15975 + # source://prism//lib/prism/node.rb#14011 sig { returns(Prism::Location) } def name_loc; end @@ -28744,46 +29043,20 @@ class Prism::RequiredKeywordParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#15982 + # source://prism//lib/prism/node.rb#14003 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16005 + # source://prism//lib/prism/node.rb#14023 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#15968 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16015 + # source://prism//lib/prism/node.rb#14028 def type; end end end @@ -28794,62 +29067,69 @@ end # ^ # end # -# source://prism//lib/prism/node.rb#16034 +# source://prism//lib/prism/node.rb#14047 class Prism::RequiredParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol name, Location location) -> void + # Initialize a new RequiredParameterNode node. # # @return [RequiredParameterNode] a new instance of RequiredParameterNode # - # source://prism//lib/prism/node.rb#16036 - sig { params(source: Prism::Source, flags: Integer, name: Symbol, location: Prism::Location).void } - def initialize(source, flags, name, location); end + # source://prism//lib/prism/node.rb#14049 + 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#16123 + # source://prism//lib/prism/node.rb#14115 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16044 + # source://prism//lib/prism/node.rb#14058 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16049 + # source://prism//lib/prism/node.rb#14063 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#16059 + # source://prism//lib/prism/node.rb#14073 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#16054 + # source://prism//lib/prism/node.rb#14068 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol, ?location: Location) -> RequiredParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol) -> RequiredParameterNode # - # source://prism//lib/prism/node.rb#16064 - sig { params(flags: Integer, name: Symbol, location: Prism::Location).returns(Prism::RequiredParameterNode) } - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14078 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16049 + # source://prism//lib/prism/node.rb#14063 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, name: Symbol } # - # source://prism//lib/prism/node.rb#16072 + # source://prism//lib/prism/node.rb#14086 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -28858,13 +29138,13 @@ class Prism::RequiredParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16089 + # source://prism//lib/prism/node.rb#14099 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol # - # source://prism//lib/prism/node.rb#16081 + # source://prism//lib/prism/node.rb#14096 sig { returns(Symbol) } def name; end @@ -28872,46 +29152,20 @@ class Prism::RequiredParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16084 + # source://prism//lib/prism/node.rb#14091 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16107 + # source://prism//lib/prism/node.rb#14104 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16077 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16117 + # source://prism//lib/prism/node.rb#14109 def type; end end end @@ -28921,83 +29175,87 @@ end # foo rescue nil # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16134 +# source://prism//lib/prism/node.rb#14126 class Prism::RescueModifierNode < ::Prism::Node - # def initialize: (Prism::node expression, Location keyword_loc, Prism::node rescue_expression, Location location) -> void + # Initialize a new RescueModifierNode node. # # @return [RescueModifierNode] a new instance of RescueModifierNode # - # source://prism//lib/prism/node.rb#16136 + # source://prism//lib/prism/node.rb#14128 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, keyword_loc: Prism::Location, - rescue_expression: Prism::Node, - location: Prism::Location + rescue_expression: Prism::Node ).void end - def initialize(source, expression, keyword_loc, rescue_expression, location); end + def initialize(source, node_id, location, flags, expression, keyword_loc, rescue_expression); 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#16230 + # source://prism//lib/prism/node.rb#14206 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16145 + # source://prism//lib/prism/node.rb#14139 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16150 + # source://prism//lib/prism/node.rb#14144 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#16160 + # source://prism//lib/prism/node.rb#14154 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#16155 + # source://prism//lib/prism/node.rb#14149 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?expression: Prism::node, ?keyword_loc: Location, ?rescue_expression: Prism::node, ?location: Location) -> RescueModifierNode + # 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#16165 + # source://prism//lib/prism/node.rb#14159 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, expression: Prism::Node, keyword_loc: Prism::Location, - rescue_expression: Prism::Node, - location: Prism::Location + rescue_expression: Prism::Node ).returns(Prism::RescueModifierNode) end - def copy(expression: T.unsafe(nil), keyword_loc: T.unsafe(nil), rescue_expression: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16150 + # source://prism//lib/prism/node.rb#14144 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { expression: Prism::node, keyword_loc: Location, rescue_expression: Prism::node, location: Location } + # 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#16173 + # source://prism//lib/prism/node.rb#14167 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16178 + # source://prism//lib/prism/node.rb#14172 sig { returns(Prism::Node) } def expression; end @@ -29006,59 +29264,41 @@ class Prism::RescueModifierNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16196 + # source://prism//lib/prism/node.rb#14190 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16191 + # source://prism//lib/prism/node.rb#14185 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16181 + # source://prism//lib/prism/node.rb#14175 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#115 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader rescue_expression: Prism::node # - # source://prism//lib/prism/node.rb#16188 + # source://prism//lib/prism/node.rb#14182 sig { returns(Prism::Node) } def rescue_expression; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16214 + # source://prism//lib/prism/node.rb#14195 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16224 + # source://prism//lib/prism/node.rb#14200 def type; end end end @@ -29071,97 +29311,101 @@ end # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ # end # -# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `exception` field. +# `Foo, *splat, Bar` are in the `exceptions` field. `ex` is in the `reference` field. # -# source://prism//lib/prism/node.rb#16247 +# source://prism//lib/prism/node.rb#14223 class Prism::RescueNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Prism::node] exceptions, Location? operator_loc, Prism::node? reference, StatementsNode? statements, RescueNode? consequent, Location location) -> void + # Initialize a new RescueNode node. # # @return [RescueNode] a new instance of RescueNode # - # source://prism//lib/prism/node.rb#16249 + # source://prism//lib/prism/node.rb#14225 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, exceptions: T::Array[Prism::Node], operator_loc: T.nilable(Prism::Location), - reference: T.nilable(Prism::Node), + reference: 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)), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::RescueNode), - location: Prism::Location + subsequent: T.nilable(Prism::RescueNode) ).void end - def initialize(source, keyword_loc, exceptions, operator_loc, reference, statements, consequent, location); end + def initialize(source, node_id, location, flags, keyword_loc, exceptions, operator_loc, reference, statements, subsequent); 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#16375 + # source://prism//lib/prism/node.rb#14335 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16261 + # source://prism//lib/prism/node.rb#14239 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16266 + # source://prism//lib/prism/node.rb#14244 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#16281 + # source://prism//lib/prism/node.rb#14259 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#16271 + # source://prism//lib/prism/node.rb#14249 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # attr_reader consequent: RescueNode? + # Returns the subsequent rescue clause of the rescue node. This method is + # deprecated in favor of #subsequent. # - # source://prism//lib/prism/node.rb#16328 - sig { returns(T.nilable(Prism::RescueNode)) } + # source://prism//lib/prism/node_ext.rb#494 def consequent; end - # def copy: (?keyword_loc: Location, ?exceptions: Array[Prism::node], ?operator_loc: Location?, ?reference: Prism::node?, ?statements: StatementsNode?, ?consequent: RescueNode?, ?location: Location) -> RescueNode + # 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, ?statements: StatementsNode?, ?subsequent: RescueNode?) -> RescueNode # - # source://prism//lib/prism/node.rb#16286 + # source://prism//lib/prism/node.rb#14264 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, exceptions: T::Array[Prism::Node], operator_loc: T.nilable(Prism::Location), - reference: T.nilable(Prism::Node), + reference: 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)), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::RescueNode), - location: Prism::Location + subsequent: T.nilable(Prism::RescueNode) ).returns(Prism::RescueNode) end - def copy(keyword_loc: T.unsafe(nil), exceptions: T.unsafe(nil), operator_loc: T.unsafe(nil), reference: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); 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), statements: T.unsafe(nil), subsequent: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16266 + # source://prism//lib/prism/node.rb#14244 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, exceptions: Array[Prism::node], operator_loc: Location?, reference: Prism::node?, statements: StatementsNode?, consequent: RescueNode?, location: Location } + # 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, statements: StatementsNode?, subsequent: RescueNode? } # - # source://prism//lib/prism/node.rb#16294 + # source://prism//lib/prism/node.rb#14272 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader exceptions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#16306 + # source://prism//lib/prism/node.rb#14284 sig { returns(T::Array[Prism::Node]) } def exceptions; end @@ -29170,74 +29414,64 @@ class Prism::RescueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16341 + # source://prism//lib/prism/node.rb#14319 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16331 + # source://prism//lib/prism/node.rb#14309 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16299 + # source://prism//lib/prism/node.rb#14277 sig { returns(Prism::Location) } def keyword_loc; end # def operator: () -> String? # - # source://prism//lib/prism/node.rb#16336 + # source://prism//lib/prism/node.rb#14314 sig { returns(T.nilable(String)) } def operator; end # attr_reader operator_loc: Location? # - # source://prism//lib/prism/node.rb#16309 + # source://prism//lib/prism/node.rb#14287 sig { returns(T.nilable(Prism::Location)) } def operator_loc; end - # attr_reader reference: Prism::node? + # attr_reader reference: LocalVariableTargetNode | InstanceVariableTargetNode | ClassVariableTargetNode | GlobalVariableTargetNode | ConstantTargetNode | ConstantPathTargetNode | CallTargetNode | IndexTargetNode | BackReferenceReadNode | NumberedReferenceReadNode | MissingNode | nil # - # source://prism//lib/prism/node.rb#16322 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#14300 + 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 def reference; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#16325 + # source://prism//lib/prism/node.rb#14303 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # attr_reader subsequent: RescueNode? # - # def type: () -> Symbol + # source://prism//lib/prism/node.rb#14306 + sig { returns(T.nilable(Prism::RescueNode)) } + def subsequent; end + + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16359 + # source://prism//lib/prism/node.rb#14324 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16369 + # source://prism//lib/prism/node.rb#14329 def type; end end end @@ -29248,79 +29482,81 @@ end # ^^ # end # -# source://prism//lib/prism/node.rb#16392 +# source://prism//lib/prism/node.rb#14352 class Prism::RestParameterNode < ::Prism::Node - # def initialize: (Integer flags, Symbol? name, Location? name_loc, Location operator_loc, Location location) -> void + # Initialize a new RestParameterNode node. # # @return [RestParameterNode] a new instance of RestParameterNode # - # source://prism//lib/prism/node.rb#16394 + # source://prism//lib/prism/node.rb#14354 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).void end - def initialize(source, flags, name, name_loc, operator_loc, location); end + def initialize(source, node_id, location, flags, name, name_loc, operator_loc); 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#16508 + # source://prism//lib/prism/node.rb#14447 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16404 + # source://prism//lib/prism/node.rb#14365 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16409 + # source://prism//lib/prism/node.rb#14370 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#16419 + # source://prism//lib/prism/node.rb#14380 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#16414 + # source://prism//lib/prism/node.rb#14375 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location, ?location: Location) -> RestParameterNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?name: Symbol?, ?name_loc: Location?, ?operator_loc: Location) -> RestParameterNode # - # source://prism//lib/prism/node.rb#16424 + # source://prism//lib/prism/node.rb#14385 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, name: T.nilable(Symbol), name_loc: T.nilable(Prism::Location), - operator_loc: Prism::Location, - location: Prism::Location + operator_loc: Prism::Location ).returns(Prism::RestParameterNode) end - def copy(flags: T.unsafe(nil), name: T.unsafe(nil), name_loc: T.unsafe(nil), operator_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16409 + # source://prism//lib/prism/node.rb#14370 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, name: Symbol?, name_loc: Location?, operator_loc: Location, location: Location } + # 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#16432 + # source://prism//lib/prism/node.rb#14393 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29329,31 +29565,31 @@ class Prism::RestParameterNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16474 + # source://prism//lib/prism/node.rb#14431 sig { override.returns(String) } def inspect; end # attr_reader name: Symbol? # - # source://prism//lib/prism/node.rb#16441 + # source://prism//lib/prism/node.rb#14403 sig { returns(T.nilable(Symbol)) } def name; end # attr_reader name_loc: Location? # - # source://prism//lib/prism/node.rb#16444 + # source://prism//lib/prism/node.rb#14406 sig { returns(T.nilable(Prism::Location)) } def name_loc; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#16469 + # source://prism//lib/prism/node.rb#14426 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16457 + # source://prism//lib/prism/node.rb#14419 sig { returns(Prism::Location) } def operator_loc; end @@ -29361,46 +29597,20 @@ class Prism::RestParameterNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16464 + # source://prism//lib/prism/node.rb#14398 sig { returns(T::Boolean) } def repeated_parameter?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16492 + # source://prism//lib/prism/node.rb#14436 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16437 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16502 + # source://prism//lib/prism/node.rb#14441 def type; end end end @@ -29409,13 +29619,13 @@ end # the requested structure, any comments that were encounters, and any errors # that were encountered. # -# source://prism//lib/prism/parse_result.rb#521 +# source://prism//lib/prism/parse_result.rb#662 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#543 + # source://prism//lib/prism/parse_result.rb#684 sig do params( comments: T::Array[Prism::Comment], @@ -29428,9 +29638,19 @@ class Prism::Result end def initialize(comments, magic_comments, data_loc, errors, warnings, source); end + # Create a code units cache for the given encoding. + # + # source://prism//lib/prism/parse_result.rb#716 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # The list of comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#523 + # source://prism//lib/prism/parse_result.rb#664 sig { returns(T::Array[Prism::Comment]) } def comments; end @@ -29438,25 +29658,25 @@ 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#531 + # source://prism//lib/prism/parse_result.rb#672 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#553 + # source://prism//lib/prism/parse_result.rb#694 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#558 + # source://prism//lib/prism/parse_result.rb#699 sig { returns(Encoding) } def encoding; end # The list of errors that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#534 + # source://prism//lib/prism/parse_result.rb#675 sig { returns(T::Array[Prism::ParseError]) } def errors; end @@ -29465,19 +29685,19 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#570 + # source://prism//lib/prism/parse_result.rb#711 sig { returns(T::Boolean) } def failure?; end # The list of magic comments that were encountered during parsing. # - # source://prism//lib/prism/parse_result.rb#526 + # source://prism//lib/prism/parse_result.rb#667 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#540 + # source://prism//lib/prism/parse_result.rb#681 sig { returns(Prism::Source) } def source; end @@ -29486,13 +29706,13 @@ class Prism::Result # # @return [Boolean] # - # source://prism//lib/prism/parse_result.rb#564 + # source://prism//lib/prism/parse_result.rb#705 sig { returns(T::Boolean) } def success?; end # The list of warnings that were generated during parsing. # - # source://prism//lib/prism/parse_result.rb#537 + # source://prism//lib/prism/parse_result.rb#678 sig { returns(T::Array[Prism::ParseWarning]) } def warnings; end end @@ -29502,62 +29722,62 @@ end # retry # ^^^^^ # -# source://prism//lib/prism/node.rb#16521 +# source://prism//lib/prism/node.rb#14460 class Prism::RetryNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new RetryNode node. # # @return [RetryNode] a new instance of RetryNode # - # source://prism//lib/prism/node.rb#16523 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#14462 + 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#16596 + # source://prism//lib/prism/node.rb#14519 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16529 + # source://prism//lib/prism/node.rb#14470 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16534 + # source://prism//lib/prism/node.rb#14475 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#16544 + # source://prism//lib/prism/node.rb#14485 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#16539 + # source://prism//lib/prism/node.rb#14480 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> RetryNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> RetryNode # - # source://prism//lib/prism/node.rb#16549 - sig { params(location: Prism::Location).returns(Prism::RetryNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14490 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16534 + # source://prism//lib/prism/node.rb#14475 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16557 + # source://prism//lib/prism/node.rb#14498 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29566,38 +29786,20 @@ class Prism::RetryNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16562 + # source://prism//lib/prism/node.rb#14503 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16580 + # source://prism//lib/prism/node.rb#14508 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16590 + # source://prism//lib/prism/node.rb#14513 def type; end end end @@ -29607,83 +29809,85 @@ end # return 1 # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#16605 +# source://prism//lib/prism/node.rb#14528 class Prism::ReturnNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, ArgumentsNode? arguments, Location location) -> void + # Initialize a new ReturnNode node. # # @return [ReturnNode] a new instance of ReturnNode # - # source://prism//lib/prism/node.rb#16607 + # source://prism//lib/prism/node.rb#14530 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - location: Prism::Location + arguments: T.nilable(Prism::ArgumentsNode) ).void end - def initialize(source, flags, keyword_loc, arguments, location); end + def initialize(source, node_id, location, flags, keyword_loc, arguments); 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#16709 + # source://prism//lib/prism/node.rb#14606 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16616 + # source://prism//lib/prism/node.rb#14540 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#16662 + # source://prism//lib/prism/node.rb#14582 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16621 + # source://prism//lib/prism/node.rb#14545 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#16633 + # source://prism//lib/prism/node.rb#14557 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#16626 + # source://prism//lib/prism/node.rb#14550 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?, ?location: Location) -> ReturnNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?arguments: ArgumentsNode?) -> ReturnNode # - # source://prism//lib/prism/node.rb#16638 + # source://prism//lib/prism/node.rb#14562 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, - arguments: T.nilable(Prism::ArgumentsNode), - location: Prism::Location + arguments: T.nilable(Prism::ArgumentsNode) ).returns(Prism::ReturnNode) end - def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16621 + # source://prism//lib/prism/node.rb#14545 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, arguments: ArgumentsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, arguments: ArgumentsNode? } # - # source://prism//lib/prism/node.rb#16646 + # source://prism//lib/prism/node.rb#14570 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29692,141 +29896,97 @@ class Prism::ReturnNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16675 + # source://prism//lib/prism/node.rb#14590 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#16670 + # source://prism//lib/prism/node.rb#14585 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#16655 + # source://prism//lib/prism/node.rb#14575 sig { returns(Prism::Location) } def keyword_loc; end - # def redundant?: () -> bool + # Return a symbol representation of this node type. See `Node#type`. # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#16665 - sig { returns(T::Boolean) } - def redundant?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16693 + # source://prism//lib/prism/node.rb#14595 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16651 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16703 + # source://prism//lib/prism/node.rb#14600 def type; end end end -# Flags for return nodes. -# -# source://prism//lib/prism/node.rb#19250 -module Prism::ReturnNodeFlags; end - -# a return statement that is redundant because it is the last statement in a method -# -# source://prism//lib/prism/node.rb#19252 -Prism::ReturnNodeFlags::REDUNDANT = T.let(T.unsafe(nil), Integer) - # Represents the `self` keyword. # # self # ^^^^ # -# source://prism//lib/prism/node.rb#16721 +# source://prism//lib/prism/node.rb#14617 class Prism::SelfNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new SelfNode node. # # @return [SelfNode] a new instance of SelfNode # - # source://prism//lib/prism/node.rb#16723 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#14619 + 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#16796 + # source://prism//lib/prism/node.rb#14676 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16729 + # source://prism//lib/prism/node.rb#14627 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16734 + # source://prism//lib/prism/node.rb#14632 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#16744 + # source://prism//lib/prism/node.rb#14642 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#16739 + # source://prism//lib/prism/node.rb#14637 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> SelfNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SelfNode # - # source://prism//lib/prism/node.rb#16749 - sig { params(location: Prism::Location).returns(Prism::SelfNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14647 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16734 + # source://prism//lib/prism/node.rb#14632 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#16757 + # source://prism//lib/prism/node.rb#14655 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -29835,38 +29995,20 @@ class Prism::SelfNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16762 + # source://prism//lib/prism/node.rb#14660 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#16780 + # source://prism//lib/prism/node.rb#14665 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16790 + # source://prism//lib/prism/node.rb#14670 def type; end end end @@ -29884,154 +30026,154 @@ module Prism::Serialize # Deserialize the tokens represented by the given string into a parse # result. # - # source://prism//lib/prism/serialize.rb#40 + # source://prism//lib/prism/serialize.rb#51 def load_tokens(source, serialized); end end end -# source://prism//lib/prism/serialize.rb#44 +# source://prism//lib/prism/serialize.rb#55 class Prism::Serialize::Loader # @return [Loader] a new instance of Loader # - # source://prism//lib/prism/serialize.rb#80 + # source://prism//lib/prism/serialize.rb#91 def initialize(source, serialized); end # Returns the value of attribute constant_pool. # - # source://prism//lib/prism/serialize.rb#77 + # source://prism//lib/prism/serialize.rb#88 def constant_pool; end # Returns the value of attribute constant_pool_offset. # - # source://prism//lib/prism/serialize.rb#77 + # source://prism//lib/prism/serialize.rb#88 def constant_pool_offset; end # Returns the value of attribute encoding. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def encoding; end # Returns the value of attribute input. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def input; end # Returns the value of attribute io. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def io; end - # source://prism//lib/prism/serialize.rb#118 + # source://prism//lib/prism/serialize.rb#129 def load_comments; end - # source://prism//lib/prism/serialize.rb#104 + # source://prism//lib/prism/serialize.rb#115 def load_encoding; end - # source://prism//lib/prism/serialize.rb#95 + # source://prism//lib/prism/serialize.rb#106 def load_header; end - # source://prism//lib/prism/serialize.rb#114 + # source://prism//lib/prism/serialize.rb#125 def load_line_offsets; end - # source://prism//lib/prism/serialize.rb#438 + # source://prism//lib/prism/serialize.rb#462 def load_metadata; end - # source://prism//lib/prism/serialize.rb#472 + # source://prism//lib/prism/serialize.rb#496 def load_nodes; end - # source://prism//lib/prism/serialize.rb#486 + # source://prism//lib/prism/serialize.rb#510 def load_result; end - # source://prism//lib/prism/serialize.rb#110 + # source://prism//lib/prism/serialize.rb#121 def load_start_line; end - # source://prism//lib/prism/serialize.rb#447 + # source://prism//lib/prism/serialize.rb#471 def load_tokens; end - # source://prism//lib/prism/serialize.rb#460 + # source://prism//lib/prism/serialize.rb#484 def load_tokens_result; end # Returns the value of attribute serialized. # - # source://prism//lib/prism/serialize.rb#76 + # source://prism//lib/prism/serialize.rb#87 def serialized; end # Returns the value of attribute source. # - # source://prism//lib/prism/serialize.rb#77 + # source://prism//lib/prism/serialize.rb#88 def source; end # Returns the value of attribute start_line. # - # source://prism//lib/prism/serialize.rb#78 + # source://prism//lib/prism/serialize.rb#89 def start_line; end private - # source://prism//lib/prism/serialize.rb#572 + # source://prism//lib/prism/serialize.rb#596 def load_constant(index); end - # source://prism//lib/prism/serialize.rb#525 + # source://prism//lib/prism/serialize.rb#549 def load_double; end - # source://prism//lib/prism/serialize.rb#540 + # source://prism//lib/prism/serialize.rb#564 def load_embedded_string; end - # source://prism//lib/prism/serialize.rb#602 + # source://prism//lib/prism/serialize.rb#626 def load_error_level; end - # source://prism//lib/prism/serialize.rb#514 + # source://prism//lib/prism/serialize.rb#538 def load_integer; end - # source://prism//lib/prism/serialize.rb#556 + # source://prism//lib/prism/serialize.rb#580 def load_location; end - # source://prism//lib/prism/serialize.rb#560 + # source://prism//lib/prism/serialize.rb#584 def load_location_object; end - # source://prism//lib/prism/serialize.rb#631 + # source://prism//lib/prism/serialize.rb#655 def load_node; end - # source://prism//lib/prism/serialize.rb#597 + # source://prism//lib/prism/serialize.rb#621 def load_optional_constant; end - # source://prism//lib/prism/serialize.rb#564 + # source://prism//lib/prism/serialize.rb#588 def load_optional_location; end - # source://prism//lib/prism/serialize.rb#568 + # source://prism//lib/prism/serialize.rb#592 def load_optional_location_object; end - # source://prism//lib/prism/serialize.rb#533 + # source://prism//lib/prism/serialize.rb#557 def load_optional_node; end - # source://prism//lib/prism/serialize.rb#593 + # source://prism//lib/prism/serialize.rb#617 def load_required_constant; end - # source://prism//lib/prism/serialize.rb#544 + # source://prism//lib/prism/serialize.rb#568 def load_string; end - # source://prism//lib/prism/serialize.rb#529 + # source://prism//lib/prism/serialize.rb#553 def load_uint32; end - # source://prism//lib/prism/serialize.rb#509 + # source://prism//lib/prism/serialize.rb#533 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#495 + # source://prism//lib/prism/serialize.rb#519 def load_varuint; end - # source://prism//lib/prism/serialize.rb#617 + # source://prism//lib/prism/serialize.rb#641 def load_warning_level; end end -# source://prism//lib/prism/serialize.rb#127 +# source://prism//lib/prism/serialize.rb#138 Prism::Serialize::Loader::DIAGNOSTIC_TYPES = T.let(T.unsafe(nil), Array) # StringIO is synchronized and that adds a high overhead on TruffleRuby. # -# source://prism//lib/prism/serialize.rb#72 +# source://prism//lib/prism/serialize.rb#83 Prism::Serialize::Loader::FastStringIO = StringIO # The major version of prism that we are expecting to find in the serialized @@ -30054,7 +30196,7 @@ 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#1863 +# source://prism//lib/prism/serialize.rb#1737 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. @@ -30062,75 +30204,77 @@ Prism::Serialize::TOKEN_TYPES = T.let(T.unsafe(nil), Array) # C = { a: 1 } # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16806 +# source://prism//lib/prism/node.rb#14686 class Prism::ShareableConstantNode < ::Prism::Node - # def initialize: (Integer flags, ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode write, Location location) -> void + # Initialize a new ShareableConstantNode node. # # @return [ShareableConstantNode] a new instance of ShareableConstantNode # - # source://prism//lib/prism/node.rb#16808 + # source://prism//lib/prism/node.rb#14688 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), - location: Prism::Location + write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode) ).void end - def initialize(source, flags, write, location); end + def initialize(source, node_id, location, flags, write); 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#16905 + # source://prism//lib/prism/node.rb#14764 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16816 + # source://prism//lib/prism/node.rb#14697 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16821 + # source://prism//lib/prism/node.rb#14702 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#16831 + # source://prism//lib/prism/node.rb#14712 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#16826 + # source://prism//lib/prism/node.rb#14707 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, ?location: Location) -> ShareableConstantNode + # 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#16836 + # source://prism//lib/prism/node.rb#14717 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, - write: T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode), - location: Prism::Location + 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(flags: T.unsafe(nil), write: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), write: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16821 + # source://prism//lib/prism/node.rb#14702 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, write: ConstantWriteNode | ConstantAndWriteNode | ConstantOrWriteNode | ConstantOperatorWriteNode | ConstantPathWriteNode | ConstantPathAndWriteNode | ConstantPathOrWriteNode | ConstantPathOperatorWriteNode, location: Location } + # 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#16844 + # source://prism//lib/prism/node.rb#14725 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30138,7 +30282,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16866 + # source://prism//lib/prism/node.rb#14740 sig { returns(T::Boolean) } def experimental_copy?; end @@ -30146,7 +30290,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16861 + # source://prism//lib/prism/node.rb#14735 sig { returns(T::Boolean) } def experimental_everything?; end @@ -30155,7 +30299,7 @@ class Prism::ShareableConstantNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#16871 + # source://prism//lib/prism/node.rb#14748 sig { override.returns(String) } def inspect; end @@ -30163,76 +30307,50 @@ class Prism::ShareableConstantNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#16856 + # source://prism//lib/prism/node.rb#14730 sig { returns(T::Boolean) } def literal?; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#16889 + # source://prism//lib/prism/node.rb#14753 sig { override.returns(Symbol) } def type; end # The constant write that should be modified with the shareability state. # - # source://prism//lib/prism/node.rb#16853 + # source://prism//lib/prism/node.rb#14745 sig do returns(T.any(Prism::ConstantWriteNode, Prism::ConstantAndWriteNode, Prism::ConstantOrWriteNode, Prism::ConstantOperatorWriteNode, Prism::ConstantPathWriteNode, Prism::ConstantPathAndWriteNode, Prism::ConstantPathOrWriteNode, Prism::ConstantPathOperatorWriteNode)) end def write; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#16849 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#16899 + # source://prism//lib/prism/node.rb#14758 def type; end end end # Flags for shareable constant nodes. # -# source://prism//lib/prism/node.rb#19256 +# source://prism//lib/prism/node.rb#16816 module Prism::ShareableConstantNodeFlags; end # constant writes that should be modified with shareable constant value experimental copy # -# source://prism//lib/prism/node.rb#19264 +# source://prism//lib/prism/node.rb#16824 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#19261 +# source://prism//lib/prism/node.rb#16821 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#19258 +# source://prism//lib/prism/node.rb#16818 Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # Represents a singleton class declaration involving the `class` keyword. @@ -30240,119 +30358,123 @@ Prism::ShareableConstantNodeFlags::LITERAL = T.let(T.unsafe(nil), Integer) # class << self end # ^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#16916 +# source://prism//lib/prism/node.rb#14775 class Prism::SingletonClassNode < ::Prism::Node - # def initialize: (Array[Symbol] locals, Location class_keyword_loc, Location operator_loc, Prism::node expression, Prism::node? body, Location end_keyword_loc, Location location) -> void + # Initialize a new SingletonClassNode node. # # @return [SingletonClassNode] a new instance of SingletonClassNode # - # source://prism//lib/prism/node.rb#16918 + # source://prism//lib/prism/node.rb#14777 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, operator_loc: Prism::Location, expression: Prism::Node, - body: T.nilable(Prism::Node), - end_keyword_loc: Prism::Location, - location: Prism::Location + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location ).void end - def initialize(source, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, locals, class_keyword_loc, operator_loc, expression, body, end_keyword_loc); 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#17045 + # source://prism//lib/prism/node.rb#14888 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#16930 + # source://prism//lib/prism/node.rb#14791 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end - # attr_reader body: Prism::node? + # attr_reader body: StatementsNode | BeginNode | nil # - # source://prism//lib/prism/node.rb#16986 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#14847 + sig { returns(T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode))) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16935 + # source://prism//lib/prism/node.rb#14796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def class_keyword: () -> String # - # source://prism//lib/prism/node.rb#16996 + # source://prism//lib/prism/node.rb#14857 sig { returns(String) } def class_keyword; end # attr_reader class_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16969 + # source://prism//lib/prism/node.rb#14830 sig { returns(Prism::Location) } def class_keyword_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#16948 + # source://prism//lib/prism/node.rb#14809 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#16940 + # source://prism//lib/prism/node.rb#14801 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?locals: Array[Symbol], ?class_keyword_loc: Location, ?operator_loc: Location, ?expression: Prism::node, ?body: Prism::node?, ?end_keyword_loc: Location, ?location: Location) -> SingletonClassNode + # 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#16953 + # source://prism//lib/prism/node.rb#14814 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, locals: T::Array[Symbol], class_keyword_loc: Prism::Location, operator_loc: Prism::Location, expression: Prism::Node, - body: T.nilable(Prism::Node), - end_keyword_loc: Prism::Location, - location: Prism::Location + body: T.nilable(T.any(Prism::StatementsNode, Prism::BeginNode)), + end_keyword_loc: Prism::Location ).returns(Prism::SingletonClassNode) end - def copy(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), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#16935 + # source://prism//lib/prism/node.rb#14796 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { locals: Array[Symbol], class_keyword_loc: Location, operator_loc: Location, expression: Prism::node, body: Prism::node?, end_keyword_loc: Location, location: Location } + # 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#16961 + # source://prism//lib/prism/node.rb#14822 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # def end_keyword: () -> String # - # source://prism//lib/prism/node.rb#17006 + # source://prism//lib/prism/node.rb#14867 sig { returns(String) } def end_keyword; end # attr_reader end_keyword_loc: Location # - # source://prism//lib/prism/node.rb#16989 + # source://prism//lib/prism/node.rb#14850 sig { returns(Prism::Location) } def end_keyword_loc; end # attr_reader expression: Prism::node # - # source://prism//lib/prism/node.rb#16983 + # source://prism//lib/prism/node.rb#14844 sig { returns(Prism::Node) } def expression; end @@ -30361,56 +30483,38 @@ class Prism::SingletonClassNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17011 + # source://prism//lib/prism/node.rb#14872 sig { override.returns(String) } def inspect; end # attr_reader locals: Array[Symbol] # - # source://prism//lib/prism/node.rb#16966 + # source://prism//lib/prism/node.rb#14827 sig { returns(T::Array[Symbol]) } def locals; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17001 + # source://prism//lib/prism/node.rb#14862 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#16976 + # source://prism//lib/prism/node.rb#14837 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17029 + # source://prism//lib/prism/node.rb#14877 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17039 + # source://prism//lib/prism/node.rb#14882 def type; end end end @@ -30425,26 +30529,37 @@ class Prism::Source # # @return [Source] a new instance of Source # - # source://prism//lib/prism/parse_result.rb#26 + # source://prism//lib/prism/parse_result.rb#45 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 # Return the column number in characters for the given byte offset. # - # source://prism//lib/prism/parse_result.rb#78 + # source://prism//lib/prism/parse_result.rb#97 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#73 + # source://prism//lib/prism/parse_result.rb#92 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#125 + sig do + params( + encoding: Encoding + ).returns(T.any(Prism::CodeUnitsCache, T.proc.params(byte_offset: Integer).returns(Integer))) + end + def code_units_cache(encoding); end + # Returns the column number in code units for the given encoding for the # given byte offset. # - # source://prism//lib/prism/parse_result.rb#95 + # source://prism//lib/prism/parse_result.rb#131 sig { params(byte_offset: Integer, encoding: Encoding).returns(Integer) } def code_units_column(byte_offset, encoding); end @@ -30455,71 +30570,77 @@ class 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#88 + # We purposefully replace invalid and undefined characters with replacement + # characters in this conversion. This happens for two reasons. First, it's + # possible that the given byte offset will not occur on a character + # 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#113 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#68 + # source://prism//lib/prism/parse_result.rb#87 sig { params(byte_offset: Integer).returns(Integer) } def column(byte_offset); 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#34 + # source://prism//lib/prism/parse_result.rb#53 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#51 + # source://prism//lib/prism/parse_result.rb#70 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#63 + # source://prism//lib/prism/parse_result.rb#82 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#57 + # source://prism//lib/prism/parse_result.rb#76 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#39 + # source://prism//lib/prism/parse_result.rb#58 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#23 + # source://prism//lib/prism/parse_result.rb#42 sig { returns(T::Array[Integer]) } def offsets; end # Perform a byteslice on the source code using the given byte offset and # byte length. # - # source://prism//lib/prism/parse_result.rb#45 + # source://prism//lib/prism/parse_result.rb#64 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#17 + # source://prism//lib/prism/parse_result.rb#36 sig { returns(String) } def source; end # The line number where this source starts. # - # source://prism//lib/prism/parse_result.rb#20 + # source://prism//lib/prism/parse_result.rb#39 sig { returns(Integer) } def start_line; end @@ -30528,7 +30649,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#103 + # source://prism//lib/prism/parse_result.rb#139 def find_line(byte_offset); end class << self @@ -30547,62 +30668,62 @@ end # __ENCODING__ # ^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17061 +# source://prism//lib/prism/node.rb#14904 class Prism::SourceEncodingNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new SourceEncodingNode node. # # @return [SourceEncodingNode] a new instance of SourceEncodingNode # - # source://prism//lib/prism/node.rb#17063 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#14906 + 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#17136 + # source://prism//lib/prism/node.rb#14963 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17069 + # source://prism//lib/prism/node.rb#14914 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17074 + # source://prism//lib/prism/node.rb#14919 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#17084 + # source://prism//lib/prism/node.rb#14929 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#17079 + # source://prism//lib/prism/node.rb#14924 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> SourceEncodingNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> SourceEncodingNode # - # source://prism//lib/prism/node.rb#17089 - sig { params(location: Prism::Location).returns(Prism::SourceEncodingNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#14934 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17074 + # source://prism//lib/prism/node.rb#14919 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#17097 + # source://prism//lib/prism/node.rb#14942 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -30611,38 +30732,20 @@ class Prism::SourceEncodingNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17102 + # source://prism//lib/prism/node.rb#14947 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17120 + # source://prism//lib/prism/node.rb#14952 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#17130 + # source://prism//lib/prism/node.rb#14957 def type; end end end @@ -30652,253 +30755,224 @@ end # __FILE__ # ^^^^^^^^ # -# source://prism//lib/prism/node.rb#17145 +# source://prism//lib/prism/node.rb#14972 class Prism::SourceFileNode < ::Prism::Node - # def initialize: (Integer flags, String filepath, Location location) -> void + # Initialize a new SourceFileNode node. # # @return [SourceFileNode] a new instance of SourceFileNode # - # source://prism//lib/prism/node.rb#17147 - sig { params(source: Prism::Source, flags: Integer, filepath: String, location: Prism::Location).void } - def initialize(source, flags, filepath, location); 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#17249 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#17155 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17160 - 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#17170 - 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#17165 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?flags: Integer, ?filepath: String, ?location: Location) -> SourceFileNode - # - # source://prism//lib/prism/node.rb#17175 - sig { params(flags: Integer, filepath: String, location: Prism::Location).returns(Prism::SourceFileNode) } - def copy(flags: T.unsafe(nil), filepath: T.unsafe(nil), location: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#17160 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, filepath: String, location: Location } - # - # source://prism//lib/prism/node.rb#17183 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); 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#17192 - sig { returns(String) } - def filepath; end - - # def forced_binary_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17200 - sig { returns(T::Boolean) } - def forced_binary_encoding?; end - - # def forced_utf8_encoding?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17195 - sig { returns(T::Boolean) } - def forced_utf8_encoding?; end - - # def frozen?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17205 - sig { returns(T::Boolean) } - def frozen?; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#17215 - sig { override.returns(String) } - def inspect; end - - # def mutable?: () -> bool - # - # @return [Boolean] - # - # source://prism//lib/prism/node.rb#17210 - sig { returns(T::Boolean) } - def mutable?; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17233 - sig { override.returns(Symbol) } - def type; end - - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#17188 - sig { returns(Integer) } - def flags; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17243 - def type; end + # source://prism//lib/prism/node.rb#14974 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + filepath: String + ).void end -end - -# Represents the use of the `__LINE__` keyword. -# -# __LINE__ -# ^^^^^^^^ -# -# source://prism//lib/prism/node.rb#17260 -class Prism::SourceLineNode < ::Prism::Node - # def initialize: (Location location) -> void - # - # @return [SourceLineNode] a new instance of SourceLineNode - # - # source://prism//lib/prism/node.rb#17262 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + def initialize(source, node_id, location, flags, filepath); 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#17335 + # source://prism//lib/prism/node.rb#15055 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17268 + # source://prism//lib/prism/node.rb#14983 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17273 + # source://prism//lib/prism/node.rb#14988 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#17283 + # source://prism//lib/prism/node.rb#14998 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#17278 + # source://prism//lib/prism/node.rb#14993 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> SourceLineNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?filepath: String) -> SourceFileNode # - # source://prism//lib/prism/node.rb#17288 - sig { params(location: Prism::Location).returns(Prism::SourceLineNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15003 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17273 + # source://prism//lib/prism/node.rb#14988 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, filepath: String } # - # source://prism//lib/prism/node.rb#17296 + # source://prism//lib/prism/node.rb#15011 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); 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#15036 + sig { returns(String) } + def filepath; end + + # def forced_binary_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15021 + sig { returns(T::Boolean) } + def forced_binary_encoding?; end + + # def forced_utf8_encoding?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15016 + sig { returns(T::Boolean) } + def forced_utf8_encoding?; end + + # def frozen?: () -> bool + # + # @return [Boolean] + # + # source://prism//lib/prism/node.rb#15026 + sig { returns(T::Boolean) } + def frozen?; end + # def inspect -> String # - # source://prism//lib/prism/node.rb#17301 + # source://prism//lib/prism/node.rb#15039 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # def mutable?: () -> bool # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # @return [Boolean] # - # def type: () -> Symbol + # source://prism//lib/prism/node.rb#15031 + sig { returns(T::Boolean) } + def mutable?; end + + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17319 + # source://prism//lib/prism/node.rb#15044 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol + # source://prism//lib/prism/node.rb#15049 + def type; end + end +end + +# Represents the use of the `__LINE__` keyword. +# +# __LINE__ +# ^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15066 +class Prism::SourceLineNode < ::Prism::Node + # Initialize a new SourceLineNode node. + # + # @return [SourceLineNode] a new instance of SourceLineNode + # + # source://prism//lib/prism/node.rb#15068 + 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#15125 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15076 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15081 + 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#15091 + 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#15086 + 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#15096 + 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 child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15081 + 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#15104 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15109 + sig { override.returns(String) } + def inspect; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15114 + 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#17329 + # source://prism//lib/prism/node.rb#15119 def type; end end end @@ -30908,81 +30982,85 @@ end # [*a] # ^^ # -# source://prism//lib/prism/node.rb#17344 +# source://prism//lib/prism/node.rb#15134 class Prism::SplatNode < ::Prism::Node - # def initialize: (Location operator_loc, Prism::node? expression, Location location) -> void + # Initialize a new SplatNode node. # # @return [SplatNode] a new instance of SplatNode # - # source://prism//lib/prism/node.rb#17346 + # source://prism//lib/prism/node.rb#15136 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - expression: T.nilable(Prism::Node), - location: Prism::Location + expression: T.nilable(Prism::Node) ).void end - def initialize(source, operator_loc, expression, location); end + def initialize(source, node_id, location, flags, operator_loc, expression); 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#17438 + # source://prism//lib/prism/node.rb#15212 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17354 + # source://prism//lib/prism/node.rb#15146 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17359 + # source://prism//lib/prism/node.rb#15151 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#17371 + # source://prism//lib/prism/node.rb#15163 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#17364 + # source://prism//lib/prism/node.rb#15156 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?operator_loc: Location, ?expression: Prism::node?, ?location: Location) -> SplatNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?operator_loc: Location, ?expression: Prism::node?) -> SplatNode # - # source://prism//lib/prism/node.rb#17376 + # source://prism//lib/prism/node.rb#15168 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, operator_loc: Prism::Location, - expression: T.nilable(Prism::Node), - location: Prism::Location + expression: T.nilable(Prism::Node) ).returns(Prism::SplatNode) end - def copy(operator_loc: T.unsafe(nil), expression: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17359 + # source://prism//lib/prism/node.rb#15151 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { operator_loc: Location, expression: Prism::node?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, operator_loc: Location, expression: Prism::node? } # - # source://prism//lib/prism/node.rb#17384 + # source://prism//lib/prism/node.rb#15176 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end # attr_reader expression: Prism::node? # - # source://prism//lib/prism/node.rb#17396 + # source://prism//lib/prism/node.rb#15188 sig { returns(T.nilable(Prism::Node)) } def expression; end @@ -30991,50 +31069,32 @@ class Prism::SplatNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17404 + # source://prism//lib/prism/node.rb#15196 sig { override.returns(String) } def inspect; end # def operator: () -> String # - # source://prism//lib/prism/node.rb#17399 + # source://prism//lib/prism/node.rb#15191 sig { returns(String) } def operator; end # attr_reader operator_loc: Location # - # source://prism//lib/prism/node.rb#17389 + # source://prism//lib/prism/node.rb#15181 sig { returns(Prism::Location) } def operator_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17422 + # source://prism//lib/prism/node.rb#15201 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17432 + # source://prism//lib/prism/node.rb#15206 def type; end end end @@ -31044,68 +31104,83 @@ end # foo; bar; baz # ^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17449 +# source://prism//lib/prism/node.rb#15223 class Prism::StatementsNode < ::Prism::Node - # def initialize: (Array[Prism::node] body, Location location) -> void + # Initialize a new StatementsNode node. # # @return [StatementsNode] a new instance of StatementsNode # - # source://prism//lib/prism/node.rb#17451 - sig { params(source: Prism::Source, body: T::Array[Prism::Node], location: Prism::Location).void } - def initialize(source, body, location); end + # source://prism//lib/prism/node.rb#15225 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + body: T::Array[Prism::Node] + ).void + end + def initialize(source, node_id, location, flags, body); 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#17528 + # source://prism//lib/prism/node.rb#15286 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17458 + # source://prism//lib/prism/node.rb#15234 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#17491 + # source://prism//lib/prism/node.rb#15267 sig { returns(T::Array[Prism::Node]) } def body; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17463 + # source://prism//lib/prism/node.rb#15239 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#17473 + # source://prism//lib/prism/node.rb#15249 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#17468 + # source://prism//lib/prism/node.rb#15244 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?body: Array[Prism::node], ?location: Location) -> StatementsNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?body: Array[Prism::node]) -> StatementsNode # - # source://prism//lib/prism/node.rb#17478 - sig { params(body: T::Array[Prism::Node], location: Prism::Location).returns(Prism::StatementsNode) } - def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15254 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17463 + # source://prism//lib/prism/node.rb#15239 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { body: Array[Prism::node], location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, body: Array[Prism::node] } # - # source://prism//lib/prism/node.rb#17486 + # source://prism//lib/prism/node.rb#15262 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31114,61 +31189,43 @@ class Prism::StatementsNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17494 + # source://prism//lib/prism/node.rb#15270 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17512 + # source://prism//lib/prism/node.rb#15275 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17522 + # source://prism//lib/prism/node.rb#15280 def type; end end end # Flags for string nodes. # -# source://prism//lib/prism/node.rb#19268 +# source://prism//lib/prism/node.rb#16828 module Prism::StringFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19273 +# source://prism//lib/prism/node.rb#16833 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#19270 +# source://prism//lib/prism/node.rb#16830 Prism::StringFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19276 +# source://prism//lib/prism/node.rb#16836 Prism::StringFlags::FROZEN = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/node.rb#19279 +# source://prism//lib/prism/node.rb#16839 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. @@ -31182,107 +31239,109 @@ Prism::StringFlags::MUTABLE = T.let(T.unsafe(nil), Integer) # "foo #{bar} baz" # ^^^^ ^^^^ # -# source://prism//lib/prism/node.rb#17545 +# source://prism//lib/prism/node.rb#15303 class Prism::StringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Integer flags, Location? opening_loc, Location content_loc, Location? closing_loc, String unescaped, Location location) -> void + # Initialize a new StringNode node. # # @return [StringNode] a new instance of StringNode # - # source://prism//lib/prism/node.rb#17547 + # source://prism//lib/prism/node.rb#15305 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), content_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#17700 + # source://prism//lib/prism/node.rb#15437 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17558 + # source://prism//lib/prism/node.rb#15317 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17563 + # source://prism//lib/prism/node.rb#15322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17661 + # source://prism//lib/prism/node.rb#15416 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17615 + # source://prism//lib/prism/node.rb#15390 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17573 + # source://prism//lib/prism/node.rb#15332 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#17568 + # source://prism//lib/prism/node.rb#15327 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#17656 + # source://prism//lib/prism/node.rb#15411 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#17608 + # source://prism//lib/prism/node.rb#15383 sig { returns(Prism::Location) } def content_loc; end - # def copy: (?flags: Integer, ?opening_loc: Location?, ?content_loc: Location, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> StringNode + # 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#17578 + # source://prism//lib/prism/node.rb#15337 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), content_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::StringNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17563 + # source://prism//lib/prism/node.rb#15322 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, content_loc: Location, closing_loc: Location?, unescaped: String, location: Location } + # 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#17586 + # source://prism//lib/prism/node.rb#15345 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31293,7 +31352,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17636 + # source://prism//lib/prism/node.rb#15355 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -31301,7 +31360,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17631 + # source://prism//lib/prism/node.rb#15350 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -31309,7 +31368,7 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17641 + # source://prism//lib/prism/node.rb#15360 sig { returns(T::Boolean) } def frozen?; end @@ -31318,7 +31377,7 @@ class Prism::StringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17666 + # source://prism//lib/prism/node.rb#15421 sig { override.returns(String) } def inspect; end @@ -31326,71 +31385,45 @@ class Prism::StringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17646 + # source://prism//lib/prism/node.rb#15365 sig { returns(T::Boolean) } def mutable?; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17651 + # source://prism//lib/prism/node.rb#15406 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17595 + # source://prism//lib/prism/node.rb#15370 sig { returns(T.nilable(Prism::Location)) } def opening_loc; 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#69 + # source://prism//lib/prism/node_ext.rb#72 sig { returns(Prism::InterpolatedStringNode) } def to_interpolated; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17684 + # source://prism//lib/prism/node.rb#15426 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17628 + # source://prism//lib/prism/node.rb#15403 sig { returns(String) } def unescaped; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#17591 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17694 + # source://prism//lib/prism/node.rb#15431 def type; end end end @@ -31403,93 +31436,97 @@ end # super foo, bar # ^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#17717 +# source://prism//lib/prism/node.rb#15454 class Prism::SuperNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Prism::node? block, Location location) -> void + # Initialize a new SuperNode node. # # @return [SuperNode] a new instance of SuperNode # - # source://prism//lib/prism/node.rb#17719 + # source://prism//lib/prism/node.rb#15456 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).void end - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, block, location); end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_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#17854 + # source://prism//lib/prism/node.rb#15575 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17730 + # source://prism//lib/prism/node.rb#15469 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#17786 + # source://prism//lib/prism/node.rb#15525 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end - # attr_reader block: Prism::node? + # attr_reader block: BlockNode | BlockArgumentNode | nil # - # source://prism//lib/prism/node.rb#17802 - sig { returns(T.nilable(Prism::Node)) } + # source://prism//lib/prism/node.rb#15541 + sig { returns(T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode))) } def block; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17735 + # source://prism//lib/prism/node.rb#15474 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#17748 + # source://prism//lib/prism/node.rb#15487 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#17740 + # source://prism//lib/prism/node.rb#15479 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?block: Prism::node?, ?location: Location) -> SuperNode + # 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#17753 + # source://prism//lib/prism/node.rb#15492 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), rparen_loc: T.nilable(Prism::Location), - block: T.nilable(Prism::Node), - location: Prism::Location + block: T.nilable(T.any(Prism::BlockNode, Prism::BlockArgumentNode)) ).returns(Prism::SuperNode) end - def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17735 + # source://prism//lib/prism/node.rb#15474 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, block: Prism::node?, location: Location } + # 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#17761 + # source://prism//lib/prism/node.rb#15500 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31498,96 +31535,78 @@ class Prism::SuperNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#17820 + # source://prism//lib/prism/node.rb#15559 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#17805 + # source://prism//lib/prism/node.rb#15544 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#17766 + # source://prism//lib/prism/node.rb#15505 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#17810 + # source://prism//lib/prism/node.rb#15549 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#17773 + # source://prism//lib/prism/node.rb#15512 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#17815 + # source://prism//lib/prism/node.rb#15554 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#17789 + # source://prism//lib/prism/node.rb#15528 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#17838 + # source://prism//lib/prism/node.rb#15564 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#17848 + # source://prism//lib/prism/node.rb#15569 def type; end end end # Flags for symbol nodes. # -# source://prism//lib/prism/node.rb#19283 +# source://prism//lib/prism/node.rb#16843 module Prism::SymbolFlags; end # internal bytes forced the encoding to binary # -# source://prism//lib/prism/node.rb#19288 +# source://prism//lib/prism/node.rb#16848 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#19291 +# source://prism//lib/prism/node.rb#16851 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#19285 +# source://prism//lib/prism/node.rb#16845 Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # Represents a symbol literal or a symbol contained within a `%i` list. @@ -31598,93 +31617,95 @@ Prism::SymbolFlags::FORCED_UTF8_ENCODING = T.let(T.unsafe(nil), Integer) # %i[foo] # ^^^ # -# source://prism//lib/prism/node.rb#17871 +# source://prism//lib/prism/node.rb#15592 class Prism::SymbolNode < ::Prism::Node - # def initialize: (Integer flags, Location? opening_loc, Location? value_loc, Location? closing_loc, String unescaped, Location location) -> void + # Initialize a new SymbolNode node. # # @return [SymbolNode] a new instance of SymbolNode # - # source://prism//lib/prism/node.rb#17873 + # source://prism//lib/prism/node.rb#15594 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, value_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, value_loc, closing_loc, unescaped); 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#18027 + # source://prism//lib/prism/node.rb#15727 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#17884 + # source://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] # - # source://prism//lib/prism/node.rb#17889 + # source://prism//lib/prism/node.rb#15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#17988 + # source://prism//lib/prism/node.rb#15706 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#17947 + # source://prism//lib/prism/node.rb#15680 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#17899 + # source://prism//lib/prism/node.rb#15621 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#17894 + # source://prism//lib/prism/node.rb#15616 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?opening_loc: Location?, ?value_loc: Location?, ?closing_loc: Location?, ?unescaped: String, ?location: Location) -> SymbolNode + # 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#17904 + # source://prism//lib/prism/node.rb#15626 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: T.nilable(Prism::Location), value_loc: T.nilable(Prism::Location), closing_loc: T.nilable(Prism::Location), - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::SymbolNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), value_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#17889 + # source://prism//lib/prism/node.rb#15611 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location?, value_loc: Location?, closing_loc: Location?, unescaped: String, location: Location } + # 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#17912 + # source://prism//lib/prism/node.rb#15634 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -31695,7 +31716,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17968 + # source://prism//lib/prism/node.rb#15644 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -31703,7 +31724,7 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17973 + # source://prism//lib/prism/node.rb#15649 sig { returns(T::Boolean) } def forced_us_ascii_encoding?; end @@ -31711,131 +31732,110 @@ class Prism::SymbolNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#17963 + # source://prism//lib/prism/node.rb#15639 sig { returns(T::Boolean) } def forced_utf8_encoding?; end # def inspect -> String # - # source://prism//lib/prism/node.rb#17993 + # source://prism//lib/prism/node.rb#15711 sig { override.returns(String) } def inspect; end # def opening: () -> String? # - # source://prism//lib/prism/node.rb#17978 + # source://prism//lib/prism/node.rb#15696 sig { returns(T.nilable(String)) } def opening; end # attr_reader opening_loc: Location? # - # source://prism//lib/prism/node.rb#17921 + # source://prism//lib/prism/node.rb#15654 sig { returns(T.nilable(Prism::Location)) } def opening_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18011 + # source://prism//lib/prism/node.rb#15716 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#17960 + # source://prism//lib/prism/node.rb#15693 sig { returns(String) } def unescaped; end # def value: () -> String? # - # source://prism//lib/prism/node.rb#17983 + # source://prism//lib/prism/node.rb#15701 sig { returns(T.nilable(String)) } def value; end # attr_reader value_loc: Location? # - # source://prism//lib/prism/node.rb#17934 + # source://prism//lib/prism/node.rb#15667 sig { returns(T.nilable(Prism::Location)) } def value_loc; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#17917 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18021 + # source://prism//lib/prism/node.rb#15721 def type; end end end # This represents a token from the Ruby source. # -# source://prism//lib/prism/parse_result.rb#645 +# source://prism//lib/prism/parse_result.rb#799 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#657 + # source://prism//lib/prism/parse_result.rb#811 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#692 + # source://prism//lib/prism/parse_result.rb#846 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#665 + # source://prism//lib/prism/parse_result.rb#819 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 token. + # + # source://prism//lib/prism/parse_result.rb#853 + def inspect; end + # A Location object representing the location of this token in the source. # - # source://prism//lib/prism/parse_result.rb#670 + # source://prism//lib/prism/parse_result.rb#824 sig { returns(Prism::Location) } def location; end # Implement the pretty print interface for Token. # - # source://prism//lib/prism/parse_result.rb#677 + # source://prism//lib/prism/parse_result.rb#831 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#651 + # source://prism//lib/prism/parse_result.rb#805 sig { returns(Symbol) } def type; end # A byteslice of the source that this token represents. # - # source://prism//lib/prism/parse_result.rb#654 + # source://prism//lib/prism/parse_result.rb#808 sig { returns(String) } def value; end @@ -31843,7 +31843,7 @@ class Prism::Token # The Source object that represents the source this token came from. # - # source://prism//lib/prism/parse_result.rb#647 + # source://prism//lib/prism/parse_result.rb#801 sig { returns(Prism::Source) } def source; end end @@ -33127,50 +33127,50 @@ class Prism::Translation::Parser::Lexer # # @return [Lexer] a new instance of Lexer # - # source://prism//lib/prism/translation/parser/lexer.rb#204 + # source://prism//lib/prism/translation/parser/lexer.rb#217 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#197 + # source://prism//lib/prism/translation/parser/lexer.rb#210 def lexed; end # A hash that maps offsets in bytes to offsets in characters. # - # source://prism//lib/prism/translation/parser/lexer.rb#200 + # source://prism//lib/prism/translation/parser/lexer.rb#213 def offset_cache; end # The Parser::Source::Buffer that the tokens were lexed from. # - # source://prism//lib/prism/translation/parser/lexer.rb#193 + # source://prism//lib/prism/translation/parser/lexer.rb#206 def source_buffer; end # Convert the prism tokens into the expected format for the parser gem. # - # source://prism//lib/prism/translation/parser/lexer.rb#214 + # source://prism//lib/prism/translation/parser/lexer.rb#227 def to_a; end private # Parse a complex from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#387 + # source://prism//lib/prism/translation/parser/lexer.rb#409 def parse_complex(value); end # Parse a float from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#380 + # source://prism//lib/prism/translation/parser/lexer.rb#402 def parse_float(value); end # Parse an integer from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#373 + # source://prism//lib/prism/translation/parser/lexer.rb#395 def parse_integer(value); end # Parse a rational from the string representation. # - # source://prism//lib/prism/translation/parser/lexer.rb#402 + # source://prism//lib/prism/translation/parser/lexer.rb#424 def parse_rational(value); end end @@ -33188,7 +33188,21 @@ Prism::Translation::Parser::Lexer::EXPR_BEG = T.let(T.unsafe(nil), Integer) # source://prism//lib/prism/translation/parser/lexer.rb#188 Prism::Translation::Parser::Lexer::EXPR_LABEL = T.let(T.unsafe(nil), Integer) -# source://prism//lib/prism/translation/parser/lexer.rb#210 +# It is used to determine whether `do` is of the token type `kDO` or `kDO_LAMBDA`. +# +# 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#194 +Prism::Translation::Parser::Lexer::LAMBDA_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# 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#198 +Prism::Translation::Parser::Lexer::LPAREN_CONVERSION_TOKEN_TYPES = T.let(T.unsafe(nil), Array) + +# source://prism//lib/prism/translation/parser/lexer.rb#223 Prism::Translation::Parser::Lexer::Range = Parser::Source::Range # The direct translating of types between the two lexers. @@ -34267,25 +34281,25 @@ class Prism::Translation::Ripper < ::Prism::Compiler # :stopdoc: # - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def _dispatch_0; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def _dispatch_1(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def _dispatch_2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def _dispatch_3(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def _dispatch_4(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3394 + # source://prism//lib/prism/translation/ripper.rb#3390 def _dispatch_5(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # source://prism//lib/prism/translation/ripper.rb#3391 def _dispatch_7(_, _, _, _, _, _, _); end # This method is responsible for updating lineno and column information @@ -34294,7 +34308,7 @@ 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#3379 + # source://prism//lib/prism/translation/ripper.rb#3375 def bounds(location); end # Returns true if the given node is a command node. @@ -34306,7 +34320,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # This method is called when the parser found syntax error. # - # source://prism//lib/prism/translation/ripper.rb#3417 + # source://prism//lib/prism/translation/ripper.rb#3413 def compile_error(msg); end # This method is provided by the Ripper C extension. It is called when a @@ -34314,577 +34328,577 @@ 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#3432 + # source://prism//lib/prism/translation/ripper.rb#3428 def dedent_string(string, width); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_BEGIN(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_CHAR(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_END(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on___end__(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_alias_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_aref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_aref_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_arg_ambiguous(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_arg_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_args_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_forward; end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_args_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_array(_); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_aryptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_assign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_assign_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_assoc_new(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_assoc_splat(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_assoclist_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_backref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_backtick(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_bare_assoc_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_begin(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_binary(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_block_var(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_blockarg(_); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_bodystmt(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_brace_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_break(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_call(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_case(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_class(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_class_name_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_comma(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_command(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_command_call(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_comment(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_const(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_const_path_field(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_const_path_ref(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_cvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_def(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_defined(_); end - # source://prism//lib/prism/translation/ripper.rb#3394 + # source://prism//lib/prism/translation/ripper.rb#3390 def on_defs(_, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_do_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_dot2(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_dot3(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_dyna_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_else(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_elsif(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embdoc(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embdoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embdoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embexpr_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embexpr_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_embvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ensure(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_excessed_comma; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_fcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_field(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_float(_); end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_fndptn(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_for(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_gvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_hash(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_heredoc_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_heredoc_dedent(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_heredoc_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_hshptn(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ident(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_if(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_if_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_ifop(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ignored_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ignored_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_imaginary(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_in(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_int(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_ivar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_kw(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_kwrest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_label(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_label_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_lambda(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_lbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_lbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_lparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_magic_comment(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_massign(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_method_add_arg(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_method_add_block(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mlhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mlhs_add_post(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mlhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mlhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_mlhs_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_module(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mrhs_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_mrhs_add_star(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_mrhs_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_mrhs_new_from_args(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_next(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_nl(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_nokw_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_op(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_opassign(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_operator_ambiguous(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_param_error(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3395 + # source://prism//lib/prism/translation/ripper.rb#3391 def on_params(_, _, _, _, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_paren(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_parse_error(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_period(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_program(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_qsymbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_qsymbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qsymbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_qwords_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_qwords_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_qwords_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rational(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rbrace(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rbracket(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_redo; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_regexp_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_regexp_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_regexp_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_regexp_literal(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_regexp_new; end - # source://prism//lib/prism/translation/ripper.rb#3393 + # source://prism//lib/prism/translation/ripper.rb#3389 def on_rescue(_, _, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_rescue_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rest_param(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_retry; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_return(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_return0; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_rparen(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_sclass(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_semicolon(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_sp(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_stmts_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_stmts_new; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_string_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_string_concat(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_string_content; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_string_dvar(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_string_embexpr(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_string_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_super(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbol(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbol_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_symbols_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_symbols_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_symbols_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tlambda(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tlambeg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_top_const_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_top_const_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tstring_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tstring_content(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_tstring_end(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_unary(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_undef(_); end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_unless(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_unless_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_until(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_until_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_var_alias(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_var_field(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_var_ref(_); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_vcall(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_void_stmt; end - # source://prism//lib/prism/translation/ripper.rb#3392 + # source://prism//lib/prism/translation/ripper.rb#3388 def on_when(_, _, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_while(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_while_mod(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_word_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_word_new; end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_words_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_words_beg(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_words_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_words_sep(_); end - # source://prism//lib/prism/translation/ripper.rb#3391 + # source://prism//lib/prism/translation/ripper.rb#3387 def on_xstring_add(_, _); end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_xstring_literal(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_xstring_new; end - # source://prism//lib/prism/translation/ripper.rb#3390 + # source://prism//lib/prism/translation/ripper.rb#3386 def on_yield(_); end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_yield0; end - # source://prism//lib/prism/translation/ripper.rb#3389 + # source://prism//lib/prism/translation/ripper.rb#3385 def on_zsuper; end # Lazily initialize the parse result. @@ -34896,7 +34910,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # # @return [Boolean] # - # source://prism//lib/prism/translation/ripper.rb#3284 + # source://prism//lib/prism/translation/ripper.rb#3280 def trailing_comma?(left, right); end # Visit one side of an alias global variable node. @@ -34968,7 +34982,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # Visit a node that represents a number. We need to explicitly handle the # unary - operator. # - # source://prism//lib/prism/translation/ripper.rb#3323 + # source://prism//lib/prism/translation/ripper.rb#3319 def visit_number_node(node); end # Visit a pattern within a pattern match. This is used to bypass the @@ -34993,7 +35007,7 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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#3296 + # source://prism//lib/prism/translation/ripper.rb#3292 def visit_token(token, allow_keywords = T.unsafe(nil)); end # Dispatch a words_sep event that contains the space between the elements @@ -35005,26 +35019,26 @@ class Prism::Translation::Ripper < ::Prism::Compiler # 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#3341 + # source://prism//lib/prism/translation/ripper.rb#3337 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#3289 + # source://prism//lib/prism/translation/ripper.rb#3285 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#3408 + # source://prism//lib/prism/translation/ripper.rb#3404 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#3413 + # source://prism//lib/prism/translation/ripper.rb#3409 def warning(fmt, *args); end class << self @@ -35841,13 +35855,13 @@ 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#1556 + # source://prism//lib/prism/translation/ruby_parser.rb#1598 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#1562 + # source://prism//lib/prism/translation/ruby_parser.rb#1604 def parse_file(filepath); end private @@ -35855,20 +35869,20 @@ class Prism::Translation::RubyParser # Translate the given parse result and filepath into the # seattlerb/ruby_parser gem's Sexp format. # - # source://prism//lib/prism/translation/ruby_parser.rb#1584 + # source://prism//lib/prism/translation/ruby_parser.rb#1626 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#1569 + # source://prism//lib/prism/translation/ruby_parser.rb#1611 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#1575 + # source://prism//lib/prism/translation/ruby_parser.rb#1617 def parse_file(filepath); end end end @@ -35930,25 +35944,25 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo(bar) # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#96 + # source://prism//lib/prism/translation/ruby_parser.rb#108 def visit_arguments_node(node); end # [] # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#63 + # source://prism//lib/prism/translation/ruby_parser.rb#75 def visit_array_node(node); end # foo => [bar] # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#73 + # source://prism//lib/prism/translation/ruby_parser.rb#85 def visit_array_pattern_node(node); end # { a: 1 } # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#102 + # source://prism//lib/prism/translation/ruby_parser.rb#114 def visit_assoc_node(node); end # def foo(**); bar(**); end @@ -35957,47 +35971,47 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # { **foo } # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#111 + # source://prism//lib/prism/translation/ruby_parser.rb#123 def visit_assoc_splat_node(node); end # $+ # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#121 + # source://prism//lib/prism/translation/ruby_parser.rb#133 def visit_back_reference_read_node(node); end # begin end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#127 + # source://prism//lib/prism/translation/ruby_parser.rb#139 def visit_begin_node(node); end # foo(&bar) # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#160 + # source://prism//lib/prism/translation/ruby_parser.rb#172 def visit_block_argument_node(node); end # foo { |; bar| } # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#168 + # source://prism//lib/prism/translation/ruby_parser.rb#180 def visit_block_local_variable_node(node); end # A block on a keyword or method call. # - # source://prism//lib/prism/translation/ruby_parser.rb#173 + # source://prism//lib/prism/translation/ruby_parser.rb#185 def visit_block_node(node); end # def foo(&bar); end # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#179 + # source://prism//lib/prism/translation/ruby_parser.rb#191 def visit_block_parameter_node(node); end # A block's parameters. # - # source://prism//lib/prism/translation/ruby_parser.rb#184 + # source://prism//lib/prism/translation/ruby_parser.rb#196 def visit_block_parameters_node(node); end # break @@ -36006,13 +36020,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # break foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#224 + # source://prism//lib/prism/translation/ruby_parser.rb#236 def visit_break_node(node); end # foo.bar &&= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#287 + # source://prism//lib/prism/translation/ruby_parser.rb#304 def visit_call_and_write_node(node); end # foo @@ -36024,79 +36038,79 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo.bar() {} # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#242 + # source://prism//lib/prism/translation/ruby_parser.rb#254 def visit_call_node(node); end # foo.bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#277 + # source://prism//lib/prism/translation/ruby_parser.rb#294 def visit_call_operator_write_node(node); end # foo.bar ||= baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#297 + # source://prism//lib/prism/translation/ruby_parser.rb#314 def visit_call_or_write_node(node); end # foo.bar, = 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#320 + # source://prism//lib/prism/translation/ruby_parser.rb#337 def visit_call_target_node(node); end # foo => bar => baz # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#326 + # source://prism//lib/prism/translation/ruby_parser.rb#343 def visit_capture_pattern_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#338 + # source://prism//lib/prism/translation/ruby_parser.rb#355 def visit_case_match_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#332 + # source://prism//lib/prism/translation/ruby_parser.rb#349 def visit_case_node(node); end # class Foo; end # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#344 + # source://prism//lib/prism/translation/ruby_parser.rb#361 def visit_class_node(node); end # @@foo &&= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#385 + # source://prism//lib/prism/translation/ruby_parser.rb#402 def visit_class_variable_and_write_node(node); end # @@foo += bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#379 + # source://prism//lib/prism/translation/ruby_parser.rb#396 def visit_class_variable_operator_write_node(node); end # @@foo ||= bar # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#391 + # source://prism//lib/prism/translation/ruby_parser.rb#408 def visit_class_variable_or_write_node(node); end # @@foo # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#364 + # source://prism//lib/prism/translation/ruby_parser.rb#381 def visit_class_variable_read_node(node); end # @@foo, = bar # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#397 + # source://prism//lib/prism/translation/ruby_parser.rb#414 def visit_class_variable_target_node(node); end # @@foo = 1 @@ -36105,55 +36119,55 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # @@foo, @@bar = 1 # ^^^^^ ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#373 + # source://prism//lib/prism/translation/ruby_parser.rb#390 def visit_class_variable_write_node(node); end # Foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#430 + # source://prism//lib/prism/translation/ruby_parser.rb#447 def visit_constant_and_write_node(node); end # Foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#424 + # source://prism//lib/prism/translation/ruby_parser.rb#441 def visit_constant_operator_write_node(node); end # Foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#436 + # source://prism//lib/prism/translation/ruby_parser.rb#453 def visit_constant_or_write_node(node); end # Foo::Bar &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#473 + # source://prism//lib/prism/translation/ruby_parser.rb#490 def visit_constant_path_and_write_node(node); end # Foo::Bar # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#448 + # source://prism//lib/prism/translation/ruby_parser.rb#465 def visit_constant_path_node(node); end # Foo::Bar += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#467 + # source://prism//lib/prism/translation/ruby_parser.rb#484 def visit_constant_path_operator_write_node(node); end # Foo::Bar ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#479 + # source://prism//lib/prism/translation/ruby_parser.rb#496 def visit_constant_path_or_write_node(node); end # Foo::Bar, = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#485 + # source://prism//lib/prism/translation/ruby_parser.rb#502 def visit_constant_path_target_node(node); end # Foo::Bar = 1 @@ -36162,19 +36176,19 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Foo::Foo, Bar::Bar = 1 # ^^^^^^^^ ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#461 + # source://prism//lib/prism/translation/ruby_parser.rb#478 def visit_constant_path_write_node(node); end # Foo # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#409 + # source://prism//lib/prism/translation/ruby_parser.rb#426 def visit_constant_read_node(node); end # Foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#442 + # source://prism//lib/prism/translation/ruby_parser.rb#459 def visit_constant_target_node(node); end # Foo = 1 @@ -36183,7 +36197,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # Foo, Bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#418 + # source://prism//lib/prism/translation/ruby_parser.rb#435 def visit_constant_write_node(node); end # def foo; end @@ -36192,7 +36206,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def self.foo; end # ^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#501 + # source://prism//lib/prism/translation/ruby_parser.rb#518 def visit_def_node(node); end # defined? a @@ -36201,73 +36215,73 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # defined?(a) # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#532 + # source://prism//lib/prism/translation/ruby_parser.rb#549 def visit_defined_node(node); end # if foo then bar else baz end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#538 + # source://prism//lib/prism/translation/ruby_parser.rb#555 def visit_else_node(node); end # "foo #{bar}" # ^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#544 + # source://prism//lib/prism/translation/ruby_parser.rb#561 def visit_embedded_statements_node(node); end # "foo #@bar" # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#552 + # source://prism//lib/prism/translation/ruby_parser.rb#569 def visit_embedded_variable_node(node); end # begin; foo; ensure; bar; end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#558 + # source://prism//lib/prism/translation/ruby_parser.rb#575 def visit_ensure_node(node); end # false # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#564 + # source://prism//lib/prism/translation/ruby_parser.rb#581 def visit_false_node(node); end # foo => [*, bar, *] # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#570 + # source://prism//lib/prism/translation/ruby_parser.rb#587 def visit_find_pattern_node(node); end # if foo .. bar; end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#576 + # source://prism//lib/prism/translation/ruby_parser.rb#593 def visit_flip_flop_node(node); end # 1.0 # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#586 + # source://prism//lib/prism/translation/ruby_parser.rb#603 def visit_float_node(node); end # for foo in bar do end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#592 + # source://prism//lib/prism/translation/ruby_parser.rb#609 def visit_for_node(node); end # def foo(...); bar(...); end # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#598 + # source://prism//lib/prism/translation/ruby_parser.rb#615 def visit_forwarding_arguments_node(node); end # def foo(...); end # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#604 + # source://prism//lib/prism/translation/ruby_parser.rb#621 def visit_forwarding_parameter_node(node); end # super @@ -36276,37 +36290,37 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # super {} # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#613 + # source://prism//lib/prism/translation/ruby_parser.rb#630 def visit_forwarding_super_node(node); end # $foo &&= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#640 + # source://prism//lib/prism/translation/ruby_parser.rb#657 def visit_global_variable_and_write_node(node); end # $foo += bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#634 + # source://prism//lib/prism/translation/ruby_parser.rb#651 def visit_global_variable_operator_write_node(node); end # $foo ||= bar # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#646 + # source://prism//lib/prism/translation/ruby_parser.rb#663 def visit_global_variable_or_write_node(node); end # $foo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#619 + # source://prism//lib/prism/translation/ruby_parser.rb#636 def visit_global_variable_read_node(node); end # $foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#652 + # source://prism//lib/prism/translation/ruby_parser.rb#669 def visit_global_variable_target_node(node); end # $foo = 1 @@ -36315,19 +36329,19 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # $foo, $bar = 1 # ^^^^ ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#628 + # source://prism//lib/prism/translation/ruby_parser.rb#645 def visit_global_variable_write_node(node); end # {} # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#658 + # source://prism//lib/prism/translation/ruby_parser.rb#675 def visit_hash_node(node); end # foo => {} # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#664 + # source://prism//lib/prism/translation/ruby_parser.rb#681 def visit_hash_pattern_node(node); end # if foo then bar end @@ -36339,80 +36353,80 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo ? bar : baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#685 + # source://prism//lib/prism/translation/ruby_parser.rb#702 def visit_if_node(node); end # 1i # - # source://prism//lib/prism/translation/ruby_parser.rb#690 + # source://prism//lib/prism/translation/ruby_parser.rb#707 def visit_imaginary_node(node); end # { foo: } # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#696 + # source://prism//lib/prism/translation/ruby_parser.rb#713 def visit_implicit_node(node); end # foo { |bar,| } # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#701 + # source://prism//lib/prism/translation/ruby_parser.rb#718 def visit_implicit_rest_node(node); end # case foo; in bar; end # ^^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#706 + # source://prism//lib/prism/translation/ruby_parser.rb#723 def visit_in_node(node); end # foo[bar] &&= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#732 + # source://prism//lib/prism/translation/ruby_parser.rb#749 def visit_index_and_write_node(node); end # foo[bar] += baz # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#719 + # source://prism//lib/prism/translation/ruby_parser.rb#736 def visit_index_operator_write_node(node); end # foo[bar] ||= baz # ^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#745 + # source://prism//lib/prism/translation/ruby_parser.rb#762 def visit_index_or_write_node(node); end # foo[bar], = 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#758 + # source://prism//lib/prism/translation/ruby_parser.rb#775 def visit_index_target_node(node); end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#788 + # source://prism//lib/prism/translation/ruby_parser.rb#805 def visit_instance_variable_and_write_node(node); end # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#782 + # source://prism//lib/prism/translation/ruby_parser.rb#799 def visit_instance_variable_operator_write_node(node); end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#794 + # source://prism//lib/prism/translation/ruby_parser.rb#811 def visit_instance_variable_or_write_node(node); end # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#767 + # source://prism//lib/prism/translation/ruby_parser.rb#784 def visit_instance_variable_read_node(node); end # @foo, = bar # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#800 + # source://prism//lib/prism/translation/ruby_parser.rb#817 def visit_instance_variable_target_node(node); end # ^^^^^^^^ @@ -36420,55 +36434,55 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # @foo, @bar = 1 # ^^^^ ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#776 + # source://prism//lib/prism/translation/ruby_parser.rb#793 def visit_instance_variable_write_node(node); end # 1 # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#806 + # source://prism//lib/prism/translation/ruby_parser.rb#823 def visit_integer_node(node); end # if /foo #{bar}/ then end # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#812 + # source://prism//lib/prism/translation/ruby_parser.rb#829 def visit_interpolated_match_last_line_node(node); end # /foo #{bar}/ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#829 + # source://prism//lib/prism/translation/ruby_parser.rb#846 def visit_interpolated_regular_expression_node(node); end # "foo #{bar}" # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#844 + # source://prism//lib/prism/translation/ruby_parser.rb#861 def visit_interpolated_string_node(node); end # :"foo #{bar}" # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#851 + # source://prism//lib/prism/translation/ruby_parser.rb#868 def visit_interpolated_symbol_node(node); end # `foo #{bar}` # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#858 + # source://prism//lib/prism/translation/ruby_parser.rb#875 def visit_interpolated_x_string_node(node); end # -> { it } # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#923 + # source://prism//lib/prism/translation/ruby_parser.rb#947 def visit_it_local_variable_read_node(node); end # foo(bar: baz) # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#929 + # source://prism//lib/prism/translation/ruby_parser.rb#953 def visit_keyword_hash_node(node); end # def foo(**bar); end @@ -36477,42 +36491,42 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def foo(**); end # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#938 + # source://prism//lib/prism/translation/ruby_parser.rb#962 def visit_keyword_rest_parameter_node(node); end # -> {} # - # source://prism//lib/prism/translation/ruby_parser.rb#943 + # source://prism//lib/prism/translation/ruby_parser.rb#967 def visit_lambda_node(node); end # foo &&= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#986 + # source://prism//lib/prism/translation/ruby_parser.rb#1010 def visit_local_variable_and_write_node(node); end # foo += bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#980 + # source://prism//lib/prism/translation/ruby_parser.rb#1004 def visit_local_variable_operator_write_node(node); end # foo ||= bar # ^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#992 + # source://prism//lib/prism/translation/ruby_parser.rb#1016 def visit_local_variable_or_write_node(node); end # foo # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#961 + # source://prism//lib/prism/translation/ruby_parser.rb#985 def visit_local_variable_read_node(node); end # foo, = bar # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#998 + # source://prism//lib/prism/translation/ruby_parser.rb#1022 def visit_local_variable_target_node(node); end # foo = 1 @@ -36521,56 +36535,56 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # foo, bar = 1 # ^^^ ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#974 + # source://prism//lib/prism/translation/ruby_parser.rb#998 def visit_local_variable_write_node(node); end # if /foo/ then end # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1004 + # source://prism//lib/prism/translation/ruby_parser.rb#1028 def visit_match_last_line_node(node); end # foo in bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1010 + # source://prism//lib/prism/translation/ruby_parser.rb#1034 def visit_match_predicate_node(node); end # foo => bar # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1016 + # source://prism//lib/prism/translation/ruby_parser.rb#1040 def visit_match_required_node(node); end # /(?foo)/ =~ bar # ^^^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1022 + # source://prism//lib/prism/translation/ruby_parser.rb#1046 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#1029 + # source://prism//lib/prism/translation/ruby_parser.rb#1053 def visit_missing_node(node); end # module Foo; end # ^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1035 + # source://prism//lib/prism/translation/ruby_parser.rb#1059 def visit_module_node(node); end # foo, bar = baz # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1055 + # source://prism//lib/prism/translation/ruby_parser.rb#1079 def visit_multi_target_node(node); end # foo, bar = baz # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1065 + # source://prism//lib/prism/translation/ruby_parser.rb#1089 def visit_multi_write_node(node); end # next @@ -36579,55 +36593,55 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # next foo # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1089 + # source://prism//lib/prism/translation/ruby_parser.rb#1113 def visit_next_node(node); end # nil # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1102 + # source://prism//lib/prism/translation/ruby_parser.rb#1126 def visit_nil_node(node); end # def foo(**nil); end # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1108 + # source://prism//lib/prism/translation/ruby_parser.rb#1132 def visit_no_keywords_parameter_node(node); end # -> { _1 + _2 } # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1114 + # source://prism//lib/prism/translation/ruby_parser.rb#1138 def visit_numbered_parameters_node(node); end # $1 # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1120 + # source://prism//lib/prism/translation/ruby_parser.rb#1144 def visit_numbered_reference_read_node(node); end # def foo(bar: baz); end # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1126 + # source://prism//lib/prism/translation/ruby_parser.rb#1150 def visit_optional_keyword_parameter_node(node); end # def foo(bar = 1); end # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1132 + # source://prism//lib/prism/translation/ruby_parser.rb#1156 def visit_optional_parameter_node(node); end # a or b # ^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1138 + # source://prism//lib/prism/translation/ruby_parser.rb#1162 def visit_or_node(node); end # def foo(bar, *baz); end # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1144 + # source://prism//lib/prism/translation/ruby_parser.rb#1180 def visit_parameters_node(node); end # () @@ -36636,82 +36650,82 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # (1) # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1182 + # source://prism//lib/prism/translation/ruby_parser.rb#1218 def visit_parentheses_node(node); end # foo => ^(bar) # ^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1192 + # source://prism//lib/prism/translation/ruby_parser.rb#1228 def visit_pinned_expression_node(node); end # foo = 1 and bar => ^foo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1198 + # source://prism//lib/prism/translation/ruby_parser.rb#1234 def visit_pinned_variable_node(node); end # END {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1207 + # source://prism//lib/prism/translation/ruby_parser.rb#1243 def visit_post_execution_node(node); end # BEGIN {} # - # source://prism//lib/prism/translation/ruby_parser.rb#1212 + # source://prism//lib/prism/translation/ruby_parser.rb#1248 def visit_pre_execution_node(node); end # The top-level program node. # - # source://prism//lib/prism/translation/ruby_parser.rb#1217 + # source://prism//lib/prism/translation/ruby_parser.rb#1253 def visit_program_node(node); end # 0..5 # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1223 + # source://prism//lib/prism/translation/ruby_parser.rb#1259 def visit_range_node(node); end # 1r # ^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1245 + # source://prism//lib/prism/translation/ruby_parser.rb#1281 def visit_rational_node(node); end # redo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1251 + # source://prism//lib/prism/translation/ruby_parser.rb#1287 def visit_redo_node(node); end # /foo/ # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1257 + # source://prism//lib/prism/translation/ruby_parser.rb#1293 def visit_regular_expression_node(node); end # def foo(bar:); end # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1263 + # source://prism//lib/prism/translation/ruby_parser.rb#1299 def visit_required_keyword_parameter_node(node); end # def foo(bar); end # ^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1269 + # source://prism//lib/prism/translation/ruby_parser.rb#1305 def visit_required_parameter_node(node); end # foo rescue bar # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1275 + # source://prism//lib/prism/translation/ruby_parser.rb#1311 def visit_rescue_modifier_node(node); end # begin; rescue; end # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1281 + # source://prism//lib/prism/translation/ruby_parser.rb#1317 def visit_rescue_node(node); end # def foo(*bar); end @@ -36720,13 +36734,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def foo(*); end # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1301 + # source://prism//lib/prism/translation/ruby_parser.rb#1337 def visit_rest_parameter_node(node); end # retry # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1307 + # source://prism//lib/prism/translation/ruby_parser.rb#1343 def visit_retry_node(node); end # return @@ -36735,42 +36749,42 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # return 1 # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1316 + # source://prism//lib/prism/translation/ruby_parser.rb#1352 def visit_return_node(node); end # self # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1329 + # source://prism//lib/prism/translation/ruby_parser.rb#1365 def visit_self_node(node); end # A shareable constant. # - # source://prism//lib/prism/translation/ruby_parser.rb#1334 + # source://prism//lib/prism/translation/ruby_parser.rb#1370 def visit_shareable_constant_node(node); end # class << self; end # ^^^^^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1340 + # source://prism//lib/prism/translation/ruby_parser.rb#1376 def visit_singleton_class_node(node); end # __ENCODING__ # ^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1348 + # source://prism//lib/prism/translation/ruby_parser.rb#1384 def visit_source_encoding_node(node); end # __FILE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1355 + # source://prism//lib/prism/translation/ruby_parser.rb#1391 def visit_source_file_node(node); end # __LINE__ # ^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1361 + # source://prism//lib/prism/translation/ruby_parser.rb#1397 def visit_source_line_node(node); end # foo(*bar) @@ -36782,42 +36796,42 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # def foo(*); bar(*); end # ^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1373 + # source://prism//lib/prism/translation/ruby_parser.rb#1409 def visit_splat_node(node); end # A list of statements. # - # source://prism//lib/prism/translation/ruby_parser.rb#1382 + # source://prism//lib/prism/translation/ruby_parser.rb#1418 def visit_statements_node(node); end # "foo" # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1394 + # source://prism//lib/prism/translation/ruby_parser.rb#1430 def visit_string_node(node); end # super(foo) # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1400 + # source://prism//lib/prism/translation/ruby_parser.rb#1442 def visit_super_node(node); end # :foo # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1414 + # source://prism//lib/prism/translation/ruby_parser.rb#1456 def visit_symbol_node(node); end # true # ^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1420 + # source://prism//lib/prism/translation/ruby_parser.rb#1462 def visit_true_node(node); end # undef foo # ^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1426 + # source://prism//lib/prism/translation/ruby_parser.rb#1468 def visit_undef_node(node); end # unless foo; bar end @@ -36826,7 +36840,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar unless foo # ^^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1436 + # source://prism//lib/prism/translation/ruby_parser.rb#1478 def visit_unless_node(node); end # until foo; bar end @@ -36835,13 +36849,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar until foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1445 + # source://prism//lib/prism/translation/ruby_parser.rb#1487 def visit_until_node(node); end # case foo; when bar; end # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1451 + # source://prism//lib/prism/translation/ruby_parser.rb#1493 def visit_when_node(node); end # while foo; bar end @@ -36850,13 +36864,13 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # bar while foo # ^^^^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1460 + # source://prism//lib/prism/translation/ruby_parser.rb#1502 def visit_while_node(node); end # `foo` # ^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1466 + # source://prism//lib/prism/translation/ruby_parser.rb#1508 def visit_x_string_node(node); end # yield @@ -36865,7 +36879,7 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # yield 1 # ^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1482 + # source://prism//lib/prism/translation/ruby_parser.rb#1524 def visit_yield_node(node); end private @@ -36873,12 +36887,12 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # 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#403 + # source://prism//lib/prism/translation/ruby_parser.rb#420 def class_variable_write_type; end # Create a new compiler with the given options. # - # source://prism//lib/prism/translation/ruby_parser.rb#1489 + # source://prism//lib/prism/translation/ruby_parser.rb#1531 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 @@ -36887,53 +36901,53 @@ class Prism::Translation::RubyParser::Compiler < ::Prism::Compiler # # @return [Boolean] # - # source://prism//lib/prism/translation/ruby_parser.rb#308 + # source://prism//lib/prism/translation/ruby_parser.rb#325 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#314 + # source://prism//lib/prism/translation/ruby_parser.rb#331 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#1494 + # source://prism//lib/prism/translation/ruby_parser.rb#1536 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#1504 + # source://prism//lib/prism/translation/ruby_parser.rb#1546 def visit_block(node, sexp, block); end # def foo((bar, baz)); end # ^^^^^^^^^^ # - # source://prism//lib/prism/translation/ruby_parser.rb#1159 + # source://prism//lib/prism/translation/ruby_parser.rb#1195 def visit_destructured_parameter(node); end # Visit the interpolated content of the string-like node. # - # source://prism//lib/prism/translation/ruby_parser.rb#865 + # source://prism//lib/prism/translation/ruby_parser.rb#882 def visit_interpolated_parts(parts); end # Pattern constants get wrapped in another layer of :const. # - # source://prism//lib/prism/translation/ruby_parser.rb#1525 + # source://prism//lib/prism/translation/ruby_parser.rb#1567 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#1235 + # source://prism//lib/prism/translation/ruby_parser.rb#1271 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#1539 + # source://prism//lib/prism/translation/ruby_parser.rb#1581 def visit_write_value(node); end end @@ -36942,62 +36956,62 @@ end # true # ^^^^ # -# source://prism//lib/prism/node.rb#18041 +# source://prism//lib/prism/node.rb#15741 class Prism::TrueNode < ::Prism::Node - # def initialize: (Location location) -> void + # Initialize a new TrueNode node. # # @return [TrueNode] a new instance of TrueNode # - # source://prism//lib/prism/node.rb#18043 - sig { params(source: Prism::Source, location: Prism::Location).void } - def initialize(source, location); end + # source://prism//lib/prism/node.rb#15743 + 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#18116 + # source://prism//lib/prism/node.rb#15800 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18049 + # source://prism//lib/prism/node.rb#15751 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18054 + # source://prism//lib/prism/node.rb#15756 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#18064 + # source://prism//lib/prism/node.rb#15766 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#18059 + # source://prism//lib/prism/node.rb#15761 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?location: Location) -> TrueNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer) -> TrueNode # - # source://prism//lib/prism/node.rb#18069 - sig { params(location: Prism::Location).returns(Prism::TrueNode) } - def copy(location: T.unsafe(nil)); end + # source://prism//lib/prism/node.rb#15771 + 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18054 + # source://prism//lib/prism/node.rb#15756 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location } # - # source://prism//lib/prism/node.rb#18077 + # source://prism//lib/prism/node.rb#15779 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -37006,38 +37020,20 @@ class Prism::TrueNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18082 + # source://prism//lib/prism/node.rb#15784 sig { override.returns(String) } def inspect; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18100 + # source://prism//lib/prism/node.rb#15789 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18110 + # source://prism//lib/prism/node.rb#15794 def type; end end end @@ -37047,237 +37043,233 @@ end # undef :foo, :bar, :baz # ^^^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18125 +# source://prism//lib/prism/node.rb#15809 class Prism::UndefNode < ::Prism::Node - # def initialize: (Array[SymbolNode | InterpolatedSymbolNode] names, Location keyword_loc, Location location) -> void + # Initialize a new UndefNode node. # # @return [UndefNode] a new instance of UndefNode # - # source://prism//lib/prism/node.rb#18127 + # source://prism//lib/prism/node.rb#15811 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], - keyword_loc: Prism::Location, - location: Prism::Location - ).void - end - def initialize(source, names, keyword_loc, location); 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#18217 - def ===(other); end - - # def accept: (Visitor visitor) -> void - # - # source://prism//lib/prism/node.rb#18135 - sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } - def accept(visitor); end - - # def child_nodes: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18140 - 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#18150 - 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#18145 - sig { override.returns(T::Array[Prism::Node]) } - def compact_child_nodes; end - - # def copy: (?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location, ?location: Location) -> UndefNode - # - # source://prism//lib/prism/node.rb#18155 - sig do - params( - names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], - keyword_loc: Prism::Location, - location: Prism::Location - ).returns(Prism::UndefNode) - end - def copy(names: T.unsafe(nil), keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); end - - # def child_nodes: () -> Array[nil | Node] - # def deconstruct: () -> Array[nil | Node] - # - # source://prism//lib/prism/node.rb#18140 - sig { override.returns(T::Array[T.nilable(Prism::Node)]) } - def deconstruct; end - - # def deconstruct_keys: (Array[Symbol] keys) -> { names: Array[SymbolNode | InterpolatedSymbolNode], keyword_loc: Location, location: Location } - # - # source://prism//lib/prism/node.rb#18163 - sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } - def deconstruct_keys(keys); end - - sig { override.returns(T::Array[Prism::Reflection::Field]) } - def fields; end - - # def inspect -> String - # - # source://prism//lib/prism/node.rb#18183 - sig { override.returns(String) } - def inspect; end - - # def keyword: () -> String - # - # source://prism//lib/prism/node.rb#18178 - sig { returns(String) } - def keyword; end - - # attr_reader keyword_loc: Location - # - # source://prism//lib/prism/node.rb#18171 - sig { returns(Prism::Location) } - def keyword_loc; end - - # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] - # - # source://prism//lib/prism/node.rb#18168 - sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } - def names; end - - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18201 - sig { override.returns(Symbol) } - def type; end - - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18211 - def type; end - end -end - -# Represents the use of the `unless` keyword, either in the block form or the modifier form. -# -# bar unless foo -# ^^^^^^^^^^^^^^ -# -# unless foo then bar end -# ^^^^^^^^^^^^^^^^^^^^^^^ -# -# source://prism//lib/prism/node.rb#18232 -class Prism::UnlessNode < ::Prism::Node - # def initialize: (Location keyword_loc, Prism::node predicate, Location? then_keyword_loc, StatementsNode? statements, ElseNode? consequent, Location? end_keyword_loc, Location location) -> void - # - # @return [UnlessNode] a new instance of UnlessNode - # - # source://prism//lib/prism/node.rb#18234 - sig do - params( - source: Prism::Source, - keyword_loc: Prism::Location, - predicate: Prism::Node, - then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::ElseNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + keyword_loc: Prism::Location ).void end - def initialize(source, keyword_loc, predicate, then_keyword_loc, statements, consequent, end_keyword_loc, location); end + def initialize(source, node_id, location, flags, names, keyword_loc); 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#18399 + # source://prism//lib/prism/node.rb#15885 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18246 + # source://prism//lib/prism/node.rb#15821 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18251 + # source://prism//lib/prism/node.rb#15826 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#18265 + # source://prism//lib/prism/node.rb#15836 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#18256 + # source://prism//lib/prism/node.rb#15831 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # The else clause of the unless expression, if present. + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?names: Array[SymbolNode | InterpolatedSymbolNode], ?keyword_loc: Location) -> UndefNode # - # unless cond then bar else baz end - # ^^^^^^^^ + # source://prism//lib/prism/node.rb#15841 + sig do + params( + node_id: Integer, + location: Prism::Location, + flags: Integer, + names: T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)], + 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 child_nodes: () -> Array[nil | Node] + # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18331 - sig { returns(T.nilable(Prism::ElseNode)) } + # source://prism//lib/prism/node.rb#15826 + 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#15849 + sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } + def deconstruct_keys(keys); end + + sig { override.returns(T::Array[Prism::Reflection::Field]) } + def fields; end + + # def inspect -> String + # + # source://prism//lib/prism/node.rb#15869 + sig { override.returns(String) } + def inspect; end + + # def keyword: () -> String + # + # source://prism//lib/prism/node.rb#15864 + sig { returns(String) } + def keyword; end + + # attr_reader keyword_loc: Location + # + # source://prism//lib/prism/node.rb#15857 + sig { returns(Prism::Location) } + def keyword_loc; end + + # attr_reader names: Array[SymbolNode | InterpolatedSymbolNode] + # + # source://prism//lib/prism/node.rb#15854 + sig { returns(T::Array[T.any(Prism::SymbolNode, Prism::InterpolatedSymbolNode)]) } + def names; end + + # Return a symbol representation of this node type. See `Node#type`. + # + # source://prism//lib/prism/node.rb#15874 + 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#15879 + def type; end + end +end + +# Represents the use of the `unless` keyword, either in the block form or the modifier form. +# +# bar unless foo +# ^^^^^^^^^^^^^^ +# +# unless foo then bar end +# ^^^^^^^^^^^^^^^^^^^^^^^ +# +# source://prism//lib/prism/node.rb#15900 +class Prism::UnlessNode < ::Prism::Node + # Initialize a new UnlessNode node. + # + # @return [UnlessNode] a new instance of UnlessNode + # + # source://prism//lib/prism/node.rb#15902 + sig do + params( + source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, + keyword_loc: Prism::Location, + predicate: Prism::Node, + then_keyword_loc: T.nilable(Prism::Location), + statements: T.nilable(Prism::StatementsNode), + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) + ).void + end + def initialize(source, node_id, location, flags, keyword_loc, predicate, then_keyword_loc, statements, else_clause, end_keyword_loc); 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#16051 + def ===(other); end + + # def accept: (Visitor visitor) -> void + # + # source://prism//lib/prism/node.rb#15916 + sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } + def accept(visitor); end + + # def child_nodes: () -> Array[nil | Node] + # + # source://prism//lib/prism/node.rb#15921 + 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#15935 + 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#15926 + 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 def consequent; end - # def copy: (?keyword_loc: Location, ?predicate: Prism::node, ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?consequent: ElseNode?, ?end_keyword_loc: Location?, ?location: Location) -> UnlessNode + # 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#18270 + # source://prism//lib/prism/node.rb#15940 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, predicate: Prism::Node, then_keyword_loc: T.nilable(Prism::Location), statements: T.nilable(Prism::StatementsNode), - consequent: T.nilable(Prism::ElseNode), - end_keyword_loc: T.nilable(Prism::Location), - location: Prism::Location + else_clause: T.nilable(Prism::ElseNode), + end_keyword_loc: T.nilable(Prism::Location) ).returns(Prism::UnlessNode) end - def copy(keyword_loc: T.unsafe(nil), predicate: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), end_keyword_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18251 + # source://prism//lib/prism/node.rb#15921 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, predicate: Prism::node, then_keyword_loc: Location?, statements: StatementsNode?, consequent: ElseNode?, end_keyword_loc: Location?, location: Location } + # 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#18278 + # source://prism//lib/prism/node.rb#15948 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end + # The else clause of the unless expression, if present. + # + # unless cond then bar else baz end + # ^^^^^^^^ + # + # source://prism//lib/prism/node.rb#16001 + sig { returns(T.nilable(Prism::ElseNode)) } + def else_clause; end + # def end_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18360 + # source://prism//lib/prism/node.rb#16030 sig { returns(T.nilable(String)) } def end_keyword; end @@ -37286,7 +37278,7 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18337 + # source://prism//lib/prism/node.rb#16007 sig { returns(T.nilable(Prism::Location)) } def end_keyword_loc; end @@ -37295,13 +37287,13 @@ class Prism::UnlessNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18365 + # source://prism//lib/prism/node.rb#16035 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18350 + # source://prism//lib/prism/node.rb#16020 sig { returns(String) } def keyword; end @@ -37313,12 +37305,12 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^^^ # - # source://prism//lib/prism/node.rb#18289 + # source://prism//lib/prism/node.rb#15959 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#97 - def newline!(lines); end + 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). # @@ -37328,7 +37320,7 @@ class Prism::UnlessNode < ::Prism::Node # bar unless cond # ^^^^ # - # source://prism//lib/prism/node.rb#18302 + # source://prism//lib/prism/node.rb#15972 sig { returns(Prism::Node) } def predicate; end @@ -37338,13 +37330,13 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^ # - # source://prism//lib/prism/node.rb#18325 + # source://prism//lib/prism/node.rb#15995 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18355 + # source://prism//lib/prism/node.rb#16025 sig { returns(T.nilable(String)) } def then_keyword; end @@ -37353,38 +37345,20 @@ class Prism::UnlessNode < ::Prism::Node # unless cond then bar end # ^^^^ # - # source://prism//lib/prism/node.rb#18308 + # source://prism//lib/prism/node.rb#15978 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18383 + # source://prism//lib/prism/node.rb#16040 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18393 + # source://prism//lib/prism/node.rb#16045 def type; end end end @@ -37397,35 +37371,36 @@ end # until foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18417 +# source://prism//lib/prism/node.rb#16069 class Prism::UntilNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # Initialize a new UntilNode node. # # @return [UntilNode] a new instance of UntilNode # - # source://prism//lib/prism/node.rb#18419 + # source://prism//lib/prism/node.rb#16071 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); 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#18545 + # source://prism//lib/prism/node.rb#16176 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18430 + # source://prism//lib/prism/node.rb#16083 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -37433,65 +37408,66 @@ class Prism::UntilNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18496 + # source://prism//lib/prism/node.rb#16119 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18435 + # source://prism//lib/prism/node.rb#16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18506 + # source://prism//lib/prism/node.rb#16155 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18477 + # source://prism//lib/prism/node.rb#16131 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18448 + # source://prism//lib/prism/node.rb#16101 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#18440 + # source://prism//lib/prism/node.rb#16093 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> UntilNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> UntilNode # - # source://prism//lib/prism/node.rb#18453 + # source://prism//lib/prism/node.rb#16106 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).returns(Prism::UntilNode) end - def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18435 + # source://prism//lib/prism/node.rb#16088 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#18461 + # source://prism//lib/prism/node.rb#16114 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -37500,73 +37476,47 @@ class Prism::UntilNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18511 + # source://prism//lib/prism/node.rb#16160 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18501 + # source://prism//lib/prism/node.rb#16150 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18470 + # source://prism//lib/prism/node.rb#16124 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#103 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18490 + # source://prism//lib/prism/node.rb#16144 sig { returns(Prism::Node) } def predicate; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18493 + # source://prism//lib/prism/node.rb#16147 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18529 + # source://prism//lib/prism/node.rb#16165 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18466 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#18539 + # source://prism//lib/prism/node.rb#16170 def type; end end end @@ -38509,85 +38459,89 @@ end # ^^^^^^^^^ # end # -# source://prism//lib/prism/node.rb#18561 +# source://prism//lib/prism/node.rb#16192 class Prism::WhenNode < ::Prism::Node - # def initialize: (Location keyword_loc, Array[Prism::node] conditions, Location? then_keyword_loc, StatementsNode? statements, Location location) -> void + # Initialize a new WhenNode node. # # @return [WhenNode] a new instance of WhenNode # - # source://prism//lib/prism/node.rb#18563 + # source://prism//lib/prism/node.rb#16194 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, conditions: T::Array[Prism::Node], then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, keyword_loc, conditions, then_keyword_loc, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, conditions, then_keyword_loc, statements); 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#18679 + # source://prism//lib/prism/node.rb#16294 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18573 + # source://prism//lib/prism/node.rb#16206 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18578 + # source://prism//lib/prism/node.rb#16211 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#18591 + # source://prism//lib/prism/node.rb#16224 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#18583 + # source://prism//lib/prism/node.rb#16216 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # attr_reader conditions: Array[Prism::node] # - # source://prism//lib/prism/node.rb#18616 + # source://prism//lib/prism/node.rb#16249 sig { returns(T::Array[Prism::Node]) } def conditions; end - # def copy: (?keyword_loc: Location, ?conditions: Array[Prism::node], ?then_keyword_loc: Location?, ?statements: StatementsNode?, ?location: Location) -> WhenNode + # 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#18596 + # source://prism//lib/prism/node.rb#16229 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, conditions: T::Array[Prism::Node], then_keyword_loc: T.nilable(Prism::Location), - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhenNode) end - def copy(keyword_loc: T.unsafe(nil), conditions: T.unsafe(nil), then_keyword_loc: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18578 + # source://prism//lib/prism/node.rb#16211 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, conditions: Array[Prism::node], then_keyword_loc: Location?, statements: StatementsNode?, location: Location } + # 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#18604 + # source://prism//lib/prism/node.rb#16237 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -38596,68 +38550,50 @@ class Prism::WhenNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18645 + # source://prism//lib/prism/node.rb#16278 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18635 + # source://prism//lib/prism/node.rb#16268 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18609 + # source://prism//lib/prism/node.rb#16242 sig { returns(Prism::Location) } def keyword_loc; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18632 + # source://prism//lib/prism/node.rb#16265 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end # def then_keyword: () -> String? # - # source://prism//lib/prism/node.rb#18640 + # source://prism//lib/prism/node.rb#16273 sig { returns(T.nilable(String)) } def then_keyword; end # attr_reader then_keyword_loc: Location? # - # source://prism//lib/prism/node.rb#18619 + # source://prism//lib/prism/node.rb#16252 sig { returns(T.nilable(Prism::Location)) } def then_keyword_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol + # Return a symbol representation of this node type. See `Node#type`. # - # source://prism//lib/prism/node.rb#18663 + # source://prism//lib/prism/node.rb#16283 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18673 + # source://prism//lib/prism/node.rb#16288 def type; end end end @@ -38670,35 +38606,36 @@ end # while foo do bar end # ^^^^^^^^^^^^^^^^^^^^ # -# source://prism//lib/prism/node.rb#18696 +# source://prism//lib/prism/node.rb#16311 class Prism::WhileNode < ::Prism::Node - # def initialize: (Integer flags, Location keyword_loc, Location? closing_loc, Prism::node predicate, StatementsNode? statements, Location location) -> void + # Initialize a new WhileNode node. # # @return [WhileNode] a new instance of WhileNode # - # source://prism//lib/prism/node.rb#18698 + # source://prism//lib/prism/node.rb#16313 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).void end - def initialize(source, flags, keyword_loc, closing_loc, predicate, statements, location); end + def initialize(source, node_id, location, flags, keyword_loc, closing_loc, predicate, statements); 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#18824 + # source://prism//lib/prism/node.rb#16418 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18709 + # source://prism//lib/prism/node.rb#16325 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end @@ -38706,65 +38643,66 @@ class Prism::WhileNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18775 + # source://prism//lib/prism/node.rb#16361 sig { returns(T::Boolean) } def begin_modifier?; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18714 + # source://prism//lib/prism/node.rb#16330 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String? # - # source://prism//lib/prism/node.rb#18785 + # source://prism//lib/prism/node.rb#16397 sig { returns(T.nilable(String)) } def closing; end # attr_reader closing_loc: Location? # - # source://prism//lib/prism/node.rb#18756 + # source://prism//lib/prism/node.rb#16373 sig { returns(T.nilable(Prism::Location)) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18727 + # source://prism//lib/prism/node.rb#16343 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#18719 + # source://prism//lib/prism/node.rb#16335 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?, ?location: Location) -> WhileNode + # def copy: (?node_id: Integer, ?location: Location, ?flags: Integer, ?keyword_loc: Location, ?closing_loc: Location?, ?predicate: Prism::node, ?statements: StatementsNode?) -> WhileNode # - # source://prism//lib/prism/node.rb#18732 + # source://prism//lib/prism/node.rb#16348 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, keyword_loc: Prism::Location, closing_loc: T.nilable(Prism::Location), predicate: Prism::Node, - statements: T.nilable(Prism::StatementsNode), - location: Prism::Location + statements: T.nilable(Prism::StatementsNode) ).returns(Prism::WhileNode) end - def copy(flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end + def copy(node_id: T.unsafe(nil), location: T.unsafe(nil), flags: T.unsafe(nil), keyword_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), predicate: T.unsafe(nil), statements: T.unsafe(nil)); end # def child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18714 + # source://prism//lib/prism/node.rb#16330 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode?, location: Location } + # def deconstruct_keys: (Array[Symbol] keys) -> { node_id: Integer, location: Location, keyword_loc: Location, closing_loc: Location?, predicate: Prism::node, statements: StatementsNode? } # - # source://prism//lib/prism/node.rb#18740 + # source://prism//lib/prism/node.rb#16356 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -38773,73 +38711,47 @@ class Prism::WhileNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18790 + # source://prism//lib/prism/node.rb#16402 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#18780 + # source://prism//lib/prism/node.rb#16392 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#18749 + # source://prism//lib/prism/node.rb#16366 sig { returns(Prism::Location) } def keyword_loc; end # source://prism//lib/prism/parse_result/newlines.rb#109 - def newline!(lines); end + def newline_flag!(lines); end # attr_reader predicate: Prism::node # - # source://prism//lib/prism/node.rb#18769 + # source://prism//lib/prism/node.rb#16386 sig { returns(Prism::Node) } def predicate; end # attr_reader statements: StatementsNode? # - # source://prism//lib/prism/node.rb#18772 + # source://prism//lib/prism/node.rb#16389 sig { returns(T.nilable(Prism::StatementsNode)) } def statements; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18808 + # source://prism//lib/prism/node.rb#16407 sig { override.returns(Symbol) } def type; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18745 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18818 + # source://prism//lib/prism/node.rb#16412 def type; end end end @@ -38849,107 +38761,109 @@ end # `foo` # ^^^^^ # -# source://prism//lib/prism/node.rb#18838 +# source://prism//lib/prism/node.rb#16432 class Prism::XStringNode < ::Prism::Node include ::Prism::HeredocQuery - # def initialize: (Integer flags, Location opening_loc, Location content_loc, Location closing_loc, String unescaped, Location location) -> void + # Initialize a new XStringNode node. # # @return [XStringNode] a new instance of XStringNode # - # source://prism//lib/prism/node.rb#18840 + # source://prism//lib/prism/node.rb#16434 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).void end - def initialize(source, flags, opening_loc, content_loc, closing_loc, unescaped, location); end + def initialize(source, node_id, location, flags, opening_loc, content_loc, closing_loc, unescaped); 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#18971 + # source://prism//lib/prism/node.rb#16544 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18851 + # source://prism//lib/prism/node.rb#16446 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18856 + # source://prism//lib/prism/node.rb#16451 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def child_nodes; end # def closing: () -> String # - # source://prism//lib/prism/node.rb#18932 + # source://prism//lib/prism/node.rb#16523 sig { returns(String) } def closing; end # attr_reader closing_loc: Location # - # source://prism//lib/prism/node.rb#18902 + # source://prism//lib/prism/node.rb#16503 sig { returns(Prism::Location) } def closing_loc; end # def comment_targets: () -> Array[Node | Location] # - # source://prism//lib/prism/node.rb#18866 + # source://prism//lib/prism/node.rb#16461 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#18861 + # source://prism//lib/prism/node.rb#16456 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end # def content: () -> String # - # source://prism//lib/prism/node.rb#18927 + # source://prism//lib/prism/node.rb#16518 sig { returns(String) } def content; end # attr_reader content_loc: Location # - # source://prism//lib/prism/node.rb#18895 + # source://prism//lib/prism/node.rb#16496 sig { returns(Prism::Location) } def content_loc; end - # def copy: (?flags: Integer, ?opening_loc: Location, ?content_loc: Location, ?closing_loc: Location, ?unescaped: String, ?location: Location) -> XStringNode + # 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#18871 + # source://prism//lib/prism/node.rb#16466 sig do params( + node_id: Integer, + location: Prism::Location, flags: Integer, opening_loc: Prism::Location, content_loc: Prism::Location, closing_loc: Prism::Location, - unescaped: String, - location: Prism::Location + unescaped: String ).returns(Prism::XStringNode) end - def copy(flags: T.unsafe(nil), opening_loc: T.unsafe(nil), content_loc: T.unsafe(nil), closing_loc: T.unsafe(nil), unescaped: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#18856 + # source://prism//lib/prism/node.rb#16451 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { flags: Integer, opening_loc: Location, content_loc: Location, closing_loc: Location, unescaped: String, location: Location } + # 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#18879 + # source://prism//lib/prism/node.rb#16474 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -38960,7 +38874,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18917 + # source://prism//lib/prism/node.rb#16484 sig { returns(T::Boolean) } def forced_binary_encoding?; end @@ -38968,7 +38882,7 @@ class Prism::XStringNode < ::Prism::Node # # @return [Boolean] # - # source://prism//lib/prism/node.rb#18912 + # source://prism//lib/prism/node.rb#16479 sig { returns(T::Boolean) } def forced_utf8_encoding?; end @@ -38977,71 +38891,45 @@ class Prism::XStringNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#18937 + # source://prism//lib/prism/node.rb#16528 sig { override.returns(String) } def inspect; end # def opening: () -> String # - # source://prism//lib/prism/node.rb#18922 + # source://prism//lib/prism/node.rb#16513 sig { returns(String) } def opening; end # attr_reader opening_loc: Location # - # source://prism//lib/prism/node.rb#18888 + # source://prism//lib/prism/node.rb#16489 sig { returns(Prism::Location) } def opening_loc; 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#86 + # source://prism//lib/prism/node_ext.rb#90 sig { returns(Prism::InterpolatedXStringNode) } def to_interpolated; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. + # Return a symbol representation of this node type. See `Node#type`. # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. - # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18955 + # source://prism//lib/prism/node.rb#16533 sig { override.returns(Symbol) } def type; end # attr_reader unescaped: String # - # source://prism//lib/prism/node.rb#18909 + # source://prism//lib/prism/node.rb#16510 sig { returns(String) } def unescaped; end - protected - - # protected attr_reader flags: Integer - # - # source://prism//lib/prism/node.rb#18884 - sig { returns(Integer) } - def flags; end - class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. + # Return a symbol representation of this node type. See `Node::type`. # - # def self.type: () -> Symbol - # - # source://prism//lib/prism/node.rb#18965 + # source://prism//lib/prism/node.rb#16538 def type; end end end @@ -39051,85 +38939,89 @@ end # yield 1 # ^^^^^^^ # -# source://prism//lib/prism/node.rb#18985 +# source://prism//lib/prism/node.rb#16558 class Prism::YieldNode < ::Prism::Node - # def initialize: (Location keyword_loc, Location? lparen_loc, ArgumentsNode? arguments, Location? rparen_loc, Location location) -> void + # Initialize a new YieldNode node. # # @return [YieldNode] a new instance of YieldNode # - # source://prism//lib/prism/node.rb#18987 + # source://prism//lib/prism/node.rb#16560 sig do params( source: Prism::Source, + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).void end - def initialize(source, keyword_loc, lparen_loc, arguments, rparen_loc, location); end + def initialize(source, node_id, location, flags, keyword_loc, lparen_loc, arguments, rparen_loc); 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#19117 + # source://prism//lib/prism/node.rb#16674 def ===(other); end # def accept: (Visitor visitor) -> void # - # source://prism//lib/prism/node.rb#18997 + # source://prism//lib/prism/node.rb#16572 sig { override.params(visitor: Prism::Visitor).returns(T.untyped) } def accept(visitor); end # attr_reader arguments: ArgumentsNode? # - # source://prism//lib/prism/node.rb#19052 + # source://prism//lib/prism/node.rb#16627 sig { returns(T.nilable(Prism::ArgumentsNode)) } def arguments; end # def child_nodes: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19002 + # source://prism//lib/prism/node.rb#16577 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#19014 + # source://prism//lib/prism/node.rb#16589 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#19007 + # source://prism//lib/prism/node.rb#16582 sig { override.returns(T::Array[Prism::Node]) } def compact_child_nodes; end - # def copy: (?keyword_loc: Location, ?lparen_loc: Location?, ?arguments: ArgumentsNode?, ?rparen_loc: Location?, ?location: Location) -> YieldNode + # 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#19019 + # source://prism//lib/prism/node.rb#16594 sig do params( + node_id: Integer, + location: Prism::Location, + flags: Integer, keyword_loc: Prism::Location, lparen_loc: T.nilable(Prism::Location), arguments: T.nilable(Prism::ArgumentsNode), - rparen_loc: T.nilable(Prism::Location), - location: Prism::Location + rparen_loc: T.nilable(Prism::Location) ).returns(Prism::YieldNode) end - def copy(keyword_loc: T.unsafe(nil), lparen_loc: T.unsafe(nil), arguments: T.unsafe(nil), rparen_loc: T.unsafe(nil), location: T.unsafe(nil)); 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 child_nodes: () -> Array[nil | Node] # def deconstruct: () -> Array[nil | Node] # - # source://prism//lib/prism/node.rb#19002 + # source://prism//lib/prism/node.rb#16577 sig { override.returns(T::Array[T.nilable(Prism::Node)]) } def deconstruct; end - # def deconstruct_keys: (Array[Symbol] keys) -> { keyword_loc: Location, lparen_loc: Location?, arguments: ArgumentsNode?, rparen_loc: Location?, location: Location } + # 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#19027 + # source://prism//lib/prism/node.rb#16602 sig { params(keys: T.nilable(T::Array[Symbol])).returns(T::Hash[Symbol, T.untyped]) } def deconstruct_keys(keys); end @@ -39138,74 +39030,56 @@ class Prism::YieldNode < ::Prism::Node # def inspect -> String # - # source://prism//lib/prism/node.rb#19083 + # source://prism//lib/prism/node.rb#16658 sig { override.returns(String) } def inspect; end # def keyword: () -> String # - # source://prism//lib/prism/node.rb#19068 + # source://prism//lib/prism/node.rb#16643 sig { returns(String) } def keyword; end # attr_reader keyword_loc: Location # - # source://prism//lib/prism/node.rb#19032 + # source://prism//lib/prism/node.rb#16607 sig { returns(Prism::Location) } def keyword_loc; end # def lparen: () -> String? # - # source://prism//lib/prism/node.rb#19073 + # source://prism//lib/prism/node.rb#16648 sig { returns(T.nilable(String)) } def lparen; end # attr_reader lparen_loc: Location? # - # source://prism//lib/prism/node.rb#19039 + # source://prism//lib/prism/node.rb#16614 sig { returns(T.nilable(Prism::Location)) } def lparen_loc; end # def rparen: () -> String? # - # source://prism//lib/prism/node.rb#19078 + # source://prism//lib/prism/node.rb#16653 sig { returns(T.nilable(String)) } def rparen; end # attr_reader rparen_loc: Location? # - # source://prism//lib/prism/node.rb#19055 + # source://prism//lib/prism/node.rb#16630 sig { returns(T.nilable(Prism::Location)) } def rparen_loc; end - # Sometimes you want to check an instance of a node against a list of - # classes to see what kind of behavior to perform. Usually this is done by - # calling `[cls1, cls2].include?(node.class)` or putting the node into a - # case statement and doing `case node; when cls1; when cls2; end`. Both of - # these approaches are relatively slow because of the constant lookups, - # method calls, and/or array allocations. - # - # Instead, you can call #type, which will return to you a symbol that you - # can use for comparison. This is faster than the other approaches because - # it uses a single integer comparison, but also because if you're on CRuby - # you can take advantage of the fact that case statements with all symbol - # keys will use a jump table. + # Return a symbol representation of this node type. See `Node#type`. # - # def type: () -> Symbol - # - # source://prism//lib/prism/node.rb#19101 + # source://prism//lib/prism/node.rb#16663 sig { override.returns(Symbol) } def type; end class << self - # Similar to #type, this method returns a symbol that you can use for - # splitting on the type of the node without having to do a long === chain. - # 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. - # - # def self.type: () -> Symbol + # Return a symbol representation of this node type. See `Node::type`. # - # source://prism//lib/prism/node.rb#19111 + # source://prism//lib/prism/node.rb#16668 def type; end end end diff --git a/sorbet/rbi/gems/protocol-hpack@1.4.2.rbi b/sorbet/rbi/gems/protocol-hpack@1.4.3.rbi similarity index 73% rename from sorbet/rbi/gems/protocol-hpack@1.4.2.rbi rename to sorbet/rbi/gems/protocol-hpack@1.4.3.rbi index abfdcacf4..ca45ac3c9 100644 --- a/sorbet/rbi/gems/protocol-hpack@1.4.2.rbi +++ b/sorbet/rbi/gems/protocol-hpack@1.4.3.rbi @@ -4,7 +4,8 @@ # This is an autogenerated file for types exported from the `protocol-hpack` gem. # Please instead update this file by running `bin/tapioca gem protocol-hpack`. -# source://protocol-hpack//lib/protocol/hpack/version.rb#23 + +# source://protocol-hpack//lib/protocol/hpack/version.rb#6 module Protocol; end # Implementation of header compression for HTTP 2.0 (HPACK) format adapted @@ -12,29 +13,32 @@ module Protocol; end # # - http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-10 # -# source://protocol-hpack//lib/protocol/hpack/version.rb#24 +# source://protocol-hpack//lib/protocol/hpack/version.rb#7 module Protocol::HPACK; end -# source://protocol-hpack//lib/protocol/hpack/error.rb#29 +# source://protocol-hpack//lib/protocol/hpack/context.rb#17 +Protocol::HPACK::CHANGE_TABLE_SIZE_TYPE = T.let(T.unsafe(nil), Hash) + +# source://protocol-hpack//lib/protocol/hpack/error.rb#11 class Protocol::HPACK::CompressionError < ::Protocol::HPACK::Error; end # Responsible for encoding header key-value pairs using HPACK algorithm. # -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#52 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#43 class Protocol::HPACK::Compressor # @return [Compressor] a new instance of Compressor # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#53 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#44 def initialize(buffer, context = T.unsafe(nil), table_size_limit: T.unsafe(nil)); end # Returns the value of attribute buffer. # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#62 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#53 def buffer; end # Returns the value of attribute context. # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#63 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#54 def context; end # Encodes provided list of HTTP headers. @@ -42,26 +46,23 @@ class Protocol::HPACK::Compressor # @param headers [Array] +[[name, value], ...]+ # @return [Buffer] # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#188 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#175 def encode(headers, table_size = T.unsafe(nil)); end - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#108 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#95 def huffman; end # Returns the value of attribute offset. # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#64 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#55 def offset; end # Returns the value of attribute table_size_limit. # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#60 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#51 def table_size_limit; end - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#66 - def write_byte(byte); end - - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#70 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#57 def write_bytes(bytes); end # Encodes header command with appropriate header representation. @@ -70,7 +71,7 @@ class Protocol::HPACK::Compressor # @param buffer [String] # @return [Buffer] # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#159 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#146 def write_header(command); end # Encodes provided value via integer representation. @@ -89,7 +90,7 @@ class Protocol::HPACK::Compressor # @param bits [Integer] number of available bits # @return [String] binary string # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#89 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#76 def write_integer(value, bits); end # Encodes provided value via string literal representation. @@ -112,7 +113,7 @@ class Protocol::HPACK::Compressor # @param string [String] # @return [String] binary string # - # source://protocol-hpack//lib/protocol/hpack/compressor.rb#132 + # source://protocol-hpack//lib/protocol/hpack/compressor.rb#119 def write_string(string, huffman = T.unsafe(nil)); end end @@ -120,20 +121,20 @@ end # dynamic table as a decoding context. # No other state information is needed. # -# source://protocol-hpack//lib/protocol/hpack/context.rb#44 +# source://protocol-hpack//lib/protocol/hpack/context.rb#31 class Protocol::HPACK::Context # Initializes compression context with appropriate client/server defaults and maximum size of the dynamic table. # # @option huffman - # @option table_size # @option index - # @param table_size [Hash] a customizable set of options - # @param huffman [Hash] a customizable set of options + # @option table_size # @param table [Array] Table of header key-value pairs. + # @param huffman [Hash] a customizable set of options # @param index [Hash] a customizable set of options + # @param table_size [Hash] a customizable set of options # @return [Context] a new instance of Context # - # source://protocol-hpack//lib/protocol/hpack/context.rb#117 + # source://protocol-hpack//lib/protocol/hpack/context.rb#104 def initialize(table = T.unsafe(nil), huffman: T.unsafe(nil), index: T.unsafe(nil), table_size: T.unsafe(nil)); end # Emits command for a header. @@ -149,18 +150,18 @@ class Protocol::HPACK::Context # @param header [Array] +[name, value]+ # @return [Hash] command # - # source://protocol-hpack//lib/protocol/hpack/context.rb#251 + # source://protocol-hpack//lib/protocol/hpack/context.rb#238 def add_command(*header); end - # source://protocol-hpack//lib/protocol/hpack/context.rb#292 + # source://protocol-hpack//lib/protocol/hpack/context.rb#279 def change_table_size(size); end # Returns current table size in octets # # @return [Integer] # - # source://protocol-hpack//lib/protocol/hpack/context.rb#301 - def current_table_size; end + # source://protocol-hpack//lib/protocol/hpack/context.rb#288 + def compute_current_table_size; end # Header Block Processing # - http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-10#section-4.1 @@ -168,7 +169,7 @@ class Protocol::HPACK::Context # @param command [Hash] {type:, name:, value:, index:} # @return [Array] +[name, value]+ header field that is added to the decoded header list # - # source://protocol-hpack//lib/protocol/hpack/context.rb#167 + # source://protocol-hpack//lib/protocol/hpack/context.rb#154 def decode(command); end # Finds an entry in current dynamic table by index. @@ -182,7 +183,7 @@ class Protocol::HPACK::Context # @param index [Integer] zero-based index in the dynamic table. # @return [Array] +[key, value]+ # - # source://protocol-hpack//lib/protocol/hpack/context.rb#151 + # source://protocol-hpack//lib/protocol/hpack/context.rb#138 def dereference(index); end # Plan header compression according to +@index+ @@ -193,33 +194,33 @@ class Protocol::HPACK::Context # @param headers [Array] +[[name, value], ...]+ # @return [Array] array of commands # - # source://protocol-hpack//lib/protocol/hpack/context.rb#222 + # source://protocol-hpack//lib/protocol/hpack/context.rb#209 def encode(headers); end # Returns the value of attribute huffman. # - # source://protocol-hpack//lib/protocol/hpack/context.rb#136 + # source://protocol-hpack//lib/protocol/hpack/context.rb#123 def huffman; end # Returns the value of attribute index. # - # source://protocol-hpack//lib/protocol/hpack/context.rb#137 + # source://protocol-hpack//lib/protocol/hpack/context.rb#124 def index; end # Current table of header key-value pairs. # - # source://protocol-hpack//lib/protocol/hpack/context.rb#134 + # source://protocol-hpack//lib/protocol/hpack/context.rb#121 def table; end # Returns the value of attribute table_size. # - # source://protocol-hpack//lib/protocol/hpack/context.rb#139 + # source://protocol-hpack//lib/protocol/hpack/context.rb#126 def table_size; end # Alter dynamic table size. # When the size is reduced, some headers might be evicted. # - # source://protocol-hpack//lib/protocol/hpack/context.rb#287 + # source://protocol-hpack//lib/protocol/hpack/context.rb#274 def table_size=(size); end private @@ -228,10 +229,13 @@ class Protocol::HPACK::Context # # @param command [Array] +[name, value]+ # - # source://protocol-hpack//lib/protocol/hpack/context.rb#310 + # source://protocol-hpack//lib/protocol/hpack/context.rb#297 def add_to_table(command); end - # source://protocol-hpack//lib/protocol/hpack/context.rb#126 + # source://protocol-hpack//lib/protocol/hpack/context.rb#307 + def entry_size(e); end + + # source://protocol-hpack//lib/protocol/hpack/context.rb#113 def initialize_copy(other); end # To keep the dynamic table size lower than or equal to @table_size, @@ -240,38 +244,38 @@ class Protocol::HPACK::Context # @param command [Hash] # @return [Boolean] whether +command+ fits in the dynamic table. # - # source://protocol-hpack//lib/protocol/hpack/context.rb#324 + # source://protocol-hpack//lib/protocol/hpack/context.rb#316 def size_check(command); end end # Static header table. # https://tools.ietf.org/html/rfc7541#appendix-A # -# source://protocol-hpack//lib/protocol/hpack/context.rb#47 +# source://protocol-hpack//lib/protocol/hpack/context.rb#34 Protocol::HPACK::Context::STATIC_TABLE = T.let(T.unsafe(nil), Array) -# source://protocol-hpack//lib/protocol/hpack/error.rb#32 +# source://protocol-hpack//lib/protocol/hpack/error.rb#14 class Protocol::HPACK::DecompressionError < ::Protocol::HPACK::Error; end # Responsible for decoding received headers and maintaining compression # context of the opposing peer. Decompressor must be initialized with # appropriate starting context based on local role: client or server. # -# source://protocol-hpack//lib/protocol/hpack/decompressor.rb#32 +# source://protocol-hpack//lib/protocol/hpack/decompressor.rb#14 class Protocol::HPACK::Decompressor # @return [Decompressor] a new instance of Decompressor # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#33 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#18 def initialize(buffer, context = T.unsafe(nil), table_size_limit: T.unsafe(nil)); end # Returns the value of attribute buffer. # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#41 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#26 def buffer; end # Returns the value of attribute context. # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#42 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#27 def context; end # Decodes and processes header commands within provided buffer. @@ -279,35 +283,34 @@ class Protocol::HPACK::Decompressor # @param buffer [Buffer] # @return [Array] +[[name, value], ...]+ # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#155 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#190 def decode(list = T.unsafe(nil)); end # @return [Boolean] # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#47 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#32 def end?; end # Returns the value of attribute offset. # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#43 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#28 def offset; end - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#59 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#44 def peek_byte; end - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#51 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#36 def read_byte; end - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#63 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#48 def read_bytes(length); end # Decodes header command from provided buffer. # # @param buffer [Buffer] - # @raise [CompressionError] # @return [Hash] command # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#115 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#100 def read_header; end # Decodes integer value from provided buffer. @@ -315,7 +318,7 @@ class Protocol::HPACK::Decompressor # @param bits [Integer] number of available bits # @return [Integer] # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#75 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#60 def read_integer(bits); end # Decodes string value from provided buffer. @@ -323,26 +326,27 @@ class Protocol::HPACK::Decompressor # @raise [CompressionError] when input is malformed # @return [String] UTF-8 encoded string # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#95 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#80 def read_string; end # Returns the value of attribute table_size_limit. # - # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#45 + # source://protocol-hpack//lib/protocol/hpack/decompressor.rb#30 def table_size_limit; end end -# source://protocol-hpack//lib/protocol/hpack/error.rb#26 +# source://protocol-hpack//lib/protocol/hpack/decompressor.rb#16 +Protocol::HPACK::Decompressor::MASK_SHIFT_4 = T.let(T.unsafe(nil), Integer) + +# source://protocol-hpack//lib/protocol/hpack/error.rb#8 class Protocol::HPACK::Error < ::StandardError; end -# Header representation as defined by the spec. -# -# source://protocol-hpack//lib/protocol/hpack/context.rb#33 +# source://protocol-hpack//lib/protocol/hpack/context.rb#20 Protocol::HPACK::HEADER_REPRESENTATION = T.let(T.unsafe(nil), Hash) # Implementation of huffman encoding for HPACK. # -# source://protocol-hpack//lib/protocol/hpack/huffman/machine.rb#29 +# source://protocol-hpack//lib/protocol/hpack/huffman/machine.rb#11 class Protocol::HPACK::Huffman # Decodes provided Huffman coded string. # @@ -350,7 +354,7 @@ class Protocol::HPACK::Huffman # @raise [CompressionError] when Huffman coded string is malformed # @return [String] binary string # - # source://protocol-hpack//lib/protocol/hpack/huffman.rb#50 + # source://protocol-hpack//lib/protocol/hpack/huffman.rb#36 def decode(buffer); end # Encodes provided value via huffman encoding. @@ -359,59 +363,73 @@ class Protocol::HPACK::Huffman # @param str [String] # @return [String] binary string # - # source://protocol-hpack//lib/protocol/hpack/huffman.rb#39 + # source://protocol-hpack//lib/protocol/hpack/huffman.rb#25 def encode(str); end end -# source://protocol-hpack//lib/protocol/hpack/huffman.rb#31 +# source://protocol-hpack//lib/protocol/hpack/huffman.rb#17 Protocol::HPACK::Huffman::BITS_AT_ONCE = T.let(T.unsafe(nil), Integer) # Huffman table as specified in https://tools.ietf.org/html/rfc7541#appendix-B # -# source://protocol-hpack//lib/protocol/hpack/huffman.rb#79 +# source://protocol-hpack//lib/protocol/hpack/huffman.rb#65 Protocol::HPACK::Huffman::CODES = T.let(T.unsafe(nil), Array) -# source://protocol-hpack//lib/protocol/hpack/huffman.rb#339 +# source://protocol-hpack//lib/protocol/hpack/huffman.rb#325 Protocol::HPACK::Huffman::ENCODE_TABLE = T.let(T.unsafe(nil), Array) -# source://protocol-hpack//lib/protocol/hpack/huffman.rb#32 +# source://protocol-hpack//lib/protocol/hpack/huffman.rb#18 Protocol::HPACK::Huffman::EOS = T.let(T.unsafe(nil), Integer) -# source://protocol-hpack//lib/protocol/hpack/huffman/machine.rb#32 +# source://protocol-hpack//lib/protocol/hpack/huffman/machine.rb#14 Protocol::HPACK::Huffman::MACHINE = T.let(T.unsafe(nil), Array) -# source://protocol-hpack//lib/protocol/hpack/huffman/machine.rb#31 +# source://protocol-hpack//lib/protocol/hpack/huffman/machine.rb#13 Protocol::HPACK::Huffman::MAX_FINAL_STATE = T.let(T.unsafe(nil), Integer) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#32 +# source://protocol-hpack//lib/protocol/hpack/context.rb#18 +Protocol::HPACK::INCREMENTAL_TYPE = T.let(T.unsafe(nil), Hash) + +# source://protocol-hpack//lib/protocol/hpack/context.rb#19 +Protocol::HPACK::INDEXED_TYPE = T.let(T.unsafe(nil), Hash) + +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#23 Protocol::HPACK::LINEAR = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#36 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#27 Protocol::HPACK::LINEAR_HUFFMAN = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#40 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#31 Protocol::HPACK::MODES = T.let(T.unsafe(nil), Hash) # Predefined options set for Compressor # http://mew.org/~kazu/material/2014-hpack.pdf # -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#31 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#22 Protocol::HPACK::NAIVE = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#35 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#26 Protocol::HPACK::NAIVE_HUFFMAN = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#34 +# source://protocol-hpack//lib/protocol/hpack/context.rb#16 +Protocol::HPACK::NEVER_INDEXED_TYPE = T.let(T.unsafe(nil), Hash) + +# Header representation as defined by the spec. +# +# source://protocol-hpack//lib/protocol/hpack/context.rb#15 +Protocol::HPACK::NO_INDEX_TYPE = T.let(T.unsafe(nil), Hash) + +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#25 Protocol::HPACK::SHORTER = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#38 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#29 Protocol::HPACK::SHORTER_HUFFMAN = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#33 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#24 Protocol::HPACK::STATIC = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/compressor.rb#37 +# source://protocol-hpack//lib/protocol/hpack/compressor.rb#28 Protocol::HPACK::STATIC_HUFFMAN = T.let(T.unsafe(nil), Hash) -# source://protocol-hpack//lib/protocol/hpack/version.rb#25 +# source://protocol-hpack//lib/protocol/hpack/version.rb#8 Protocol::HPACK::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/protocol-http1@0.16.0.rbi b/sorbet/rbi/gems/protocol-http1@0.19.1.rbi similarity index 72% rename from sorbet/rbi/gems/protocol-http1@0.16.0.rbi rename to sorbet/rbi/gems/protocol-http1@0.19.1.rbi index 1f6506601..96cdd2286 100644 --- a/sorbet/rbi/gems/protocol-http1@0.16.0.rbi +++ b/sorbet/rbi/gems/protocol-http1@0.19.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `protocol-http1` gem. # Please instead update this file by running `bin/tapioca gem protocol-http1`. + # source://protocol-http1//lib/protocol/http1/version.rb#6 module Protocol; end @@ -21,50 +22,50 @@ class Protocol::HTTP1::BadRequest < ::Protocol::HTTP1::Error; end # source://protocol-http1//lib/protocol/http1/error.rb#27 class Protocol::HTTP1::BadResponse < ::Protocol::HTTP1::Error; end -# source://protocol-http1//lib/protocol/http1/body/chunked.rb#10 +# source://protocol-http1//lib/protocol/http1/body/chunked.rb#11 module Protocol::HTTP1::Body; end -# source://protocol-http1//lib/protocol/http1/body/chunked.rb#11 +# source://protocol-http1//lib/protocol/http1/body/chunked.rb#12 class Protocol::HTTP1::Body::Chunked < ::Protocol::HTTP::Body::Readable # @return [Chunked] a new instance of Chunked # - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#14 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#15 def initialize(stream, headers); end - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#28 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#29 def close(error = T.unsafe(nil)); end # @return [Boolean] # - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#24 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#25 def empty?; end - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#73 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#74 def inspect; end # Follows the procedure outlined in https://tools.ietf.org/html/rfc7230#section-4.1.3 # - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#41 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#42 def read; end private - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#83 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#84 def read_line; end # @return [Boolean] # - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#79 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#80 def read_line?; end - # source://protocol-http1//lib/protocol/http1/body/chunked.rb#87 + # source://protocol-http1//lib/protocol/http1/body/chunked.rb#88 def read_trailer; end end -# source://protocol-http1//lib/protocol/http1/body/chunked.rb#12 +# source://protocol-http1//lib/protocol/http1/body/chunked.rb#13 Protocol::HTTP1::Body::Chunked::CRLF = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/body/chunked.rb#38 +# source://protocol-http1//lib/protocol/http1/body/chunked.rb#39 Protocol::HTTP1::Body::Chunked::VALID_CHUNK_LENGTH = T.let(T.unsafe(nil), Regexp) # source://protocol-http1//lib/protocol/http1/body/fixed.rb#11 @@ -111,187 +112,220 @@ class Protocol::HTTP1::Body::Remainder < ::Protocol::HTTP::Body::Readable # source://protocol-http1//lib/protocol/http1/body/remainder.rb#15 def initialize(stream); end - # source://protocol-http1//lib/protocol/http1/body/remainder.rb#38 + # source://protocol-http1//lib/protocol/http1/body/remainder.rb#42 def call(stream); end - # source://protocol-http1//lib/protocol/http1/body/remainder.rb#23 + # source://protocol-http1//lib/protocol/http1/body/remainder.rb#24 def close(error = T.unsafe(nil)); end # @return [Boolean] # - # source://protocol-http1//lib/protocol/http1/body/remainder.rb#19 + # source://protocol-http1//lib/protocol/http1/body/remainder.rb#20 def empty?; end - # source://protocol-http1//lib/protocol/http1/body/remainder.rb#50 + # source://protocol-http1//lib/protocol/http1/body/remainder.rb#56 def inspect; end - # source://protocol-http1//lib/protocol/http1/body/remainder.rb#46 + # source://protocol-http1//lib/protocol/http1/body/remainder.rb#50 def join; end # TODO this is a bit less efficient in order to maintain compatibility with `IO`. # - # source://protocol-http1//lib/protocol/http1/body/remainder.rb#31 + # source://protocol-http1//lib/protocol/http1/body/remainder.rb#33 def read; end end # source://protocol-http1//lib/protocol/http1/body/remainder.rb#12 Protocol::HTTP1::Body::Remainder::BLOCK_SIZE = T.let(T.unsafe(nil), Integer) -# source://protocol-http1//lib/protocol/http1/connection.rb#25 +# source://protocol-http1//lib/protocol/http1/connection.rb#27 Protocol::HTTP1::CHUNKED = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#28 +# source://protocol-http1//lib/protocol/http1/connection.rb#30 Protocol::HTTP1::CLOSE = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#27 +# source://protocol-http1//lib/protocol/http1/connection.rb#29 Protocol::HTTP1::CONNECTION = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#22 +# source://protocol-http1//lib/protocol/http1/connection.rb#24 Protocol::HTTP1::CONTENT_LENGTH = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#46 +# source://protocol-http1//lib/protocol/http1/connection.rb#48 class Protocol::HTTP1::Connection # @return [Connection] a new instance of Connection # - # source://protocol-http1//lib/protocol/http1/connection.rb#51 + # source://protocol-http1//lib/protocol/http1/connection.rb#53 def initialize(stream, persistent = T.unsafe(nil)); end # Close the connection and underlying stream. # - # source://protocol-http1//lib/protocol/http1/connection.rb#113 + # source://protocol-http1//lib/protocol/http1/connection.rb#129 def close; end # The number of requests processed. # - # source://protocol-http1//lib/protocol/http1/connection.rb#65 + # source://protocol-http1//lib/protocol/http1/connection.rb#74 def count; end - # source://protocol-http1//lib/protocol/http1/connection.rb#412 + # source://protocol-http1//lib/protocol/http1/connection.rb#442 def extract_content_length(headers); end # Effectively close the connection and return the underlying IO. # # @return [IO] the underlying non-blocking IO. # - # source://protocol-http1//lib/protocol/http1/connection.rb#102 + # source://protocol-http1//lib/protocol/http1/connection.rb#118 def hijack!; end + # Indicates whether the connection has been hijacked meaning its + # IO has been handed over and is not usable anymore. + # + # @return [Boolean] hijack status + # + # source://protocol-http1//lib/protocol/http1/connection.rb#112 + def hijacked?; end + # Whether the connection is persistent. + # This determines what connection headers are sent in the response and whether + # the connection can be reused after the response is sent. + # This setting is automatically managed according to the nature of the request + # and response. + # Changing to false is safe. + # Changing to true from outside this class should generally be avoided and, + # depending on the response semantics, may be reset to false anyway. # - # source://protocol-http1//lib/protocol/http1/connection.rb#62 + # source://protocol-http1//lib/protocol/http1/connection.rb#71 def persistent; end + # Whether the connection is persistent. + # This determines what connection headers are sent in the response and whether + # the connection can be reused after the response is sent. + # This setting is automatically managed according to the nature of the request + # and response. + # Changing to false is safe. + # Changing to true from outside this class should generally be avoided and, + # depending on the response semantics, may be reset to false anyway. + # + # source://protocol-http1//lib/protocol/http1/connection.rb#71 + def persistent=(_arg0); end + # @return [Boolean] # - # source://protocol-http1//lib/protocol/http1/connection.rb#67 + # source://protocol-http1//lib/protocol/http1/connection.rb#76 def persistent?(version, method, headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#473 + # source://protocol-http1//lib/protocol/http1/connection.rb#503 def read_body(headers, remainder = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#387 + # source://protocol-http1//lib/protocol/http1/connection.rb#417 def read_chunked_body(headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#391 + # source://protocol-http1//lib/protocol/http1/connection.rb#421 def read_fixed_body(length); end - # source://protocol-http1//lib/protocol/http1/connection.rb#399 + # source://protocol-http1//lib/protocol/http1/connection.rb#429 def read_head_body(length); end - # source://protocol-http1//lib/protocol/http1/connection.rb#204 + # source://protocol-http1//lib/protocol/http1/connection.rb#233 def read_headers; end - # source://protocol-http1//lib/protocol/http1/connection.rb#164 + # source://protocol-http1//lib/protocol/http1/connection.rb#180 def read_line; end # @return [Boolean] # - # source://protocol-http1//lib/protocol/http1/connection.rb#160 + # source://protocol-http1//lib/protocol/http1/connection.rb#176 def read_line?; end - # source://protocol-http1//lib/protocol/http1/connection.rb#395 + # source://protocol-http1//lib/protocol/http1/connection.rb#425 def read_remainder_body; end - # source://protocol-http1//lib/protocol/http1/connection.rb#168 + # source://protocol-http1//lib/protocol/http1/connection.rb#196 def read_request; end - # source://protocol-http1//lib/protocol/http1/connection.rb#458 + # source://protocol-http1//lib/protocol/http1/connection.rb#488 def read_request_body(method, headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#188 + # source://protocol-http1//lib/protocol/http1/connection.rb#184 + def read_request_line; end + + # source://protocol-http1//lib/protocol/http1/connection.rb#219 def read_response(method); end - # source://protocol-http1//lib/protocol/http1/connection.rb#422 + # source://protocol-http1//lib/protocol/http1/connection.rb#452 def read_response_body(method, status, headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#403 + # source://protocol-http1//lib/protocol/http1/connection.rb#211 + def read_response_line; end + + # source://protocol-http1//lib/protocol/http1/connection.rb#433 def read_tunnel_body; end # Returns the value of attribute stream. # - # source://protocol-http1//lib/protocol/http1/connection.rb#59 + # source://protocol-http1//lib/protocol/http1/connection.rb#61 def stream; end - # source://protocol-http1//lib/protocol/http1/connection.rb#356 + # source://protocol-http1//lib/protocol/http1/connection.rb#386 def write_body(version, body, head = T.unsafe(nil), trailer = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#336 + # source://protocol-http1//lib/protocol/http1/connection.rb#365 def write_body_and_close(body, head); end - # source://protocol-http1//lib/protocol/http1/connection.rb#302 + # source://protocol-http1//lib/protocol/http1/connection.rb#331 def write_chunked_body(body, head, trailer = T.unsafe(nil)); end # Write the appropriate header for connection persistence. # - # source://protocol-http1//lib/protocol/http1/connection.rb#88 + # source://protocol-http1//lib/protocol/http1/connection.rb#97 def write_connection_header(version); end - # source://protocol-http1//lib/protocol/http1/connection.rb#263 + # source://protocol-http1//lib/protocol/http1/connection.rb#292 def write_empty_body(body); end - # source://protocol-http1//lib/protocol/http1/connection.rb#270 + # source://protocol-http1//lib/protocol/http1/connection.rb#299 def write_fixed_length_body(body, length, head); end - # source://protocol-http1//lib/protocol/http1/connection.rb#140 + # source://protocol-http1//lib/protocol/http1/connection.rb#156 def write_headers(headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#131 + # source://protocol-http1//lib/protocol/http1/connection.rb#147 def write_interim_response(version, status, headers, reason = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#117 + # source://protocol-http1//lib/protocol/http1/connection.rb#133 def write_request(authority, method, path, version, headers); end - # source://protocol-http1//lib/protocol/http1/connection.rb#124 + # source://protocol-http1//lib/protocol/http1/connection.rb#140 def write_response(version, status, headers, reason = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#243 + # source://protocol-http1//lib/protocol/http1/connection.rb#272 def write_tunnel_body(version, body = T.unsafe(nil)); end # @param protocol [String] the protocol to upgrade to. # - # source://protocol-http1//lib/protocol/http1/connection.rb#222 + # source://protocol-http1//lib/protocol/http1/connection.rb#251 def write_upgrade_body(protocol, body = T.unsafe(nil)); end - # source://protocol-http1//lib/protocol/http1/connection.rb#96 + # source://protocol-http1//lib/protocol/http1/connection.rb#105 def write_upgrade_header(upgrade); end end -# source://protocol-http1//lib/protocol/http1/connection.rb#408 +# source://protocol-http1//lib/protocol/http1/connection.rb#438 Protocol::HTTP1::Connection::CONNECT = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#47 +# source://protocol-http1//lib/protocol/http1/connection.rb#49 Protocol::HTTP1::Connection::CRLF = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#407 +# source://protocol-http1//lib/protocol/http1/connection.rb#437 Protocol::HTTP1::Connection::HEAD = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#48 +# source://protocol-http1//lib/protocol/http1/connection.rb#50 Protocol::HTTP1::Connection::HTTP10 = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#49 +# source://protocol-http1//lib/protocol/http1/connection.rb#51 Protocol::HTTP1::Connection::HTTP11 = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#410 +# source://protocol-http1//lib/protocol/http1/connection.rb#440 Protocol::HTTP1::Connection::VALID_CONTENT_LENGTH = T.let(T.unsafe(nil), Regexp) # The specified content length and the given content's length do not match. @@ -304,25 +338,25 @@ class Protocol::HTTP1::Error < ::Protocol::HTTP::Error; end # HTTP/1.x header parser: # -# source://protocol-http1//lib/protocol/http1/connection.rb#39 +# source://protocol-http1//lib/protocol/http1/connection.rb#41 Protocol::HTTP1::FIELD_NAME = T.let(T.unsafe(nil), Regexp) -# source://protocol-http1//lib/protocol/http1/connection.rb#40 +# source://protocol-http1//lib/protocol/http1/connection.rb#42 Protocol::HTTP1::FIELD_VALUE = T.let(T.unsafe(nil), Regexp) -# source://protocol-http1//lib/protocol/http1/connection.rb#41 +# source://protocol-http1//lib/protocol/http1/connection.rb#43 Protocol::HTTP1::HEADER = T.let(T.unsafe(nil), Regexp) -# source://protocol-http1//lib/protocol/http1/connection.rb#31 +# source://protocol-http1//lib/protocol/http1/connection.rb#33 Protocol::HTTP1::HOST = T.let(T.unsafe(nil), String) # source://protocol-http1//lib/protocol/http1/error.rb#13 class Protocol::HTTP1::InvalidRequest < ::Protocol::HTTP1::Error; end -# source://protocol-http1//lib/protocol/http1/connection.rb#29 +# source://protocol-http1//lib/protocol/http1/connection.rb#31 Protocol::HTTP1::KEEP_ALIVE = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#36 +# source://protocol-http1//lib/protocol/http1/connection.rb#38 Protocol::HTTP1::REQUEST_LINE = T.let(T.unsafe(nil), Regexp) # source://protocol-http1//lib/protocol/http1/reason.rb#10 @@ -333,19 +367,19 @@ Protocol::HTTP1::Reason::DESCRIPTIONS = T.let(T.unsafe(nil), Hash) # HTTP/1.x request line parser: # -# source://protocol-http1//lib/protocol/http1/connection.rb#35 +# source://protocol-http1//lib/protocol/http1/connection.rb#37 Protocol::HTTP1::TOKEN = T.let(T.unsafe(nil), Regexp) -# source://protocol-http1//lib/protocol/http1/connection.rb#24 +# source://protocol-http1//lib/protocol/http1/connection.rb#26 Protocol::HTTP1::TRANSFER_ENCODING = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#32 +# source://protocol-http1//lib/protocol/http1/connection.rb#34 Protocol::HTTP1::UPGRADE = T.let(T.unsafe(nil), String) -# source://protocol-http1//lib/protocol/http1/connection.rb#43 +# source://protocol-http1//lib/protocol/http1/connection.rb#45 Protocol::HTTP1::VALID_FIELD_NAME = T.let(T.unsafe(nil), Regexp) -# source://protocol-http1//lib/protocol/http1/connection.rb#44 +# source://protocol-http1//lib/protocol/http1/connection.rb#46 Protocol::HTTP1::VALID_FIELD_VALUE = T.let(T.unsafe(nil), Regexp) # source://protocol-http1//lib/protocol/http1/version.rb#8 diff --git a/sorbet/rbi/gems/protocol-http2@0.15.1.rbi b/sorbet/rbi/gems/protocol-http2@0.18.0.rbi similarity index 96% rename from sorbet/rbi/gems/protocol-http2@0.15.1.rbi rename to sorbet/rbi/gems/protocol-http2@0.18.0.rbi index 1050a0d50..9731fe8e6 100644 --- a/sorbet/rbi/gems/protocol-http2@0.15.1.rbi +++ b/sorbet/rbi/gems/protocol-http2@0.18.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `protocol-http2` gem. # Please instead update this file by running `bin/tapioca gem protocol-http2`. + # source://protocol-http2//lib/protocol/http2/error.rb#8 module Protocol; end @@ -91,52 +92,52 @@ class Protocol::HTTP2::Connection # On the client side, we accept push promise streams. # On the server side, existing streams create push promise streams. # - # source://protocol-http2//lib/protocol/http2/connection.rb#335 + # source://protocol-http2//lib/protocol/http2/connection.rb#355 def accept_push_promise_stream(stream_id, &block); end # Accept an incoming stream from the other side of the connnection. # On the server side, we accept requests. # - # source://protocol-http2//lib/protocol/http2/connection.rb#324 + # source://protocol-http2//lib/protocol/http2/connection.rb#344 def accept_stream(stream_id, &block); end # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/connection.rb#404 + # source://protocol-http2//lib/protocol/http2/connection.rb#425 def client_stream_id?(id); end # Close the underlying framer and all streams. # - # source://protocol-http2//lib/protocol/http2/connection.rb#99 + # source://protocol-http2//lib/protocol/http2/connection.rb#100 def close(error = T.unsafe(nil)); end # Transition the connection into the closed state. # - # source://protocol-http2//lib/protocol/http2/connection.rb#181 + # source://protocol-http2//lib/protocol/http2/connection.rb#187 def close!; end # Whether the connection is effectively or actually closed. # # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/connection.rb#89 + # source://protocol-http2//lib/protocol/http2/connection.rb#90 def closed?; end # This is only valid if the stream doesn't exist in `@streams`. # # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/connection.rb#431 + # source://protocol-http2//lib/protocol/http2/connection.rb#452 def closed_stream_id?(id); end # Traverse active streams in order of priority and allow them to consume the available flow-control window. # # @param amount [Integer] the amount of data to write. Defaults to the current window capacity. # - # source://protocol-http2//lib/protocol/http2/connection.rb#454 + # source://protocol-http2//lib/protocol/http2/connection.rb#475 def consume_window(size = T.unsafe(nil)); end - # source://protocol-http2//lib/protocol/http2/connection.rb#354 + # source://protocol-http2//lib/protocol/http2/connection.rb#374 def create_push_promise_stream(&block); end # Create a stream, defaults to an outgoing stream. @@ -144,31 +145,31 @@ class Protocol::HTTP2::Connection # # @return [Stream] the created stream. # - # source://protocol-http2//lib/protocol/http2/connection.rb#342 + # source://protocol-http2//lib/protocol/http2/connection.rb#362 def create_stream(id = T.unsafe(nil), &block); end - # source://protocol-http2//lib/protocol/http2/connection.rb#115 + # source://protocol-http2//lib/protocol/http2/connection.rb#116 def decode_headers(data); end - # source://protocol-http2//lib/protocol/http2/connection.rb#93 + # source://protocol-http2//lib/protocol/http2/connection.rb#94 def delete(id); end # Returns the value of attribute dependencies. # - # source://protocol-http2//lib/protocol/http2/connection.rb#130 + # source://protocol-http2//lib/protocol/http2/connection.rb#131 def dependencies; end # Returns the value of attribute dependency. # - # source://protocol-http2//lib/protocol/http2/connection.rb#132 + # source://protocol-http2//lib/protocol/http2/connection.rb#133 def dependency; end - # source://protocol-http2//lib/protocol/http2/connection.rb#111 + # source://protocol-http2//lib/protocol/http2/connection.rb#112 def encode_headers(headers, buffer = T.unsafe(nil)); end # Returns the value of attribute framer. # - # source://protocol-http2//lib/protocol/http2/connection.rb#69 + # source://protocol-http2//lib/protocol/http2/connection.rb#70 def framer; end # source://protocol-http2//lib/protocol/http2/connection.rb#48 @@ -176,7 +177,7 @@ class Protocol::HTTP2::Connection # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/connection.rb#412 + # source://protocol-http2//lib/protocol/http2/connection.rb#433 def idle_stream_id?(id); end # 6.8. GOAWAY @@ -185,26 +186,28 @@ class Protocol::HTTP2::Connection # # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/connection.rb#137 + # source://protocol-http2//lib/protocol/http2/connection.rb#138 def ignore_frame?(frame); end # Current settings value for local and peer # - # source://protocol-http2//lib/protocol/http2/connection.rb#75 + # source://protocol-http2//lib/protocol/http2/connection.rb#76 def local_settings; end # Current settings value for local and peer # - # source://protocol-http2//lib/protocol/http2/connection.rb#75 + # source://protocol-http2//lib/protocol/http2/connection.rb#76 def local_settings=(_arg0); end # Our window for receiving data. When we receive data, it reduces this window. # If the window gets too small, we must send a window update. # - # source://protocol-http2//lib/protocol/http2/connection.rb#80 + # source://protocol-http2//lib/protocol/http2/connection.rb#81 def local_window; end - # source://protocol-http2//lib/protocol/http2/connection.rb#65 + # The maximum number of concurrent streams that this connection can initiate: + # + # source://protocol-http2//lib/protocol/http2/connection.rb#66 def maximum_concurrent_streams; end # The size of a frame payload is limited by the maximum size that a receiver advertises in the SETTINGS_MAX_FRAME_SIZE setting. @@ -214,138 +217,139 @@ class Protocol::HTTP2::Connection # Streams are identified with an unsigned 31-bit integer. Streams initiated by a client MUST use odd-numbered stream identifiers; those initiated by the server MUST use even-numbered stream identifiers. A stream identifier of zero (0x0) is used for connection control messages; the stream identifier of zero cannot be used to establish a new stream. # - # source://protocol-http2//lib/protocol/http2/connection.rb#120 + # source://protocol-http2//lib/protocol/http2/connection.rb#121 def next_stream_id; end - # source://protocol-http2//lib/protocol/http2/connection.rb#261 + # source://protocol-http2//lib/protocol/http2/connection.rb#281 def open!; end # In addition to changing the flow-control window for streams that are not yet active, a SETTINGS frame can alter the initial flow-control window size for streams with active flow-control windows (that is, streams in the "open" or "half-closed (remote)" state). When the value of SETTINGS_INITIAL_WINDOW_SIZE changes, a receiver MUST adjust the size of all stream flow-control windows that it maintains by the difference between the new value and the old value. # # @return [Boolean] whether the frame was an acknowledgement # - # source://protocol-http2//lib/protocol/http2/connection.rb#238 + # source://protocol-http2//lib/protocol/http2/connection.rb#258 def process_settings(frame); end # Reads one frame from the network and processes. Processing the frame updates the state of the connection and related streams. If the frame triggers an error, e.g. a protocol error, the connection will typically emit a goaway frame and re-raise the exception. You should continue processing frames until the underlying connection is closed. # - # source://protocol-http2//lib/protocol/http2/connection.rb#147 + # source://protocol-http2//lib/protocol/http2/connection.rb#152 def read_frame; end # @raise [ProtocolError] # - # source://protocol-http2//lib/protocol/http2/connection.rb#490 + # source://protocol-http2//lib/protocol/http2/connection.rb#511 def receive_continuation(frame); end - # source://protocol-http2//lib/protocol/http2/connection.rb#306 + # source://protocol-http2//lib/protocol/http2/connection.rb#326 def receive_data(frame); end - # source://protocol-http2//lib/protocol/http2/connection.rb#494 + # source://protocol-http2//lib/protocol/http2/connection.rb#515 def receive_frame(frame); end - # source://protocol-http2//lib/protocol/http2/connection.rb#197 + # source://protocol-http2//lib/protocol/http2/connection.rb#203 def receive_goaway(frame); end # On the server side, starts a new request. # - # source://protocol-http2//lib/protocol/http2/connection.rb#359 + # source://protocol-http2//lib/protocol/http2/connection.rb#379 def receive_headers(frame); end - # source://protocol-http2//lib/protocol/http2/connection.rb#289 + # source://protocol-http2//lib/protocol/http2/connection.rb#309 def receive_ping(frame); end # Sets the priority for an incoming stream. # - # source://protocol-http2//lib/protocol/http2/connection.rb#392 + # source://protocol-http2//lib/protocol/http2/connection.rb#413 def receive_priority(frame); end # @raise [ProtocolError] # - # source://protocol-http2//lib/protocol/http2/connection.rb#400 + # source://protocol-http2//lib/protocol/http2/connection.rb#421 def receive_push_promise(frame); end - # source://protocol-http2//lib/protocol/http2/connection.rb#440 + # source://protocol-http2//lib/protocol/http2/connection.rb#461 def receive_reset_stream(frame); end - # source://protocol-http2//lib/protocol/http2/connection.rb#267 + # source://protocol-http2//lib/protocol/http2/connection.rb#287 def receive_settings(frame); end - # source://protocol-http2//lib/protocol/http2/connection.rb#471 + # source://protocol-http2//lib/protocol/http2/connection.rb#492 def receive_window_update(frame); end # Returns the value of attribute remote_settings. # - # source://protocol-http2//lib/protocol/http2/connection.rb#76 + # source://protocol-http2//lib/protocol/http2/connection.rb#77 def remote_settings; end # Sets the attribute remote_settings # # @param value the value to set the attribute remote_settings to. # - # source://protocol-http2//lib/protocol/http2/connection.rb#76 + # source://protocol-http2//lib/protocol/http2/connection.rb#77 def remote_settings=(_arg0); end # The highest stream_id that has been successfully accepted by this connection. # - # source://protocol-http2//lib/protocol/http2/connection.rb#86 + # source://protocol-http2//lib/protocol/http2/connection.rb#87 def remote_stream_id; end # Our window for sending data. When we send data, it reduces this window. # - # source://protocol-http2//lib/protocol/http2/connection.rb#83 + # source://protocol-http2//lib/protocol/http2/connection.rb#84 def remote_window; end # Tell the remote end that the connection is being shut down. If the `error_code` is 0, this is a graceful shutdown. The other end of the connection should not make any new streams, but existing streams may be completed. # - # source://protocol-http2//lib/protocol/http2/connection.rb#188 + # source://protocol-http2//lib/protocol/http2/connection.rb#194 def send_goaway(error_code = T.unsafe(nil), message = T.unsafe(nil)); end - # source://protocol-http2//lib/protocol/http2/connection.rb#278 + # source://protocol-http2//lib/protocol/http2/connection.rb#298 def send_ping(data); end - # source://protocol-http2//lib/protocol/http2/connection.rb#384 + # source://protocol-http2//lib/protocol/http2/connection.rb#405 def send_priority(stream_id, priority); end - # source://protocol-http2//lib/protocol/http2/connection.rb#171 + # source://protocol-http2//lib/protocol/http2/connection.rb#177 def send_settings(changes); end # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/connection.rb#408 + # source://protocol-http2//lib/protocol/http2/connection.rb#429 def server_stream_id?(id); end # Connection state (:new, :open, :closed). # - # source://protocol-http2//lib/protocol/http2/connection.rb#72 + # source://protocol-http2//lib/protocol/http2/connection.rb#73 def state; end # Connection state (:new, :open, :closed). # - # source://protocol-http2//lib/protocol/http2/connection.rb#72 + # source://protocol-http2//lib/protocol/http2/connection.rb#73 def state=(_arg0); end # Returns the value of attribute streams. # - # source://protocol-http2//lib/protocol/http2/connection.rb#128 + # source://protocol-http2//lib/protocol/http2/connection.rb#129 def streams; end - # source://protocol-http2//lib/protocol/http2/connection.rb#217 + # source://protocol-http2//lib/protocol/http2/connection.rb#147 + def synchronize; end + + # source://protocol-http2//lib/protocol/http2/connection.rb#237 def update_local_settings(changes); end - # source://protocol-http2//lib/protocol/http2/connection.rb#227 + # source://protocol-http2//lib/protocol/http2/connection.rb#247 def update_remote_settings(changes); end # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/connection.rb#318 + # source://protocol-http2//lib/protocol/http2/connection.rb#338 def valid_remote_stream_id?(stream_id); end - # source://protocol-http2//lib/protocol/http2/connection.rb#209 + # source://protocol-http2//lib/protocol/http2/connection.rb#215 def write_frame(frame); end - # @yield [@framer] - # - # source://protocol-http2//lib/protocol/http2/connection.rb#213 + # source://protocol-http2//lib/protocol/http2/connection.rb#224 def write_frames; end end @@ -923,32 +927,38 @@ class Protocol::HTTP2::Framer # source://protocol-http2//lib/protocol/http2/framer.rb#39 def initialize(stream, frames = T.unsafe(nil)); end - # source://protocol-http2//lib/protocol/http2/framer.rb#44 + # source://protocol-http2//lib/protocol/http2/framer.rb#48 def close; end # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/framer.rb#48 + # source://protocol-http2//lib/protocol/http2/framer.rb#52 def closed?; end - # source://protocol-http2//lib/protocol/http2/framer.rb#56 + # source://protocol-http2//lib/protocol/http2/framer.rb#44 + def flush; end + + # source://protocol-http2//lib/protocol/http2/framer.rb#60 def read_connection_preface; end # @raise if the underlying IO fails for some reason. # @return [Frame] the frame that has been read from the underlying IO. # - # source://protocol-http2//lib/protocol/http2/framer.rb#68 + # source://protocol-http2//lib/protocol/http2/framer.rb#72 def read_frame(maximum_frame_size = T.unsafe(nil)); end # @raise [EOFError] # - # source://protocol-http2//lib/protocol/http2/framer.rb#97 + # source://protocol-http2//lib/protocol/http2/framer.rb#101 def read_header; end - # source://protocol-http2//lib/protocol/http2/framer.rb#52 + # source://protocol-http2//lib/protocol/http2/framer.rb#56 def write_connection_preface; end - # source://protocol-http2//lib/protocol/http2/framer.rb#86 + # Write a frame to the underlying IO. + # After writing one or more frames, you should call flush to ensure the frames are sent to the remote peer. + # + # source://protocol-http2//lib/protocol/http2/framer.rb#93 def write_frame(frame); end end @@ -1360,12 +1370,12 @@ class Protocol::HTTP2::Server < ::Protocol::HTTP2::Connection # @raise [ProtocolError] # - # source://protocol-http2//lib/protocol/http2/server.rb#41 + # source://protocol-http2//lib/protocol/http2/server.rb#43 def accept_push_promise_stream(stream_id, &block); end # @return [Boolean] # - # source://protocol-http2//lib/protocol/http2/server.rb#45 + # source://protocol-http2//lib/protocol/http2/server.rb#47 def enable_push?; end # @return [Boolean] diff --git a/sorbet/rbi/gems/protocol-http@0.25.0.rbi b/sorbet/rbi/gems/protocol-http@0.27.0.rbi similarity index 75% rename from sorbet/rbi/gems/protocol-http@0.25.0.rbi rename to sorbet/rbi/gems/protocol-http@0.27.0.rbi index 8796340e3..07311b05d 100644 --- a/sorbet/rbi/gems/protocol-http@0.25.0.rbi +++ b/sorbet/rbi/gems/protocol-http@0.27.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `protocol-http` gem. # Please instead update this file by running `bin/tapioca gem protocol-http`. + # source://protocol-http//lib/protocol/http/body/readable.rb#7 module Protocol; end @@ -19,53 +20,53 @@ module Protocol::HTTP::Body; end class Protocol::HTTP::Body::Buffered < ::Protocol::HTTP::Body::Readable # @return [Buffered] a new instance of Buffered # - # source://protocol-http//lib/protocol/http/body/buffered.rb#38 + # source://protocol-http//lib/protocol/http/body/buffered.rb#42 def initialize(chunks = T.unsafe(nil), length = T.unsafe(nil)); end # Returns the value of attribute chunks. # - # source://protocol-http//lib/protocol/http/body/buffered.rb#45 + # source://protocol-http//lib/protocol/http/body/buffered.rb#49 def chunks; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/buffered.rb#55 + # source://protocol-http//lib/protocol/http/body/buffered.rb#59 def empty?; end - # source://protocol-http//lib/protocol/http/body/buffered.rb#47 + # source://protocol-http//lib/protocol/http/body/buffered.rb#51 def finish; end - # source://protocol-http//lib/protocol/http/body/buffered.rb#80 + # source://protocol-http//lib/protocol/http/body/buffered.rb#84 def inspect; end - # source://protocol-http//lib/protocol/http/body/buffered.rb#51 + # source://protocol-http//lib/protocol/http/body/buffered.rb#55 def length; end - # source://protocol-http//lib/protocol/http/body/buffered.rb#64 + # source://protocol-http//lib/protocol/http/body/buffered.rb#68 def read; end # A buffered response is always ready. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/buffered.rb#60 + # source://protocol-http//lib/protocol/http/body/buffered.rb#64 def ready?; end - # source://protocol-http//lib/protocol/http/body/buffered.rb#76 + # source://protocol-http//lib/protocol/http/body/buffered.rb#80 def rewind; end - # source://protocol-http//lib/protocol/http/body/buffered.rb#72 + # source://protocol-http//lib/protocol/http/body/buffered.rb#76 def write(chunk); end class << self - # source://protocol-http//lib/protocol/http/body/buffered.rb#28 + # source://protocol-http//lib/protocol/http/body/buffered.rb#32 def for(body); end # Wraps an array into a buffered body. # - # @return [Readable, nil] the wrapped body or nil if nil was given. + # For compatibility, also accepts anything that behaves like an `Array(String)`. # - # source://protocol-http//lib/protocol/http/body/buffered.rb#16 + # source://protocol-http//lib/protocol/http/body/buffered.rb#20 def wrap(body); end end end @@ -79,7 +80,7 @@ class Protocol::HTTP::Body::Completable < ::Protocol::HTTP::Body::Wrapper # source://protocol-http//lib/protocol/http/body/completable.rb#21 def initialize(body, callback); end - # source://protocol-http//lib/protocol/http/body/completable.rb#39 + # source://protocol-http//lib/protocol/http/body/completable.rb#36 def close(error = T.unsafe(nil)); end # source://protocol-http//lib/protocol/http/body/completable.rb#27 @@ -117,25 +118,28 @@ class Protocol::HTTP::Body::Head < ::Protocol::HTTP::Body::Readable end end -# def finish -> buffer the stream and close it. -# def close(error = nil) -> close the stream immediately. -# end +# An interface for reading data from a body. # -# source://protocol-http//lib/protocol/http/body/readable.rb#19 +# Typically, you'd override `#read` to return chunks of data. +# +# source://protocol-http//lib/protocol/http/body/readable.rb#13 class Protocol::HTTP::Body::Readable + # source://protocol-http//lib/protocol/http/body/readable.rb#97 + def as_json(*_arg0, **_arg1, &_arg2); end + # Write the body to the given stream. # - # source://protocol-http//lib/protocol/http/body/readable.rb#54 + # source://protocol-http//lib/protocol/http/body/readable.rb#49 def call(stream); end - # The consumer can call stop to signal that the stream output has terminated. + # Close the stream immediately. # - # source://protocol-http//lib/protocol/http/body/readable.rb#21 + # source://protocol-http//lib/protocol/http/body/readable.rb#15 def close(error = T.unsafe(nil)); end # Enumerate all chunks until finished, then invoke `#close`. # - # source://protocol-http//lib/protocol/http/body/readable.rb#69 + # source://protocol-http//lib/protocol/http/body/readable.rb#68 def each; end # Optimistically determine whether read (may) return any data. @@ -144,25 +148,25 @@ class Protocol::HTTP::Body::Readable # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/readable.rb#27 + # source://protocol-http//lib/protocol/http/body/readable.rb#21 def empty?; end # Read all remaining chunks into a buffered body and close the underlying input. # - # source://protocol-http//lib/protocol/http/body/readable.rb#63 + # source://protocol-http//lib/protocol/http/body/readable.rb#59 def finish; end # Read all remaining chunks into a single binary string using `#each`. # - # source://protocol-http//lib/protocol/http/body/readable.rb#82 + # source://protocol-http//lib/protocol/http/body/readable.rb#83 def join; end - # source://protocol-http//lib/protocol/http/body/readable.rb#38 + # source://protocol-http//lib/protocol/http/body/readable.rb#32 def length; end # Read the next available chunk. # - # source://protocol-http//lib/protocol/http/body/readable.rb#43 + # source://protocol-http//lib/protocol/http/body/readable.rb#38 def read; end # Whether calling read will return a chunk of data without blocking. @@ -170,15 +174,18 @@ class Protocol::HTTP::Body::Readable # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/readable.rb#34 + # source://protocol-http//lib/protocol/http/body/readable.rb#28 def ready?; end # Should the internal mechanism prefer to use {call}? # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/readable.rb#49 + # source://protocol-http//lib/protocol/http/body/readable.rb#44 def stream?; end + + # source://protocol-http//lib/protocol/http/body/readable.rb#107 + def to_json(*_arg0, **_arg1, &_arg2); end end # General operations for interacting with a request or response body. @@ -233,84 +240,135 @@ class Protocol::HTTP::Body::Stream # @raise [ArgumentError] # @return [Stream] a new instance of Stream # - # source://protocol-http//lib/protocol/http/body/stream.rb#14 + # source://protocol-http//lib/protocol/http/body/stream.rb#16 def initialize(input = T.unsafe(nil), output = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/body/stream.rb#143 + # Write data to the stream using {write}. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#214 def <<(buffer); end # Close the input and output bodies. # - # source://protocol-http//lib/protocol/http/body/stream.rb#165 + # source://protocol-http//lib/protocol/http/body/stream.rb#260 def close(error = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/body/stream.rb#150 + # Close the input body. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#241 def close_read; end - # close must never be called on the input stream. huh? + # Close the output body. # - # source://protocol-http//lib/protocol/http/body/stream.rb#159 + # source://protocol-http//lib/protocol/http/body/stream.rb#252 def close_write; end # Whether the stream has been closed. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/stream.rb#175 + # source://protocol-http//lib/protocol/http/body/stream.rb#270 def closed?; end # Whether there are any output chunks remaining? # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/stream.rb#180 + # source://protocol-http//lib/protocol/http/body/stream.rb#275 def empty?; end - # source://protocol-http//lib/protocol/http/body/stream.rb#147 + # Flush the output stream. + # + # This is currently a no-op. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#237 def flush; end # Returns the value of attribute input. # - # source://protocol-http//lib/protocol/http/body/stream.rb#26 + # source://protocol-http//lib/protocol/http/body/stream.rb#28 def input; end # Returns the value of attribute output. # - # source://protocol-http//lib/protocol/http/body/stream.rb#27 + # source://protocol-http//lib/protocol/http/body/stream.rb#29 def output; end - # source://protocol-http//lib/protocol/http/body/stream.rb#130 + # Write lines to the stream. + # + # The current implementation buffers the lines and writes them in a single operation. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#224 + def puts(*arguments, separator: T.unsafe(nil)); end + + # Write data to the underlying stream. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#193 def write(buffer); end - # source://protocol-http//lib/protocol/http/body/stream.rb#139 - def write_nonblock(buffer); end + # Write data to the stream using {write}. + # + # Provided for compatibility with IO-like objects. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#209 + def write_nonblock(buffer, exception: T.unsafe(nil)); end private - # source://protocol-http//lib/protocol/http/body/stream.rb#186 + # source://protocol-http//lib/protocol/http/body/stream.rb#281 def read_next; end end +# source://protocol-http//lib/protocol/http/body/stream.rb#14 +Protocol::HTTP::Body::Stream::NEWLINE = T.let(T.unsafe(nil), String) + # This provides a read-only interface for data, which is surprisingly tricky to implement correctly. # -# source://protocol-http//lib/protocol/http/body/stream.rb#30 +# source://protocol-http//lib/protocol/http/body/stream.rb#32 module Protocol::HTTP::Body::Stream::Reader - # read behaves like IO#read. Its signature is read([length, [buffer]]). If given, length must be a non-negative Integer (>= 0) or nil, and buffer must be a String and may not be nil. If length is given and not nil, then this method reads at most length bytes from the input stream. If length is not given or nil, then this method reads all data until EOF. When EOF is reached, this method returns nil if length is given and not nil, or “” if length is not given or is nil. If buffer is given, then the read data will be placed into buffer instead of a newly created String object. + # Read a single line from the stream. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#181 + def gets(separator = T.unsafe(nil), **options); end + + # Read data from the underlying stream. + # + # If given a non-negative length, it will read at most that many bytes from the stream. If the stream is at EOF, it will return nil. + # + # If the length is not given, it will read all data until EOF, or return an empty string if the stream is already at EOF. + # + # If buffer is given, then the read data will be placed into buffer instead of a newly created String object. # # @param length [Integer] the amount of data to read # @param buffer [String] the buffer which will receive the data # @return a buffer containing the data # - # source://protocol-http//lib/protocol/http/body/stream.rb#38 + # source://protocol-http//lib/protocol/http/body/stream.rb#44 def read(length = T.unsafe(nil), buffer = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/body/stream.rb#101 - def read_nonblock(length, buffer = T.unsafe(nil)); end + # Read data from the stream without blocking if possible. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#119 + def read_nonblock(length, buffer = T.unsafe(nil), exception: T.unsafe(nil)); end - # Read at most `length` bytes from the stream. Will avoid reading from the underlying stream if possible. + # Read some bytes from the stream. + # + # If the length is given, at most length bytes will be read. Otherwise, one chunk of data from the underlying stream will be read. # - # source://protocol-http//lib/protocol/http/body/stream.rb#80 + # Will avoid reading from the underlying stream if there is buffered data available. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#92 def read_partial(length = T.unsafe(nil)); end + + # Read data from the stream until encountering pattern. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#151 + def read_until(pattern, offset = T.unsafe(nil), chomp: T.unsafe(nil)); end + + # Similar to {read_partial} but raises an `EOFError` if the stream is at EOF. + # + # source://protocol-http//lib/protocol/http/body/stream.rb#114 + def readpartial(length); end end # Wrapping body instance. Typically you'd override `#read`. @@ -322,12 +380,15 @@ class Protocol::HTTP::Body::Wrapper < ::Protocol::HTTP::Body::Readable # source://protocol-http//lib/protocol/http/body/wrapper.rb#19 def initialize(body); end + # source://protocol-http//lib/protocol/http/body/wrapper.rb#54 + def as_json(*_arg0, **_arg1, &_arg2); end + # The wrapped body. # # source://protocol-http//lib/protocol/http/body/wrapper.rb#24 def body; end - # source://protocol-http//lib/protocol/http/body/wrapper.rb#62 + # source://protocol-http//lib/protocol/http/body/wrapper.rb#73 def call(stream); end # source://protocol-http//lib/protocol/http/body/wrapper.rb#31 @@ -343,7 +404,7 @@ class Protocol::HTTP::Body::Wrapper < ::Protocol::HTTP::Body::Readable # source://protocol-http//lib/protocol/http/body/wrapper.rb#27 def finish; end - # source://protocol-http//lib/protocol/http/body/wrapper.rb#54 + # source://protocol-http//lib/protocol/http/body/wrapper.rb#65 def inspect; end # source://protocol-http//lib/protocol/http/body/wrapper.rb#45 @@ -361,9 +422,12 @@ class Protocol::HTTP::Body::Wrapper < ::Protocol::HTTP::Body::Readable # @return [Boolean] # - # source://protocol-http//lib/protocol/http/body/wrapper.rb#58 + # source://protocol-http//lib/protocol/http/body/wrapper.rb#69 def stream?; end + # source://protocol-http//lib/protocol/http/body/wrapper.rb#61 + def to_json(*_arg0, **_arg1, &_arg2); end + class << self # source://protocol-http//lib/protocol/http/body/wrapper.rb#13 def wrap(message); end @@ -426,17 +490,17 @@ module Protocol::HTTP::Header; end # headers.add('authorization', Authorization.basic("my_username", "my_password")) # ~~~ # -# source://protocol-http//lib/protocol/http/header/authorization.rb#16 +# source://protocol-http//lib/protocol/http/header/authorization.rb#15 class Protocol::HTTP::Header::Authorization < ::String # Splits the header and # # @return [Tuple(String, String)] # - # source://protocol-http//lib/protocol/http/header/authorization.rb#19 + # source://protocol-http//lib/protocol/http/header/authorization.rb#18 def credentials; end class << self - # source://protocol-http//lib/protocol/http/header/authorization.rb#23 + # source://protocol-http//lib/protocol/http/header/authorization.rb#22 def basic(username, password); end end end @@ -554,39 +618,39 @@ Protocol::HTTP::Header::CacheControl::STREAMING = T.let(T.unsafe(nil), String) # source://protocol-http//lib/protocol/http/header/cache_control.rb#18 Protocol::HTTP::Header::CacheControl::S_MAXAGE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/connection.rb#11 +# source://protocol-http//lib/protocol/http/header/connection.rb#12 class Protocol::HTTP::Header::Connection < ::Protocol::HTTP::Header::Split # @return [Connection] a new instance of Connection # - # source://protocol-http//lib/protocol/http/header/connection.rb#16 + # source://protocol-http//lib/protocol/http/header/connection.rb#17 def initialize(value = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/header/connection.rb#20 + # source://protocol-http//lib/protocol/http/header/connection.rb#21 def <<(value); end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/connection.rb#28 + # source://protocol-http//lib/protocol/http/header/connection.rb#29 def close?; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/connection.rb#24 + # source://protocol-http//lib/protocol/http/header/connection.rb#25 def keep_alive?; end # @return [Boolean] # - # source://protocol-http//lib/protocol/http/header/connection.rb#32 + # source://protocol-http//lib/protocol/http/header/connection.rb#33 def upgrade?; end end -# source://protocol-http//lib/protocol/http/header/connection.rb#13 +# source://protocol-http//lib/protocol/http/header/connection.rb#14 Protocol::HTTP::Header::Connection::CLOSE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/connection.rb#12 +# source://protocol-http//lib/protocol/http/header/connection.rb#13 Protocol::HTTP::Header::Connection::KEEP_ALIVE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/header/connection.rb#14 +# source://protocol-http//lib/protocol/http/header/connection.rb#15 Protocol::HTTP::Header::Connection::UPGRADE = T.let(T.unsafe(nil), String) # The Cookie HTTP request header contains stored HTTP cookies previously sent by the server with the Set-Cookie header. @@ -713,7 +777,7 @@ class Protocol::HTTP::Headers # source://protocol-http//lib/protocol/http/headers.rb#50 def initialize(fields = T.unsafe(nil), indexed = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/headers.rb#306 + # source://protocol-http//lib/protocol/http/headers.rb#308 def ==(other); end # source://protocol-http//lib/protocol/http/headers.rb#289 @@ -735,6 +799,11 @@ class Protocol::HTTP::Headers # source://protocol-http//lib/protocol/http/headers.rb#168 def add(key, value); end + # A hash table of `{key, policy[key].map(values)}` + # + # source://protocol-http//lib/protocol/http/headers.rb#294 + def as_json; end + # source://protocol-http//lib/protocol/http/headers.rb#65 def clear; end @@ -775,7 +844,7 @@ class Protocol::HTTP::Headers # source://protocol-http//lib/protocol/http/headers.rb#140 def include?(key); end - # source://protocol-http//lib/protocol/http/headers.rb#302 + # source://protocol-http//lib/protocol/http/headers.rb#304 def inspect; end # @return [Boolean] @@ -849,28 +918,28 @@ end # Used for merging objects into a sequential list of headers. Normalizes header keys and values. # -# source://protocol-http//lib/protocol/http/headers.rb#318 +# source://protocol-http//lib/protocol/http/headers.rb#320 class Protocol::HTTP::Headers::Merged include ::Enumerable # @return [Merged] a new instance of Merged # - # source://protocol-http//lib/protocol/http/headers.rb#321 + # source://protocol-http//lib/protocol/http/headers.rb#323 def initialize(*all); end - # source://protocol-http//lib/protocol/http/headers.rb#337 + # source://protocol-http//lib/protocol/http/headers.rb#339 def <<(headers); end - # source://protocol-http//lib/protocol/http/headers.rb#333 + # source://protocol-http//lib/protocol/http/headers.rb#335 def clear; end - # source://protocol-http//lib/protocol/http/headers.rb#344 + # source://protocol-http//lib/protocol/http/headers.rb#346 def each(&block); end - # source://protocol-http//lib/protocol/http/headers.rb#325 + # source://protocol-http//lib/protocol/http/headers.rb#327 def fields; end - # source://protocol-http//lib/protocol/http/headers.rb#329 + # source://protocol-http//lib/protocol/http/headers.rb#331 def flatten; end end @@ -991,249 +1060,310 @@ Protocol::HTTP::Methods::PUT = T.let(T.unsafe(nil), String) # source://protocol-http//lib/protocol/http/methods.rb#48 Protocol::HTTP::Methods::TRACE = T.let(T.unsafe(nil), String) -# source://protocol-http//lib/protocol/http/request.rb#14 +# Represents an HTTP request which can be used both server and client-side. +# +# ~~~ ruby +# require 'protocol/http' +# +# # Long form: +# Protocol::HTTP::Request.new("http", "example.com", "GET", "/index.html", "HTTP/1.1", Protocol::HTTP::Headers[["accept", "text/html"]]) +# +# # Short form: +# Protocol::HTTP::Request["GET", "/index.html", {"accept" => "text/html"}] +# ~~~ +# +# source://protocol-http//lib/protocol/http/request.rb#25 class Protocol::HTTP::Request include ::Protocol::HTTP::Body::Reader # @return [Request] a new instance of Request # - # source://protocol-http//lib/protocol/http/request.rb#17 + # source://protocol-http//lib/protocol/http/request.rb#28 def initialize(scheme = T.unsafe(nil), authority = T.unsafe(nil), method = T.unsafe(nil), path = T.unsafe(nil), version = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil), protocol = T.unsafe(nil)); end - # The request authority, usually a hostname and port number. + # source://protocol-http//lib/protocol/http/request.rb#96 + def as_json(*_arg0, **_arg1, &_arg2); end + + # Returns the value of attribute authority. # - # source://protocol-http//lib/protocol/http/request.rb#32 + # source://protocol-http//lib/protocol/http/request.rb#43 def authority; end - # The request authority, usually a hostname and port number. + # Sets the attribute authority + # + # @param value the value to set the attribute authority to. # - # source://protocol-http//lib/protocol/http/request.rb#32 + # source://protocol-http//lib/protocol/http/request.rb#43 def authority=(_arg0); end - # The request body, an instance of Protocol::HTTP::Body::Readable or similar. + # Returns the value of attribute body. # - # source://protocol-http//lib/protocol/http/request.rb#47 + # source://protocol-http//lib/protocol/http/request.rb#58 def body; end - # The request body, an instance of Protocol::HTTP::Body::Readable or similar. + # Sets the attribute body # - # source://protocol-http//lib/protocol/http/request.rb#47 + # @param value the value to set the attribute body to. + # + # source://protocol-http//lib/protocol/http/request.rb#58 def body=(_arg0); end # Send the request to the given connection. # - # source://protocol-http//lib/protocol/http/request.rb#53 + # source://protocol-http//lib/protocol/http/request.rb#64 def call(connection); end + # Whether this is a CONNECT request: typically used to establish a tunnel. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/request.rb#61 + # source://protocol-http//lib/protocol/http/request.rb#74 def connect?; end + # Whether this is a HEAD request: no body is expected in the response. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/request.rb#57 + # source://protocol-http//lib/protocol/http/request.rb#69 def head?; end - # The request headers, contains metadata associated with the request such as the user agent, accept (content type), accept-language, etc. + # Returns the value of attribute headers. # - # source://protocol-http//lib/protocol/http/request.rb#44 + # source://protocol-http//lib/protocol/http/request.rb#55 def headers; end - # The request headers, contains metadata associated with the request such as the user agent, accept (content type), accept-language, etc. + # Sets the attribute headers # - # source://protocol-http//lib/protocol/http/request.rb#44 + # @param value the value to set the attribute headers to. + # + # source://protocol-http//lib/protocol/http/request.rb#55 def headers=(_arg0); end + # Whether the request can be replayed without side-effects. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/request.rb#72 + # source://protocol-http//lib/protocol/http/request.rb#92 def idempotent?; end - # The request method, usually one of "GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT" or "OPTIONS". + # Returns the value of attribute method. # - # source://protocol-http//lib/protocol/http/request.rb#35 + # source://protocol-http//lib/protocol/http/request.rb#46 def method; end - # The request method, usually one of "GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT" or "OPTIONS". + # Sets the attribute method + # + # @param value the value to set the attribute method to. # - # source://protocol-http//lib/protocol/http/request.rb#35 + # source://protocol-http//lib/protocol/http/request.rb#46 def method=(_arg0); end - # The request path, usually a path and query string. + # Returns the value of attribute path. # - # source://protocol-http//lib/protocol/http/request.rb#38 + # source://protocol-http//lib/protocol/http/request.rb#49 def path; end - # The request path, usually a path and query string. + # Sets the attribute path # - # source://protocol-http//lib/protocol/http/request.rb#38 + # @param value the value to set the attribute path to. + # + # source://protocol-http//lib/protocol/http/request.rb#49 def path=(_arg0); end - # The request protocol, usually empty, but occasionally "websocket" or "webtransport", can be either single value `String` or multi-value `Array` of `String` instances. In HTTP/1, it is used to request a connection upgrade, and in HTTP/2 it is used to indicate a specfic protocol for the stream. + # Returns the value of attribute protocol. # - # source://protocol-http//lib/protocol/http/request.rb#50 + # source://protocol-http//lib/protocol/http/request.rb#61 def protocol; end - # The request protocol, usually empty, but occasionally "websocket" or "webtransport", can be either single value `String` or multi-value `Array` of `String` instances. In HTTP/1, it is used to request a connection upgrade, and in HTTP/2 it is used to indicate a specfic protocol for the stream. + # Sets the attribute protocol + # + # @param value the value to set the attribute protocol to. # - # source://protocol-http//lib/protocol/http/request.rb#50 + # source://protocol-http//lib/protocol/http/request.rb#61 def protocol=(_arg0); end - # The request scheme, usually one of "http" or "https". + # Returns the value of attribute scheme. # - # source://protocol-http//lib/protocol/http/request.rb#29 + # source://protocol-http//lib/protocol/http/request.rb#40 def scheme; end - # The request scheme, usually one of "http" or "https". + # Sets the attribute scheme # - # source://protocol-http//lib/protocol/http/request.rb#29 + # @param value the value to set the attribute scheme to. + # + # source://protocol-http//lib/protocol/http/request.rb#40 def scheme=(_arg0); end - # source://protocol-http//lib/protocol/http/request.rb#76 + # source://protocol-http//lib/protocol/http/request.rb#109 + def to_json(*_arg0, **_arg1, &_arg2); end + + # source://protocol-http//lib/protocol/http/request.rb#113 def to_s; end - # The request version, usually "http/1.0", "http/1.1", "h2", or "h3". + # Returns the value of attribute version. # - # source://protocol-http//lib/protocol/http/request.rb#41 + # source://protocol-http//lib/protocol/http/request.rb#52 def version; end - # The request version, usually "http/1.0", "http/1.1", "h2", or "h3". + # Sets the attribute version + # + # @param value the value to set the attribute version to. # - # source://protocol-http//lib/protocol/http/request.rb#41 + # source://protocol-http//lib/protocol/http/request.rb#52 def version=(_arg0); end class << self - # source://protocol-http//lib/protocol/http/request.rb#65 + # A short-cut method which exposes the main request variables that you'd typically care about. + # + # source://protocol-http//lib/protocol/http/request.rb#84 def [](method, path, headers = T.unsafe(nil), body = T.unsafe(nil)); end end end -# source://protocol-http//lib/protocol/http/response.rb#11 +# Represents an HTTP response which can be used both server and client-side. +# +# ~~~ ruby +# require 'protocol/http' +# +# # Long form: +# Protocol::HTTP::Response.new("http/1.1", 200, Protocol::HTTP::Headers[["content-type", "text/html"]], Protocol::HTTP::Body::Buffered.wrap("Hello, World!")) +# +# # Short form: +# Protocol::HTTP::Response[200, {"content-type" => "text/html"}, ["Hello, World!"]] +# ~~~ +# +# source://protocol-http//lib/protocol/http/response.rb#22 class Protocol::HTTP::Response include ::Protocol::HTTP::Body::Reader + # Create a new response. + # # @return [Response] a new instance of Response # - # source://protocol-http//lib/protocol/http/response.rb#14 + # source://protocol-http//lib/protocol/http/response.rb#32 def initialize(version = T.unsafe(nil), status = T.unsafe(nil), headers = T.unsafe(nil), body = T.unsafe(nil), protocol = T.unsafe(nil)); end + # source://protocol-http//lib/protocol/http/response.rb#147 + def as_json(*_arg0, **_arg1, &_arg2); end + # Whether the status is 400 (bad request). # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#84 + # source://protocol-http//lib/protocol/http/response.rb#112 def bad_request?; end # Returns the value of attribute body. # - # source://protocol-http//lib/protocol/http/response.rb#25 + # source://protocol-http//lib/protocol/http/response.rb#50 def body; end # Sets the attribute body # # @param value the value to set the attribute body to. # - # source://protocol-http//lib/protocol/http/response.rb#25 + # source://protocol-http//lib/protocol/http/response.rb#50 def body=(_arg0); end # Whether the status is 100 (continue). # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#33 + # source://protocol-http//lib/protocol/http/response.rb#61 def continue?; end # Whether the status is considered a failure. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#79 + # source://protocol-http//lib/protocol/http/response.rb#107 def failure?; end # Whether the status is considered final. Note that 101 is considered final. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#43 + # source://protocol-http//lib/protocol/http/response.rb#71 def final?; end # Returns the value of attribute headers. # - # source://protocol-http//lib/protocol/http/response.rb#24 + # source://protocol-http//lib/protocol/http/response.rb#47 def headers; end # Sets the attribute headers # # @param value the value to set the attribute headers to. # - # source://protocol-http//lib/protocol/http/response.rb#24 + # source://protocol-http//lib/protocol/http/response.rb#47 def headers=(_arg0); end + # Whether the response is considered a hijack: the connection has been taken over by the application and the server should not send any more data. + # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#28 + # source://protocol-http//lib/protocol/http/response.rb#56 def hijack?; end # Whether the status is considered informational. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#38 + # source://protocol-http//lib/protocol/http/response.rb#66 def informational?; end # Whether the status is 500 (internal server error). # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#89 + # source://protocol-http//lib/protocol/http/response.rb#117 def internal_server_error?; end # Whether the status is 304 (not modified). # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#69 + # source://protocol-http//lib/protocol/http/response.rb#97 def not_modified?; end # Whether the status is 200 (ok). # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#49 + # source://protocol-http//lib/protocol/http/response.rb#77 def ok?; end # Whether the status is 206 (partial content). # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#59 + # source://protocol-http//lib/protocol/http/response.rb#87 def partial?; end # Whether the status is 307 (temporary redirect) and should preserve the method of the request when following the redirect. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#74 + # source://protocol-http//lib/protocol/http/response.rb#102 def preserve_method?; end # Returns the value of attribute protocol. # - # source://protocol-http//lib/protocol/http/response.rb#26 + # source://protocol-http//lib/protocol/http/response.rb#53 def protocol; end # Sets the attribute protocol # # @param value the value to set the attribute protocol to. # - # source://protocol-http//lib/protocol/http/response.rb#26 + # source://protocol-http//lib/protocol/http/response.rb#53 def protocol=(_arg0); end # Whether the status is considered a redirection. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#64 + # source://protocol-http//lib/protocol/http/response.rb#92 def redirection?; end # Whether the status is 500 (internal server error). @@ -1241,51 +1371,62 @@ class Protocol::HTTP::Response # @deprecated Use {#internal_server_error?} instead. # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#89 + # source://protocol-http//lib/protocol/http/response.rb#117 def server_failure?; end # Returns the value of attribute status. # - # source://protocol-http//lib/protocol/http/response.rb#23 + # source://protocol-http//lib/protocol/http/response.rb#44 def status; end # Sets the attribute status # # @param value the value to set the attribute status to. # - # source://protocol-http//lib/protocol/http/response.rb#23 + # source://protocol-http//lib/protocol/http/response.rb#44 def status=(_arg0); end # Whether the status is considered successful. # # @return [Boolean] # - # source://protocol-http//lib/protocol/http/response.rb#54 + # source://protocol-http//lib/protocol/http/response.rb#82 def success?; end - # source://protocol-http//lib/protocol/http/response.rb#111 + # source://protocol-http//lib/protocol/http/response.rb#165 def to_ary; end - # source://protocol-http//lib/protocol/http/response.rb#107 + # source://protocol-http//lib/protocol/http/response.rb#157 + def to_json(*_arg0, **_arg1, &_arg2); end + + # source://protocol-http//lib/protocol/http/response.rb#161 def to_s; end # Returns the value of attribute version. # - # source://protocol-http//lib/protocol/http/response.rb#22 + # source://protocol-http//lib/protocol/http/response.rb#41 def version; end # Sets the attribute version # # @param value the value to set the attribute version to. # - # source://protocol-http//lib/protocol/http/response.rb#22 + # source://protocol-http//lib/protocol/http/response.rb#41 def version=(_arg0); end class << self - # source://protocol-http//lib/protocol/http/response.rb#96 + # A short-cut method which exposes the main response variables that you'd typically care about. It follows the same order as the `Rack` response tuple, but also includes the protocol. + # + # ~~~ ruby + # Response[200, {"content-type" => "text/html"}, ["Hello, World!"]] + # ~~~ + # + # source://protocol-http//lib/protocol/http/response.rb#133 def [](status, headers = T.unsafe(nil), body = T.unsafe(nil), protocol = T.unsafe(nil)); end - # source://protocol-http//lib/protocol/http/response.rb#103 + # Create a response for the given exception. + # + # source://protocol-http//lib/protocol/http/response.rb#143 def for_exception(exception); end end end @@ -1293,12 +1434,14 @@ end # source://protocol-http//lib/protocol/http/url.rb#9 module Protocol::HTTP::URL class << self - # source://protocol-http//lib/protocol/http/url.rb#71 + # Assign a value to a nested hash. + # + # source://protocol-http//lib/protocol/http/url.rb#77 def assign(keys, value, parent); end # TODO use native C extension from `Trenni::Reference`. # - # source://protocol-http//lib/protocol/http/url.rb#92 + # source://protocol-http//lib/protocol/http/url.rb#98 def decode(string, maximum = T.unsafe(nil), symbolize_keys: T.unsafe(nil)); end # Encodes a hash or array into a query string. @@ -1321,7 +1464,7 @@ module Protocol::HTTP::URL # source://protocol-http//lib/protocol/http/url.rb#59 def scan(string); end - # source://protocol-http//lib/protocol/http/url.rb#67 + # source://protocol-http//lib/protocol/http/url.rb#69 def split(name); end # Unescapes a percent encoded string. diff --git a/sorbet/rbi/gems/public_suffix@5.0.4.rbi b/sorbet/rbi/gems/public_suffix@6.0.0.rbi similarity index 99% rename from sorbet/rbi/gems/public_suffix@5.0.4.rbi rename to sorbet/rbi/gems/public_suffix@6.0.0.rbi index 49c81c106..d7ab2c1be 100644 --- a/sorbet/rbi/gems/public_suffix@5.0.4.rbi +++ b/sorbet/rbi/gems/public_suffix@6.0.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `public_suffix` gem. # Please instead update this file by running `bin/tapioca gem public_suffix`. + # PublicSuffix is a Ruby domain name parser based on the Public Suffix List. # # The [Public Suffix List](https://publicsuffix.org) is a cross-vendor initiative @@ -119,12 +120,12 @@ PublicSuffix::DOT = T.let(T.unsafe(nil), String) class PublicSuffix::Domain # Creates and returns a new {PublicSuffix::Domain} instance. # - # @example Initialize with a TLD and SLD - # PublicSuffix::Domain.new("com", "example") - # # => # # @example Initialize with a TLD # PublicSuffix::Domain.new("com") # # => # + # @example Initialize with a TLD and SLD + # PublicSuffix::Domain.new("com", "example") + # # => # # @example Initialize with a TLD, SLD and TRD # PublicSuffix::Domain.new("com", "example", "wwww") # # => # diff --git a/sorbet/rbi/gems/puma@6.4.2.rbi b/sorbet/rbi/gems/puma@6.4.3.rbi similarity index 99% rename from sorbet/rbi/gems/puma@6.4.2.rbi rename to sorbet/rbi/gems/puma@6.4.3.rbi index b638f1e89..ce355de46 100644 --- a/sorbet/rbi/gems/puma@6.4.2.rbi +++ b/sorbet/rbi/gems/puma@6.4.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `puma` gem. # Please instead update this file by running `bin/tapioca gem puma`. + # This module is used as an 'include' file in code at bottom of file # # source://puma//lib/puma/detect.rb#7 @@ -917,7 +918,7 @@ module Puma::Const; end # Banned keys of response header # -# source://puma//lib/puma/const.rb#285 +# source://puma//lib/puma/const.rb#293 Puma::Const::BANNED_HEADER_KEY = T.let(T.unsafe(nil), Regexp) # source://puma//lib/puma/const.rb#224 @@ -1095,7 +1096,7 @@ Puma::Const::PORT_443 = T.let(T.unsafe(nil), String) # source://puma//lib/puma/const.rb#211 Puma::Const::PORT_80 = T.let(T.unsafe(nil), String) -# source://puma//lib/puma/const.rb#287 +# source://puma//lib/puma/const.rb#295 Puma::Const::PROXY_PROTOCOL_V1_REGEX = T.let(T.unsafe(nil), Regexp) # source://puma//lib/puma/const.rb#234 @@ -1175,6 +1176,13 @@ Puma::Const::TRANSFER_ENCODING2 = T.let(T.unsafe(nil), String) # source://puma//lib/puma/const.rb#262 Puma::Const::TRANSFER_ENCODING_CHUNKED = T.let(T.unsafe(nil), String) +# The keys of headers that should not be convert to underscore +# normalized versions. These headers are ignored at the request reading layer, +# but if we normalize them after reading, it's just confusing for the application. +# +# source://puma//lib/puma/const.rb#287 +Puma::Const::UNMASKABLE_HEADERS = T.let(T.unsafe(nil), Hash) + # source://puma//lib/puma/const.rb#216 Puma::Const::UNSPECIFIED_IPV4 = T.let(T.unsafe(nil), String) @@ -2336,7 +2344,7 @@ end Puma::IS_JRUBY = T.let(T.unsafe(nil), FalseClass) # source://puma//lib/puma/detect.rb#19 -Puma::IS_LINUX = T.let(T.unsafe(nil), FalseClass) +Puma::IS_LINUX = T.let(T.unsafe(nil), TrueClass) # @version 5.2.0 # @@ -2344,7 +2352,7 @@ Puma::IS_LINUX = T.let(T.unsafe(nil), FalseClass) Puma::IS_MRI = T.let(T.unsafe(nil), TrueClass) # source://puma//lib/puma/detect.rb#15 -Puma::IS_OSX = T.let(T.unsafe(nil), TrueClass) +Puma::IS_OSX = T.let(T.unsafe(nil), FalseClass) # source://puma//lib/puma/detect.rb#17 Puma::IS_WINDOWS = T.let(T.unsafe(nil), FalseClass) @@ -3558,7 +3566,7 @@ module Puma::Request # @param status [Integer] status from the app # @return [String] the text description from Puma::HTTP_STATUS_CODES # - # source://puma//lib/puma/request.rb#554 + # source://puma//lib/puma/request.rb#567 def fetch_status_code(status); end # @param header_key [#to_s] @@ -3589,10 +3597,13 @@ module Puma::Request # avoid allocation in the common case (ie there are no headers # with `,` in their names), that's why it has the extra conditionals. # + # @note If a normalized version of a `,` header already exists, we ignore + # the `,` version. This prevents clobbering headers managed by proxies + # but not by clients (Like X-Forwarded-For). # @param env [Hash] see Puma::Client#env, from request, modifies in place # @version 5.0.3 # - # source://puma//lib/puma/request.rb#501 + # source://puma//lib/puma/request.rb#506 def req_env_post_parse(env); end # Used in the lambda for env[ `Puma::Const::EARLY_HINTS` ] @@ -3601,7 +3612,7 @@ module Puma::Request # @return [String] # @version 5.0.3 # - # source://puma//lib/puma/request.rb#533 + # source://puma//lib/puma/request.rb#546 def str_early_hints(headers); end # Processes and write headers to the IOBuffer. @@ -3617,7 +3628,7 @@ module Puma::Request # @return [Hash] resp_info # @version 5.0.3 # - # source://puma//lib/puma/request.rb#571 + # source://puma//lib/puma/request.rb#584 def str_headers(env, status, headers, res_body, io_buffer, force_keep_alive); end end @@ -3831,7 +3842,7 @@ class Puma::Server # @return [Boolean] # - # source://puma//lib/puma/server.rb#204 + # source://puma//lib/puma/server.rb#187 def closed_socket?(socket); end # source://puma//lib/puma/server.rb#673 @@ -3841,7 +3852,7 @@ class Puma::Server # 3 == TCP_CORK # 1/0 == turn on/off # - # source://puma//lib/puma/server.rb#177 + # source://puma//lib/puma/server.rb#159 def cork_socket(socket); end # @todo the following may be deprecated in the future @@ -4005,7 +4016,7 @@ class Puma::Server # source://puma//lib/puma/server.rb#35 def thread; end - # source://puma//lib/puma/server.rb#180 + # source://puma//lib/puma/server.rb#168 def uncork_socket(socket); end # Triggers a client timeout if the thread-pool shuts down @@ -4052,6 +4063,9 @@ Puma::Server::STAT_METHODS = T.let(T.unsafe(nil), Array) # source://puma//lib/puma/server.rb#49 Puma::Server::THREAD_LOCAL_KEY = T.let(T.unsafe(nil), Symbol) +# source://puma//lib/puma/server.rb#185 +Puma::Server::UNPACK_TCP_STATE_FROM_TCP_INFO = T.let(T.unsafe(nil), String) + # This class is instantiated by the `Puma::Launcher` and used # to boot and serve a Ruby application when no puma "workers" are needed # i.e. only using "threaded" mode. For example `$ puma -t 1:5` diff --git a/sorbet/rbi/gems/racc@1.7.3.rbi b/sorbet/rbi/gems/racc@1.8.1.rbi similarity index 66% rename from sorbet/rbi/gems/racc@1.7.3.rbi rename to sorbet/rbi/gems/racc@1.8.1.rbi index ef9b9bf5d..5d4f1618e 100644 --- a/sorbet/rbi/gems/racc@1.7.3.rbi +++ b/sorbet/rbi/gems/racc@1.8.1.rbi @@ -4,35 +4,36 @@ # This is an autogenerated file for types exported from the `racc` gem. # Please instead update this file by running `bin/tapioca gem racc`. -# source://racc//lib/racc/parser.rb#23 + +# source://racc//lib/racc/parser.rb#19 ParseError = Racc::ParseError # source://racc//lib/racc/info.rb#17 Racc::Copyright = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#188 +# source://racc//lib/racc/parser.rb#184 class Racc::Parser - # source://racc//lib/racc/parser.rb#283 + # source://racc//lib/racc/parser.rb#279 def _racc_do_parse_rb(arg, in_debug); end - # source://racc//lib/racc/parser.rb#483 + # source://racc//lib/racc/parser.rb#479 def _racc_do_reduce(arg, act); end # common # - # source://racc//lib/racc/parser.rb#386 + # source://racc//lib/racc/parser.rb#382 def _racc_evalact(act, arg); end - # source://racc//lib/racc/parser.rb#236 + # source://racc//lib/racc/parser.rb#232 def _racc_init_sysvars; end - # source://racc//lib/racc/parser.rb#224 + # source://racc//lib/racc/parser.rb#220 def _racc_setup; end - # source://racc//lib/racc/parser.rb#333 + # source://racc//lib/racc/parser.rb#329 def _racc_yyparse_rb(recv, mid, arg, c_debug); end - # source://racc//lib/racc/parser.rb#266 + # source://racc//lib/racc/parser.rb#262 def do_parse; end # The method to fetch next token. @@ -46,7 +47,7 @@ class Racc::Parser # # @raise [NotImplementedError] # - # source://racc//lib/racc/parser.rb#279 + # source://racc//lib/racc/parser.rb#275 def next_token; end # This method is called when a parse error is found. @@ -66,88 +67,92 @@ class Racc::Parser # # @raise [ParseError] # - # source://racc//lib/racc/parser.rb#539 + # source://racc//lib/racc/parser.rb#535 def on_error(t, val, vstack); end - # source://racc//lib/racc/parser.rb#588 + # source://racc//lib/racc/parser.rb#584 def racc_accept; end - # source://racc//lib/racc/parser.rb#593 + # source://racc//lib/racc/parser.rb#589 def racc_e_pop(state, tstack, vstack); end - # source://racc//lib/racc/parser.rb#600 + # source://racc//lib/racc/parser.rb#596 def racc_next_state(curstate, state); end - # source://racc//lib/racc/parser.rb#606 + # source://racc//lib/racc/parser.rb#602 def racc_print_stacks(t, v); end - # source://racc//lib/racc/parser.rb#615 + # source://racc//lib/racc/parser.rb#611 def racc_print_states(s); end # For debugging output # - # source://racc//lib/racc/parser.rb#562 + # source://racc//lib/racc/parser.rb#558 def racc_read_token(t, tok, val); end - # source://racc//lib/racc/parser.rb#575 + # source://racc//lib/racc/parser.rb#571 def racc_reduce(toks, sim, tstack, vstack); end - # source://racc//lib/racc/parser.rb#569 + # source://racc//lib/racc/parser.rb#565 def racc_shift(tok, tstack, vstack); end - # source://racc//lib/racc/parser.rb#622 + # source://racc//lib/racc/parser.rb#618 def racc_token2str(tok); end # Convert internal ID of token symbol to the string. # - # source://racc//lib/racc/parser.rb#628 + # source://racc//lib/racc/parser.rb#624 def token_to_str(t); end # Exit parser. # Return value is +Symbol_Value_Stack[0]+. # - # source://racc//lib/racc/parser.rb#552 + # source://racc//lib/racc/parser.rb#548 def yyaccept; end # Leave error recovering mode. # - # source://racc//lib/racc/parser.rb#557 + # source://racc//lib/racc/parser.rb#553 def yyerrok; end # Enter error recovering mode. # This method does not call #on_error. # - # source://racc//lib/racc/parser.rb#546 + # source://racc//lib/racc/parser.rb#542 def yyerror; end - # source://racc//lib/racc/parser.rb#328 + # source://racc//lib/racc/parser.rb#324 def yyparse(recv, mid); end class << self - # source://racc//lib/racc/parser.rb#220 + # source://racc//lib/racc/parser.rb#216 def racc_runtime_type; end end end -# source://racc//lib/racc/parser.rb#209 +# source://racc//lib/racc/parser.rb#205 Racc::Parser::Racc_Main_Parsing_Routine = T.let(T.unsafe(nil), Symbol) -# source://racc//lib/racc/parser.rb#211 +Racc::Parser::Racc_Runtime_Core_Id_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#207 Racc::Parser::Racc_Runtime_Core_Version = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#191 +Racc::Parser::Racc_Runtime_Core_Version_C = T.let(T.unsafe(nil), String) + +# source://racc//lib/racc/parser.rb#187 Racc::Parser::Racc_Runtime_Core_Version_R = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#212 +# source://racc//lib/racc/parser.rb#208 Racc::Parser::Racc_Runtime_Type = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#190 +# source://racc//lib/racc/parser.rb#186 Racc::Parser::Racc_Runtime_Version = T.let(T.unsafe(nil), String) -# source://racc//lib/racc/parser.rb#210 +# source://racc//lib/racc/parser.rb#206 Racc::Parser::Racc_YY_Parse_Method = T.let(T.unsafe(nil), Symbol) -# source://racc//lib/racc/parser.rb#185 +# source://racc//lib/racc/parser.rb#181 Racc::Racc_No_Extensions = T.let(T.unsafe(nil), FalseClass) # source://racc//lib/racc/info.rb#15 diff --git a/sorbet/rbi/gems/rack-mini-profiler@3.1.1.rbi b/sorbet/rbi/gems/rack-mini-profiler@3.3.1.rbi similarity index 78% rename from sorbet/rbi/gems/rack-mini-profiler@3.1.1.rbi rename to sorbet/rbi/gems/rack-mini-profiler@3.3.1.rbi index a8cd372a6..a30783fbd 100644 --- a/sorbet/rbi/gems/rack-mini-profiler@3.1.1.rbi +++ b/sorbet/rbi/gems/rack-mini-profiler@3.3.1.rbi @@ -4,444 +4,6 @@ # This is an autogenerated file for types exported from the `rack-mini-profiler` gem. # Please instead update this file by running `bin/tapioca gem rack-mini-profiler`. -# source://rack-mini-profiler//lib/patches/db/pg.rb#31 -class PG::Connection - include ::PG::Constants - - # source://pg/1.5.4/lib/pg/connection.rb#582 - def async_cancel; end - - def async_describe_portal(_arg0); end - def async_describe_prepared(_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#555 - def async_encrypt_password(password, username, algorithm = T.unsafe(nil)); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#109 - def async_exec(*args, &blk); end - - def async_exec_params(*_arg0); end - def async_exec_prepared(*_arg0); end - def async_exec_without_profiling(*_arg0); end - def async_flush; end - - # source://pg/1.5.4/lib/pg/connection.rb#423 - def async_get_copy_data(async = T.unsafe(nil), decoder = T.unsafe(nil)); end - - def async_get_last_result; end - - # source://pg/1.5.4/lib/pg/connection.rb#400 - def async_get_result; end - - # source://pg/1.5.4/lib/pg/connection.rb#471 - def async_isnonblocking; end - - def async_prepare(*_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#495 - def async_put_copy_data(buffer, encoder = T.unsafe(nil)); end - - # source://pg/1.5.4/lib/pg/connection.rb#525 - def async_put_copy_end(*args); end - - def async_query(*_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#567 - def async_reset; end - - def async_set_client_encoding(_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#457 - def async_setnonblocking(enabled); end - - def backend_key; end - def backend_pid; end - def block(*_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#582 - def cancel; end - - # source://pg/1.5.4/lib/pg/connection.rb#379 - def check_socket; end - - def client_encoding=(_arg0); end - def close; end - - # source://pg/1.5.4/lib/pg/connection.rb#321 - def conndefaults; end - - # source://pg/1.5.4/lib/pg/connection.rb#337 - def conndefaults_hash; end - - def connect_poll; end - def connection_needs_password; end - def connection_used_password; end - def conninfo; end - - # source://pg/1.5.4/lib/pg/connection.rb#345 - def conninfo_hash; end - - def consume_input; end - - # source://pg/1.5.4/lib/pg/connection.rb#211 - def copy_data(sql, coder = T.unsafe(nil)); end - - def db; end - def decoder_for_get_copy_data; end - def decoder_for_get_copy_data=(_arg0); end - def describe_portal(_arg0); end - def describe_prepared(_arg0); end - def discard_results; end - def encoder_for_put_copy_data; end - def encoder_for_put_copy_data=(_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#555 - def encrypt_password(password, username, algorithm = T.unsafe(nil)); end - - def enter_pipeline_mode; end - def error_message; end - def escape(_arg0); end - def escape_bytea(_arg0); end - def escape_identifier(_arg0); end - def escape_literal(_arg0); end - def escape_string(_arg0); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#55 - def exec(*args, &blk); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#68 - def exec_params(*args, &blk); end - - def exec_params_without_profiling(*_arg0); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#81 - def exec_prepared(*args, &blk); end - - def exec_prepared_without_profiling(*_arg0); end - def exec_without_profiling(*_arg0); end - def exit_pipeline_mode; end - def external_encoding; end - def field_name_type; end - def field_name_type=(_arg0); end - def finish; end - def finished?; end - def flush; end - def get_client_encoding; end - - # source://pg/1.5.4/lib/pg/connection.rb#423 - def get_copy_data(async = T.unsafe(nil), decoder = T.unsafe(nil)); end - - def get_last_result; end - - # source://pg/1.5.4/lib/pg/connection.rb#400 - def get_result; end - - def host; end - def hostaddr; end - - # source://pg/1.5.4/lib/pg/connection.rb#100 - def inspect; end - - def internal_encoding; end - def internal_encoding=(_arg0); end - def is_busy; end - - # source://pg/1.5.4/lib/pg/connection.rb#471 - def isnonblocking; end - - def lo_close(_arg0); end - def lo_creat(*_arg0); end - def lo_create(_arg0); end - def lo_export(_arg0, _arg1); end - def lo_import(_arg0); end - def lo_lseek(_arg0, _arg1, _arg2); end - def lo_open(*_arg0); end - def lo_read(_arg0, _arg1); end - def lo_seek(_arg0, _arg1, _arg2); end - def lo_tell(_arg0); end - def lo_truncate(_arg0, _arg1); end - def lo_unlink(_arg0); end - def lo_write(_arg0, _arg1); end - def loclose(_arg0); end - def locreat(*_arg0); end - def locreate(_arg0); end - def loexport(_arg0, _arg1); end - def loimport(_arg0); end - def lolseek(_arg0, _arg1, _arg2); end - def loopen(*_arg0); end - def loread(_arg0, _arg1); end - def loseek(_arg0, _arg1, _arg2); end - def lotell(_arg0); end - def lotruncate(_arg0, _arg1); end - def lounlink(_arg0); end - def lowrite(_arg0, _arg1); end - def make_empty_pgresult(_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#471 - def nonblocking?; end - - def notifies; end - def notifies_wait(*_arg0); end - def options; end - def parameter_status(_arg0); end - def pass; end - def pipeline_status; end - def pipeline_sync; end - def port; end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#42 - def prepare(*args, &blk); end - - def prepare_without_profiling(*_arg0); end - def protocol_version; end - - # source://pg/1.5.4/lib/pg/connection.rb#495 - def put_copy_data(buffer, encoder = T.unsafe(nil)); end - - # source://pg/1.5.4/lib/pg/connection.rb#525 - def put_copy_end(*args); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#55 - def query(*args, &blk); end - - def quote_ident(_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#567 - def reset; end - - def reset_poll; end - def reset_start; end - def send_describe_portal(_arg0); end - def send_describe_prepared(_arg0); end - def send_flush_request; end - def send_prepare(*_arg0); end - def send_query(*_arg0); end - def send_query_params(*_arg0); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#95 - def send_query_prepared(*args, &blk); end - - def send_query_prepared_without_profiling(*_arg0); end - def server_version; end - def set_client_encoding(_arg0); end - def set_default_encoding; end - def set_error_context_visibility(_arg0); end - def set_error_verbosity(_arg0); end - def set_notice_processor; end - def set_notice_receiver; end - def set_single_row_mode; end - - # source://pg/1.5.4/lib/pg/connection.rb#457 - def setnonblocking(enabled); end - - def socket; end - def socket_io; end - def ssl_attribute(_arg0); end - def ssl_attribute_names; end - - # source://pg/1.5.4/lib/pg/connection.rb#362 - def ssl_attributes; end - - def ssl_in_use?; end - def status; end - def sync_cancel; end - def sync_describe_portal(_arg0); end - def sync_describe_prepared(_arg0); end - def sync_encrypt_password(*_arg0); end - def sync_exec(*_arg0); end - def sync_exec_params(*_arg0); end - def sync_exec_prepared(*_arg0); end - def sync_flush; end - def sync_get_copy_data(*_arg0); end - def sync_get_last_result; end - def sync_get_result; end - def sync_isnonblocking; end - def sync_prepare(*_arg0); end - def sync_put_copy_data(*_arg0); end - def sync_put_copy_end(*_arg0); end - def sync_reset; end - def sync_set_client_encoding(_arg0); end - def sync_setnonblocking(_arg0); end - def trace(_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#305 - def transaction; end - - def transaction_status; end - def tty; end - def type_map_for_queries; end - def type_map_for_queries=(_arg0); end - def type_map_for_results; end - def type_map_for_results=(_arg0); end - def unescape_bytea(_arg0); end - def untrace; end - def user; end - def wait_for_notify(*_arg0); end - - private - - # source://pg/1.5.4/lib/pg/connection.rb#637 - def async_connect_or_reset(poll_meth); end - - def flush_data=(_arg0); end - - class << self - # source://pg/1.5.4/lib/pg/connection.rb#937 - def async_api=(enable); end - - # source://pg/1.5.4/lib/pg/connection.rb#758 - def async_connect(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#858 - def async_ping(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#914 - def async_send_api=(enable); end - - def conndefaults; end - - # source://pg/1.5.4/lib/pg/connection.rb#329 - def conndefaults_hash; end - - # source://pg/1.5.4/lib/pg/connection.rb#758 - def connect(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#44 - def connect_hash_to_string(hash); end - - def connect_start(*_arg0); end - def conninfo_parse(_arg0); end - def encrypt_password(_arg0, _arg1); end - def escape(_arg0); end - def escape_bytea(_arg0); end - def escape_string(_arg0); end - def isthreadsafe; end - - # source://pg/1.5.4/lib/pg/connection.rb#758 - def new(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#758 - def open(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#64 - def parse_connect_args(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#858 - def ping(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#37 - def quote_connstr(value); end - - def quote_ident(_arg0); end - - # source://pg/1.5.4/lib/pg/connection.rb#758 - def setdb(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#758 - def setdblogin(*args); end - - def sync_connect(*_arg0); end - def sync_ping(*_arg0); end - def unescape_bytea(_arg0); end - - private - - # source://pg/1.5.4/lib/pg/connection.rb#776 - def connect_to_hosts(*args); end - - # source://pg/1.5.4/lib/pg/connection.rb#828 - def host_is_named_pipe?(host_string); end - end -end - -module PG::Constants; end - -# PG patches, keep in mind exec and async_exec have a exec{|r| } semantics that is yet to be implemented -# -# source://rack-mini-profiler//lib/patches/db/pg.rb#4 -class PG::Result - include ::Enumerable - include ::PG::Constants - - def [](_arg0); end - def autoclear?; end - def binary_tuples; end - def check; end - def check_result; end - def clear; end - def cleared?; end - def cmd_status; end - def cmd_tuples; end - def cmdtuples; end - def column_values(_arg0); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#15 - def each(*args, &blk); end - - def each_row; end - def each_without_profiling; end - def error_field(_arg0); end - def error_message; end - def fformat(_arg0); end - def field_name_type; end - def field_name_type=(_arg0); end - - # source://pg/1.5.4/lib/pg/result.rb#26 - def field_names_as(type); end - - def field_values(_arg0); end - def fields; end - def fmod(_arg0); end - def fname(_arg0); end - def fnumber(_arg0); end - def freeze; end - def fsize(_arg0); end - def ftable(_arg0); end - def ftablecol(_arg0); end - def ftype(_arg0); end - def getisnull(_arg0, _arg1); end - def getlength(_arg0, _arg1); end - def getvalue(_arg0, _arg1); end - - # source://pg/1.5.4/lib/pg/result.rb#32 - def inspect; end - - # source://pg/1.5.4/lib/pg/result.rb#16 - def map_types!(type_map); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#22 - def mp_report_sql(&block); end - - def nfields; end - def nparams; end - def ntuples; end - def num_fields; end - def num_tuples; end - def oid_value; end - def paramtype(_arg0); end - def res_status(*_arg0); end - def result_error_field(_arg0); end - def result_error_message; end - def result_status; end - def result_verbose_error_message(_arg0, _arg1); end - def stream_each; end - def stream_each_row; end - def stream_each_tuple; end - def tuple(_arg0); end - def tuple_values(_arg0); end - def type_map; end - def type_map=(_arg0); end - - # source://rack-mini-profiler//lib/patches/db/pg.rb#8 - def values(*args, &blk); end - - def values_without_profiling; end - def verbose_error_message(_arg0, _arg1); end - - class << self - def res_status(_arg0); end - end -end # based off https://github.com/newrelic/rpm/blob/master/lib/new_relic/agent/instrumentation/active_record.rb # fallback for alls sorts of weird dbs @@ -449,16 +11,18 @@ end # source://rack-mini-profiler//lib/mini_profiler/version.rb#3 module Rack class << self - # source://rack/2.2.8.1/lib/rack/version.rb#26 + # source://rack/2.2.9/lib/rack/version.rb#26 def release; end - # source://rack/2.2.8.1/lib/rack/version.rb#19 + # source://rack/2.2.9/lib/rack/version.rb#19 def version; end end end # source://rack-mini-profiler//lib/mini_profiler/version.rb#4 class Rack::MiniProfiler + include ::Rack::MiniProfiler::Actions + include ::Rack::MiniProfiler::Views extend ::Rack::MiniProfiler::ProfilingMethods # options: @@ -466,203 +30,165 @@ class Rack::MiniProfiler # # @return [MiniProfiler] a new instance of MiniProfiler # - # source://rack-mini-profiler//lib/mini_profiler.rb#126 + # source://rack-mini-profiler//lib/mini_profiler.rb#122 def initialize(app, config = T.unsafe(nil)); end + # source://rack-mini-profiler//lib/mini_profiler.rb#419 + def action_parameters(env); end + # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler.rb#217 + # source://rack-mini-profiler//lib/mini_profiler.rb#149 def advanced_debugging_enabled?; end - # source://rack-mini-profiler//lib/mini_profiler.rb#595 + # source://rack-mini-profiler//lib/mini_profiler.rb#525 def analyze_memory; end - # source://rack-mini-profiler//lib/mini_profiler.rb#820 + # source://rack-mini-profiler//lib/mini_profiler.rb#618 def cache_control_value; end - # source://rack-mini-profiler//lib/mini_profiler.rb#225 + # source://rack-mini-profiler//lib/mini_profiler.rb#157 def call(env); end # cancels automatic injection of profile script for the current page # - # source://rack-mini-profiler//lib/mini_profiler.rb#816 + # source://rack-mini-profiler//lib/mini_profiler.rb#614 def cancel_auto_inject(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#213 + # source://rack-mini-profiler//lib/mini_profiler.rb#145 def config; end - # source://rack-mini-profiler//lib/mini_profiler.rb#205 + # source://rack-mini-profiler//lib/mini_profiler.rb#137 def current; end - # source://rack-mini-profiler//lib/mini_profiler.rb#209 + # source://rack-mini-profiler//lib/mini_profiler.rb#141 def current=(c); end - # source://rack-mini-profiler//lib/mini_profiler.rb#567 + # source://rack-mini-profiler//lib/mini_profiler.rb#497 def dump_env(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#549 + # source://rack-mini-profiler//lib/mini_profiler.rb#479 def dump_exceptions(exceptions); end - # source://rack-mini-profiler//lib/mini_profiler.rb#708 - def flamegraph(graph, path, env); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#178 - def generate_html(page_struct, env, result_json = T.unsafe(nil)); end - - # get_profile_script returns script to be injected inside current html page - # By default, profile_script is appended to the end of all html requests automatically. - # Calling get_profile_script cancels automatic append for the current page - # Use it when: - # * you have disabled auto append behaviour throught :auto_inject => false flag - # * you do not want script to be automatically appended for the current page. You can also call cancel_auto_inject - # - # source://rack-mini-profiler//lib/mini_profiler.rb#758 - def get_profile_script(env); end + # source://rack-mini-profiler//lib/mini_profiler.rb#609 + def flamegraph_path(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#671 - def help(client_settings, env); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#739 + # source://rack-mini-profiler//lib/mini_profiler.rb#596 def ids(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#748 + # source://rack-mini-profiler//lib/mini_profiler.rb#605 def ids_comma_separated(env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#528 + # source://rack-mini-profiler//lib/mini_profiler.rb#458 def inject(fragment, script); end - # source://rack-mini-profiler//lib/mini_profiler.rb#494 + # source://rack-mini-profiler//lib/mini_profiler.rb#423 def inject_profiler(env, status, headers, body); end - # source://rack-mini-profiler//lib/mini_profiler.rb#666 - def make_link(postfix, env); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#190 - def serve_html(env); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#141 - def serve_results(env); end + # @return [Boolean] + # + # source://rack-mini-profiler//lib/mini_profiler.rb#414 + def matches_action?(action, env); end - # source://rack-mini-profiler//lib/mini_profiler.rb#661 + # source://rack-mini-profiler//lib/mini_profiler.rb#591 def text_result(body, status: T.unsafe(nil), headers: T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler.rb#221 + # source://rack-mini-profiler//lib/mini_profiler.rb#153 def tool_disabled_message(client_settings); end - # source://rack-mini-profiler//lib/mini_profiler.rb#589 + # source://rack-mini-profiler//lib/mini_profiler.rb#519 def trim_strings(strings, max_size); end - # source://rack-mini-profiler//lib/mini_profiler.rb#137 + # source://rack-mini-profiler//lib/mini_profiler.rb#133 def user(env); end private - # source://rack-mini-profiler//lib/mini_profiler.rb#826 - def handle_snapshots_request(env); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#950 - def public_base_path(env); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#894 + # source://rack-mini-profiler//lib/mini_profiler.rb#624 def rails_route_from_path(path, method); end - # source://rack-mini-profiler//lib/mini_profiler.rb#876 - def serve_flamegraph(env); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#921 + # source://rack-mini-profiler//lib/mini_profiler.rb#641 def take_snapshot(env, start); end # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler.rb#915 + # source://rack-mini-profiler//lib/mini_profiler.rb#635 def take_snapshot?(path); end - # source://rack-mini-profiler//lib/mini_profiler.rb#910 - def url_for_snapshot(id, group_name); end - - # source://rack-mini-profiler//lib/mini_profiler.rb#905 - def url_for_snapshots_group(group_name); end - class << self - # source://rack-mini-profiler//lib/mini_profiler.rb#59 + # source://rack-mini-profiler//lib/mini_profiler.rb#55 def add_snapshot_custom_field(key, value); end - # source://rack-mini-profiler//lib/mini_profiler.rb#95 + # source://rack-mini-profiler//lib/mini_profiler.rb#91 def advanced_tools_message; end - # source://rack-mini-profiler//lib/mini_profiler.rb#83 + # source://rack-mini-profiler//lib/mini_profiler.rb#79 def authorize_request; end - # source://rack-mini-profiler//lib/mini_profiler.rb#101 + # source://rack-mini-profiler//lib/mini_profiler.rb#97 def binds_to_params(binds); end # So we can change the configuration if we want # - # source://rack-mini-profiler//lib/mini_profiler.rb#36 + # source://rack-mini-profiler//lib/mini_profiler.rb#40 def config; end - # source://rack-mini-profiler//lib/mini_profiler.rb#74 + # source://rack-mini-profiler//lib/mini_profiler.rb#70 def create_current(env = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler.rb#48 + # source://rack-mini-profiler//lib/mini_profiler.rb#44 def current; end - # source://rack-mini-profiler//lib/mini_profiler.rb#52 + # source://rack-mini-profiler//lib/mini_profiler.rb#48 def current=(c); end - # source://rack-mini-profiler//lib/mini_profiler.rb#87 + # source://rack-mini-profiler//lib/mini_profiler.rb#83 def deauthorize_request; end # discard existing results, don't track this request # - # source://rack-mini-profiler//lib/mini_profiler.rb#70 + # source://rack-mini-profiler//lib/mini_profiler.rb#66 def discard_results; end - # source://rack-mini-profiler//lib/mini_profiler.rb#27 + # source://rack-mini-profiler//lib/mini_profiler.rb#31 def generate_id; end - # source://rack-mini-profiler//lib/mini_profiler.rb#65 + # source://rack-mini-profiler//lib/mini_profiler.rb#61 def get_snapshot_custom_fields; end # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler.rb#23 + # source://rack-mini-profiler//lib/mini_profiler.rb#27 def patch_rails?; end # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler.rb#117 + # source://rack-mini-profiler//lib/mini_profiler.rb#113 def redact_sql_queries?; end # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler.rb#91 + # source://rack-mini-profiler//lib/mini_profiler.rb#87 def request_authorized?; end - # source://rack-mini-profiler//lib/mini_profiler.rb#31 + # source://rack-mini-profiler//lib/mini_profiler.rb#35 def reset_config; end - # source://rack-mini-profiler//lib/mini_profiler.rb#40 - def resources_root; end - - # source://rack-mini-profiler//lib/mini_profiler.rb#44 - def share_template; end - # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler.rb#112 + # source://rack-mini-profiler//lib/mini_profiler.rb#108 def snapshots_transporter?; end # Returns the value of attribute subscribe_sql_active_record. # - # source://rack-mini-profiler//lib/mini_profiler.rb#21 + # source://rack-mini-profiler//lib/mini_profiler.rb#25 def subscribe_sql_active_record; end # Sets the attribute subscribe_sql_active_record # # @param value the value to set the attribute subscribe_sql_active_record to. # - # source://rack-mini-profiler//lib/mini_profiler.rb#21 + # source://rack-mini-profiler//lib/mini_profiler.rb#25 def subscribe_sql_active_record=(_arg0); end end end @@ -758,6 +284,27 @@ end # source://rack-mini-profiler//lib/mini_profiler/storage/abstract_store.rb#8 Rack::MiniProfiler::AbstractStore::MAX_TOKEN_AGE = T.let(T.unsafe(nil), Integer) +# source://rack-mini-profiler//lib/mini_profiler/actions.rb#4 +module Rack::MiniProfiler::Actions + # source://rack-mini-profiler//lib/mini_profiler/actions.rb#54 + def serve_file(env, file_name:); end + + # source://rack-mini-profiler//lib/mini_profiler/actions.rb#104 + def serve_flamegraph(env); end + + # source://rack-mini-profiler//lib/mini_profiler/actions.rb#122 + def serve_profile_gc(env, client_settings); end + + # source://rack-mini-profiler//lib/mini_profiler/actions.rb#128 + def serve_profile_memory(env, client_settings); end + + # source://rack-mini-profiler//lib/mini_profiler/actions.rb#67 + def serve_results(env); end + + # source://rack-mini-profiler//lib/mini_profiler/actions.rb#5 + def serve_snapshot(env); end +end + # source://rack-mini-profiler//lib/mini_profiler/client_settings.rb#5 class Rack::MiniProfiler::ClientSettings # @return [ClientSettings] a new instance of ClientSettings @@ -840,10 +387,10 @@ Rack::MiniProfiler::ClientSettings::COOKIE_NAME = T.let(T.unsafe(nil), String) class Rack::MiniProfiler::Config # Returns the value of attribute assets_url. # - # source://rack-mini-profiler//lib/mini_profiler/config.rb#95 + # source://rack-mini-profiler//lib/mini_profiler/config.rb#96 def assets_url; end - # source://rack-mini-profiler//lib/mini_profiler/config.rb#113 + # source://rack-mini-profiler//lib/mini_profiler/config.rb#116 def assets_url=(lmbda); end # Returns the value of attribute authorization_mode. @@ -851,11 +398,7 @@ class Rack::MiniProfiler::Config # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 def authorization_mode; end - # Sets the attribute authorization_mode - # - # @param value the value to set the attribute authorization_mode to. - # - # source://rack-mini-profiler//lib/mini_profiler/config.rb#99 + # source://rack-mini-profiler//lib/mini_profiler/config.rb#101 def authorization_mode=(mode); end # Returns the value of attribute auto_inject. @@ -1012,6 +555,18 @@ class Rack::MiniProfiler::Config # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 def enabled=(_arg0); end + # Returns the value of attribute flamegraph_ignore_gc. + # + # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 + def flamegraph_ignore_gc; end + + # Sets the attribute flamegraph_ignore_gc + # + # @param value the value to set the attribute flamegraph_ignore_gc to. + # + # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 + def flamegraph_ignore_gc=(_arg0); end + # Returns the value of attribute flamegraph_mode. # # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 @@ -1036,7 +591,7 @@ class Rack::MiniProfiler::Config # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 def flamegraph_sample_rate=(_arg0); end - # source://rack-mini-profiler//lib/mini_profiler/config.rb#124 + # source://rack-mini-profiler//lib/mini_profiler/config.rb#127 def horizontal_position; end # ui accessors @@ -1103,7 +658,7 @@ class Rack::MiniProfiler::Config # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 def max_traces_to_show=(_arg0); end - # source://rack-mini-profiler//lib/mini_profiler/config.rb#128 + # source://rack-mini-profiler//lib/mini_profiler/config.rb#131 def merge!(config); end # ui accessors @@ -1378,7 +933,7 @@ class Rack::MiniProfiler::Config # source://rack-mini-profiler//lib/mini_profiler/config.rb#9 def user_provider=(_arg0); end - # source://rack-mini-profiler//lib/mini_profiler/config.rb#120 + # source://rack-mini-profiler//lib/mini_profiler/config.rb#123 def vertical_position; end class << self @@ -1504,31 +1059,31 @@ class Rack::MiniProfiler::FileStore < ::Rack::MiniProfiler::AbstractStore # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#51 def initialize(args = T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#147 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#145 def allowed_tokens; end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#163 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#161 def cleanup_cache; end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#141 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#139 def flush_tokens; end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#135 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#133 def get_unviewed_ids(user); end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#104 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#102 def load(id); end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#98 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#96 def save(page_struct); end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#129 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#127 def set_all_unviewed(user, ids); end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#110 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#108 def set_unviewed(user, id); end - # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#119 + # source://rack-mini-profiler//lib/mini_profiler/storage/file_store.rb#117 def set_viewed(user, id); end end @@ -1592,28 +1147,33 @@ class Rack::MiniProfiler::MemcacheStore < ::Rack::MiniProfiler::AbstractStore # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#10 def initialize(args = T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#64 + # @return [Boolean] + # + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#21 + def alive?; end + + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#73 def allowed_tokens; end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#60 + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#69 def flush_tokens; end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#56 + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#65 def get_unviewed_ids(user); end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#25 + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#34 def load(id); end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#21 + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#30 def save(page_struct); end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#52 + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#61 def set_all_unviewed(user, ids); end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#32 + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#41 def set_unviewed(user, id); end - # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#42 + # source://rack-mini-profiler//lib/mini_profiler/storage/memcache_store.rb#51 def set_viewed(user, id); end end @@ -1742,44 +1302,47 @@ module Rack::MiniProfiler::ProfilingMethods # # Returns the result of the block, or nil when no block is given. # - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#143 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#147 def counter(type, duration_ms = T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#64 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#68 def counter_method(klass, method, &blk); end - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#27 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#31 def finish_step(obj); end - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#72 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#76 def profile_method(klass, method, type = T.unsafe(nil), &blk); end - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#124 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#128 def profile_singleton_method(klass, method, type = T.unsafe(nil), &blk); end # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#7 def record_sql(query, elapsed_ms, params = T.unsafe(nil)); end # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#20 + def report_reader_duration(elapsed_ms, row_count = T.unsafe(nil), class_name = T.unsafe(nil)); end + + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#24 def start_step(name); end # perform a profiling step on given block # - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#35 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#39 def step(name, opts = T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#68 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#72 def uncounter_method(klass, method); end - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#50 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#54 def unprofile_method(klass, method); end - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#128 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#132 def unprofile_singleton_method(klass, method); end private - # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#157 + # source://rack-mini-profiler//lib/mini_profiler/profiling_methods.rb#161 def clean_method_name(method); end end @@ -1897,63 +1460,63 @@ Rack::MiniProfiler::SOURCE_CODE_URI = T.let(T.unsafe(nil), String) class Rack::MiniProfiler::SnapshotsTransporter # @return [SnapshotsTransporter] a new instance of SnapshotsTransporter # - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#28 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#30 def initialize(config); end # Returns the value of attribute buffer. # - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#25 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#27 def buffer; end - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#49 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#51 def flush_buffer; end # Returns the value of attribute gzip_requests. # - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#26 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#28 def gzip_requests; end # Sets the attribute gzip_requests # # @param value the value to set the attribute gzip_requests to. # - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#26 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#28 def gzip_requests=(_arg0); end # Returns the value of attribute max_buffer_size. # - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#26 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#28 def max_buffer_size; end # Sets the attribute max_buffer_size # # @param value the value to set the attribute max_buffer_size to. # - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#26 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#28 def max_buffer_size=(_arg0); end - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#89 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#91 def requests_interval; end - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#41 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#43 def ship(snapshot); end private - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#95 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#97 def backoff_delay; end - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#100 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#102 def start_thread; end class << self - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#15 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#17 def failed_http_requests_count; end - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#12 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#13 def successful_http_requests_count; end - # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#19 + # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#21 def transport(snapshot); end # source://rack-mini-profiler//lib/mini_profiler/snapshots_transporter.rb#9 @@ -1981,13 +1544,13 @@ class Rack::MiniProfiler::TimerStruct::Base # source://rack-mini-profiler//lib/mini_profiler/timer_struct/base.rb#23 def []=(name, val); end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/base.rb#34 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/base.rb#33 def as_json(options = T.unsafe(nil)); end # source://rack-mini-profiler//lib/mini_profiler/timer_struct/base.rb#15 def attributes; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/base.rb#28 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/base.rb#27 def to_json(*a); end end @@ -2056,7 +1619,7 @@ class Rack::MiniProfiler::TimerStruct::Page < ::Rack::MiniProfiler::TimerStruct: # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#60 def initialize(env); end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#124 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#131 def as_json(options = T.unsafe(nil)); end # Returns the value of attribute attributes. @@ -2064,25 +1627,28 @@ class Rack::MiniProfiler::TimerStruct::Page < ::Rack::MiniProfiler::TimerStruct: # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#58 def attributes; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#116 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#123 def attributes_to_serialize; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#104 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#111 def duration_ms; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#108 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#115 def duration_ms_in_sql; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#128 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#135 def extra_json; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#100 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#99 def name; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#112 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#103 + def page_name(env); end + + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#119 def root; end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#120 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/page.rb#127 def to_json(*a); end class << self @@ -2109,13 +1675,13 @@ class Rack::MiniProfiler::TimerStruct::Request < ::Rack::MiniProfiler::TimerStru # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#81 def add_child(name); end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#128 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#134 def add_custom(type, elapsed_ms, page); end # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#104 def add_sql(query, elapsed_ms, page, params = T.unsafe(nil), skip_backtrace = T.unsafe(nil), full_backtrace = T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#172 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#178 def adjust_depth; end # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#69 @@ -2148,7 +1714,7 @@ class Rack::MiniProfiler::TimerStruct::Request < ::Rack::MiniProfiler::TimerStru # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#90 def move_child(child, destination); end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#145 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#151 def move_custom(type, custom, destination); end # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#115 @@ -2169,9 +1735,14 @@ class Rack::MiniProfiler::TimerStruct::Request < ::Rack::MiniProfiler::TimerStru # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#14 def parent=(_arg0); end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#165 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#171 def record_time(milliseconds = T.unsafe(nil)); end + # please call SqlTiming#report_reader_duration instead + # + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#129 + def report_reader_duration(elapsed_ms, row_count = T.unsafe(nil), class_name = T.unsafe(nil)); end + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/request.rb#77 def sql_timings; end @@ -2216,24 +1787,70 @@ class Rack::MiniProfiler::TimerStruct::Sql < ::Rack::MiniProfiler::TimerStruct:: def parent=(_arg0); end # source://rack-mini-profiler//lib/mini_profiler/timer_struct/sql.rb#54 - def report_reader_duration(elapsed_ms); end + def report_reader_duration(elapsed_ms, row_count = T.unsafe(nil), class_name = T.unsafe(nil)); end - # source://rack-mini-profiler//lib/mini_profiler/timer_struct/sql.rb#62 + # source://rack-mini-profiler//lib/mini_profiler/timer_struct/sql.rb#64 def trim_binds(binds); end end # source://rack-mini-profiler//lib/mini_profiler/version.rb#5 Rack::MiniProfiler::VERSION = T.let(T.unsafe(nil), String) +# source://rack-mini-profiler//lib/mini_profiler/views.rb#4 +module Rack::MiniProfiler::Views + # source://rack-mini-profiler//lib/mini_profiler/views.rb#103 + def blank_page_html; end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#112 + def flamegraph(graph, path, env); end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#13 + def generate_html(page_struct, env, result_json = T.unsafe(nil)); end + + # get_profile_script returns script to be injected inside current html page + # By default, profile_script is appended to the end of all html requests automatically. + # Calling get_profile_script cancels automatic append for the current page + # Use it when: + # * you have disabled auto append behaviour throught :auto_inject => false flag + # * you do not want script to be automatically appended for the current page. You can also call cancel_auto_inject + # + # source://rack-mini-profiler//lib/mini_profiler/views.rb#31 + def get_profile_script(env, response_headers = T.unsafe(nil)); end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#143 + def help(client_settings, env); end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#107 + def make_link(postfix, env); end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#193 + def public_base_path(env); end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#5 + def resources_root; end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#9 + def share_template; end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#188 + def url_for_snapshot(id, group_name); end + + # source://rack-mini-profiler//lib/mini_profiler/views.rb#183 + def url_for_snapshots_group(group_name); end +end + +# source://rack-mini-profiler//lib/mini_profiler/views.rb#93 +Rack::MiniProfiler::Views::BLANK_PAGE = T.let(T.unsafe(nil), String) + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#6 module Rack::MiniProfilerRails extend ::Rack::MiniProfilerRailsMethods class << self - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#122 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#132 def create_engine; end - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#143 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#153 def get_key(payload); end # call direct if needed to do a defer init @@ -2243,18 +1860,18 @@ module Rack::MiniProfilerRails # @return [Boolean] # - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#151 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#161 def serves_static_assets?(app); end - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#147 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#157 def shorten_identifier(identifier); end - # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#133 + # source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#143 def subscribe(event, &blk); end end end -# source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#167 +# source://rack-mini-profiler//lib/mini_profiler_rails/railtie.rb#177 class Rack::MiniProfilerRails::Railtie < ::Rails::Railtie; end # source://rack-mini-profiler//lib/mini_profiler_rails/railtie_methods.rb#3 diff --git a/sorbet/rbi/gems/rack@2.2.8.1.rbi b/sorbet/rbi/gems/rack@2.2.9.rbi similarity index 99% rename from sorbet/rbi/gems/rack@2.2.8.1.rbi rename to sorbet/rbi/gems/rack@2.2.9.rbi index b1aeec0d8..19da3538d 100644 --- a/sorbet/rbi/gems/rack@2.2.8.1.rbi +++ b/sorbet/rbi/gems/rack@2.2.9.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rack` gem. # Please instead update this file by running `bin/tapioca gem rack`. + # The Rack main module, serving as a namespace for all core Rack # modules and classes. # @@ -2323,10 +2324,10 @@ class Rack::Multipart::Parser # source://rack//lib/rack/multipart/parser.rb#180 def initialize(boundary, tempfile, bufsize, query_parser); end - # source://rack//lib/rack/multipart/parser.rb#198 + # source://rack//lib/rack/multipart/parser.rb#199 def on_read(content); end - # source://rack//lib/rack/multipart/parser.rb#204 + # source://rack//lib/rack/multipart/parser.rb#205 def result; end # Returns the value of attribute state. @@ -2336,34 +2337,34 @@ class Rack::Multipart::Parser private - # source://rack//lib/rack/multipart/parser.rb#296 + # source://rack//lib/rack/multipart/parser.rb#302 def consume_boundary; end - # source://rack//lib/rack/multipart/parser.rb#294 + # source://rack//lib/rack/multipart/parser.rb#300 def full_boundary; end - # source://rack//lib/rack/multipart/parser.rb#306 + # source://rack//lib/rack/multipart/parser.rb#312 def get_filename(head); end - # source://rack//lib/rack/multipart/parser.rb#242 + # source://rack//lib/rack/multipart/parser.rb#248 def handle_consume_token; end - # source://rack//lib/rack/multipart/parser.rb#371 + # source://rack//lib/rack/multipart/parser.rb#377 def handle_empty_content!(content); end - # source://rack//lib/rack/multipart/parser.rb#233 + # source://rack//lib/rack/multipart/parser.rb#234 def handle_fast_forward; end - # source://rack//lib/rack/multipart/parser.rb#275 + # source://rack//lib/rack/multipart/parser.rb#281 def handle_mime_body; end - # source://rack//lib/rack/multipart/parser.rb#252 + # source://rack//lib/rack/multipart/parser.rb#258 def handle_mime_head; end - # source://rack//lib/rack/multipart/parser.rb#216 + # source://rack//lib/rack/multipart/parser.rb#217 def run_parser; end - # source://rack//lib/rack/multipart/parser.rb#343 + # source://rack//lib/rack/multipart/parser.rb#349 def tag_multipart_encoding(filename, content_type, name, body); end class << self @@ -2395,7 +2396,7 @@ class Rack::Multipart::Parser::BoundedIO def rewind; end end -# source://rack//lib/rack/multipart/parser.rb#341 +# source://rack//lib/rack/multipart/parser.rb#347 Rack::Multipart::Parser::CHARSET = T.let(T.unsafe(nil), String) # source://rack//lib/rack/multipart/parser.rb#87 @@ -3018,13 +3019,13 @@ class Rack::Request # source://rack//lib/rack/request.rb#35 def update_param(k, v); end - # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#94 + # source://yard/0.9.37/lib/yard/server/rack_adapter.rb#94 def version_supplied; end - # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#94 + # source://yard/0.9.37/lib/yard/server/rack_adapter.rb#94 def version_supplied=(_arg0); end - # source://yard/0.9.36/lib/yard/server/rack_adapter.rb#96 + # source://yard/0.9.37/lib/yard/server/rack_adapter.rb#96 def xhr?; end class << self diff --git a/sorbet/rbi/gems/rails-i18n@7.0.8.rbi b/sorbet/rbi/gems/rails-i18n@7.0.9.rbi similarity index 99% rename from sorbet/rbi/gems/rails-i18n@7.0.8.rbi rename to sorbet/rbi/gems/rails-i18n@7.0.9.rbi index c43a4038d..7e50f3179 100644 --- a/sorbet/rbi/gems/rails-i18n@7.0.8.rbi +++ b/sorbet/rbi/gems/rails-i18n@7.0.9.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `rails-i18n` gem. # Please instead update this file by running `bin/tapioca gem rails-i18n`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rails@7.1.3.rbi b/sorbet/rbi/gems/rails@7.1.3.4.rbi similarity index 99% rename from sorbet/rbi/gems/rails@7.1.3.rbi rename to sorbet/rbi/gems/rails@7.1.3.4.rbi index a789f5918..e414d2594 100644 --- a/sorbet/rbi/gems/rails@7.1.3.rbi +++ b/sorbet/rbi/gems/rails@7.1.3.4.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `rails` gem. # Please instead update this file by running `bin/tapioca gem rails`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/railties@7.1.3.rbi b/sorbet/rbi/gems/railties@7.1.3.4.rbi similarity index 98% rename from sorbet/rbi/gems/railties@7.1.3.rbi rename to sorbet/rbi/gems/railties@7.1.3.4.rbi index adabd34fd..bbec886ed 100644 --- a/sorbet/rbi/gems/railties@7.1.3.rbi +++ b/sorbet/rbi/gems/railties@7.1.3.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `railties` gem. # Please instead update this file by running `bin/tapioca gem railties`. + # :include: railties/README.rdoc # # source://railties//lib/rails/gem_version.rb#3 @@ -1440,10 +1441,10 @@ class Rails::Application::RoutesReloader # source://railties//lib/rails/application/routes_reloader.rb#15 def initialize; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end # Returns the value of attribute eager_load. @@ -1509,13 +1510,13 @@ class Rails::Application::RoutesReloader def updater; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end end end @@ -1524,7 +1525,7 @@ end class Rails::ApplicationController < ::ActionController::Base private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://railties//lib/rails/application_controller.rb#25 @@ -1539,16 +1540,16 @@ class Rails::ApplicationController < ::ActionController::Base def require_local!; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -1713,7 +1714,7 @@ end class Rails::Command::Base < ::Thor include ::Rails::Command::Actions - # source://thor/1.3.1/lib/thor/base.rb#155 + # source://thor/1.3.2/lib/thor/base.rb#155 def current_subcommand; end # source://railties//lib/rails/command/base.rb#172 @@ -2442,16 +2443,16 @@ class Rails::Engine < ::Rails::Railtie # source://railties//lib/rails/engine.rb#439 def initialize; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#963 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#963 def _load_seed_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#951 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#951 def _run_load_seed_callbacks(&block); end # Returns the underlying Rack application for this engine. @@ -2599,19 +2600,19 @@ class Rails::Engine < ::Rails::Railtie def load_config_initializer(initializer); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks=(value); end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks?; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#955 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#955 def _load_seed_callbacks; end - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#959 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#959 def _load_seed_callbacks=(value); end # Returns the value of attribute called_from. @@ -4126,16 +4127,16 @@ class Rails::Generators::NamedBase < ::Rails::Generators::Base # Returns the value of attribute file_name. # - # source://thor/1.3.1/lib/thor/base.rb#155 + # source://thor/1.3.2/lib/thor/base.rb#155 def file_name; end # source://railties//lib/rails/generators/named_base.rb#29 def js_template(source, destination); end - # source://thor/1.3.1/lib/thor/base.rb#163 + # source://thor/1.3.2/lib/thor/base.rb#163 def name; end - # source://thor/1.3.1/lib/thor/base.rb#163 + # source://thor/1.3.2/lib/thor/base.rb#163 def name=(_arg0); end # source://railties//lib/rails/generators/named_base.rb#23 @@ -4739,7 +4740,7 @@ class Rails::HealthController < ::ActionController::Base private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://railties//lib/rails/health_controller.rb#51 @@ -4752,10 +4753,10 @@ class Rails::HealthController < ::ActionController::Base def render_up; end class << self - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end - # source://activesupport/7.1.3/lib/active_support/rescuable.rb#15 + # source://activesupport/7.1.3.4/lib/active_support/rescuable.rb#15 def rescue_handlers; end end end @@ -4806,7 +4807,7 @@ class Rails::InfoController < ::Rails::ApplicationController private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://railties//lib/rails/info_controller.rb#8 @@ -4816,16 +4817,16 @@ class Rails::InfoController < ::Rails::ApplicationController def matching_routes(query:, exact_match:); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -4933,7 +4934,7 @@ class Rails::MailersController < ::Rails::ApplicationController private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end # source://railties//lib/rails/mailers_controller.rb#90 @@ -4960,13 +4961,13 @@ class Rails::MailersController < ::Rails::ApplicationController def show_previews?; end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionpack/7.1.3/lib/abstract_controller/helpers.rb#12 + # source://actionpack/7.1.3.4/lib/abstract_controller/helpers.rb#12 def _helper_methods; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end @@ -6034,7 +6035,7 @@ Rails::VERSION::MAJOR = T.let(T.unsafe(nil), Integer) Rails::VERSION::MINOR = T.let(T.unsafe(nil), Integer) # source://railties//lib/rails/gem_version.rb#13 -Rails::VERSION::PRE = T.let(T.unsafe(nil), T.untyped) +Rails::VERSION::PRE = T.let(T.unsafe(nil), String) # source://railties//lib/rails/gem_version.rb#15 Rails::VERSION::STRING = T.let(T.unsafe(nil), String) @@ -6049,20 +6050,20 @@ class Rails::WelcomeController < ::Rails::ApplicationController private - # source://actionview/7.1.3/lib/action_view/layouts.rb#330 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#330 def _layout(lookup_context, formats); end class << self - # source://activesupport/7.1.3/lib/active_support/callbacks.rb#70 + # source://activesupport/7.1.3.4/lib/active_support/callbacks.rb#70 def __callbacks; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#211 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#211 def _layout; end - # source://actionview/7.1.3/lib/action_view/layouts.rb#212 + # source://actionview/7.1.3.4/lib/action_view/layouts.rb#212 def _layout_conditions; end - # source://actionpack/7.1.3/lib/action_controller/metal.rb#262 + # source://actionpack/7.1.3.4/lib/action_controller/metal.rb#262 def middleware_stack; end end end diff --git a/sorbet/rbi/gems/rake@13.1.0.rbi b/sorbet/rbi/gems/rake@13.2.1.rbi similarity index 97% rename from sorbet/rbi/gems/rake@13.1.0.rbi rename to sorbet/rbi/gems/rake@13.2.1.rbi index c429a7248..9c619c116 100644 --- a/sorbet/rbi/gems/rake@13.1.0.rbi +++ b/sorbet/rbi/gems/rake@13.2.1.rbi @@ -4,11 +4,12 @@ # This is an autogenerated file for types exported from the `rake` gem. # Please instead update this file by running `bin/tapioca gem rake`. + # :stopdoc: # # Some top level Constants. # -# source://rake//lib/rake.rb#70 +# source://rake//lib/rake.rb#69 FileList = Rake::FileList # -- @@ -195,7 +196,7 @@ class Rake::Application # Add a file to the list of files to be imported. # - # source://rake//lib/rake/application.rb#801 + # source://rake//lib/rake/application.rb#807 def add_import(fn); end # Add a loader to handle imported files ending in the extension @@ -213,13 +214,13 @@ class Rake::Application # recognised command-line options, which OptionParser.parse will # have taken care of already. # - # source://rake//lib/rake/application.rb#782 + # source://rake//lib/rake/application.rb#788 def collect_command_line_tasks(args); end # Default task name ("default"). # (May be overridden by subclasses) # - # source://rake//lib/rake/application.rb#796 + # source://rake//lib/rake/application.rb#802 def default_task_name; end # Warn about deprecated usage. @@ -227,75 +228,75 @@ class Rake::Application # Example: # Rake.application.deprecate("import", "Rake.import", caller.first) # - # source://rake//lib/rake/application.rb#282 + # source://rake//lib/rake/application.rb#288 def deprecate(old_usage, new_usage, call_site); end - # source://rake//lib/rake/application.rb#244 + # source://rake//lib/rake/application.rb#250 def display_cause_details(ex); end # Display the error message that caused the exception. # - # source://rake//lib/rake/application.rb#228 + # source://rake//lib/rake/application.rb#234 def display_error_message(ex); end - # source://rake//lib/rake/application.rb#269 + # source://rake//lib/rake/application.rb#275 def display_exception_backtrace(ex); end - # source://rake//lib/rake/application.rb#236 + # source://rake//lib/rake/application.rb#242 def display_exception_details(ex); end - # source://rake//lib/rake/application.rb#251 + # source://rake//lib/rake/application.rb#257 def display_exception_details_seen; end - # source://rake//lib/rake/application.rb#259 + # source://rake//lib/rake/application.rb#265 def display_exception_message_details(ex); end # Display the tasks and prerequisites # - # source://rake//lib/rake/application.rb#405 + # source://rake//lib/rake/application.rb#411 def display_prerequisites; end # Display the tasks and comments. # - # source://rake//lib/rake/application.rb#322 + # source://rake//lib/rake/application.rb#328 def display_tasks_and_comments; end # Calculate the dynamic width of the # - # source://rake//lib/rake/application.rb#373 + # source://rake//lib/rake/application.rb#379 def dynamic_width; end - # source://rake//lib/rake/application.rb#377 + # source://rake//lib/rake/application.rb#383 def dynamic_width_stty; end - # source://rake//lib/rake/application.rb#381 + # source://rake//lib/rake/application.rb#387 def dynamic_width_tput; end # Exit the program because of an unhandled exception. # (may be overridden by subclasses) # - # source://rake//lib/rake/application.rb#223 + # source://rake//lib/rake/application.rb#229 def exit_because_of_exception(ex); end - # source://rake//lib/rake/application.rb#702 + # source://rake//lib/rake/application.rb#708 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#668 + # source://rake//lib/rake/application.rb#674 def handle_options(argv); end # @return [Boolean] # - # source://rake//lib/rake/application.rb#255 + # source://rake//lib/rake/application.rb#261 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#298 + # source://rake//lib/rake/application.rb#304 def have_rakefile; end # Initialize the command line parameters and app name. @@ -305,12 +306,12 @@ class Rake::Application # Invokes a task with arguments that are extracted from +task_string+ # - # source://rake//lib/rake/application.rb#179 + # source://rake//lib/rake/application.rb#185 def invoke_task(task_string); end # Load the pending list of imported files. # - # source://rake//lib/rake/application.rb#806 + # source://rake//lib/rake/application.rb#812 def load_imports; end # Find the rakefile and then load it and any pending imports. @@ -333,16 +334,16 @@ class Rake::Application # source://rake//lib/rake/application.rb#27 def original_dir; end - # source://rake//lib/rake/application.rb#185 + # source://rake//lib/rake/application.rb#191 def parse_task_string(string); end - # source://rake//lib/rake/application.rb#714 + # source://rake//lib/rake/application.rb#720 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#688 + # source://rake//lib/rake/application.rb#694 def rake_require(file_name, paths = T.unsafe(nil), loaded = T.unsafe(nil)); end # Name of the actual rakefile used. @@ -350,10 +351,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#30 def rakefile; end - # source://rake//lib/rake/application.rb#822 + # source://rake//lib/rake/application.rb#828 def rakefile_location(backtrace = T.unsafe(nil)); end - # source://rake//lib/rake/application.rb#719 + # source://rake//lib/rake/application.rb#725 def raw_load_rakefile; end # Run the Rake application. The run method performs the following @@ -375,23 +376,23 @@ class Rake::Application # source://rake//lib/rake/application.rb#144 def run_with_threads; end - # source://rake//lib/rake/application.rb#831 + # source://rake//lib/rake/application.rb#837 def set_default_options; end # Provide standard exception handling for the given block. # - # source://rake//lib/rake/application.rb#207 + # source://rake//lib/rake/application.rb#213 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#426 + # source://rake//lib/rake/application.rb#432 def standard_rake_options; end # The directory path containing the system wide rakefiles. # - # source://rake//lib/rake/application.rb#751 + # source://rake//lib/rake/application.rb#757 def system_dir; end # Number of columns on the terminal @@ -404,12 +405,12 @@ class Rake::Application # source://rake//lib/rake/application.rb#33 def terminal_columns=(_arg0); end - # source://rake//lib/rake/application.rb#361 + # source://rake//lib/rake/application.rb#367 def terminal_width; end # Return the thread pool used for multithreaded processing. # - # source://rake//lib/rake/application.rb#172 + # source://rake//lib/rake/application.rb#178 def thread_pool; end # Run the top level tasks of a Rake application. @@ -422,10 +423,10 @@ class Rake::Application # source://rake//lib/rake/application.rb#36 def top_level_tasks; end - # source://rake//lib/rake/application.rb#412 + # source://rake//lib/rake/application.rb#418 def trace(*strings); end - # source://rake//lib/rake/application.rb#394 + # source://rake//lib/rake/application.rb#400 def truncate(string, width); end # We will truncate output if we are outputting to a TTY or if we've been @@ -433,7 +434,7 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#317 + # source://rake//lib/rake/application.rb#323 def truncate_output?; end # Override the detected TTY output state (mostly for testing) @@ -445,44 +446,44 @@ class Rake::Application # # @return [Boolean] # - # source://rake//lib/rake/application.rb#311 + # source://rake//lib/rake/application.rb#317 def tty_output?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#385 + # source://rake//lib/rake/application.rb#391 def unix?; end # @return [Boolean] # - # source://rake//lib/rake/application.rb#390 + # source://rake//lib/rake/application.rb#396 def windows?; end private - # source://rake//lib/rake/application.rb#745 + # source://rake//lib/rake/application.rb#751 def glob(path, &block); end # Does the exception have a task invocation chain? # # @return [Boolean] # - # source://rake//lib/rake/application.rb#291 + # source://rake//lib/rake/application.rb#297 def has_chain?(exception); end # source://rake//lib/rake/application.rb#102 def load_debug_at_stop_feature; end - # source://rake//lib/rake/application.rb#644 + # source://rake//lib/rake/application.rb#650 def select_tasks_to_show(options, show_tasks, value); end - # source://rake//lib/rake/application.rb#651 + # source://rake//lib/rake/application.rb#657 def select_trace_output(options, trace_option, value); end - # source://rake//lib/rake/application.rb#417 + # source://rake//lib/rake/application.rb#423 def sort_options(options); end - # source://rake//lib/rake/application.rb#768 + # source://rake//lib/rake/application.rb#774 def standard_system_dir; end end @@ -492,7 +493,7 @@ Rake::Application::DEFAULT_RAKEFILES = T.let(T.unsafe(nil), Array) # source://rake//lib/rake/backtrace.rb#3 module Rake::Backtrace class << self - # source://rake//lib/rake/backtrace.rb#18 + # source://rake//lib/rake/backtrace.rb#19 def collapse(backtrace); end end end @@ -503,7 +504,7 @@ Rake::Backtrace::SUPPRESSED_PATHS = T.let(T.unsafe(nil), Array) # source://rake//lib/rake/backtrace.rb#12 Rake::Backtrace::SUPPRESSED_PATHS_RE = T.let(T.unsafe(nil), String) -# source://rake//lib/rake/backtrace.rb#16 +# source://rake//lib/rake/backtrace.rb#17 Rake::Backtrace::SUPPRESS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rake//lib/rake/backtrace.rb#4 @@ -598,7 +599,7 @@ module Rake::DSL # # ... run tests # end # - # source://rake//lib/rake/dsl_definition.rb#165 + # source://rake//lib/rake/dsl_definition.rb#166 def desc(description); end # Declare a set of files tasks to create the given directories on @@ -646,7 +647,7 @@ module Rake::DSL # Example: # import ".depend", "my_rules" # - # source://rake//lib/rake/dsl_definition.rb#183 + # source://rake//lib/rake/dsl_definition.rb#184 def import(*fns); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -690,7 +691,7 @@ module Rake::DSL # Example: # multitask deploy: %w[deploy_gem deploy_rdoc] # - # source://rake//lib/rake/dsl_definition.rb#112 + # source://rake//lib/rake/dsl_definition.rb#113 def multitask(*args, &block); end # source://rake//lib/rake/file_utils_ext.rb#34 @@ -715,7 +716,7 @@ module Rake::DSL # # ... # end # - # source://rake//lib/rake/dsl_definition.rb#135 + # source://rake//lib/rake/dsl_definition.rb#136 def namespace(name = T.unsafe(nil), &block); end # source://rake//lib/rake/file_utils_ext.rb#77 @@ -755,10 +756,10 @@ module Rake::DSL # # Example: # rule '.o' => '.c' do |t| - # sh 'cc', '-o', t.name, t.source + # sh 'cc', '-c', '-o', t.name, t.source # end # - # source://rake//lib/rake/dsl_definition.rb#151 + # source://rake//lib/rake/dsl_definition.rb#152 def rule(*args, &block); end # source://rake//lib/rake/file_utils.rb#110 @@ -3091,7 +3092,7 @@ end # source://rake//lib/rake/win32.rb#11 class Rake::Win32::Win32HomeError < ::RuntimeError; end -# source://rake//lib/rake.rb#71 +# source://rake//lib/rake.rb#70 RakeFileUtils = Rake::FileUtilsExt # source://rake//lib/rake/ext/string.rb#4 diff --git a/sorbet/rbi/gems/rbi@0.1.13.rbi b/sorbet/rbi/gems/rbi@0.1.13.rbi deleted file mode 100644 index 87079e938..000000000 --- a/sorbet/rbi/gems/rbi@0.1.13.rbi +++ /dev/null @@ -1,3054 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rbi` gem. -# Please instead update this file by running `bin/tapioca gem rbi`. - -# source://rbi//lib/rbi/loc.rb#4 -module RBI; end - -# source://rbi//lib/rbi/model.rb#1041 -class RBI::Arg < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1053 - sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#1059 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#613 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1064 - sig { returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#1045 - 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#349 -class RBI::Attr < ::RBI::NodeWithComments - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/model.rb#374 - sig do - params( - name: ::Symbol, - names: T::Array[::Symbol], - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#348 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#412 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#382 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#113 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#356 - sig { returns(T::Array[::Symbol]) } - def names; end - - # source://rbi//lib/rbi/printer.rb#375 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#362 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # source://rbi//lib/rbi/model.rb#359 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#359 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#385 -class RBI::AttrAccessor < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#399 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#452 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#405 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#411 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#417 -class RBI::AttrReader < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#431 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#434 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#437 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#443 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#449 -class RBI::AttrWriter < ::RBI::Attr - # source://rbi//lib/rbi/model.rb#463 - sig do - params( - name: ::Symbol, - names: ::Symbol, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) - ).void - end - def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#443 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#469 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#475 - 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#74 -class RBI::BlankLine < ::RBI::Comment - # source://rbi//lib/rbi/model.rb#78 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#217 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end -end - -# source://rbi//lib/rbi/model.rb#814 -class RBI::BlockParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#825 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#836 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#543 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#548 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#831 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#218 -class RBI::Class < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#236 - sig do - params( - name: ::String, - superclass_name: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Class).void) - ).void - end - def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#376 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#244 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#222 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#222 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#284 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#225 - sig { returns(T.nilable(::String)) } - def superclass_name; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#225 - def superclass_name=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#53 -class RBI::Comment < ::RBI::Node - # source://rbi//lib/rbi/model.rb#60 - sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(text, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#66 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#197 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#57 - sig { returns(::String) } - def text; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#57 - 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#589 -class RBI::ConflictTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#596 - sig { params(left_name: ::String, right_name: ::String).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#607 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 - sig { returns(::RBI::Tree) } - def left; end - - # @return [Tree] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 - def right; end -end - -# Consts -# -# source://rbi//lib/rbi/model.rb#312 -class RBI::Const < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#327 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Const).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#335 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#403 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#335 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#103 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#316 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#342 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#316 - def value; end -end - -# source://rbi//lib/rbi/model.rb#889 -class RBI::Extend < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#901 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Extend).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#502 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#143 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#907 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#137 -class RBI::File - # source://rbi//lib/rbi/model.rb#156 - sig do - params( - strictness: T.nilable(::String), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(file: ::RBI::File).void) - ).void - end - def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#164 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#105 - sig { params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#147 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#147 - def comments=(_arg0); end - - # source://rbi//lib/rbi/model.rb#169 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/printer.rb#129 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#141 - sig { returns(::RBI::Tree) } - def root; end - - # @return [Tree] - # - # source://rbi//lib/rbi/model.rb#141 - def root=(_arg0); end - - # source://rbi//lib/rbi/model.rb#144 - sig { returns(T.nilable(::String)) } - def strictness; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#144 - def strictness=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#135 - sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } - def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/formatter.rb#5 -class RBI::Formatter - # source://rbi//lib/rbi/formatter.rb#36 - sig do - params( - add_sig_templates: T::Boolean, - group_nodes: T::Boolean, - max_line_length: T.nilable(::Integer), - nest_singleton_methods: T::Boolean, - nest_non_public_methods: T::Boolean, - sort_nodes: T::Boolean - ).void - end - def initialize(add_sig_templates: T.unsafe(nil), group_nodes: T.unsafe(nil), max_line_length: T.unsafe(nil), nest_singleton_methods: T.unsafe(nil), nest_non_public_methods: T.unsafe(nil), sort_nodes: T.unsafe(nil)); end - - # source://rbi//lib/rbi/formatter.rb#15 - sig { params(add_sig_templates: T::Boolean).returns(T::Boolean) } - def add_sig_templates=(add_sig_templates); end - - # source://rbi//lib/rbi/formatter.rb#59 - sig { params(file: ::RBI::File).void } - def format_file(file); end - - # source://rbi//lib/rbi/formatter.rb#64 - sig { params(tree: ::RBI::Tree).void } - def format_tree(tree); end - - # source://rbi//lib/rbi/formatter.rb#18 - sig { params(group_nodes: T::Boolean).returns(T::Boolean) } - def group_nodes=(group_nodes); end - - # source://rbi//lib/rbi/formatter.rb#24 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/formatter.rb#24 - def max_line_length=(_arg0); end - - # source://rbi//lib/rbi/formatter.rb#21 - sig { params(nest_non_public_methods: T::Boolean).returns(T::Boolean) } - def nest_non_public_methods=(nest_non_public_methods); end - - # source://rbi//lib/rbi/formatter.rb#12 - sig { params(nest_singleton_methods: T::Boolean).returns(T::Boolean) } - def nest_singleton_methods=(nest_singleton_methods); end - - # source://rbi//lib/rbi/formatter.rb#53 - sig { params(file: ::RBI::File).returns(::String) } - def print_file(file); end - - # source://rbi//lib/rbi/formatter.rb#9 - sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } - def sort_nodes=(sort_nodes); end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#88 -class RBI::Group < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/group_nodes.rb#95 - sig { params(kind: ::RBI::Group::Kind).void } - def initialize(kind); end - - # source://rbi//lib/rbi/printer.rb#838 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#92 - sig { returns(::RBI::Group::Kind) } - def kind; end -end - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#100 -class RBI::Group::Kind < ::T::Enum - enums do - Mixins = new - RequiredAncestors = new - Helpers = new - TypeMembers = new - MixesInClassMethods = new - Sends = new - Attrs = new - TStructFields = new - TEnums = new - Inits = new - Methods = new - SingletonClasses = new - Consts = new - end -end - -# Sorbet's misc. -# -# source://rbi//lib/rbi/model.rb#1372 -class RBI::Helper < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1386 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Helper).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#825 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#520 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#173 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1376 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1393 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#866 -class RBI::Include < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#878 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Include).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#493 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#133 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#884 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/index.rb#5 -class RBI::Index < ::RBI::Visitor - # source://rbi//lib/rbi/index.rb#21 - sig { void } - def initialize; end - - # source://rbi//lib/rbi/index.rb#32 - sig { params(id: ::String).returns(T::Array[::RBI::Node]) } - def [](id); end - - # source://rbi//lib/rbi/index.rb#37 - sig { params(nodes: ::RBI::Node).void } - def index(*nodes); end - - # source://rbi//lib/rbi/index.rb#27 - sig { returns(T::Array[::String]) } - def keys; end - - # source://rbi//lib/rbi/index.rb#42 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/index.rb#59 - sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } - def index_node(node); end - - class << self - # source://rbi//lib/rbi/index.rb#13 - 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#74 -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#85 - sig { abstract.returns(T::Array[::String]) } - def index_ids; end -end - -# source://rbi//lib/rbi/model.rb#1069 -class RBI::KwArg < ::RBI::Arg - # source://rbi//lib/rbi/model.rb#1082 - sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } - def initialize(keyword, value, loc: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#1088 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#622 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1073 - sig { returns(::String) } - def keyword; end - - # source://rbi//lib/rbi/model.rb#1093 - sig { returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#755 -class RBI::KwOptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#770 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#782 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#513 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#518 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#777 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#759 - sig { returns(::String) } - def value; end -end - -# source://rbi//lib/rbi/model.rb#728 -class RBI::KwParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#739 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#750 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#498 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#503 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#745 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#787 -class RBI::KwRestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#798 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#809 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#528 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#533 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#804 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/loc.rb#5 -class RBI::Loc - # source://rbi//lib/rbi/loc.rb#38 - sig do - params( - file: T.nilable(::String), - begin_line: T.nilable(::Integer), - end_line: T.nilable(::Integer), - begin_column: T.nilable(::Integer), - end_column: T.nilable(::Integer) - ).void - end - def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def begin_column; end - - # source://rbi//lib/rbi/loc.rb#27 - sig { returns(T.nilable(::Integer)) } - def begin_line; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def end_column; end - - # @return [Integer, nil] - # - # source://rbi//lib/rbi/loc.rb#27 - def end_line; end - - # source://rbi//lib/rbi/loc.rb#24 - sig { returns(T.nilable(::String)) } - def file; end - - # source://rbi//lib/rbi/loc.rb#56 - sig { returns(T.nilable(::String)) } - def source; end - - # source://rbi//lib/rbi/loc.rb#47 - sig { returns(::String) } - def to_s; end - - class << self - # source://rbi//lib/rbi/loc.rb#12 - 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#330 -class RBI::MergeTree < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end -end - -# Methods and args -# -# source://rbi//lib/rbi/model.rb#483 -class RBI::Method < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#513 - sig do - params( - name: ::String, - params: T::Array[::RBI::Param], - is_singleton: T::Boolean, - visibility: ::RBI::Visibility, - sigs: T::Array[::RBI::Sig], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Method).void) - ).void - end - def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#533 - sig { params(param: ::RBI::Param).void } - def <<(param); end - - # source://rbi//lib/rbi/printer.rb#384 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#568 - sig { params(name: ::String).void } - def add_block_param(name); end - - # source://rbi//lib/rbi/model.rb#558 - sig { params(name: ::String, default_value: ::String).void } - def add_kw_opt_param(name, default_value); end - - # source://rbi//lib/rbi/model.rb#553 - sig { params(name: ::String).void } - def add_kw_param(name); end - - # source://rbi//lib/rbi/model.rb#563 - sig { params(name: ::String).void } - def add_kw_rest_param(name); end - - # source://rbi//lib/rbi/model.rb#543 - sig { params(name: ::String, default_value: ::String).void } - def add_opt_param(name, default_value); end - - # source://rbi//lib/rbi/model.rb#538 - sig { params(name: ::String).void } - def add_param(name); end - - # source://rbi//lib/rbi/model.rb#548 - sig { params(name: ::String).void } - def add_rest_param(name); end - - # source://rbi//lib/rbi/model.rb#585 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), - is_abstract: T::Boolean, - is_override: T::Boolean, - is_overridable: T::Boolean, - is_final: T::Boolean, - type_params: T::Array[::String], - checked: T.nilable(::Symbol), - block: 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 - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#461 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#611 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#123 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#437 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#493 - sig { returns(T::Boolean) } - def is_singleton; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#493 - def is_singleton=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#470 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#487 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#487 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#432 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#490 - sig { returns(T::Array[::RBI::Param]) } - def params; end - - # source://rbi//lib/rbi/model.rb#499 - sig { returns(T::Array[::RBI::Sig]) } - def sigs; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#499 - def sigs=(_arg0); end - - # source://rbi//lib/rbi/model.rb#620 - sig { override.returns(::String) } - def to_s; end - - # source://rbi//lib/rbi/model.rb#496 - sig { returns(::RBI::Visibility) } - def visibility; end - - # @return [Visibility] - # - # source://rbi//lib/rbi/model.rb#496 - def visibility=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1433 -class RBI::MixesInClassMethods < ::RBI::Mixin - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1445 - sig do - params( - name: ::String, - names: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) - ).void - end - def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#511 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#153 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1451 - 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#843 -class RBI::Mixin < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#860 - sig do - params( - name: ::String, - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#558 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#484 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#850 - sig { returns(T::Array[::String]) } - def names; end -end - -# source://rbi//lib/rbi/model.rb#190 -class RBI::Module < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#204 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Module).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#385 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#211 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#194 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#194 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#270 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#5 -class RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#18 - sig { params(loc: T.nilable(::RBI::Loc)).void } - def initialize(loc: T.unsafe(nil)); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#146 - sig { abstract.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Can `self` and `_other` be merged into a single definition? - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 - sig { params(_other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(_other); end - - # source://rbi//lib/rbi/model.rb#24 - sig { void } - def detach; end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#48 - sig { returns(::RBI::Group::Kind) } - def group_kind; end - - # source://rbi//lib/rbi/model.rb#15 - sig { returns(T.nilable(::RBI::Loc)) } - def loc; end - - # @return [Loc, nil] - # - # source://rbi//lib/rbi/model.rb#15 - def loc=(_arg0); end - - # Merge `self` and `other` into a single definition - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 - sig { params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#179 - sig { returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 - sig { returns(T.nilable(::RBI::ConflictTree)) } - def parent_conflict_tree; end - - # source://rbi//lib/rbi/model.rb#46 - sig { returns(T.nilable(::RBI::Scope)) } - def parent_scope; end - - # source://rbi//lib/rbi/model.rb#12 - sig { returns(T.nilable(::RBI::Tree)) } - def parent_tree; end - - # @return [Tree, nil] - # - # source://rbi//lib/rbi/model.rb#12 - def parent_tree=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#156 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#169 - sig { params(v: ::RBI::Printer).void } - def print_blank_line_before(v); end - - # source://rbi//lib/rbi/model.rb#33 - sig { params(node: ::RBI::Node).void } - def replace(node); end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 - sig { params(version: ::Gem::Version).returns(T::Boolean) } - def satisfies_version?(version); end - - # source://rbi//lib/rbi/printer.rb#162 - 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#83 -class RBI::NodeWithComments < ::RBI::Node - abstract! - - # source://rbi//lib/rbi/model.rb#93 - sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#99 - sig { returns(T::Array[::String]) } - def annotations; end - - # source://rbi//lib/rbi/model.rb#90 - sig { returns(T::Array[::RBI::Comment]) } - def comments; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#90 - def comments=(_arg0); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/printer.rb#188 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 - sig { returns(T::Array[::Gem::Requirement]) } - def version_requirements; end -end - -# source://rbi//lib/rbi/model.rb#674 -class RBI::OptParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#689 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#696 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#468 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#473 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#678 - 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#625 -class RBI::Param < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#641 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#446 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#459 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#632 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#451 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#647 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/parser.rb#7 -class RBI::ParseError < ::StandardError - # source://rbi//lib/rbi/parser.rb#14 - sig { params(message: ::String, location: ::RBI::Loc).void } - def initialize(message, location); end - - # source://rbi//lib/rbi/parser.rb#11 - sig { returns(::RBI::Loc) } - def location; end -end - -# source://rbi//lib/rbi/parser.rb#53 -class RBI::Parser - # source://rbi//lib/rbi/parser.rb#88 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#83 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - private - - # source://rbi//lib/rbi/parser.rb#95 - sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } - def parse(source, file:); end - - class << self - # source://rbi//lib/rbi/parser.rb#65 - sig { params(path: ::String).returns(::RBI::Tree) } - def parse_file(path); end - - # source://rbi//lib/rbi/parser.rb#70 - sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_files(paths); end - - # source://rbi//lib/rbi/parser.rb#60 - sig { params(string: ::String).returns(::RBI::Tree) } - def parse_string(string); end - - # source://rbi//lib/rbi/parser.rb#76 - sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } - def parse_strings(strings); end - end -end - -# source://rbi//lib/rbi/parser.rb#791 -class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#798 - sig { params(content: ::String, file: ::String).void } - def initialize(content, file:); end - - # source://rbi//lib/rbi/parser.rb#795 - sig { returns(::RBI::Sig) } - def current; end - - # source://rbi//lib/rbi/parser.rb#850 - sig { override.params(node: ::Prism::AssocNode).void } - def visit_assoc_node(node); end - - # source://rbi//lib/rbi/parser.rb#805 - sig { override.params(node: ::Prism::CallNode).void } - def visit_call_node(node); end -end - -# source://rbi//lib/rbi/parser.rb#153 -class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor - # source://rbi//lib/rbi/parser.rb#163 - sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } - def initialize(source, comments:, file:); end - - # source://rbi//lib/rbi/parser.rb#160 - sig { returns(T.nilable(::Prism::Node)) } - def last_node; end - - # source://rbi//lib/rbi/parser.rb#157 - sig { returns(::RBI::Tree) } - def tree; end - - # source://rbi//lib/rbi/parser.rb#299 - sig { params(node: ::Prism::CallNode).void } - def visit_call_node(node); end - - # source://rbi//lib/rbi/parser.rb#176 - sig { override.params(node: ::Prism::ClassNode).void } - def visit_class_node(node); end - - # source://rbi//lib/rbi/parser.rb#208 - sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } - def visit_constant_assign(node); end - - # source://rbi//lib/rbi/parser.rb#201 - sig { override.params(node: ::Prism::ConstantPathWriteNode).void } - def visit_constant_path_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#194 - sig { override.params(node: ::Prism::ConstantWriteNode).void } - def visit_constant_write_node(node); end - - # source://rbi//lib/rbi/parser.rb#241 - sig { override.params(node: ::Prism::DefNode).void } - def visit_def_node(node); end - - # source://rbi//lib/rbi/parser.rb#255 - sig { override.params(node: ::Prism::ModuleNode).void } - def visit_module_node(node); end - - # source://rbi//lib/rbi/parser.rb#272 - sig { override.params(node: ::Prism::ProgramNode).void } - def visit_program_node(node); end - - # source://rbi//lib/rbi/parser.rb#283 - sig { override.params(node: ::Prism::SingletonClassNode).void } - def visit_singleton_class_node(node); end - - private - - # Collect all the remaining comments within a node - # - # source://rbi//lib/rbi/parser.rb#467 - sig { params(node: ::Prism::Node).void } - def collect_dangling_comments(node); end - - # Collect all the remaining comments after visiting the tree - # - # source://rbi//lib/rbi/parser.rb#485 - sig { void } - def collect_orphan_comments; end - - # source://rbi//lib/rbi/parser.rb#508 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/parser.rb#513 - sig { returns(T::Array[::RBI::Sig]) } - def current_sigs; end - - # source://rbi//lib/rbi/parser.rb#520 - sig { returns(T::Array[::RBI::Comment]) } - def current_sigs_comments; end - - # source://rbi//lib/rbi/parser.rb#527 - sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } - def node_comments(node); end - - # source://rbi//lib/rbi/parser.rb#545 - sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } - def parse_comment(node); end - - # source://rbi//lib/rbi/parser.rb#574 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } - def parse_params(node); end - - # source://rbi//lib/rbi/parser.rb#550 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } - def parse_send_args(node); end - - # source://rbi//lib/rbi/parser.rb#648 - sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } - def parse_sig(node); end - - # source://rbi//lib/rbi/parser.rb#658 - sig do - params( - node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) - ).returns(T.nilable(::RBI::Struct)) - end - def parse_struct(node); end - - # source://rbi//lib/rbi/parser.rb#708 - sig { params(send: ::Prism::CallNode).void } - def parse_tstruct_field(send); end - - # source://rbi//lib/rbi/parser.rb#745 - sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } - def parse_visibility(name, node); end - - # source://rbi//lib/rbi/parser.rb#759 - sig { void } - def separate_header_comments; end - - # source://rbi//lib/rbi/parser.rb#769 - sig { void } - def set_root_tree_loc; end - - # source://rbi//lib/rbi/parser.rb#783 - sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } - def type_variable_definition?(node); end -end - -# source://rbi//lib/rbi/parser.rb#122 -class RBI::Parser::Visitor < ::Prism::Visitor - # source://rbi//lib/rbi/parser.rb#126 - sig { params(source: ::String, file: ::String).void } - def initialize(source, file:); end - - private - - # source://rbi//lib/rbi/parser.rb#136 - sig { params(node: ::Prism::Node).returns(::RBI::Loc) } - def node_loc(node); end - - # source://rbi//lib/rbi/parser.rb#141 - sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } - def node_string(node); end - - # source://rbi//lib/rbi/parser.rb#148 - sig { params(node: ::Prism::Node).returns(::String) } - def node_string!(node); end -end - -# source://rbi//lib/rbi/printer.rb#5 -class RBI::Printer < ::RBI::Visitor - # source://rbi//lib/rbi/printer.rb#28 - sig do - params( - out: T.any(::IO, ::StringIO), - indent: ::Integer, - print_locs: T::Boolean, - max_line_length: T.nilable(::Integer) - ).void - end - def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#15 - sig { returns(::Integer) } - def current_indent; end - - # source://rbi//lib/rbi/printer.rb#46 - sig { void } - def dedent; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def in_visibility_group=(_arg0); end - - # Printing - # - # source://rbi//lib/rbi/printer.rb#41 - sig { void } - def indent; end - - # source://rbi//lib/rbi/printer.rb#18 - sig { returns(T.nilable(::Integer)) } - def max_line_length; end - - # source://rbi//lib/rbi/printer.rb#12 - sig { returns(T.nilable(::RBI::Node)) } - def previous_node; end - - # Print a string without indentation nor `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#52 - sig { params(string: ::String).void } - def print(string); end - - # source://rbi//lib/rbi/printer.rb#9 - sig { returns(T::Boolean) } - def print_locs; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/printer.rb#9 - def print_locs=(_arg0); end - - # Print a string with indentation and `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#72 - sig { params(string: ::String).void } - def printl(string); end - - # Print a string without indentation but with a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#58 - sig { params(string: T.nilable(::String)).void } - def printn(string = T.unsafe(nil)); end - - # Print a string with indentation but without a `\n` at the end. - # - # source://rbi//lib/rbi/printer.rb#65 - sig { params(string: T.nilable(::String)).void } - def printt(string = T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#83 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/printer.rb#90 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - # source://rbi//lib/rbi/printer.rb#78 - sig { params(file: ::RBI::File).void } - def visit_file(file); end -end - -# source://rbi//lib/rbi/model.rb#982 -class RBI::Private < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#992 - 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#966 -class RBI::Protected < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#976 - 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#950 -class RBI::Public < ::RBI::Visibility - # source://rbi//lib/rbi/model.rb#960 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Public).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end -end - -# source://rbi//lib/rbi/model.rb#652 -class RBI::ReqParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#663 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#669 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end -end - -# source://rbi//lib/rbi/model.rb#1456 -class RBI::RequiresAncestor < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1469 - sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#870 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/index.rb#163 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1460 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1475 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#701 -class RBI::RestParam < ::RBI::Param - # source://rbi//lib/rbi/model.rb#712 - sig do - params( - name: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) - ).void - end - def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#723 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#483 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#488 - sig { override.params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # source://rbi//lib/rbi/model.rb#718 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 -module RBI::Rewriters; end - -# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 -class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 - sig { params(with_todo_comment: T::Boolean).void } - def initialize(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 - sig { params(attr: ::RBI::Attr).void } - def add_attr_sig(attr); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 - sig { params(method: ::RBI::Method).void } - def add_method_sig(method); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 - sig { params(node: ::RBI::NodeWithComments).void } - def add_todo_comment(node); end -end - -# source://rbi//lib/rbi/rewriters/annotate.rb#6 -class RBI::Rewriters::Annotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/annotate.rb#10 - sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } - def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#18 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/annotate.rb#31 - sig { params(node: ::RBI::NodeWithComments).void } - def annotate_node(node); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#38 - sig { params(node: ::RBI::Node).returns(T::Boolean) } - def root?(node); end -end - -# source://rbi//lib/rbi/rewriters/deannotate.rb#6 -class RBI::Rewriters::Deannotate < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/deannotate.rb#10 - sig { params(annotation: ::String).void } - def initialize(annotation); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#16 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/deannotate.rb#27 - sig { params(node: ::RBI::NodeWithComments).void } - def deannotate_node(node); end -end - -# 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 -class RBI::Rewriters::FilterVersions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 - sig { params(version: ::Gem::Version).void } - def initialize(version); end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - class << self - # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 - sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } - def filter(tree, version); end - end -end - -# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 -RBI::Rewriters::FilterVersions::VERSION_PREFIX = T.let(T.unsafe(nil), String) - -# source://rbi//lib/rbi/rewriters/group_nodes.rb#6 -class RBI::Rewriters::GroupNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/group_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Merge two RBI trees together -# -# Be this `Tree`: -# ~~~rb -# class Foo -# attr_accessor :a -# def m; end -# C = 10 -# end -# ~~~ -# -# Merged with this one: -# ~~~rb -# class Foo -# attr_reader :a -# def m(x); end -# C = 10 -# end -# ~~~ -# -# Compatible definitions are merged together while incompatible definitions are moved into a `ConflictTree`: -# ~~~rb -# class Foo -# <<<<<<< left -# attr_accessor :a -# def m; end -# ======= -# attr_reader :a -# def m(x); end -# >>>>>>> right -# C = 10 -# end -# ~~~ -# -# source://rbi//lib/rbi/rewriters/merge_trees.rb#39 -class RBI::Rewriters::Merge - # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 - sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } - def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 - sig { params(tree: ::RBI::Tree).void } - def merge(tree); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 - sig { returns(::RBI::MergeTree) } - def tree; end - - class << self - # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 - 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#86 -class RBI::Rewriters::Merge::Conflict < ::T::Struct - const :left, ::RBI::Node - const :right, ::RBI::Node - const :left_name, ::String - const :right_name, ::String - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11288/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#245 -class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 - sig { override.params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 - sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } - def merge_conflict_trees(left, right); end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 -class RBI::Rewriters::Merge::Keep < ::T::Enum - enums do - NONE = new - LEFT = new - RIGHT = new - end -end - -# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 -class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 - sig do - params( - output: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).void - end - def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 - sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } - def conflicts; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 - sig { returns(::RBI::Tree) } - def current_scope; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } - def make_conflict_scope(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 - sig { params(left: ::RBI::Node, right: ::RBI::Node).void } - def make_conflict_tree(left, right); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 - sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } - def previous_definition(node); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope).returns(::RBI::Scope) } - def replace_scope_header(left, right); end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#6 -class RBI::Rewriters::NestNonPublicMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 -class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end -end - -# Remove all definitions existing in the index from the current tree -# -# Let's create an `Index` from two different `Tree`s: -# ~~~rb -# tree1 = Parse.parse_string(<<~RBI) -# class Foo -# def foo; end -# end -# RBI -# -# tree2 = Parse.parse_string(<<~RBI) -# FOO = 10 -# RBI -# -# index = Index.index(tree1, tree2) -# ~~~ -# -# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: -# ~~~rb -# tree_to_clean = Parser.parse_string(<<~RBI) -# class Foo -# def foo; end -# def bar; end -# end -# FOO = 10 -# BAR = 42 -# RBI -# -# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) -# -# assert_equal(<<~RBI, cleaned_tree) -# class Foo -# def bar; end -# end -# BAR = 42 -# RBI -# -# assert_equal(<<~OPERATIONS, operations.join("\n")) -# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) -# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) -# OPERATIONS -# ~~~ -# -# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 -class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 - sig { params(index: ::RBI::Index).void } - def initialize(index); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 - sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } - def operations; end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end - - private - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } - def can_delete_node?(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 - sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } - def delete_node(node, previous); end - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 - sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } - def previous_definition_for(node); end - - class << self - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 - 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#134 -class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct - const :deleted_node, ::RBI::Node - const :duplicate_of, ::RBI::Node - - # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 - sig { returns(::String) } - def to_s; end - - class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 -class RBI::Rewriters::SortNodes < ::RBI::Visitor - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 - sig { override.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - private - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 - sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } - def group_rank(kind); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 - sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } - def node_name(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 - sig { params(node: ::RBI::Node).returns(::Integer) } - def node_rank(node); end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 - sig { params(node: ::RBI::Node).void } - def sort_node_names!(node); end -end - -# Scopes -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#176 -class RBI::Scope < ::RBI::Tree - include ::RBI::Indexable - - abstract! - - # source://rbi//lib/rbi/printer.rb#242 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # Duplicate `self` scope without its body - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#356 - sig { returns(T.self_type) } - def dup_empty; end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#182 - sig { abstract.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#93 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/printer.rb#256 - sig { params(v: ::RBI::Printer).void } - def print_body(v); end - - # @abstract - # - # source://rbi//lib/rbi/printer.rb#253 - sig { abstract.params(v: ::RBI::Printer).void } - def print_header(v); end - - # source://rbi//lib/rbi/model.rb#185 - 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#628 -class RBI::ScopeConflict < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/merge_trees.rb#642 - sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } - def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#651 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 - sig { returns(::RBI::Scope) } - def left; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#667 - sig { override.returns(T::Boolean) } - def oneline?; end - - # @return [Scope] - # - # source://rbi//lib/rbi/rewriters/merge_trees.rb#632 - def right; end -end - -# Sends -# -# source://rbi//lib/rbi/model.rb#1000 -class RBI::Send < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1018 - sig do - params( - method: ::String, - args: T::Array[::RBI::Arg], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Send).void) - ).void - end - def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1026 - sig { params(arg: ::RBI::Arg).void } - def <<(arg); end - - # source://rbi//lib/rbi/model.rb#1031 - sig { params(other: T.nilable(::Object)).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#592 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1007 - sig { returns(T::Array[::RBI::Arg]) } - def args; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#529 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/index.rb#193 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1004 - sig { returns(::String) } - def method; end - - # source://rbi//lib/rbi/model.rb#1036 - sig { returns(::String) } - def to_s; end -end - -# Sorbet's sigs -# -# source://rbi//lib/rbi/model.rb#1100 -class RBI::Sig < ::RBI::Node - # source://rbi//lib/rbi/model.rb#1132 - sig do - params( - params: T::Array[::RBI::SigParam], - return_type: T.nilable(::String), - is_abstract: T::Boolean, - is_override: T::Boolean, - is_overridable: T::Boolean, - is_final: T::Boolean, - type_params: T::Array[::String], - checked: T.nilable(::Symbol), - loc: T.nilable(::RBI::Loc), - block: T.nilable(T.proc.params(node: ::RBI::Sig).void) - ).void - end - def initialize(params: T.unsafe(nil), return_type: T.unsafe(nil), is_abstract: T.unsafe(nil), is_override: T.unsafe(nil), is_overridable: T.unsafe(nil), is_final: T.unsafe(nil), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1157 - sig { params(param: ::RBI::SigParam).void } - def <<(param); end - - # source://rbi//lib/rbi/model.rb#1167 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#633 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1162 - sig { params(name: ::String, type: ::String).void } - def add_param(name, type); end - - # source://rbi//lib/rbi/model.rb#1116 - sig { returns(T.nilable(::Symbol)) } - def checked; end - - # @return [Symbol, nil] - # - # source://rbi//lib/rbi/model.rb#1116 - def checked=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#656 - sig { returns(T::Boolean) } - def inline_params?; end - - # source://rbi//lib/rbi/model.rb#1110 - sig { returns(T::Boolean) } - def is_abstract; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_abstract=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_final; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_final=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_overridable; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_overridable=(_arg0); end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_override; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#1110 - def is_override=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#651 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/model.rb#1104 - sig { returns(T::Array[::RBI::SigParam]) } - def params; end - - # source://rbi//lib/rbi/model.rb#1107 - sig { returns(T.nilable(::String)) } - def return_type; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1107 - def return_type=(_arg0); end - - # source://rbi//lib/rbi/model.rb#1113 - sig { returns(T::Array[::String]) } - def type_params; end - - private - - # source://rbi//lib/rbi/printer.rb#698 - sig { params(v: ::RBI::Printer).void } - def print_as_block(v); end - - # source://rbi//lib/rbi/printer.rb#674 - sig { params(v: ::RBI::Printer).void } - def print_as_line(v); end - - # source://rbi//lib/rbi/printer.rb#663 - sig { returns(T::Array[::String]) } - def sig_modifiers; end -end - -# source://rbi//lib/rbi/model.rb#1176 -class RBI::SigParam < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#1191 - sig do - params( - name: ::String, - type: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SigParam).void) - ).void - end - def initialize(name, type, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1199 - sig { params(other: ::Object).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#751 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#764 - sig { returns(T::Array[::String]) } - def comments_lines; end - - # source://rbi//lib/rbi/model.rb#1180 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/printer.rb#756 - sig { params(v: ::RBI::Printer, last: T::Boolean).void } - def print_comment_leading_space(v, last:); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1180 - def type; end -end - -# source://rbi//lib/rbi/model.rb#251 -class RBI::SingletonClass < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#261 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#267 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/printer.rb#321 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# source://rbi//lib/rbi/model.rb#272 -class RBI::Struct < ::RBI::Scope - # source://rbi//lib/rbi/model.rb#294 - sig do - params( - name: ::String, - members: T::Array[::Symbol], - keyword_init: T::Boolean, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) - ).void - end - def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#394 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#303 - sig { override.returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/model.rb#282 - sig { returns(T::Boolean) } - def keyword_init; end - - # @return [Boolean] - # - # source://rbi//lib/rbi/model.rb#282 - def keyword_init=(_arg0); end - - # source://rbi//lib/rbi/model.rb#279 - sig { returns(T::Array[::Symbol]) } - def members; end - - # @return [Array] - # - # source://rbi//lib/rbi/model.rb#279 - def members=(_arg0); end - - # source://rbi//lib/rbi/model.rb#276 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#276 - def name=(_arg0); end - - # source://rbi//lib/rbi/printer.rb#300 - sig { override.params(v: ::RBI::Printer).void } - def print_header(v); end -end - -# Sorbet's T::Enum -# -# source://rbi//lib/rbi/model.rb#1317 -class RBI::TEnum < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1328 - 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#1334 -class RBI::TEnumBlock < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1348 - sig do - params( - names: T::Array[::String], - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TEnumBlock).void) - ).void - end - def initialize(names = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#1360 - sig { params(name: ::String).void } - def <<(name); end - - # source://rbi//lib/rbi/printer.rb#795 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1355 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/index.rb#223 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#556 - sig { override.params(other: ::RBI::Node).void } - def merge_with(other); end - - # source://rbi//lib/rbi/model.rb#1338 - sig { returns(T::Array[::String]) } - def names; end - - # source://rbi//lib/rbi/model.rb#1365 - sig { override.returns(::String) } - def to_s; end -end - -# Sorbet's T::Struct -# -# source://rbi//lib/rbi/model.rb#1206 -class RBI::TStruct < ::RBI::Class - # source://rbi//lib/rbi/model.rb#1217 - 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#1255 -class RBI::TStructConst < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1268 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructConst).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#547 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1274 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#203 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1280 - 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#1223 -class RBI::TStructField < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#1244 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment] - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/printer.rb#773 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#538 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1233 - sig { returns(T.nilable(::String)) } - def default; end - - # @return [String, nil] - # - # source://rbi//lib/rbi/model.rb#1233 - def default=(_arg0); end - - # @abstract - # - # source://rbi//lib/rbi/model.rb#1252 - sig { abstract.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/model.rb#1230 - sig { returns(::String) } - def name; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1230 - def name=(_arg0); end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1230 - def type; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1230 - def type=(_arg0); end -end - -# source://rbi//lib/rbi/model.rb#1285 -class RBI::TStructProp < ::RBI::TStructField - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1298 - sig do - params( - name: ::String, - type: ::String, - default: T.nilable(::String), - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TStructProp).void) - ).void - end - def initialize(name, type, default: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#570 - sig { override.params(other: ::RBI::Node).returns(T::Boolean) } - def compatible_with?(other); end - - # source://rbi//lib/rbi/model.rb#1304 - sig { override.returns(T::Array[::String]) } - def fully_qualified_names; end - - # source://rbi//lib/rbi/index.rb#213 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1310 - sig { override.returns(::String) } - def to_s; end -end - -# source://rbi//lib/rbi/model.rb#106 -class RBI::Tree < ::RBI::NodeWithComments - # source://rbi//lib/rbi/model.rb#119 - sig do - params( - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::Tree).void) - ).void - end - def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/model.rb#126 - sig { params(node: ::RBI::Node).void } - def <<(node); end - - # source://rbi//lib/rbi/printer.rb#226 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 - sig { params(with_todo_comment: T::Boolean).void } - def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/annotate.rb#49 - 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.12.0/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.12.0/lib/tapioca/rbi_ext/model.rb#45 - sig { params(name: ::String, value: ::String).void } - def create_constant(name, value:); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#55 - sig { params(name: ::String).void } - def create_extend(name); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#50 - sig { params(name: ::String).void } - def create_include(name); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#89 - sig do - params( - name: ::String, - parameters: T::Array[::RBI::TypedParam], - return_type: ::String, - class_method: T::Boolean, - visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] - ).void - end - def create_method(name, parameters: T.unsafe(nil), return_type: T.unsafe(nil), class_method: T.unsafe(nil), visibility: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#60 - sig { params(name: ::String).void } - def create_mixes_in_class_methods(name); end - - # source://tapioca/0.12.0/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.12.0/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.12.0/lib/tapioca/rbi_ext/model.rb#74 - sig do - params( - name: ::String, - type: ::String, - variance: ::Symbol, - fixed: T.nilable(::String), - upper: T.nilable(::String), - lower: T.nilable(::String) - ).void - end - def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/deannotate.rb#41 - sig { params(annotation: ::String).void } - def deannotate!(annotation); end - - # source://rbi//lib/rbi/model.rb#132 - sig { returns(T::Boolean) } - def empty?; end - - # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 - sig { params(version: ::Gem::Version).void } - def filter_versions!(version); end - - # source://rbi//lib/rbi/rewriters/group_nodes.rb#38 - sig { void } - def group_nodes!; end - - # source://rbi//lib/rbi/index.rb#68 - sig { returns(::RBI::Index) } - def index; end - - # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 - sig do - params( - other: ::RBI::Tree, - left_name: ::String, - right_name: ::String, - keep: ::RBI::Rewriters::Merge::Keep - ).returns(::RBI::MergeTree) - end - def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#46 - sig { void } - def nest_non_public_methods!; end - - # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 - sig { void } - def nest_singleton_methods!; end - - # source://rbi//lib/rbi/model.rb#110 - sig { returns(T::Array[::RBI::Node]) } - def nodes; end - - # source://rbi//lib/rbi/printer.rb#233 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 - sig { void } - def sort_nodes!; end - - private - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#116 - sig { params(node: ::RBI::Node).returns(::RBI::Node) } - def create_node(node); end - - # source://tapioca/0.12.0/lib/tapioca/rbi_ext/model.rb#111 - sig { returns(T::Hash[::String, ::RBI::Node]) } - def nodes_cache; end -end - -# source://rbi//lib/rbi/model.rb#1398 -class RBI::TypeMember < ::RBI::NodeWithComments - include ::RBI::Indexable - - # source://rbi//lib/rbi/model.rb#1413 - sig do - params( - name: ::String, - value: ::String, - loc: T.nilable(::RBI::Loc), - comments: T::Array[::RBI::Comment], - block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) - ).void - end - def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - - # source://rbi//lib/rbi/printer.rb#812 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#1421 - sig { returns(::String) } - def fully_qualified_name; end - - # source://rbi//lib/rbi/index.rb#183 - sig { override.returns(T::Array[::String]) } - def index_ids; end - - # source://rbi//lib/rbi/model.rb#1402 - sig { returns(::String) } - def name; end - - # source://rbi//lib/rbi/model.rb#1428 - sig { override.returns(::String) } - def to_s; end - - # @return [String] - # - # source://rbi//lib/rbi/model.rb#1402 - def value; end -end - -# source://rbi//lib/rbi/parser.rb#20 -class RBI::UnexpectedParserError < ::StandardError - # source://rbi//lib/rbi/parser.rb#27 - sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } - def initialize(parent_exception, last_location); end - - # source://rbi//lib/rbi/parser.rb#24 - sig { returns(::RBI::Loc) } - def last_location; end - - # source://rbi//lib/rbi/parser.rb#34 - sig { params(io: T.any(::IO, ::StringIO)).void } - def print_debug(io: T.unsafe(nil)); end -end - -# source://rbi//lib/rbi/version.rb#5 -RBI::VERSION = T.let(T.unsafe(nil), String) - -# Visibility -# -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/model.rb#914 -class RBI::Visibility < ::RBI::NodeWithComments - abstract! - - # source://rbi//lib/rbi/model.rb#924 - sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } - def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end - - # source://rbi//lib/rbi/model.rb#930 - sig { params(other: ::RBI::Visibility).returns(T::Boolean) } - def ==(other); end - - # source://rbi//lib/rbi/printer.rb#579 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/model.rb#945 - sig { returns(T::Boolean) } - def private?; end - - # source://rbi//lib/rbi/model.rb#940 - sig { returns(T::Boolean) } - def protected?; end - - # source://rbi//lib/rbi/model.rb#935 - sig { returns(T::Boolean) } - def public?; end - - # source://rbi//lib/rbi/model.rb#921 - sig { returns(::Symbol) } - def visibility; end -end - -# source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#52 -class RBI::VisibilityGroup < ::RBI::Tree - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#59 - sig { params(visibility: ::RBI::Visibility).void } - def initialize(visibility); end - - # source://rbi//lib/rbi/printer.rb#848 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi//lib/rbi/printer.rb#861 - sig { override.returns(T::Boolean) } - def oneline?; end - - # source://rbi//lib/rbi/rewriters/nest_non_public_methods.rb#56 - sig { returns(::RBI::Visibility) } - def visibility; end -end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://rbi//lib/rbi/visitor.rb#5 -class RBI::Visitor - abstract! - - # @abstract - # - # source://rbi//lib/rbi/visitor.rb#12 - sig { abstract.params(node: T.nilable(::RBI::Node)).void } - def visit(node); end - - # source://rbi//lib/rbi/visitor.rb#15 - sig { params(nodes: T::Array[::RBI::Node]).void } - def visit_all(nodes); end -end diff --git a/sorbet/rbi/gems/rbi@0.2.1.rbi b/sorbet/rbi/gems/rbi@0.2.1.rbi new file mode 100644 index 000000000..effb88364 --- /dev/null +++ b/sorbet/rbi/gems/rbi@0.2.1.rbi @@ -0,0 +1,4535 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rbi` gem. +# Please instead update this file by running `bin/tapioca gem rbi`. + + +# source://rbi//lib/rbi.rb#7 +module RBI; end + +# source://rbi//lib/rbi/model.rb#1045 +class RBI::Arg < ::RBI::Node + # source://rbi//lib/rbi/model.rb#1057 + sig { params(value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1063 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1068 + sig { returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#1049 + 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#351 +class RBI::Attr < ::RBI::NodeWithComments + include ::RBI::Indexable + + abstract! + + # source://rbi//lib/rbi/model.rb#376 + sig do + params( + name: ::Symbol, + names: T::Array[::Symbol], + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#420 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # @abstract + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#61 + sig { abstract.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#384 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#113 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#428 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#358 + sig { returns(T::Array[::Symbol]) } + def names; end + + # source://rbi//lib/rbi/model.rb#364 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # source://rbi//lib/rbi/model.rb#361 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#361 + def visibility=(_arg0); end + + private + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#89 + 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 + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#110 + 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 + + # @raise [UnexpectedMultipleSigsError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#66 + 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#387 +class RBI::AttrAccessor < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#401 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrAccessor).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#460 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#140 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#407 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#413 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#419 +class RBI::AttrReader < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#433 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrReader).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#442 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#154 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#439 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#445 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#451 +class RBI::AttrWriter < ::RBI::Attr + # source://rbi//lib/rbi/model.rb#465 + sig do + params( + name: ::Symbol, + names: ::Symbol, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::AttrWriter).void) + ).void + end + def initialize(name, *names, visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#451 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#163 + sig { override.returns(T::Array[::RBI::Method]) } + def convert_to_methods; end + + # source://rbi//lib/rbi/model.rb#471 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#477 + 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#76 +class RBI::BlankLine < ::RBI::Comment + # source://rbi//lib/rbi/model.rb#80 + sig { params(loc: T.nilable(::RBI::Loc)).void } + def initialize(loc: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/model.rb#816 +class RBI::BlockParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#827 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::BlockParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#838 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#833 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#220 +class RBI::Class < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#238 + sig do + params( + name: ::String, + superclass_name: T.nilable(::String), + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Class).void) + ).void + end + def initialize(name, superclass_name: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#384 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#246 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#224 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#224 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#227 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#227 + def superclass_name=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#55 +class RBI::Comment < ::RBI::Node + # source://rbi//lib/rbi/model.rb#62 + sig { params(text: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(text, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#68 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#59 + sig { returns(::String) } + def text; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#59 + 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#583 +class RBI::ConflictTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#593 + sig { params(left_name: ::String, right_name: ::String).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#587 + sig { returns(::RBI::Tree) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 + sig { returns(::String) } + def left_name; end + + # @return [Tree] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#587 + def right; end + + # @return [String] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#590 + def right_name; end +end + +# Consts +# +# source://rbi//lib/rbi/model.rb#314 +class RBI::Const < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#329 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Const).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#411 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#337 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#103 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#318 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#344 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#318 + def value; end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#351 +class RBI::DuplicateNodeError < ::RBI::Error; end + +# source://rbi//lib/rbi.rb#8 +class RBI::Error < ::StandardError; end + +# source://rbi//lib/rbi/model.rb#891 +class RBI::Extend < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#903 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Extend).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#510 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#143 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#909 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#139 +class RBI::File + # source://rbi//lib/rbi/model.rb#158 + sig do + params( + strictness: T.nilable(::String), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(file: ::RBI::File).void) + ).void + end + def initialize(strictness: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#166 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/model.rb#149 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#149 + def comments=(_arg0); end + + # source://rbi//lib/rbi/model.rb#171 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/printer.rb#743 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#996 + 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 + + # source://rbi//lib/rbi/rbs_printer.rb#1002 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#143 + sig { returns(::RBI::Tree) } + def root; end + + # @return [Tree] + # + # source://rbi//lib/rbi/model.rb#143 + def root=(_arg0); end + + # source://rbi//lib/rbi/model.rb#146 + sig { returns(T.nilable(::String)) } + def strictness; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#146 + def strictness=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#749 + sig { params(indent: ::Integer, print_locs: T::Boolean, max_line_length: T.nilable(::Integer)).returns(::String) } + def string(indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/formatter.rb#5 +class RBI::Formatter + # source://rbi//lib/rbi/formatter.rb#24 + sig do + params( + add_sig_templates: T::Boolean, + group_nodes: T::Boolean, + max_line_length: T.nilable(::Integer), + nest_singleton_methods: T::Boolean, + nest_non_public_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 + + # source://rbi//lib/rbi/formatter.rb#47 + sig { params(file: ::RBI::File).void } + def format_file(file); end + + # source://rbi//lib/rbi/formatter.rb#52 + sig { params(tree: ::RBI::Tree).void } + def format_tree(tree); end + + # source://rbi//lib/rbi/formatter.rb#12 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/formatter.rb#12 + def max_line_length=(_arg0); end + + # source://rbi//lib/rbi/formatter.rb#41 + sig { params(file: ::RBI::File).returns(::String) } + def print_file(file); end + + # source://rbi//lib/rbi/formatter.rb#9 + sig { params(sort_nodes: T::Boolean).returns(T::Boolean) } + def sort_nodes=(sort_nodes); end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#87 +class RBI::Group < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/group_nodes.rb#94 + sig { params(kind: ::RBI::Group::Kind).void } + def initialize(kind); end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#91 + sig { returns(::RBI::Group::Kind) } + def kind; end +end + +# source://rbi//lib/rbi/rewriters/group_nodes.rb#99 +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#1374 +class RBI::Helper < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1388 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Helper).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#528 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#173 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1378 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1395 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#868 +class RBI::Include < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#880 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Include).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#501 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#133 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#886 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/index.rb#5 +class RBI::Index < ::RBI::Visitor + # source://rbi//lib/rbi/index.rb#21 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/index.rb#32 + sig { params(id: ::String).returns(T::Array[::RBI::Node]) } + def [](id); end + + # source://rbi//lib/rbi/index.rb#37 + sig { params(nodes: ::RBI::Node).void } + def index(*nodes); end + + # source://rbi//lib/rbi/index.rb#27 + sig { returns(T::Array[::String]) } + def keys; end + + # source://rbi//lib/rbi/index.rb#42 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/index.rb#59 + sig { params(node: T.all(::RBI::Indexable, ::RBI::Node)).void } + def index_node(node); end + + class << self + # source://rbi//lib/rbi/index.rb#13 + 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#74 +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#85 + sig { abstract.returns(T::Array[::String]) } + def index_ids; end +end + +# source://rbi//lib/rbi/model.rb#1073 +class RBI::KwArg < ::RBI::Arg + # source://rbi//lib/rbi/model.rb#1086 + sig { params(keyword: ::String, value: ::String, loc: T.nilable(::RBI::Loc)).void } + def initialize(keyword, value, loc: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#1092 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1077 + sig { returns(::String) } + def keyword; end + + # source://rbi//lib/rbi/model.rb#1097 + sig { returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#757 +class RBI::KwOptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#772 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwOptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#784 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#779 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#761 + sig { returns(::String) } + def value; end +end + +# source://rbi//lib/rbi/model.rb#730 +class RBI::KwParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#741 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#752 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#747 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#789 +class RBI::KwRestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#800 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::KwRestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#811 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#806 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/loc.rb#5 +class RBI::Loc + # source://rbi//lib/rbi/loc.rb#38 + sig do + params( + file: T.nilable(::String), + begin_line: T.nilable(::Integer), + end_line: T.nilable(::Integer), + begin_column: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file: T.unsafe(nil), begin_line: T.unsafe(nil), end_line: T.unsafe(nil), begin_column: T.unsafe(nil), end_column: T.unsafe(nil)); end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def begin_column; end + + # source://rbi//lib/rbi/loc.rb#27 + sig { returns(T.nilable(::Integer)) } + def begin_line; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def end_column; end + + # @return [Integer, nil] + # + # source://rbi//lib/rbi/loc.rb#27 + def end_line; end + + # source://rbi//lib/rbi/loc.rb#24 + sig { returns(T.nilable(::String)) } + def file; end + + # source://rbi//lib/rbi/loc.rb#56 + sig { returns(T.nilable(::String)) } + def source; end + + # source://rbi//lib/rbi/loc.rb#47 + sig { returns(::String) } + def to_s; end + + class << self + # source://rbi//lib/rbi/loc.rb#12 + 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#330 +class RBI::MergeTree < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#344 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + conflicts: T::Array[::RBI::Rewriters::Merge::Conflict], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), conflicts: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#334 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end +end + +# Methods and args +# +# source://rbi//lib/rbi/model.rb#485 +class RBI::Method < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#515 + sig do + params( + name: ::String, + params: T::Array[::RBI::Param], + is_singleton: T::Boolean, + visibility: ::RBI::Visibility, + sigs: T::Array[::RBI::Sig], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Method).void) + ).void + end + def initialize(name, params: T.unsafe(nil), is_singleton: T.unsafe(nil), visibility: T.unsafe(nil), sigs: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#535 + sig { params(param: ::RBI::Param).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#570 + sig { params(name: ::String).void } + def add_block_param(name); end + + # source://rbi//lib/rbi/model.rb#560 + sig { params(name: ::String, default_value: ::String).void } + def add_kw_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#555 + sig { params(name: ::String).void } + def add_kw_param(name); end + + # source://rbi//lib/rbi/model.rb#565 + sig { params(name: ::String).void } + def add_kw_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#545 + sig { params(name: ::String, default_value: ::String).void } + def add_opt_param(name, default_value); end + + # source://rbi//lib/rbi/model.rb#540 + sig { params(name: ::String).void } + def add_param(name); end + + # source://rbi//lib/rbi/model.rb#550 + sig { params(name: ::String).void } + def add_rest_param(name); end + + # source://rbi//lib/rbi/model.rb#587 + 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.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 + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#469 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#613 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#123 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#495 + sig { returns(T::Boolean) } + def is_singleton; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#495 + def is_singleton=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#478 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/model.rb#489 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#489 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#492 + sig { returns(T::Array[::RBI::Param]) } + def params; end + + # source://rbi//lib/rbi/model.rb#501 + sig { returns(T::Array[::RBI::Sig]) } + def sigs; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#501 + def sigs=(_arg0); end + + # source://rbi//lib/rbi/model.rb#622 + sig { override.returns(::String) } + def to_s; end + + # source://rbi//lib/rbi/model.rb#498 + sig { returns(::RBI::Visibility) } + def visibility; end + + # @return [Visibility] + # + # source://rbi//lib/rbi/model.rb#498 + def visibility=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1435 +class RBI::MixesInClassMethods < ::RBI::Mixin + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1447 + sig do + params( + name: ::String, + names: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::MixesInClassMethods).void) + ).void + end + def initialize(name, *names, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#519 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#153 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1453 + 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#845 +class RBI::Mixin < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#862 + sig do + params( + name: ::String, + names: T::Array[::String], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment] + ).void + end + def initialize(name, names, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#492 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#852 + sig { returns(T::Array[::String]) } + def names; end +end + +# source://rbi//lib/rbi/model.rb#192 +class RBI::Module < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#206 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Module).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#393 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#213 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#196 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#196 + 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! + + # source://rbi//lib/rbi/model.rb#20 + 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? + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#287 + sig { params(_other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(_other); end + + # source://rbi//lib/rbi/model.rb#26 + sig { void } + def detach; end + + # source://rbi//lib/rbi/model.rb#17 + sig { returns(T.nilable(::RBI::Loc)) } + def loc; end + + # @return [Loc, nil] + # + # source://rbi//lib/rbi/model.rb#17 + def loc=(_arg0); end + + # Merge `self` and `other` into a single definition + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#293 + sig { params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#296 + sig { returns(T.nilable(::RBI::ConflictTree)) } + def parent_conflict_tree; end + + # source://rbi//lib/rbi/model.rb#48 + sig { returns(T.nilable(::RBI::Scope)) } + def parent_scope; end + + # source://rbi//lib/rbi/model.rb#14 + sig { returns(T.nilable(::RBI::Tree)) } + def parent_tree; end + + # @return [Tree, nil] + # + # source://rbi//lib/rbi/model.rb#14 + def parent_tree=(_arg0); end + + # source://rbi//lib/rbi/printer.rb#767 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def print(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#1013 + 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 + + # source://rbi//lib/rbi/rbs_printer.rb#1019 + sig { params(indent: ::Integer, print_locs: T::Boolean).returns(::String) } + def rbs_string(indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/model.rb#35 + sig { params(node: ::RBI::Node).void } + def replace(node); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#94 + sig { params(version: ::Gem::Version).returns(T::Boolean) } + def satisfies_version?(version); end + + # source://rbi//lib/rbi/printer.rb#773 + 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#85 +class RBI::NodeWithComments < ::RBI::Node + abstract! + + # source://rbi//lib/rbi/model.rb#95 + sig { params(loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#101 + sig { returns(T::Array[::String]) } + def annotations; end + + # source://rbi//lib/rbi/model.rb#92 + sig { returns(T::Array[::RBI::Comment]) } + def comments; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#92 + def comments=(_arg0); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#311 + sig { override.params(other: ::RBI::Node).void } + def merge_with(other); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#104 + sig { returns(T::Array[::Gem::Requirement]) } + def version_requirements; end +end + +# source://rbi//lib/rbi/model.rb#676 +class RBI::OptParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#691 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::OptParam).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#698 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#680 + 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#627 +class RBI::Param < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#643 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#634 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#649 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/parser.rb#7 +class RBI::ParseError < ::RBI::Error + # source://rbi//lib/rbi/parser.rb#14 + sig { params(message: ::String, location: ::RBI::Loc).void } + def initialize(message, location); end + + # source://rbi//lib/rbi/parser.rb#11 + sig { returns(::RBI::Loc) } + def location; end +end + +# source://rbi//lib/rbi/parser.rb#53 +class RBI::Parser + # source://rbi//lib/rbi/parser.rb#88 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#83 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + private + + # source://rbi//lib/rbi/parser.rb#95 + sig { params(source: ::String, file: ::String).returns(::RBI::Tree) } + def parse(source, file:); end + + class << self + # source://rbi//lib/rbi/parser.rb#65 + sig { params(path: ::String).returns(::RBI::Tree) } + def parse_file(path); end + + # source://rbi//lib/rbi/parser.rb#70 + sig { params(paths: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_files(paths); end + + # source://rbi//lib/rbi/parser.rb#60 + sig { params(string: ::String).returns(::RBI::Tree) } + def parse_string(string); end + + # source://rbi//lib/rbi/parser.rb#76 + sig { params(strings: T::Array[::String]).returns(T::Array[::RBI::Tree]) } + def parse_strings(strings); end + end +end + +# source://rbi//lib/rbi/parser.rb#828 +class RBI::Parser::SigBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#835 + sig { params(content: ::String, file: ::String).void } + def initialize(content, file:); end + + # source://rbi//lib/rbi/parser.rb#832 + sig { returns(::RBI::Sig) } + def current; end + + # source://rbi//lib/rbi/parser.rb#887 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://rbi//lib/rbi/parser.rb#842 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end + +# source://rbi//lib/rbi/parser.rb#153 +class RBI::Parser::TreeBuilder < ::RBI::Parser::Visitor + # source://rbi//lib/rbi/parser.rb#163 + sig { params(source: ::String, comments: T::Array[::Prism::Comment], file: ::String).void } + def initialize(source, comments:, file:); end + + # source://rbi//lib/rbi/parser.rb#160 + sig { returns(T.nilable(::Prism::Node)) } + def last_node; end + + # source://rbi//lib/rbi/parser.rb#157 + sig { returns(::RBI::Tree) } + def tree; end + + # source://rbi//lib/rbi/parser.rb#324 + sig { params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://rbi//lib/rbi/parser.rb#175 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://rbi//lib/rbi/parser.rb#224 + sig { params(node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode)).void } + def visit_constant_assign(node); end + + # source://rbi//lib/rbi/parser.rb#217 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#210 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://rbi//lib/rbi/parser.rb#257 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://rbi//lib/rbi/parser.rb#278 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://rbi//lib/rbi/parser.rb#296 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://rbi//lib/rbi/parser.rb#307 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # Collect all the remaining comments within a node + # + # source://rbi//lib/rbi/parser.rb#503 + sig { params(node: ::Prism::Node).void } + def collect_dangling_comments(node); end + + # Collect all the remaining comments after visiting the tree + # + # source://rbi//lib/rbi/parser.rb#521 + sig { void } + def collect_orphan_comments; end + + # source://rbi//lib/rbi/parser.rb#544 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/parser.rb#549 + sig { returns(T::Array[::RBI::Sig]) } + def current_sigs; end + + # source://rbi//lib/rbi/parser.rb#556 + sig { params(sigs: T::Array[::RBI::Sig]).returns(T::Array[::RBI::Comment]) } + def detach_comments_from_sigs(sigs); end + + # source://rbi//lib/rbi/parser.rb#568 + sig { params(node: ::Prism::Node).returns(T::Array[::RBI::Comment]) } + def node_comments(node); end + + # source://rbi//lib/rbi/parser.rb#586 + sig { params(node: ::Prism::Comment).returns(::RBI::Comment) } + def parse_comment(node); end + + # source://rbi//lib/rbi/parser.rb#615 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Param]) } + def parse_params(node); end + + # source://rbi//lib/rbi/parser.rb#591 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Array[::RBI::Arg]) } + def parse_send_args(node); end + + # source://rbi//lib/rbi/parser.rb#689 + sig { params(node: ::Prism::CallNode).returns(::RBI::Sig) } + def parse_sig(node); end + + # source://rbi//lib/rbi/parser.rb#698 + sig do + params( + node: T.any(::Prism::ConstantPathWriteNode, ::Prism::ConstantWriteNode) + ).returns(T.nilable(::RBI::Struct)) + end + def parse_struct(node); end + + # source://rbi//lib/rbi/parser.rb#748 + sig { params(send: ::Prism::CallNode).void } + def parse_tstruct_field(send); end + + # source://rbi//lib/rbi/parser.rb#785 + sig { params(name: ::String, node: ::Prism::Node).returns(::RBI::Visibility) } + def parse_visibility(name, node); end + + # source://rbi//lib/rbi/parser.rb#799 + sig { void } + def separate_header_comments; end + + # source://rbi//lib/rbi/parser.rb#809 + sig { void } + def set_root_tree_loc; end + + # source://rbi//lib/rbi/parser.rb#823 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def type_variable_definition?(node); end +end + +# source://rbi//lib/rbi/parser.rb#122 +class RBI::Parser::Visitor < ::Prism::Visitor + # source://rbi//lib/rbi/parser.rb#126 + sig { params(source: ::String, file: ::String).void } + def initialize(source, file:); end + + private + + # source://rbi//lib/rbi/parser.rb#136 + sig { params(node: ::Prism::Node).returns(::RBI::Loc) } + def node_loc(node); end + + # source://rbi//lib/rbi/parser.rb#141 + sig { params(node: T.nilable(::Prism::Node)).returns(T.nilable(::String)) } + def node_string(node); end + + # source://rbi//lib/rbi/parser.rb#148 + 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 + # source://rbi//lib/rbi/printer.rb#30 + sig do + params( + out: T.any(::IO, ::StringIO), + indent: ::Integer, + print_locs: T::Boolean, + max_line_length: T.nilable(::Integer) + ).void + end + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil), max_line_length: T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#17 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/printer.rb#48 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#11 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#11 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/printer.rb#43 + sig { void } + def indent; end + + # source://rbi//lib/rbi/printer.rb#20 + sig { returns(T.nilable(::Integer)) } + def max_line_length; end + + # source://rbi//lib/rbi/printer.rb#14 + sig { returns(T.nilable(::RBI::Node)) } + def previous_node; end + + # Print a string without indentation nor `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#54 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/printer.rb#11 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/printer.rb#11 + def print_locs=(_arg0); end + + # Print a string with indentation and `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#74 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/printer.rb#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. + # + # source://rbi//lib/rbi/printer.rb#67 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/printer.rb#80 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/printer.rb#91 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # source://rbi//lib/rbi/printer.rb#618 + sig { params(node: ::RBI::Node).returns(T::Boolean) } + def oneline?(node); end + + # source://rbi//lib/rbi/printer.rb#576 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/printer.rb#586 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/printer.rb#592 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#665 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_block(node); end + + # source://rbi//lib/rbi/printer.rb#640 + sig { params(node: ::RBI::Sig).void } + def print_sig_as_line(node); end + + # source://rbi//lib/rbi/printer.rb#610 + sig { params(node: ::RBI::SigParam, last: T::Boolean).void } + def print_sig_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/printer.rb#721 + sig { params(node: ::RBI::Sig).returns(T::Array[::String]) } + def sig_modifiers(node); end + + # source://rbi//lib/rbi/printer.rb#417 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/printer.rb#237 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/printer.rb#222 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/printer.rb#227 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/printer.rb#232 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/printer.rb#126 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/printer.rb#344 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/printer.rb#143 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/printer.rb#110 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/printer.rb#553 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/printer.rb#354 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/printer.rb#525 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/printer.rb#511 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/printer.rb#349 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/printer.rb#422 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/printer.rb#334 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#329 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/printer.rb#339 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#265 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/printer.rb#520 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/printer.rb#359 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/printer.rb#138 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/printer.rb#319 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/printer.rb#386 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/printer.rb#381 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/printer.rb#376 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/printer.rb#314 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/printer.rb#544 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/printer.rb#324 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/printer.rb#158 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/printer.rb#203 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/printer.rb#562 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/printer.rb#168 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/printer.rb#400 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/printer.rb#427 + sig { override.params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/printer.rb#447 + sig { override.params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/printer.rb#153 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/printer.rb#148 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/printer.rb#467 + sig { params(node: ::RBI::TStructField).void } + def visit_t_struct_field(node); end + + # source://rbi//lib/rbi/printer.rb#485 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/printer.rb#490 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/printer.rb#131 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/printer.rb#452 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/printer.rb#457 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/printer.rb#462 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/printer.rb#502 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/printer.rb#391 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/printer.rb#531 + 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#986 +class RBI::Private < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#996 + 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#970 +class RBI::Protected < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#980 + 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#954 +class RBI::Public < ::RBI::Visibility + # source://rbi//lib/rbi/model.rb#964 + 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_printer.rb#5 +class RBI::RBSPrinter < ::RBI::Visitor + # source://rbi//lib/rbi/rbs_printer.rb#18 + sig { params(out: T.any(::IO, ::StringIO), indent: ::Integer, print_locs: T::Boolean).void } + def initialize(out: T.unsafe(nil), indent: T.unsafe(nil), print_locs: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#15 + sig { returns(::Integer) } + def current_indent; end + + # source://rbi//lib/rbi/rbs_printer.rb#35 + sig { void } + def dedent; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def in_visibility_group=(_arg0); end + + # Printing + # + # source://rbi//lib/rbi/rbs_printer.rb#30 + sig { void } + def indent; end + + # 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. + # + # source://rbi//lib/rbi/rbs_printer.rb#41 + sig { params(string: ::String).void } + def print(string); end + + # source://rbi//lib/rbi/rbs_printer.rb#275 + sig { params(node: ::RBI::Attr, sig: ::RBI::Sig).void } + def print_attr_sig(node, sig); end + + # source://rbi//lib/rbi/rbs_printer.rb#9 + sig { returns(T::Boolean) } + def print_locs; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/rbs_printer.rb#9 + def print_locs=(_arg0); end + + # source://rbi//lib/rbi/rbs_printer.rb#350 + 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. + # + # source://rbi//lib/rbi/rbs_printer.rb#61 + sig { params(string: ::String).void } + def printl(string); end + + # Print a string without indentation but with a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#47 + sig { params(string: T.nilable(::String)).void } + def printn(string = T.unsafe(nil)); end + + # Print a string with indentation but without a `\n` at the end. + # + # source://rbi//lib/rbi/rbs_printer.rb#54 + sig { params(string: T.nilable(::String)).void } + def printt(string = T.unsafe(nil)); end + + # source://rbi//lib/rbi/rbs_printer.rb#67 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/rbs_printer.rb#505 + sig { override.params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#243 + sig { params(node: ::RBI::Attr).void } + def visit_attr(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#228 + sig { override.params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#233 + sig { override.params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#238 + sig { override.params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#106 + sig { override.params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#444 + sig { override.params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#123 + sig { override.params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#90 + sig { override.params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#625 + sig { override.params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#213 + sig { override.params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#454 + sig { override.params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#78 + sig { override.params(file: ::RBI::File).void } + def visit_file(file); end + + # source://rbi//lib/rbi/rbs_printer.rb#601 + sig { override.params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#591 + sig { override.params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#449 + sig { override.params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#510 + sig { override.params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#434 + sig { override.params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#429 + sig { override.params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#439 + sig { override.params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#292 + sig { override.params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#596 + sig { override.params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#459 + sig { params(node: ::RBI::Mixin).void } + def visit_mixin(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#118 + sig { override.params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#419 + sig { override.params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#486 + sig { override.params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#481 + sig { override.params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#476 + sig { override.params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#414 + sig { override.params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#620 + sig { override.params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#424 + sig { override.params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#138 + sig { params(node: ::RBI::Scope).void } + def visit_scope(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#201 + sig { params(node: ::RBI::Scope).void } + def visit_scope_body(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#634 + sig { override.params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#148 + sig { params(node: ::RBI::Scope).void } + def visit_scope_header(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#500 + sig { override.params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#133 + sig { override.params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#128 + sig { override.params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#563 + sig { override.params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#568 + sig { override.params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#111 + sig { override.params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#515 + sig { override.params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#549 + sig { override.params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#556 + sig { override.params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#586 + sig { override.params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#491 + sig { params(node: ::RBI::Visibility).void } + def visit_visibility(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#607 + sig { override.params(node: ::RBI::VisibilityGroup).void } + def visit_visibility_group(node); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#782 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_nilable_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#777 + sig { params(node: ::RBI::Type).returns(T::Boolean) } + def bare_proc?(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#725 + 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`. + # + # source://rbi//lib/rbi/rbs_printer.rb#759 + sig { params(code: T.nilable(::String)).returns(T.nilable(::String)) } + def parse_t_let(code); end + + # source://rbi//lib/rbi/rbs_printer.rb#747 + sig { params(type: T.any(::RBI::Type, ::String)).returns(::RBI::Type) } + def parse_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#650 + sig { params(node: ::RBI::Node).void } + def print_blank_line_before(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#669 + sig { params(node: ::RBI::Node).void } + def print_loc(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#699 + sig { params(node: ::RBI::Param, last: T::Boolean).void } + def print_param_comment_leading_space(node, last:); end + + # source://rbi//lib/rbi/rbs_printer.rb#675 + sig { params(node: ::RBI::Method, param: ::RBI::SigParam).void } + def print_sig_param(node, param); end + + # source://rbi//lib/rbi/rbs_printer.rb#717 + 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#654 +class RBI::ReqParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#665 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::ReqParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#671 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end +end + +# source://rbi//lib/rbi/model.rb#1458 +class RBI::RequiresAncestor < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1471 + sig { params(name: ::String, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/index.rb#163 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1462 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1477 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#703 +class RBI::RestParam < ::RBI::Param + # source://rbi//lib/rbi/model.rb#714 + sig do + params( + name: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::RestParam).void) + ).void + end + def initialize(name, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#725 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#720 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#5 +module RBI::Rewriters; end + +# source://rbi//lib/rbi/rewriters/add_sig_templates.rb#6 +class RBI::Rewriters::AddSigTemplates < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#10 + sig { params(with_todo_comment: T::Boolean).void } + def initialize(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#30 + sig { params(attr: ::RBI::Attr).void } + def add_attr_sig(attr); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#45 + sig { params(method: ::RBI::Method).void } + def add_method_sig(method); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#56 + sig { params(node: ::RBI::NodeWithComments).void } + def add_todo_comment(node); end +end + +# source://rbi//lib/rbi/rewriters/annotate.rb#6 +class RBI::Rewriters::Annotate < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/annotate.rb#10 + sig { params(annotation: ::String, annotate_scopes: T::Boolean, annotate_properties: T::Boolean).void } + def initialize(annotation, annotate_scopes: T.unsafe(nil), annotate_properties: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#18 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/annotate.rb#31 + sig { params(node: ::RBI::NodeWithComments).void } + def annotate_node(node); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#38 + 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 + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#26 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # @raise [ReplaceNodeError] + # + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#39 + 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 + # source://rbi//lib/rbi/rewriters/deannotate.rb#10 + sig { params(annotation: ::String).void } + def initialize(annotation); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#16 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/deannotate.rb#27 + sig { params(node: ::RBI::NodeWithComments).void } + def deannotate_node(node); end +end + +# 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 +class RBI::Rewriters::FilterVersions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/filter_versions.rb#73 + sig { params(version: ::Gem::Version).void } + def initialize(version); end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#79 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + class << self + # source://rbi//lib/rbi/rewriters/filter_versions.rb#66 + sig { params(tree: ::RBI::Tree, version: ::Gem::Version).void } + def filter(tree, version); end + end +end + +# source://rbi//lib/rbi/rewriters/filter_versions.rb#60 +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 +class RBI::Rewriters::FlattenSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#34 + 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 +class RBI::Rewriters::FlattenVisibilities < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#31 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#38 + 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 + # source://rbi//lib/rbi/rewriters/group_nodes.rb#12 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#36 + 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 +class RBI::Rewriters::Merge + # source://rbi//lib/rbi/rewriters/merge_trees.rb#70 + sig { params(left_name: ::String, right_name: ::String, keep: ::RBI::Rewriters::Merge::Keep).void } + def initialize(left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#79 + sig { params(tree: ::RBI::Tree).void } + def merge(tree); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#67 + sig { returns(::RBI::MergeTree) } + def tree; end + + class << self + # source://rbi//lib/rbi/rewriters/merge_trees.rb#54 + 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#86 +class RBI::Rewriters::Merge::Conflict < ::T::Struct + const :left, ::RBI::Node + const :right, ::RBI::Node + const :left_name, ::String + const :right_name, ::String + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#95 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11600/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#245 +class RBI::Rewriters::Merge::ConflictTreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#247 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#252 + sig { override.params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#273 + sig { params(left: ::RBI::Tree, right: ::RBI::Tree).void } + def merge_conflict_trees(left, right); end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#42 +class RBI::Rewriters::Merge::Keep < ::T::Enum + enums do + LEFT = new + NONE = new + RIGHT = new + end +end + +# source://rbi//lib/rbi/rewriters/merge_trees.rb#100 +class RBI::Rewriters::Merge::TreeMerger < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/merge_trees.rb#107 + sig do + params( + output: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).void + end + def initialize(output, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#104 + sig { returns(T::Array[::RBI::Rewriters::Merge::Conflict]) } + def conflicts; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#119 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#168 + sig { returns(::RBI::Tree) } + def current_scope; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#185 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope).void } + def make_conflict_scope(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#192 + sig { params(left: ::RBI::Node, right: ::RBI::Node).void } + def make_conflict_tree(left, right); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#173 + sig { params(node: ::RBI::Node).returns(T.nilable(::RBI::Node)) } + def previous_definition(node); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#204 + 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 + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#6 +class RBI::Rewriters::NestSingletonMethods < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# 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 +class RBI::Rewriters::NestTopLevelMembers < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#26 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#33 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end +end + +# Remove all definitions existing in the index from the current tree +# +# Let's create an `Index` from two different `Tree`s: +# ~~~rb +# tree1 = Parse.parse_string(<<~RBI) +# class Foo +# def foo; end +# end +# RBI +# +# tree2 = Parse.parse_string(<<~RBI) +# FOO = 10 +# RBI +# +# index = Index.index(tree1, tree2) +# ~~~ +# +# We can use `RemoveKnownDefinitions` to remove the definitions found in the `index` from the `Tree` to clean: +# ~~~rb +# tree_to_clean = Parser.parse_string(<<~RBI) +# class Foo +# def foo; end +# def bar; end +# end +# FOO = 10 +# BAR = 42 +# RBI +# +# cleaned_tree, operations = RemoveKnownDefinitions.remove(tree_to_clean, index) +# +# assert_equal(<<~RBI, cleaned_tree) +# class Foo +# def bar; end +# end +# BAR = 42 +# RBI +# +# assert_equal(<<~OPERATIONS, operations.join("\n")) +# Deleted ::Foo#foo at -:2:2-2-16 (duplicate from -:2:2-2:16) +# Deleted ::FOO at -:5:0-5:8 (duplicate from -:1:0-1:8) +# OPERATIONS +# ~~~ +# +# source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#48 +class RBI::Rewriters::RemoveKnownDefinitions < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#55 + sig { params(index: ::RBI::Index).void } + def initialize(index); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#52 + sig { returns(T::Array[::RBI::Rewriters::RemoveKnownDefinitions::Operation]) } + def operations; end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#83 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#78 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + private + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#111 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).returns(T::Boolean) } + def can_delete_node?(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#129 + sig { params(node: ::RBI::Node, previous: ::RBI::Node).void } + def delete_node(node, previous); end + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#102 + sig { params(node: ::RBI::Indexable).returns(T.nilable(::RBI::Node)) } + def previous_definition_for(node); end + + class << self + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#70 + 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#134 +class RBI::Rewriters::RemoveKnownDefinitions::Operation < ::T::Struct + const :deleted_node, ::RBI::Node + const :duplicate_of, ::RBI::Node + + # source://rbi//lib/rbi/rewriters/remove_known_definitions.rb#141 + sig { returns(::String) } + def to_s; end + + class << self + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 + def inherited(s); end + end +end + +# source://rbi//lib/rbi/rewriters/sort_nodes.rb#6 +class RBI::Rewriters::SortNodes < ::RBI::Visitor + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#10 + sig { override.params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#73 + sig { params(kind: ::RBI::Group::Kind).returns(::Integer) } + def group_rank(kind); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#94 + sig { params(node: ::RBI::Node).returns(T.nilable(::String)) } + def node_name(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#45 + sig { params(node: ::RBI::Node).returns(::Integer) } + def node_rank(node); end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#106 + sig { params(node: ::RBI::Node).void } + def sort_node_names!(node); end +end + +# Scopes +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#178 +class RBI::Scope < ::RBI::Tree + include ::RBI::Indexable + + abstract! + + # Duplicate `self` scope without its body + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#358 + sig { returns(T.self_type) } + def dup_empty; end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#184 + sig { abstract.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#93 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#187 + 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#616 +class RBI::ScopeConflict < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/merge_trees.rb#633 + sig { params(left: ::RBI::Scope, right: ::RBI::Scope, left_name: ::String, right_name: ::String).void } + def initialize(left:, right:, left_name: T.unsafe(nil), right_name: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#620 + sig { returns(::RBI::Scope) } + def left; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 + sig { returns(::String) } + def left_name; end + + # @return [Scope] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#620 + def right; end + + # @return [String] + # + # source://rbi//lib/rbi/rewriters/merge_trees.rb#623 + def right_name; end +end + +# Sends +# +# source://rbi//lib/rbi/model.rb#1004 +class RBI::Send < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1022 + sig do + params( + method: ::String, + args: T::Array[::RBI::Arg], + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Send).void) + ).void + end + def initialize(method, args = T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1030 + sig { params(arg: ::RBI::Arg).void } + def <<(arg); end + + # source://rbi//lib/rbi/model.rb#1035 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1011 + sig { returns(T::Array[::RBI::Arg]) } + def args; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#537 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/index.rb#193 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1008 + sig { returns(::String) } + def method; end + + # source://rbi//lib/rbi/model.rb#1040 + sig { returns(::String) } + def to_s; end +end + +# Sorbet's sigs +# +# source://rbi//lib/rbi/model.rb#1104 +class RBI::Sig < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1137 + 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), + 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), type_params: T.unsafe(nil), checked: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1163 + sig { params(param: ::RBI::SigParam).void } + def <<(param); end + + # source://rbi//lib/rbi/model.rb#1173 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1168 + sig { params(name: ::String, type: T.any(::RBI::Type, ::String)).void } + def add_param(name, type); end + + # source://rbi//lib/rbi/model.rb#1120 + sig { returns(T.nilable(::Symbol)) } + def checked; end + + # @return [Symbol, nil] + # + # source://rbi//lib/rbi/model.rb#1120 + def checked=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1114 + sig { returns(T::Boolean) } + def is_abstract; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_abstract=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_final; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_final=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_overridable; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_overridable=(_arg0); end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_override; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#1114 + def is_override=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1108 + sig { returns(T::Array[::RBI::SigParam]) } + def params; end + + # source://rbi//lib/rbi/model.rb#1111 + sig { returns(T.any(::RBI::Type, ::String)) } + def return_type; end + + # @return [Type, String] + # + # source://rbi//lib/rbi/model.rb#1111 + def return_type=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1117 + sig { returns(T::Array[::String]) } + def type_params; end +end + +# source://rbi//lib/rbi/model.rb#1182 +class RBI::SigParam < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#1200 + 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 + + # source://rbi//lib/rbi/model.rb#1208 + sig { params(other: ::Object).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#1186 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1189 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end +end + +# source://rbi//lib/rbi/model.rb#253 +class RBI::SingletonClass < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#263 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::SingletonClass).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#269 + sig { override.returns(::String) } + def fully_qualified_name; end +end + +# source://rbi//lib/rbi/model.rb#274 +class RBI::Struct < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#296 + sig do + params( + name: ::String, + members: T::Array[::Symbol], + keyword_init: T::Boolean, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(struct: ::RBI::Struct).void) + ).void + end + def initialize(name, members: T.unsafe(nil), keyword_init: T.unsafe(nil), loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#402 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#305 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/model.rb#284 + sig { returns(T::Boolean) } + def keyword_init; end + + # @return [Boolean] + # + # source://rbi//lib/rbi/model.rb#284 + def keyword_init=(_arg0); end + + # source://rbi//lib/rbi/model.rb#281 + sig { returns(T::Array[::Symbol]) } + def members; end + + # @return [Array] + # + # source://rbi//lib/rbi/model.rb#281 + def members=(_arg0); end + + # source://rbi//lib/rbi/model.rb#278 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#278 + def name=(_arg0); end +end + +# Sorbet's T::Enum +# +# source://rbi//lib/rbi/model.rb#1329 +class RBI::TEnum < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1340 + 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#1346 +class RBI::TEnumBlock < ::RBI::Scope + # source://rbi//lib/rbi/model.rb#1356 + 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 + + # source://rbi//lib/rbi/model.rb#1362 + sig { override.returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#223 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1367 + sig { override.returns(::String) } + def to_s; end +end + +# Sorbet's T::Struct +# +# source://rbi//lib/rbi/model.rb#1215 +class RBI::TStruct < ::RBI::Class + # source://rbi//lib/rbi/model.rb#1226 + 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#1267 +class RBI::TStructConst < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1280 + 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 + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#555 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1286 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#203 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1292 + 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#1232 +class RBI::TStructField < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#1256 + 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 + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#546 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1245 + sig { returns(T.nilable(::String)) } + def default; end + + # @return [String, nil] + # + # source://rbi//lib/rbi/model.rb#1245 + def default=(_arg0); end + + # @abstract + # + # source://rbi//lib/rbi/model.rb#1264 + sig { abstract.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/model.rb#1239 + sig { returns(::String) } + def name; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1239 + def name=(_arg0); end + + # source://rbi//lib/rbi/model.rb#1242 + sig { returns(T.any(::RBI::Type, ::String)) } + def type; end + + # @return [Type, String] + # + # source://rbi//lib/rbi/model.rb#1242 + def type=(_arg0); end +end + +# source://rbi//lib/rbi/model.rb#1297 +class RBI::TStructProp < ::RBI::TStructField + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1310 + 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 + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#564 + sig { override.params(other: ::RBI::Node).returns(T::Boolean) } + def compatible_with?(other); end + + # source://rbi//lib/rbi/model.rb#1316 + sig { override.returns(T::Array[::String]) } + def fully_qualified_names; end + + # source://rbi//lib/rbi/index.rb#213 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1322 + sig { override.returns(::String) } + def to_s; end +end + +# source://rbi//lib/rbi/model.rb#108 +class RBI::Tree < ::RBI::NodeWithComments + # source://rbi//lib/rbi/model.rb#121 + sig do + params( + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::Tree).void) + ).void + end + def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#128 + sig { params(node: ::RBI::Node).void } + def <<(node); end + + # source://rbi//lib/rbi/rewriters/add_sig_templates.rb#66 + sig { params(with_todo_comment: T::Boolean).void } + def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/annotate.rb#49 + 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.3/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.3/lib/tapioca/rbi_ext/model.rb#45 + sig { params(name: ::String, value: ::String).void } + def create_constant(name, value:); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#55 + sig { params(name: ::String).void } + def create_extend(name); end + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#50 + sig { params(name: ::String).void } + def create_include(name); end + + # source://tapioca/0.16.3/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.3/lib/tapioca/rbi_ext/model.rb#60 + sig { params(name: ::String).void } + def create_mixes_in_class_methods(name); end + + # source://tapioca/0.16.3/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.3/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.3/lib/tapioca/rbi_ext/model.rb#74 + sig do + params( + name: ::String, + type: ::String, + variance: ::Symbol, + fixed: T.nilable(::String), + upper: T.nilable(::String), + lower: T.nilable(::String) + ).void + end + def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/deannotate.rb#41 + sig { params(annotation: ::String).void } + def deannotate!(annotation); end + + # source://rbi//lib/rbi/model.rb#134 + sig { returns(T::Boolean) } + def empty?; end + + # source://rbi//lib/rbi/rewriters/filter_versions.rb#118 + sig { params(version: ::Gem::Version).void } + def filter_versions!(version); end + + # source://rbi//lib/rbi/rewriters/flatten_singleton_methods.rb#60 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi//lib/rbi/rewriters/flatten_visibilities.rb#60 + sig { void } + def flatten_visibilities!; end + + # source://rbi//lib/rbi/rewriters/group_nodes.rb#81 + sig { void } + def group_nodes!; end + + # source://rbi//lib/rbi/index.rb#68 + sig { returns(::RBI::Index) } + def index; end + + # source://rbi//lib/rbi/rewriters/merge_trees.rb#324 + sig do + params( + other: ::RBI::Tree, + left_name: ::String, + right_name: ::String, + keep: ::RBI::Rewriters::Merge::Keep + ).returns(::RBI::MergeTree) + end + def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#46 + sig { void } + def nest_non_public_members!; end + + # source://rbi//lib/rbi/rewriters/nest_singleton_methods.rb#36 + sig { void } + def nest_singleton_methods!; end + + # source://rbi//lib/rbi/rewriters/nest_top_level_members.rb#63 + sig { void } + def nest_top_level_members!; end + + # source://rbi//lib/rbi/model.rb#112 + sig { returns(T::Array[::RBI::Node]) } + def nodes; end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#53 + sig { void } + def replace_attributes_with_methods!; end + + # source://rbi//lib/rbi/rewriters/sort_nodes.rb#119 + sig { void } + def sort_nodes!; end + + private + + # source://tapioca/0.16.3/lib/tapioca/rbi_ext/model.rb#123 + sig { params(node: ::RBI::Node).returns(::RBI::Node) } + def create_node(node); end + + # source://tapioca/0.16.3/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! + + # source://rbi//lib/rbi/type.rb#699 + sig { void } + def initialize; end + + # @abstract + # + # source://rbi//lib/rbi/type.rb#745 + sig { abstract.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#748 + sig { params(other: ::BasicObject).returns(T::Boolean) } + def eql?(other); end + + # source://rbi//lib/rbi/type.rb#753 + 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)" + # ``` + # + # source://rbi//lib/rbi/type.rb#713 + sig { returns(::RBI::Type) } + def nilable; end + + # Returns whether the type is nilable. + # + # source://rbi//lib/rbi/type.rb#740 + 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" + # ``` + # + # source://rbi//lib/rbi/type.rb#728 + sig { returns(::RBI::Type) } + def non_nilable; end + + # source://rbi//lib/rbi/rbs_printer.rb#1030 + sig { returns(::String) } + def rbs_string; end + + # @abstract + # + # source://rbi//lib/rbi/type.rb#758 + sig { abstract.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#761 + 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`. + # + # source://rbi//lib/rbi/type.rb#563 + 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`. + # + # source://rbi//lib/rbi/type.rb#590 + 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`. + # + # source://rbi//lib/rbi/type.rb#488 + sig { returns(::RBI::Type::Anything) } + def anything; end + + # Builds a type that represents `T.attached_class`. + # + # source://rbi//lib/rbi/type.rb#494 + sig { returns(::RBI::Type::AttachedClass) } + def attached_class; end + + # Builds a type that represents `T::Boolean`. + # + # source://rbi//lib/rbi/type.rb#500 + sig { returns(::RBI::Type::Boolean) } + def boolean; end + + # Builds a type that represents the singleton class of another type like `T.class_of(Foo)`. + # + # source://rbi//lib/rbi/type.rb#538 + 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]`. + # + # source://rbi//lib/rbi/type.rb#655 + 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`. + # + # source://rbi//lib/rbi/type.rb#547 + sig { params(type: ::RBI::Type).returns(::RBI::Type) } + def nilable(type); end + + # Builds a type that represents `T.noreturn`. + # + # source://rbi//lib/rbi/type.rb#506 + sig { returns(::RBI::Type::NoReturn) } + def noreturn; end + + # source://rbi//lib/rbi/type_parser.rb#26 + sig { params(node: ::Prism::Node).returns(::RBI::Type) } + def parse_node(node); end + + # @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`. + # + # source://rbi//lib/rbi/type.rb#683 + sig { returns(::RBI::Type::Proc) } + def proc; end + + # Builds a type that represents `T.self_type`. + # + # source://rbi//lib/rbi/type.rb#512 + sig { returns(::RBI::Type::SelfType) } + def self_type; end + + # Builds a type that represents a shape type like `{name: String, age: Integer}`. + # + # source://rbi//lib/rbi/type.rb#675 + 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. + # + # @raise [NameError] + # + # source://rbi//lib/rbi/type.rb#477 + 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]`. + # + # source://rbi//lib/rbi/type.rb#532 + 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]`. + # + # source://rbi//lib/rbi/type.rb#669 + 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)`. + # + # source://rbi//lib/rbi/type.rb#661 + sig { params(name: ::Symbol).returns(::RBI::Type::TypeParameter) } + def type_parameter(name); end + + # Builds a type that represents `T.untyped`. + # + # source://rbi//lib/rbi/type.rb#518 + sig { returns(::RBI::Type::Untyped) } + def untyped; end + + # Builds a type that represents `void`. + # + # source://rbi//lib/rbi/type.rb#524 + sig { returns(::RBI::Type::Void) } + def void; end + + private + + # source://rbi//lib/rbi/type_parser.rb#263 + sig { params(node: ::Prism::CallNode).returns(T::Array[::Prism::Node]) } + def call_chain(node); end + + # 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 + + # 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 + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#69 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_call(node); end + + # 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 + + # @raise [Error] + # + # source://rbi//lib/rbi/type_parser.rb#195 + sig { params(node: ::Prism::CallNode).returns(::RBI::Type) } + def parse_proc(node); end + + # 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 + + # source://rbi//lib/rbi/type_parser.rb#171 + sig { params(node: ::Prism::ArrayNode).returns(::RBI::Type) } + def parse_tuple(node); end + + # source://rbi//lib/rbi/type_parser.rb#276 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t?(node); end + + # source://rbi//lib/rbi/type_parser.rb#288 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_boolean?(node); end + + # source://rbi//lib/rbi/type_parser.rb#295 + sig { params(node: ::Prism::ConstantPathNode).returns(T::Boolean) } + def t_class?(node); end + + # source://rbi//lib/rbi/type_parser.rb#300 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } + def t_class_of?(node); end + + # source://rbi//lib/rbi/type_parser.rb#307 + sig { params(node: ::Prism::CallNode).returns(T::Boolean) } + def t_proc?(node); end + + # source://rbi//lib/rbi/type.rb#693 + 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 + # source://rbi//lib/rbi/type.rb#256 + 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#262 +class RBI::Type::Any < ::RBI::Type::Composite + # source://rbi//lib/rbi/type.rb#271 + sig { returns(T::Boolean) } + def nilable?; end + + # source://rbi//lib/rbi/type.rb#266 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.anything`. +# +# source://rbi//lib/rbi/type.rb#43 +class RBI::Type::Anything < ::RBI::Type + # source://rbi//lib/rbi/type.rb#47 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # 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 + # source://rbi//lib/rbi/type.rb#62 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # 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 + # source://rbi//lib/rbi/type.rb#77 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # 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 + # source://rbi//lib/rbi/type.rb#157 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#163 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#168 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#154 + 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 + # source://rbi//lib/rbi/type.rb#184 + sig { params(type: ::RBI::Type::Simple, type_parameter: T.nilable(::RBI::Type)).void } + def initialize(type, type_parameter = T.unsafe(nil)); end + + # source://rbi//lib/rbi/type.rb#191 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#196 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#178 + sig { returns(::RBI::Type::Simple) } + def type; end + + # source://rbi//lib/rbi/type.rb#181 + 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! + + # source://rbi//lib/rbi/type.rb#240 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#246 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#237 + 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#279 +class RBI::Type::Generic < ::RBI::Type + # source://rbi//lib/rbi/type.rb#289 + sig { params(name: ::String, params: ::RBI::Type).void } + def initialize(name, *params); end + + # source://rbi//lib/rbi/type.rb#296 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#283 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/type.rb#286 + sig { returns(T::Array[::RBI::Type]) } + def params; end + + # source://rbi//lib/rbi/type.rb#301 + 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 + # source://rbi//lib/rbi/type.rb#213 + sig { params(type: ::RBI::Type).void } + def initialize(type); end + + # source://rbi//lib/rbi/type.rb#219 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#224 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#210 + sig { returns(::RBI::Type) } + def type; end +end + +# `T.noreturn`. +# +# source://rbi//lib/rbi/type.rb#88 +class RBI::Type::NoReturn < ::RBI::Type + # source://rbi//lib/rbi/type.rb#92 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # 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#387 +class RBI::Type::Proc < ::RBI::Type + # source://rbi//lib/rbi/type.rb#400 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/type.rb#408 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#436 + sig { params(type: T.untyped).returns(T.self_type) } + def bind(type); end + + # source://rbi//lib/rbi/type.rb#418 + sig { params(params: ::RBI::Type).returns(T.self_type) } + def params(**params); end + + # source://rbi//lib/rbi/type.rb#397 + sig { returns(T.nilable(::RBI::Type)) } + def proc_bind; end + + # source://rbi//lib/rbi/type.rb#391 + sig { returns(T::Hash[::Symbol, ::RBI::Type]) } + def proc_params; end + + # source://rbi//lib/rbi/type.rb#394 + sig { returns(::RBI::Type) } + def proc_returns; end + + # source://rbi//lib/rbi/type.rb#424 + sig { params(type: T.untyped).returns(T.self_type) } + def returns(type); end + + # source://rbi//lib/rbi/type.rb#442 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#430 + 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 + # source://rbi//lib/rbi/type.rb#107 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # 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#357 +class RBI::Type::Shape < ::RBI::Type + # source://rbi//lib/rbi/type.rb#364 + sig { params(types: T::Hash[T.any(::String, ::Symbol), ::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#370 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#375 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#361 + 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 +class RBI::Type::Simple < ::RBI::Type + # source://rbi//lib/rbi/type.rb#24 + sig { params(name: ::String).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#30 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#21 + sig { returns(::String) } + def name; end + + # 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#333 +class RBI::Type::Tuple < ::RBI::Type + # source://rbi//lib/rbi/type.rb#340 + sig { params(types: T::Array[::RBI::Type]).void } + def initialize(types); end + + # source://rbi//lib/rbi/type.rb#346 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#351 + sig { override.returns(::String) } + def to_rbi; end + + # source://rbi//lib/rbi/type.rb#337 + sig { returns(T::Array[::RBI::Type]) } + def types; end +end + +# A type parameter like `T.type_parameter(:U)`. +# +# source://rbi//lib/rbi/type.rb#307 +class RBI::Type::TypeParameter < ::RBI::Type + # source://rbi//lib/rbi/type.rb#314 + sig { params(name: ::Symbol).void } + def initialize(name); end + + # source://rbi//lib/rbi/type.rb#320 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#311 + sig { returns(::Symbol) } + def name; end + + # source://rbi//lib/rbi/type.rb#325 + sig { override.returns(::String) } + def to_rbi; end +end + +# `T.untyped`. +# +# source://rbi//lib/rbi/type.rb#118 +class RBI::Type::Untyped < ::RBI::Type + # source://rbi//lib/rbi/type.rb#122 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # 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 + # source://rbi//lib/rbi/type_visitor.rb#12 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + private + + # source://rbi//lib/rbi/type_visitor.rb#58 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/type_visitor.rb#61 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/type_visitor.rb#64 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/type_visitor.rb#67 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#70 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/type_visitor.rb#73 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/type_visitor.rb#76 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/type_visitor.rb#79 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/type_visitor.rb#82 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/type_visitor.rb#88 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/type_visitor.rb#91 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/type_visitor.rb#94 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/type_visitor.rb#100 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/type_visitor.rb#85 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#103 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/type_visitor.rb#106 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/type_visitor.rb#109 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/type_visitor.rb#97 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end +end + +# source://rbi//lib/rbi/type_visitor.rb#9 +class RBI::Type::Visitor::Error < ::RBI::Error; end + +# `void`. +# +# source://rbi//lib/rbi/type.rb#133 +class RBI::Type::Void < ::RBI::Type + # source://rbi//lib/rbi/type.rb#137 + sig { override.params(other: ::BasicObject).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/type.rb#142 + sig { override.returns(::String) } + def to_rbi; end +end + +# source://rbi//lib/rbi/model.rb#1400 +class RBI::TypeMember < ::RBI::NodeWithComments + include ::RBI::Indexable + + # source://rbi//lib/rbi/model.rb#1415 + sig do + params( + name: ::String, + value: ::String, + loc: T.nilable(::RBI::Loc), + comments: T::Array[::RBI::Comment], + block: T.nilable(T.proc.params(node: ::RBI::TypeMember).void) + ).void + end + def initialize(name, value, loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end + + # source://rbi//lib/rbi/model.rb#1423 + sig { returns(::String) } + def fully_qualified_name; end + + # source://rbi//lib/rbi/index.rb#183 + sig { override.returns(T::Array[::String]) } + def index_ids; end + + # source://rbi//lib/rbi/model.rb#1404 + sig { returns(::String) } + def name; end + + # source://rbi//lib/rbi/model.rb#1430 + sig { override.returns(::String) } + def to_s; end + + # @return [String] + # + # source://rbi//lib/rbi/model.rb#1404 + def value; end +end + +# source://rbi//lib/rbi/rbs_printer.rb#787 +class RBI::TypePrinter + # source://rbi//lib/rbi/rbs_printer.rb#794 + sig { void } + def initialize; end + + # source://rbi//lib/rbi/rbs_printer.rb#791 + sig { returns(::String) } + def string; end + + # source://rbi//lib/rbi/rbs_printer.rb#799 + sig { params(node: ::RBI::Type).void } + def visit(node); end + + # source://rbi//lib/rbi/rbs_printer.rb#907 + sig { params(type: ::RBI::Type::All).void } + def visit_all(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#917 + sig { params(type: ::RBI::Type::Any).void } + def visit_any(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#864 + sig { params(type: ::RBI::Type::Anything).void } + def visit_anything(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#889 + sig { params(type: ::RBI::Type::AttachedClass).void } + def visit_attached_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#848 + sig { params(type: ::RBI::Type::Boolean).void } + def visit_boolean(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#969 + sig { params(type: ::RBI::Type::Class).void } + def visit_class(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#900 + sig { params(type: ::RBI::Type::ClassOf).void } + def visit_class_of(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#853 + sig { params(type: ::RBI::Type::Generic).void } + def visit_generic(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#894 + sig { params(type: ::RBI::Type::Nilable).void } + def visit_nilable(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#874 + sig { params(type: ::RBI::Type::NoReturn).void } + def visit_no_return(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#948 + sig { params(type: ::RBI::Type::Proc).void } + def visit_proc(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#884 + sig { params(type: ::RBI::Type::SelfType).void } + def visit_self_type(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#937 + sig { params(type: ::RBI::Type::Shape).void } + def visit_shape(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#843 + sig { params(type: ::RBI::Type::Simple).void } + def visit_simple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#927 + sig { params(type: ::RBI::Type::Tuple).void } + def visit_tuple(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#964 + sig { params(type: ::RBI::Type::TypeParameter).void } + def visit_type_parameter(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#879 + sig { params(type: ::RBI::Type::Untyped).void } + def visit_untyped(type); end + + # source://rbi//lib/rbi/rbs_printer.rb#869 + sig { params(type: ::RBI::Type::Void).void } + def visit_void(type); end + + private + + # source://rbi//lib/rbi/rbs_printer.rb#978 + 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 + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#10 + sig { params(node: ::RBI::Node).void } + def initialize(node); end + + # source://rbi//lib/rbi/rewriters/attr_to_methods.rb#7 + sig { returns(::RBI::Node) } + def node; end +end + +# source://rbi//lib/rbi/parser.rb#20 +class RBI::UnexpectedParserError < ::RBI::Error + # source://rbi//lib/rbi/parser.rb#27 + sig { params(parent_exception: ::Exception, last_location: ::RBI::Loc).void } + def initialize(parent_exception, last_location); end + + # source://rbi//lib/rbi/parser.rb#24 + sig { returns(::RBI::Loc) } + def last_location; end + + # source://rbi//lib/rbi/parser.rb#34 + sig { params(io: T.any(::IO, ::StringIO)).void } + def print_debug(io: T.unsafe(nil)); end +end + +# source://rbi//lib/rbi/version.rb#5 +RBI::VERSION = T.let(T.unsafe(nil), String) + +# Visibility +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://rbi//lib/rbi/model.rb#916 +class RBI::Visibility < ::RBI::NodeWithComments + abstract! + + # source://rbi//lib/rbi/model.rb#926 + sig { params(visibility: ::Symbol, loc: T.nilable(::RBI::Loc), comments: T::Array[::RBI::Comment]).void } + def initialize(visibility, loc: T.unsafe(nil), comments: T.unsafe(nil)); end + + # source://rbi//lib/rbi/model.rb#932 + sig { params(other: T.nilable(::Object)).returns(T::Boolean) } + def ==(other); end + + # source://rbi//lib/rbi/model.rb#949 + sig { returns(T::Boolean) } + def private?; end + + # source://rbi//lib/rbi/model.rb#944 + sig { returns(T::Boolean) } + def protected?; end + + # source://rbi//lib/rbi/model.rb#939 + sig { returns(T::Boolean) } + def public?; end + + # source://rbi//lib/rbi/model.rb#923 + sig { returns(::Symbol) } + def visibility; end +end + +# source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#52 +class RBI::VisibilityGroup < ::RBI::Tree + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#59 + sig { params(visibility: ::RBI::Visibility).void } + def initialize(visibility); end + + # source://rbi//lib/rbi/rewriters/nest_non_public_members.rb#56 + 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! + + # source://rbi//lib/rbi/visitor.rb#14 + sig { params(node: T.nilable(::RBI::Node)).void } + def visit(node); end + + # source://rbi//lib/rbi/visitor.rb#108 + sig { params(nodes: T::Array[::RBI::Node]).void } + def visit_all(nodes); end + + # source://rbi//lib/rbi/visitor.rb#113 + sig { params(file: ::RBI::File).void } + def visit_file(file); end + + private + + # source://rbi//lib/rbi/visitor.rb#195 + sig { params(node: ::RBI::Arg).void } + def visit_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#144 + sig { params(node: ::RBI::AttrAccessor).void } + def visit_attr_accessor(node); end + + # source://rbi//lib/rbi/visitor.rb#147 + sig { params(node: ::RBI::AttrReader).void } + def visit_attr_reader(node); end + + # source://rbi//lib/rbi/visitor.rb#150 + sig { params(node: ::RBI::AttrWriter).void } + def visit_attr_writer(node); end + + # source://rbi//lib/rbi/visitor.rb#123 + sig { params(node: ::RBI::BlankLine).void } + def visit_blank_line(node); end + + # source://rbi//lib/rbi/visitor.rb#174 + sig { params(node: ::RBI::BlockParam).void } + def visit_block_param(node); end + + # source://rbi//lib/rbi/visitor.rb#129 + sig { params(node: ::RBI::Class).void } + def visit_class(node); end + + # source://rbi//lib/rbi/visitor.rb#120 + sig { params(node: ::RBI::Comment).void } + def visit_comment(node); end + + # source://rbi//lib/rbi/visitor.rb#240 + sig { params(node: ::RBI::ConflictTree).void } + def visit_conflict_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#141 + sig { params(node: ::RBI::Const).void } + def visit_const(node); end + + # source://rbi//lib/rbi/visitor.rb#180 + sig { params(node: ::RBI::Extend).void } + def visit_extend(node); end + + # source://rbi//lib/rbi/visitor.rb#234 + sig { params(node: ::RBI::Group).void } + def visit_group(node); end + + # source://rbi//lib/rbi/visitor.rb#222 + sig { params(node: ::RBI::Helper).void } + def visit_helper(node); end + + # source://rbi//lib/rbi/visitor.rb#177 + sig { params(node: ::RBI::Include).void } + def visit_include(node); end + + # source://rbi//lib/rbi/visitor.rb#198 + sig { params(node: ::RBI::KwArg).void } + def visit_kw_arg(node); end + + # source://rbi//lib/rbi/visitor.rb#168 + sig { params(node: ::RBI::KwOptParam).void } + def visit_kw_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#165 + sig { params(node: ::RBI::KwParam).void } + def visit_kw_param(node); end + + # source://rbi//lib/rbi/visitor.rb#171 + sig { params(node: ::RBI::KwRestParam).void } + def visit_kw_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#153 + sig { params(node: ::RBI::Method).void } + def visit_method(node); end + + # source://rbi//lib/rbi/visitor.rb#228 + sig { params(node: ::RBI::MixesInClassMethods).void } + def visit_mixes_in_class_methods(node); end + + # source://rbi//lib/rbi/visitor.rb#126 + sig { params(node: ::RBI::Module).void } + def visit_module(node); end + + # source://rbi//lib/rbi/visitor.rb#159 + sig { params(node: ::RBI::OptParam).void } + def visit_opt_param(node); end + + # source://rbi//lib/rbi/visitor.rb#189 + sig { params(node: ::RBI::Private).void } + def visit_private(node); end + + # source://rbi//lib/rbi/visitor.rb#186 + sig { params(node: ::RBI::Protected).void } + def visit_protected(node); end + + # source://rbi//lib/rbi/visitor.rb#183 + sig { params(node: ::RBI::Public).void } + def visit_public(node); end + + # source://rbi//lib/rbi/visitor.rb#156 + sig { params(node: ::RBI::ReqParam).void } + def visit_req_param(node); end + + # source://rbi//lib/rbi/visitor.rb#231 + sig { params(node: ::RBI::RequiresAncestor).void } + def visit_requires_ancestor(node); end + + # source://rbi//lib/rbi/visitor.rb#162 + sig { params(node: ::RBI::RestParam).void } + def visit_rest_param(node); end + + # source://rbi//lib/rbi/visitor.rb#243 + sig { params(node: ::RBI::ScopeConflict).void } + def visit_scope_conflict(node); end + + # source://rbi//lib/rbi/visitor.rb#192 + sig { params(node: ::RBI::Send).void } + def visit_send(node); end + + # source://rbi//lib/rbi/visitor.rb#201 + sig { params(node: ::RBI::Sig).void } + def visit_sig(node); end + + # source://rbi//lib/rbi/visitor.rb#204 + sig { params(node: ::RBI::SigParam).void } + def visit_sig_param(node); end + + # source://rbi//lib/rbi/visitor.rb#132 + sig { params(node: ::RBI::SingletonClass).void } + def visit_singleton_class(node); end + + # source://rbi//lib/rbi/visitor.rb#135 + sig { params(node: ::RBI::Struct).void } + def visit_struct(node); end + + # source://rbi//lib/rbi/visitor.rb#216 + sig { params(node: ::RBI::TEnum).void } + def visit_tenum(node); end + + # source://rbi//lib/rbi/visitor.rb#219 + sig { params(node: ::RBI::TEnumBlock).void } + def visit_tenum_block(node); end + + # source://rbi//lib/rbi/visitor.rb#138 + sig { params(node: ::RBI::Tree).void } + def visit_tree(node); end + + # source://rbi//lib/rbi/visitor.rb#207 + sig { params(node: ::RBI::TStruct).void } + def visit_tstruct(node); end + + # source://rbi//lib/rbi/visitor.rb#210 + sig { params(node: ::RBI::TStructConst).void } + def visit_tstruct_const(node); end + + # source://rbi//lib/rbi/visitor.rb#213 + sig { params(node: ::RBI::TStructProp).void } + def visit_tstruct_prop(node); end + + # source://rbi//lib/rbi/visitor.rb#225 + sig { params(node: ::RBI::TypeMember).void } + def visit_type_member(node); end + + # source://rbi//lib/rbi/visitor.rb#237 + 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/rdoc@6.6.2.rbi b/sorbet/rbi/gems/rdoc@6.7.0.rbi similarity index 71% rename from sorbet/rbi/gems/rdoc@6.6.2.rbi rename to sorbet/rbi/gems/rdoc@6.7.0.rbi index 3ca3de9e7..ad2e9bf7b 100644 --- a/sorbet/rbi/gems/rdoc@6.6.2.rbi +++ b/sorbet/rbi/gems/rdoc@6.7.0.rbi @@ -4,6 +4,7 @@ # 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 @@ -64,9 +65,11 @@ end # * 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#58 module RDoc class << self - # Seaches and returns the directory for settings. + # Searches and returns the directory for settings. # # 1. $HOME/.rdoc directory, if it exists. # 2. The +rdoc+ directory under the path specified by the @@ -76,12 +79,12 @@ module RDoc # Other than the home directory, the containing directory will be # created automatically. # - # source://rdoc//rdoc.rb#134 + # source://rdoc//lib/rdoc.rb#134 def home; end # Loads the best available YAML library. # - # source://rdoc//rdoc.rb#107 + # source://rdoc//lib/rdoc.rb#107 def load_yaml; end end end @@ -91,93 +94,97 @@ end # -- # TODO implement Alias as a proxy to a method/attribute, inheriting from # MethodAttr +# +# source://rdoc//lib/rdoc/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//rdoc/alias.rb#37 + # source://rdoc//lib/rdoc/alias.rb#37 def initialize(text, old_name, new_name, comment, singleton = T.unsafe(nil)); end # Order by #singleton then #new_name # - # source://rdoc//rdoc/alias.rb#50 + # source://rdoc//lib/rdoc/alias.rb#50 def <=>(other); end # HTML fragment reference for this alias # - # source://rdoc//rdoc/alias.rb#57 + # source://rdoc//lib/rdoc/alias.rb#57 def aref; end # Full old name including namespace # - # source://rdoc//rdoc/alias.rb#65 + # source://rdoc//lib/rdoc/alias.rb#65 def full_old_name; end # HTML id-friendly version of +#new_name+. # - # source://rdoc//rdoc/alias.rb#72 + # source://rdoc//lib/rdoc/alias.rb#72 def html_name; end - # source://rdoc//rdoc/alias.rb#76 + # source://rdoc//lib/rdoc/alias.rb#76 def inspect; end # Aliased method's name # - # source://rdoc//rdoc/alias.rb#14 + # source://rdoc//lib/rdoc/alias.rb#14 def name; end # '::' for the alias of a singleton method/attribute, '#' for instance-level. # - # source://rdoc//rdoc/alias.rb#87 + # source://rdoc//lib/rdoc/alias.rb#87 def name_prefix; end # Aliased method's name # - # source://rdoc//rdoc/alias.rb#14 + # source://rdoc//lib/rdoc/alias.rb#14 def new_name; end # Aliasee method's name # - # source://rdoc//rdoc/alias.rb#21 + # source://rdoc//lib/rdoc/alias.rb#21 def old_name; end # New name with prefix '::' or '#'. # - # source://rdoc//rdoc/alias.rb#101 + # source://rdoc//lib/rdoc/alias.rb#101 def pretty_name; end # New name with prefix '::' or '#'. # - # source://rdoc//rdoc/alias.rb#101 + # source://rdoc//lib/rdoc/alias.rb#101 def pretty_new_name; end # Old name with prefix '::' or '#'. # - # source://rdoc//rdoc/alias.rb#94 + # source://rdoc//lib/rdoc/alias.rb#94 def pretty_old_name; end # Is this an alias declared in a singleton context? # - # source://rdoc//rdoc/alias.rb#26 + # source://rdoc//lib/rdoc/alias.rb#26 def singleton; end # Is this an alias declared in a singleton context? # - # source://rdoc//rdoc/alias.rb#26 + # source://rdoc//lib/rdoc/alias.rb#26 def singleton=(_arg0); end # Source file token stream # - # source://rdoc//rdoc/alias.rb#31 + # source://rdoc//lib/rdoc/alias.rb#31 def text; end - # source://rdoc//rdoc/alias.rb#107 + # source://rdoc//lib/rdoc/alias.rb#107 def to_s; end end # AnyMethod is the base class for objects representing methods +# +# source://rdoc//lib/rdoc/any_method.rb#5 class RDoc::AnyMethod < ::RDoc::MethodAttr include ::RDoc::TokenStream @@ -185,39 +192,39 @@ class RDoc::AnyMethod < ::RDoc::MethodAttr # # @return [AnyMethod] a new instance of AnyMethod # - # source://rdoc//rdoc/any_method.rb#46 + # source://rdoc//lib/rdoc/any_method.rb#46 def initialize(text, name); end # Adds +an_alias+ as an alias for this method in +context+. # - # source://rdoc//rdoc/any_method.rb#59 + # source://rdoc//lib/rdoc/any_method.rb#59 def add_alias(an_alias, context = T.unsafe(nil)); end # Prefix for +aref+ is 'method'. # - # source://rdoc//rdoc/any_method.rb#76 + # source://rdoc//lib/rdoc/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//rdoc/any_method.rb#85 + # source://rdoc//lib/rdoc/any_method.rb#85 def arglists; end # The C function that implements this method (if it was defined in a C file) # - # source://rdoc//rdoc/any_method.rb#27 + # source://rdoc//lib/rdoc/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//rdoc/any_method.rb#27 + # source://rdoc//lib/rdoc/any_method.rb#27 def c_function=(_arg0); end # Different ways to call this method # - # source://rdoc//rdoc/any_method.rb#96 + # source://rdoc//lib/rdoc/any_method.rb#96 def call_seq; end # Sets the different ways you can call this method. If an empty +call_seq+ @@ -225,45 +232,45 @@ class RDoc::AnyMethod < ::RDoc::MethodAttr # # See also #param_seq # - # source://rdoc//rdoc/any_method.rb#112 + # source://rdoc//lib/rdoc/any_method.rb#112 def call_seq=(call_seq); end # If true this method uses +super+ to call a superclass version # - # source://rdoc//rdoc/any_method.rb#39 + # source://rdoc//lib/rdoc/any_method.rb#39 def calls_super; end # If true this method uses +super+ to call a superclass version # - # source://rdoc//rdoc/any_method.rb#39 + # source://rdoc//lib/rdoc/any_method.rb#39 def calls_super=(_arg0); end # Don't rename \#initialize to \::new # - # source://rdoc//rdoc/any_method.rb#22 + # source://rdoc//lib/rdoc/any_method.rb#22 def dont_rename_initialize; end # Don't rename \#initialize to \::new # - # source://rdoc//rdoc/any_method.rb#22 + # source://rdoc//lib/rdoc/any_method.rb#22 def dont_rename_initialize=(_arg0); end # Whether the method has a call-seq. # # @return [Boolean] # - # source://rdoc//rdoc/any_method.rb#121 + # source://rdoc//lib/rdoc/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//rdoc/any_method.rb#129 + # source://rdoc//lib/rdoc/any_method.rb#129 def is_alias_for; end # Dumps this AnyMethod for use by ri. See also #marshal_load # - # source://rdoc//rdoc/any_method.rb#147 + # source://rdoc//lib/rdoc/any_method.rb#147 def marshal_dump; end # Loads this AnyMethod from +array+. For a loaded AnyMethod the following @@ -272,46 +279,46 @@ class RDoc::AnyMethod < ::RDoc::MethodAttr # * #full_name # * #parent_name # - # source://rdoc//rdoc/any_method.rb#184 + # source://rdoc//lib/rdoc/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//rdoc/any_method.rb#233 + # source://rdoc//lib/rdoc/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//rdoc/any_method.rb#246 + # source://rdoc//lib/rdoc/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//rdoc/any_method.rb#278 + # source://rdoc//lib/rdoc/any_method.rb#278 def param_seq; end # Parameters for this method # - # source://rdoc//rdoc/any_method.rb#34 + # source://rdoc//lib/rdoc/any_method.rb#34 def params; end # Parameters for this method # - # source://rdoc//rdoc/any_method.rb#34 + # source://rdoc//lib/rdoc/any_method.rb#34 def params=(_arg0); end # The section title of the method (if defined in a C file via +:category:+) # - # source://rdoc//rdoc/any_method.rb#30 + # source://rdoc//lib/rdoc/any_method.rb#30 def section_title; end # The section title of the method (if defined in a C file via +:category:+) # - # source://rdoc//rdoc/any_method.rb#30 + # source://rdoc//lib/rdoc/any_method.rb#30 def section_title=(_arg0); end # Whether to skip the method description, true for methods that have @@ -319,24 +326,24 @@ class RDoc::AnyMethod < ::RDoc::MethodAttr # # @return [Boolean] # - # source://rdoc//rdoc/any_method.rb#310 + # source://rdoc//lib/rdoc/any_method.rb#310 def skip_description?; end # Sets the store for this method and its referenced code objects. # - # source://rdoc//rdoc/any_method.rb#317 + # source://rdoc//lib/rdoc/any_method.rb#317 def store=(store); end # For methods that +super+, find the superclass method that would be called. # - # source://rdoc//rdoc/any_method.rb#326 + # source://rdoc//lib/rdoc/any_method.rb#326 def superclass_method; end protected # call_seq without deduplication and alias lookup. # - # source://rdoc//rdoc/any_method.rb#345 + # source://rdoc//lib/rdoc/any_method.rb#345 def _call_seq; end private @@ -344,34 +351,36 @@ class RDoc::AnyMethod < ::RDoc::MethodAttr # call_seq with alias examples information removed, if this # method is an alias method. # - # source://rdoc//rdoc/any_method.rb#355 + # source://rdoc//lib/rdoc/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/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//rdoc/attr.rb#25 + # source://rdoc//lib/rdoc/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//rdoc/attr.rb#36 + # source://rdoc//lib/rdoc/attr.rb#36 def ==(other); end # Add +an_alias+ as an attribute in +context+. # - # source://rdoc//rdoc/attr.rb#46 + # source://rdoc//lib/rdoc/attr.rb#46 def add_alias(an_alias, context); end # The #aref prefix for attributes # - # source://rdoc//rdoc/attr.rb#61 + # source://rdoc//lib/rdoc/attr.rb#61 def aref_prefix; end # Attributes never call super. See RDoc::AnyMethod#calls_super @@ -379,20 +388,20 @@ class RDoc::Attr < ::RDoc::MethodAttr # An RDoc::Attr can show up in the method list in some situations (see # Gem::ConfigFile) # - # source://rdoc//rdoc/attr.rb#71 + # source://rdoc//lib/rdoc/attr.rb#71 def calls_super; end # Returns attr_reader, attr_writer or attr_accessor as appropriate. # - # source://rdoc//rdoc/attr.rb#78 + # source://rdoc//lib/rdoc/attr.rb#78 def definition; end - # source://rdoc//rdoc/attr.rb#86 + # source://rdoc//lib/rdoc/attr.rb#86 def inspect; end # Dumps this Attr for use by ri. See also #marshal_load # - # source://rdoc//rdoc/attr.rb#102 + # source://rdoc//lib/rdoc/attr.rb#102 def marshal_dump; end # Loads this Attr from +array+. For a loaded Attr the following @@ -401,23 +410,23 @@ class RDoc::Attr < ::RDoc::MethodAttr # * #full_name # * #parent_name # - # source://rdoc//rdoc/attr.rb#124 + # source://rdoc//lib/rdoc/attr.rb#124 def marshal_load(array); end - # source://rdoc//rdoc/attr.rb#151 + # source://rdoc//lib/rdoc/attr.rb#151 def pretty_print(q); end # Is the attribute readable ('R'), writable ('W') or both ('RW')? # - # source://rdoc//rdoc/attr.rb#19 + # source://rdoc//lib/rdoc/attr.rb#19 def rw; end # Is the attribute readable ('R'), writable ('W') or both ('RW')? # - # source://rdoc//rdoc/attr.rb#19 + # source://rdoc//lib/rdoc/attr.rb#19 def rw=(_arg0); end - # source://rdoc//rdoc/attr.rb#162 + # source://rdoc//lib/rdoc/attr.rb#162 def to_s; end # Attributes do not have token streams. @@ -425,12 +434,14 @@ class RDoc::Attr < ::RDoc::MethodAttr # An RDoc::Attr can show up in the method list in some situations (see # Gem::ConfigFile) # - # source://rdoc//rdoc/attr.rb#172 + # source://rdoc//lib/rdoc/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/class_module.rb#6 class RDoc::ClassModule < ::RDoc::Context # Creates a new ClassModule with +name+ with optional +superclass+ # @@ -438,17 +449,17 @@ class RDoc::ClassModule < ::RDoc::Context # # @return [ClassModule] a new instance of ClassModule # - # source://rdoc//rdoc/class_module.rb#111 + # source://rdoc//lib/rdoc/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//rdoc/class_module.rb#127 + # source://rdoc//lib/rdoc/class_module.rb#127 def add_comment(comment, location); end - # source://rdoc//rdoc/class_module.rb#148 + # source://rdoc//lib/rdoc/class_module.rb#148 def add_things(my_things, other_things); end # Ancestors list for this ClassModule: the list of included modules @@ -462,23 +473,23 @@ class RDoc::ClassModule < ::RDoc::Context # which is the order suitable for searching methods/attributes # in the ancestors. The superclass, if any, comes last. # - # source://rdoc//rdoc/class_module.rb#171 + # source://rdoc//lib/rdoc/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//rdoc/class_module.rb#183 + # source://rdoc//lib/rdoc/class_module.rb#183 def aref; end # @raise [NotImplementedError] # - # source://rdoc//rdoc/class_module.rb#175 + # source://rdoc//lib/rdoc/class_module.rb#175 def aref_prefix; end # Clears the comment. Used by the Ruby parser. # - # source://rdoc//rdoc/class_module.rb#195 + # source://rdoc//lib/rdoc/class_module.rb#195 def clear_comment; end # This method is deprecated, use #add_comment instead. @@ -486,45 +497,45 @@ class RDoc::ClassModule < ::RDoc::Context # Appends +comment+ to the current comment, but separated by a rule. Works # more like +=. # - # source://rdoc//rdoc/class_module.rb#205 + # source://rdoc//lib/rdoc/class_module.rb#205 def comment=(comment); end # Comment and the location it came from. Use #add_comment to add comments # - # source://rdoc//rdoc/class_module.rb#35 + # source://rdoc//lib/rdoc/class_module.rb#35 def comment_location; end # Comment and the location it came from. Use #add_comment to add comments # - # source://rdoc//rdoc/class_module.rb#35 + # source://rdoc//lib/rdoc/class_module.rb#35 def comment_location=(_arg0); end # Prepares this ClassModule for use by a generator. # # See RDoc::Store#complete # - # source://rdoc//rdoc/class_module.rb#223 + # source://rdoc//lib/rdoc/class_module.rb#223 def complete(min_visibility); end # Constants that are aliases for this class or module # - # source://rdoc//rdoc/class_module.rb#30 + # source://rdoc//lib/rdoc/class_module.rb#30 def constant_aliases; end # Constants that are aliases for this class or module # - # source://rdoc//rdoc/class_module.rb#30 + # source://rdoc//lib/rdoc/class_module.rb#30 def constant_aliases=(_arg0); end # Handy wrapper for marking up this class or module's comment # - # source://rdoc//rdoc/generator/markup.rb#131 + # source://rdoc//lib/rdoc/generator/markup.rb#131 def description; end - # source://rdoc//rdoc/class_module.rb#37 + # source://rdoc//lib/rdoc/class_module.rb#37 def diagram; end - # source://rdoc//rdoc/class_module.rb#37 + # source://rdoc//lib/rdoc/class_module.rb#37 def diagram=(_arg0); end # Ancestors list for this ClassModule: the list of included modules @@ -540,12 +551,12 @@ class RDoc::ClassModule < ::RDoc::Context # # Ancestors of this class or module only # - # source://rdoc//rdoc/class_module.rb#171 + # source://rdoc//lib/rdoc/class_module.rb#171 def direct_ancestors; end # Does this ClassModule or any of its methods have document_self set? # - # source://rdoc//rdoc/class_module.rb#233 + # source://rdoc//lib/rdoc/class_module.rb#233 def document_self_or_methods; end # Does this class or module have a comment with content or is @@ -553,53 +564,53 @@ class RDoc::ClassModule < ::RDoc::Context # # @return [Boolean] # - # source://rdoc//rdoc/class_module.rb#241 + # source://rdoc//lib/rdoc/class_module.rb#241 def documented?; end # Iterates the ancestors of this class or module for which an # RDoc::ClassModule exists. # - # source://rdoc//rdoc/class_module.rb#251 + # source://rdoc//lib/rdoc/class_module.rb#251 def each_ancestor; end # Looks for a symbol in the #ancestors. See Context#find_local_symbol. # - # source://rdoc//rdoc/class_module.rb#264 + # source://rdoc//lib/rdoc/class_module.rb#264 def find_ancestor_local_symbol(symbol); end # Finds a class or module with +name+ in this namespace or its descendants # - # source://rdoc//rdoc/class_module.rb#276 + # source://rdoc//lib/rdoc/class_module.rb#276 def find_class_named(name); end # Return the fully qualified name of this class or module # - # source://rdoc//rdoc/class_module.rb#289 + # source://rdoc//lib/rdoc/class_module.rb#289 def full_name; end # Class or module this constant is an alias for # - # source://rdoc//rdoc/class_module.rb#42 + # source://rdoc//lib/rdoc/class_module.rb#42 def is_alias_for; end # Class or module this constant is an alias for # - # source://rdoc//rdoc/class_module.rb#42 + # source://rdoc//lib/rdoc/class_module.rb#42 def is_alias_for=(_arg0); end # TODO: filter included items by #display? # - # source://rdoc//rdoc/class_module.rb#300 + # source://rdoc//lib/rdoc/class_module.rb#300 def marshal_dump; end - # source://rdoc//rdoc/class_module.rb#346 + # source://rdoc//lib/rdoc/class_module.rb#346 def marshal_load(array); end # Merges +class_module+ into this ClassModule. # # The data in +class_module+ is preferred over the receiver. # - # source://rdoc//rdoc/class_module.rb#435 + # source://rdoc//lib/rdoc/class_module.rb#435 def merge(class_module); end # Merges collection +mine+ with +other+ preferring other. +other_files+ is @@ -616,52 +627,52 @@ class RDoc::ClassModule < ::RDoc::Context # end # end # - # source://rdoc//rdoc/class_module.rb#519 + # source://rdoc//lib/rdoc/class_module.rb#519 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//rdoc/class_module.rb#531 + # source://rdoc//lib/rdoc/class_module.rb#531 def merge_sections(cm); end # Does this object represent a module? # # @return [Boolean] # - # source://rdoc//rdoc/class_module.rb#570 + # source://rdoc//lib/rdoc/class_module.rb#570 def module?; end # Allows overriding the initial name. # # Used for modules and classes that are constant aliases. # - # source://rdoc//rdoc/class_module.rb#579 + # source://rdoc//lib/rdoc/class_module.rb#579 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//rdoc/class_module.rb#622 + # source://rdoc//lib/rdoc/class_module.rb#622 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//rdoc/class_module.rb#631 + # source://rdoc//lib/rdoc/class_module.rb#631 def non_aliases; end # Parses +comment_location+ into an RDoc::Markup::Document composed of # multiple RDoc::Markup::Documents with their file set. # - # source://rdoc//rdoc/class_module.rb#587 + # source://rdoc//lib/rdoc/class_module.rb#587 def parse(comment_location); end # Path to this class or module for use with HTML generator output. # - # source://rdoc//rdoc/class_module.rb#613 + # source://rdoc//lib/rdoc/class_module.rb#613 def path; end # Updates the child modules or classes of class/module +parent+ by @@ -671,41 +682,41 @@ class RDoc::ClassModule < ::RDoc::Context # parent.classes_hash and +all_hash+ is ::all_modules_hash or # ::all_classes_hash. # - # source://rdoc//rdoc/class_module.rb#643 + # source://rdoc//lib/rdoc/class_module.rb#643 def remove_nodoc_children; end - # source://rdoc//rdoc/class_module.rb#657 + # source://rdoc//lib/rdoc/class_module.rb#657 def remove_things(my_things, other_files); end # Search record used by RDoc::Generator::JsonIndex # - # source://rdoc//rdoc/class_module.rb#672 + # source://rdoc//lib/rdoc/class_module.rb#672 def search_record; end # Sets the store for this class or module and its contained code objects. # - # source://rdoc//rdoc/class_module.rb#687 + # source://rdoc//lib/rdoc/class_module.rb#687 def store=(store); end # Get the superclass of this class. Attempts to retrieve the superclass # object, returns the name if it is not known. # - # source://rdoc//rdoc/class_module.rb#701 + # source://rdoc//lib/rdoc/class_module.rb#701 def superclass; end # Set the superclass of this class to +superclass+ # # @raise [NoMethodError] # - # source://rdoc//rdoc/class_module.rb#708 + # source://rdoc//lib/rdoc/class_module.rb#708 def superclass=(superclass); end - # source://rdoc//rdoc/class_module.rb#713 + # source://rdoc//lib/rdoc/class_module.rb#713 def to_s; end # 'module' or 'class' # - # source://rdoc//rdoc/class_module.rb#724 + # source://rdoc//lib/rdoc/class_module.rb#724 def type; end # Updates the child modules & classes by replacing the ones that are @@ -722,7 +733,7 @@ class RDoc::ClassModule < ::RDoc::Context # the aliased modules are included in the constants of the class/module, # that are listed separately. # - # source://rdoc//rdoc/class_module.rb#743 + # source://rdoc//lib/rdoc/class_module.rb#743 def update_aliases; end # Deletes from #extends those whose module has been removed from the @@ -730,7 +741,7 @@ class RDoc::ClassModule < ::RDoc::Context # -- # FIXME: like update_includes, extends are not reliably removed # - # source://rdoc//rdoc/class_module.rb#791 + # source://rdoc//lib/rdoc/class_module.rb#791 def update_extends; end # Deletes from #includes those whose module has been removed from the @@ -738,7 +749,7 @@ class RDoc::ClassModule < ::RDoc::Context # -- # FIXME: includes are not reliably removed, see _possible_bug test case # - # source://rdoc//rdoc/class_module.rb#776 + # source://rdoc//lib/rdoc/class_module.rb#776 def update_includes; end class << self @@ -747,7 +758,7 @@ class RDoc::ClassModule < ::RDoc::Context # -- # TODO move to RDoc::NormalClass (I think) # - # source://rdoc//rdoc/class_module.rb#50 + # source://rdoc//lib/rdoc/class_module.rb#50 def from_module(class_type, mod); end end end @@ -776,6 +787,8 @@ end # * RDoc::Mixin # * RDoc::Require # * RDoc::Include +# +# source://rdoc//lib/rdoc/code_object.rb#28 class RDoc::CodeObject include ::RDoc::Text include ::RDoc::Generator::Markup @@ -784,17 +797,17 @@ class RDoc::CodeObject # # @return [CodeObject] a new instance of CodeObject # - # source://rdoc//rdoc/code_object.rb#102 + # source://rdoc//lib/rdoc/code_object.rb#102 def initialize; end # Our comment # - # source://rdoc//rdoc/code_object.rb#35 + # source://rdoc//lib/rdoc/code_object.rb#35 def comment; end # Replaces our comment with +comment+, unless it is empty. # - # source://rdoc//rdoc/code_object.rb#135 + # source://rdoc//lib/rdoc/code_object.rb#135 def comment=(comment); end # Should this CodeObject be displayed in output? @@ -807,41 +820,41 @@ class RDoc::CodeObject # # @return [Boolean] # - # source://rdoc//rdoc/code_object.rb#163 + # source://rdoc//lib/rdoc/code_object.rb#163 def display?; end # Do we document our children? # - # source://rdoc//rdoc/code_object.rb#40 + # 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//rdoc/code_object.rb#172 + # source://rdoc//lib/rdoc/code_object.rb#172 def document_children=(document_children); end # Do we document ourselves? # - # source://rdoc//rdoc/code_object.rb#45 + # 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//rdoc/code_object.rb#183 + # source://rdoc//lib/rdoc/code_object.rb#183 def document_self=(document_self); end # Does this object have a comment with content or is #received_nodoc true? # # @return [Boolean] # - # source://rdoc//rdoc/code_object.rb#194 + # source://rdoc//lib/rdoc/code_object.rb#194 def documented?; end # Are we done documenting (ie, did we come across a :enddoc:)? # - # source://rdoc//rdoc/code_object.rb#50 + # source://rdoc//lib/rdoc/code_object.rb#50 def done_documenting; end # Turns documentation on/off, and turns on/off #document_self @@ -851,30 +864,30 @@ class RDoc::CodeObject # the object will refuse to turn #document_self or # will have no effect in the current file. # - # source://rdoc//rdoc/code_object.rb#207 + # source://rdoc//lib/rdoc/code_object.rb#207 def done_documenting=(value); end # Yields each parent of this CodeObject. See also # RDoc::ClassModule#each_ancestor # - # source://rdoc//rdoc/code_object.rb#218 + # source://rdoc//lib/rdoc/code_object.rb#218 def each_parent; end # Which file this code object was defined in # - # source://rdoc//rdoc/code_object.rb#55 + # 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//rdoc/code_object.rb#233 + # source://rdoc//lib/rdoc/code_object.rb#233 def file_name; end # Force documentation of this CodeObject # - # source://rdoc//rdoc/code_object.rb#60 + # source://rdoc//lib/rdoc/code_object.rb#60 def force_documentation; end # Force the documentation of this object unless documentation @@ -882,14 +895,14 @@ class RDoc::CodeObject # -- # HACK untested, was assigning to an ivar # - # source://rdoc//rdoc/code_object.rb#245 + # source://rdoc//lib/rdoc/code_object.rb#245 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//rdoc/code_object.rb#254 + # source://rdoc//lib/rdoc/code_object.rb#254 def full_name=(full_name); end # Use this to ignore a CodeObject and all its children until found again @@ -907,7 +920,7 @@ class RDoc::CodeObject # reopened it should not be displayed. The ignore flag allows this to # occur. # - # source://rdoc//rdoc/code_object.rb#274 + # source://rdoc//lib/rdoc/code_object.rb#274 def ignore; end # Has this class been ignored? @@ -916,27 +929,27 @@ class RDoc::CodeObject # # @return [Boolean] # - # source://rdoc//rdoc/code_object.rb#287 + # source://rdoc//lib/rdoc/code_object.rb#287 def ignored?; end # Initializes state for visibility of this CodeObject and its children. # - # source://rdoc//rdoc/code_object.rb#121 + # source://rdoc//lib/rdoc/code_object.rb#121 def initialize_visibility; end # Line in #file where this CodeObject was defined # - # source://rdoc//rdoc/code_object.rb#65 + # source://rdoc//lib/rdoc/code_object.rb#65 def line; end # Line in #file where this CodeObject was defined # - # source://rdoc//rdoc/code_object.rb#65 + # source://rdoc//lib/rdoc/code_object.rb#65 def line=(_arg0); end # Hash of arbitrary metadata for this CodeObject # - # source://rdoc//rdoc/code_object.rb#70 + # source://rdoc//lib/rdoc/code_object.rb#70 def metadata; end # The options instance from the store this CodeObject is attached to, or a @@ -944,68 +957,68 @@ class RDoc::CodeObject # # This is used by Text#snippet # - # source://rdoc//rdoc/code_object.rb#297 + # source://rdoc//lib/rdoc/code_object.rb#297 def options; end # Our parent CodeObject. The parent may be missing for classes loaded from # legacy RI data stores. # - # source://rdoc//rdoc/code_object.rb#309 + # source://rdoc//lib/rdoc/code_object.rb#309 def parent; end # Sets the parent CodeObject # - # source://rdoc//rdoc/code_object.rb#75 + # source://rdoc//lib/rdoc/code_object.rb#75 def parent=(_arg0); end # File name of our parent # - # source://rdoc//rdoc/code_object.rb#331 + # source://rdoc//lib/rdoc/code_object.rb#331 def parent_file_name; end # Name of our parent # - # source://rdoc//rdoc/code_object.rb#338 + # source://rdoc//lib/rdoc/code_object.rb#338 def parent_name; end - # source://rdoc//rdoc/code_object.rb#80 + # 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//rdoc/code_object.rb#345 + # source://rdoc//lib/rdoc/code_object.rb#345 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//rdoc/code_object.rb#355 + # source://rdoc//lib/rdoc/code_object.rb#355 def section; end # Set the section this CodeObject is in # - # source://rdoc//rdoc/code_object.rb#85 + # 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//rdoc/code_object.rb#365 + # source://rdoc//lib/rdoc/code_object.rb#365 def start_doc; end # Disable capture of documentation # - # source://rdoc//rdoc/code_object.rb#377 + # source://rdoc//lib/rdoc/code_object.rb#377 def stop_doc; end # The RDoc::Store for this object. # - # source://rdoc//rdoc/code_object.rb#90 + # source://rdoc//lib/rdoc/code_object.rb#90 def store; end # Sets the +store+ that contains this CodeObject # - # source://rdoc//rdoc/code_object.rb#387 + # source://rdoc//lib/rdoc/code_object.rb#387 def store=(store); end # Use this to suppress a CodeObject and all its children until the next file @@ -1013,7 +1026,7 @@ class RDoc::CodeObject # documentation will be displayed while an ignored item with documentation # may not be displayed. # - # source://rdoc//rdoc/code_object.rb#404 + # source://rdoc//lib/rdoc/code_object.rb#404 def suppress; end # Has this class been suppressed? @@ -1022,24 +1035,25 @@ class RDoc::CodeObject # # @return [Boolean] # - # source://rdoc//rdoc/code_object.rb#417 + # source://rdoc//lib/rdoc/code_object.rb#417 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//rdoc/code_object.rb#97 + # 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//rdoc/code_object.rb#97 + # 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 @@ -1048,28 +1062,28 @@ class RDoc::Comment # # @return [Comment] a new instance of Comment # - # source://rdoc//rdoc/comment.rb#56 + # source://rdoc//lib/rdoc/comment.rb#56 def initialize(text = T.unsafe(nil), location = T.unsafe(nil), language = T.unsafe(nil)); end - # source://rdoc//rdoc/comment.rb#74 + # 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//rdoc/comment.rb#50 + # 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//rdoc/comment.rb#128 + # source://rdoc//lib/rdoc/comment.rb#128 def empty?; end # HACK dubious # - # source://rdoc//rdoc/comment.rb#135 + # source://rdoc//lib/rdoc/comment.rb#135 def encode!(encoding); end # Look for a 'call-seq' in the comment to override the normal parameter @@ -1087,65 +1101,65 @@ class RDoc::Comment # # ARGF.to_a(limit) -> array # # ARGF.to_a(sep, limit) -> array # - # source://rdoc//rdoc/comment.rb#95 + # 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//rdoc/comment.rb#24 + # source://rdoc//lib/rdoc/comment.rb#24 def file; end # The format of this comment. Defaults to RDoc::Markup # - # source://rdoc//rdoc/comment.rb#19 + # source://rdoc//lib/rdoc/comment.rb#19 def format; end # Sets the format of this comment and resets any parsed document # - # source://rdoc//rdoc/comment.rb#143 + # source://rdoc//lib/rdoc/comment.rb#143 def format=(format); end - # source://rdoc//rdoc/comment.rb#148 + # source://rdoc//lib/rdoc/comment.rb#148 def inspect; end # Line where this Comment was written # - # source://rdoc//rdoc/comment.rb#29 + # source://rdoc//lib/rdoc/comment.rb#29 def line; end # Line where this Comment was written # - # source://rdoc//rdoc/comment.rb#29 + # source://rdoc//lib/rdoc/comment.rb#29 def line=(_arg0); end # The RDoc::TopLevel this comment was found in # - # source://rdoc//rdoc/comment.rb#24 + # source://rdoc//lib/rdoc/comment.rb#24 def location; end # The RDoc::TopLevel this comment was found in # - # source://rdoc//rdoc/comment.rb#24 + # source://rdoc//lib/rdoc/comment.rb#24 def location=(_arg0); end # Normalizes the text. See RDoc::Text#normalize_comment for details # - # source://rdoc//rdoc/comment.rb#157 + # source://rdoc//lib/rdoc/comment.rb#157 def normalize; end # Was this text normalized? # # @return [Boolean] # - # source://rdoc//rdoc/comment.rb#171 + # 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//rdoc/comment.rb#179 + # source://rdoc//lib/rdoc/comment.rb#179 def parse; end # Removes private sections from this comment. Private sections are flush to @@ -1160,12 +1174,12 @@ class RDoc::Comment # * public # */ # - # source://rdoc//rdoc/comment.rb#200 + # source://rdoc//lib/rdoc/comment.rb#200 def remove_private; end # The text for this comment # - # source://rdoc//rdoc/comment.rb#39 + # source://rdoc//lib/rdoc/comment.rb#39 def text; end # Replaces this comment's text with +text+ and resets the parsed document. @@ -1174,21 +1188,21 @@ class RDoc::Comment # # @raise [RDoc::Error] # - # source://rdoc//rdoc/comment.rb#214 + # source://rdoc//lib/rdoc/comment.rb#214 def text=(text); end # The text for this comment # # Alias for text # - # source://rdoc//rdoc/comment.rb#39 + # source://rdoc//lib/rdoc/comment.rb#39 def to_s; end # Returns true if this comment is in TomDoc format. # # @return [Boolean] # - # source://rdoc//rdoc/comment.rb#225 + # source://rdoc//lib/rdoc/comment.rb#225 def tomdoc?; end private @@ -1196,27 +1210,29 @@ class RDoc::Comment # -- # TODO deep copy @document # - # source://rdoc//rdoc/comment.rb#70 + # source://rdoc//lib/rdoc/comment.rb#70 def initialize_copy(copy); end end # A constant +# +# source://rdoc//lib/rdoc/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//rdoc/constant.rb#32 + # source://rdoc//lib/rdoc/constant.rb#32 def initialize(name, value, comment); end # Constants are ordered by name # - # source://rdoc//rdoc/constant.rb#47 + # source://rdoc//lib/rdoc/constant.rb#47 def <=>(other); end # Constants are equal when their #parent and #name is the same # - # source://rdoc//rdoc/constant.rb#56 + # source://rdoc//lib/rdoc/constant.rb#56 def ==(other); end # A constant is documented if it has a comment, or is an alias @@ -1224,30 +1240,30 @@ class RDoc::Constant < ::RDoc::CodeObject # # @return [Boolean] # - # source://rdoc//rdoc/constant.rb#66 + # source://rdoc//lib/rdoc/constant.rb#66 def documented?; end # Full constant name including namespace # - # source://rdoc//rdoc/constant.rb#81 + # source://rdoc//lib/rdoc/constant.rb#81 def full_name; end - # source://rdoc//rdoc/constant.rb#99 + # source://rdoc//lib/rdoc/constant.rb#99 def inspect; end # The module or class this constant is an alias for # - # source://rdoc//rdoc/constant.rb#88 + # source://rdoc//lib/rdoc/constant.rb#88 def is_alias_for; end # Sets the module or class this is constant is an alias for. # - # source://rdoc//rdoc/constant.rb#12 + # source://rdoc//lib/rdoc/constant.rb#12 def is_alias_for=(_arg0); end # Dumps this Constant for use by ri. See also #marshal_load # - # source://rdoc//rdoc/constant.rb#109 + # source://rdoc//lib/rdoc/constant.rb#109 def marshal_dump; end # Loads this Constant from +array+. For a loaded Constant the following @@ -1256,59 +1272,61 @@ class RDoc::Constant < ::RDoc::CodeObject # * #full_name # * #parent_name # - # source://rdoc//rdoc/constant.rb#135 + # source://rdoc//lib/rdoc/constant.rb#135 def marshal_load(array); end # The constant's name # - # source://rdoc//rdoc/constant.rb#17 + # source://rdoc//lib/rdoc/constant.rb#17 def name; end # The constant's name # - # source://rdoc//rdoc/constant.rb#17 + # source://rdoc//lib/rdoc/constant.rb#17 def name=(_arg0); end # Path to this constant for use with HTML generator output. # - # source://rdoc//rdoc/constant.rb#153 + # source://rdoc//lib/rdoc/constant.rb#153 def path; end - # source://rdoc//rdoc/constant.rb#157 + # source://rdoc//lib/rdoc/constant.rb#157 def pretty_print(q); end # Sets the store for this class or module and its contained code objects. # - # source://rdoc//rdoc/constant.rb#171 + # source://rdoc//lib/rdoc/constant.rb#171 def store=(store); end - # source://rdoc//rdoc/constant.rb#177 + # source://rdoc//lib/rdoc/constant.rb#177 def to_s; end # The constant's value # - # source://rdoc//rdoc/constant.rb#22 + # source://rdoc//lib/rdoc/constant.rb#22 def value; end # The constant's value # - # source://rdoc//rdoc/constant.rb#22 + # source://rdoc//lib/rdoc/constant.rb#22 def value=(_arg0); end # The constant's visibility # - # source://rdoc//rdoc/constant.rb#27 + # source://rdoc//lib/rdoc/constant.rb#27 def visibility; end # The constant's visibility # - # source://rdoc//rdoc/constant.rb#27 + # source://rdoc//lib/rdoc/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/context.rb#7 class RDoc::Context < ::RDoc::CodeObject include ::Comparable @@ -1316,12 +1334,12 @@ class RDoc::Context < ::RDoc::CodeObject # # @return [Context] a new instance of Context # - # source://rdoc//rdoc/context.rb#123 + # source://rdoc//lib/rdoc/context.rb#123 def initialize; end # Contexts are sorted by full_name # - # source://rdoc//rdoc/context.rb#171 + # source://rdoc//lib/rdoc/context.rb#171 def <=>(other); end # Adds an item of type +klass+ with the given +name+ and +comment+ to the @@ -1329,12 +1347,12 @@ class RDoc::Context < ::RDoc::CodeObject # # Currently only RDoc::Extend and RDoc::Include are supported. # - # source://rdoc//rdoc/context.rb#183 + # source://rdoc//lib/rdoc/context.rb#183 def add(klass, name, comment); end # Adds +an_alias+ that is automatically resolved # - # source://rdoc//rdoc/context.rb#198 + # source://rdoc//lib/rdoc/context.rb#198 def add_alias(an_alias); end # Adds +attribute+ if not already there. If it is (as method(s) or attribute), @@ -1345,7 +1363,7 @@ class RDoc::Context < ::RDoc::CodeObject # if method +foo+ exists, but attr_accessor :foo will be registered # if method +foo+ exists, but foo= does not. # - # source://rdoc//rdoc/context.rb#225 + # source://rdoc//lib/rdoc/context.rb#225 def add_attribute(attribute); end # Adds a class named +given_name+ with +superclass+. @@ -1362,7 +1380,7 @@ class RDoc::Context < ::RDoc::CodeObject # unless it later sees class Container. +add_class+ automatically # upgrades +given_name+ to a class in this case. # - # source://rdoc//rdoc/context.rb#288 + # source://rdoc//lib/rdoc/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 @@ -1371,51 +1389,51 @@ class RDoc::Context < ::RDoc::CodeObject # unless #done_documenting is +true+. Sets the #parent of +mod+ # to +self+, and its #section to #current_section. Returns +mod+. # - # source://rdoc//rdoc/context.rb#404 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#429 + # source://rdoc//lib/rdoc/context.rb#429 def add_constant(constant); end # Adds extension module +ext+ which should be an RDoc::Extend # - # source://rdoc//rdoc/context.rb#463 + # source://rdoc//lib/rdoc/context.rb#463 def add_extend(ext); end # Adds included module +include+ which should be an RDoc::Include # - # source://rdoc//rdoc/context.rb#454 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#473 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#506 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#527 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#519 + # source://rdoc//lib/rdoc/context.rb#519 def add_module_by_normal_module(mod); end # Adds +require+ to this context's top level # - # source://rdoc//rdoc/context.rb#568 + # source://rdoc//lib/rdoc/context.rb#568 def add_require(require); end # Returns a section with +title+, creating it if it doesn't already exist. @@ -1425,17 +1443,17 @@ class RDoc::Context < ::RDoc::CodeObject # # See also RDoc::Context::Section # - # source://rdoc//rdoc/context.rb#586 + # source://rdoc//lib/rdoc/context.rb#586 def add_section(title, comment = T.unsafe(nil)); end # Adds +thing+ to the collection +array+ # - # source://rdoc//rdoc/context.rb#600 + # source://rdoc//lib/rdoc/context.rb#600 def add_to(array, thing); end # Class/module aliases # - # source://rdoc//rdoc/context.rb#25 + # source://rdoc//lib/rdoc/context.rb#25 def aliases; end # Is there any content? @@ -1445,88 +1463,88 @@ class RDoc::Context < ::RDoc::CodeObject # # Includes and extends are also checked unless includes == false. # - # source://rdoc//rdoc/context.rb#616 + # source://rdoc//lib/rdoc/context.rb#616 def any_content(includes = T.unsafe(nil)); end # All attr* methods # - # source://rdoc//rdoc/context.rb#30 + # source://rdoc//lib/rdoc/context.rb#30 def attributes; end # Block params to be used in the next MethodAttr parsed under this context # - # source://rdoc//rdoc/context.rb#35 + # source://rdoc//lib/rdoc/context.rb#35 def block_params; end # Block params to be used in the next MethodAttr parsed under this context # - # source://rdoc//rdoc/context.rb#35 + # source://rdoc//lib/rdoc/context.rb#35 def block_params=(_arg0); end # Creates the full name for a child with +name+ # - # source://rdoc//rdoc/context.rb#632 + # source://rdoc//lib/rdoc/context.rb#632 def child_name(name); end # Class attributes # - # source://rdoc//rdoc/context.rb#645 + # source://rdoc//lib/rdoc/context.rb#645 def class_attributes; end # Class methods # - # source://rdoc//rdoc/context.rb#652 + # source://rdoc//lib/rdoc/context.rb#652 def class_method_list; end # Array of classes in this context # - # source://rdoc//rdoc/context.rb#659 + # source://rdoc//lib/rdoc/context.rb#659 def classes; end # All classes and modules in this namespace # - # source://rdoc//rdoc/context.rb#666 + # source://rdoc//lib/rdoc/context.rb#666 def classes_and_modules; end # Hash of classes keyed by class name # - # source://rdoc//rdoc/context.rb#673 + # source://rdoc//lib/rdoc/context.rb#673 def classes_hash; end # Constants defined # - # source://rdoc//rdoc/context.rb#40 + # source://rdoc//lib/rdoc/context.rb#40 def constants; end # Hash of registered constants. # - # source://rdoc//rdoc/context.rb#118 + # source://rdoc//lib/rdoc/context.rb#118 def constants_hash; end # Current visibility of this line # - # source://rdoc//rdoc/context.rb#102 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#681 + # source://rdoc//lib/rdoc/context.rb#681 def current_section; end # Sets the current documentation section of documentation # - # source://rdoc//rdoc/context.rb#45 + # source://rdoc//lib/rdoc/context.rb#45 def current_section=(_arg0); end # Is part of this thing was defined in +file+? # # @return [Boolean] # - # source://rdoc//rdoc/context.rb#694 + # source://rdoc//lib/rdoc/context.rb#694 def defined_in?(file); end - # source://rdoc//rdoc/context.rb#698 + # source://rdoc//lib/rdoc/context.rb#698 def display(method_attr); end # Iterator for ancestors for duck-typing. Does nothing. See @@ -1535,37 +1553,37 @@ class RDoc::Context < ::RDoc::CodeObject # This method exists to make it easy to work with Context subclasses that # aren't part of RDoc. # - # source://rdoc//rdoc/context.rb#713 - def each_ancestor; end + # source://rdoc//lib/rdoc/context.rb#713 + def each_ancestor(&_); end # Iterator for attributes # - # source://rdoc//rdoc/context.rb#719 + # source://rdoc//lib/rdoc/context.rb#719 def each_attribute; end # Iterator for classes and modules # - # source://rdoc//rdoc/context.rb#726 + # source://rdoc//lib/rdoc/context.rb#726 def each_classmodule(&block); end # Iterator for constants # - # source://rdoc//rdoc/context.rb#733 + # source://rdoc//lib/rdoc/context.rb#733 def each_constant; end # Iterator for extension modules # - # source://rdoc//rdoc/context.rb#747 + # source://rdoc//lib/rdoc/context.rb#747 def each_extend; end # Iterator for included modules # - # source://rdoc//rdoc/context.rb#740 + # source://rdoc//lib/rdoc/context.rb#740 def each_include; end # Iterator for methods # - # source://rdoc//rdoc/context.rb#754 + # source://rdoc//lib/rdoc/context.rb#754 def each_method; end # Iterator for each section's contents sorted by title. The +section+, the @@ -1577,98 +1595,98 @@ class RDoc::Context < ::RDoc::CodeObject # # NOTE: Do not edit collections yielded by this method # - # source://rdoc//rdoc/context.rb#770 + # source://rdoc//lib/rdoc/context.rb#770 def each_section; end # Modules this context is extended with # - # source://rdoc//rdoc/context.rb#60 + # source://rdoc//lib/rdoc/context.rb#60 def extends; end # Aliases that could not be resolved. # - # source://rdoc//rdoc/context.rb#92 + # source://rdoc//lib/rdoc/context.rb#92 def external_aliases; end # Finds an attribute +name+ with singleton value +singleton+. # - # source://rdoc//rdoc/context.rb#787 + # source://rdoc//lib/rdoc/context.rb#787 def find_attribute(name, singleton); end # Finds an attribute with +name+ in this context # - # source://rdoc//rdoc/context.rb#795 + # source://rdoc//lib/rdoc/context.rb#795 def find_attribute_named(name); end # Finds a class method with +name+ in this context # - # source://rdoc//rdoc/context.rb#809 + # source://rdoc//lib/rdoc/context.rb#809 def find_class_method_named(name); end # Finds a constant with +name+ in this context # - # source://rdoc//rdoc/context.rb#816 + # source://rdoc//lib/rdoc/context.rb#816 def find_constant_named(name); end # Find a module at a higher scope # - # source://rdoc//rdoc/context.rb#825 + # source://rdoc//lib/rdoc/context.rb#825 def find_enclosing_module_named(name); end # Finds an external alias +name+ with singleton value +singleton+. # - # source://rdoc//rdoc/context.rb#832 + # source://rdoc//lib/rdoc/context.rb#832 def find_external_alias(name, singleton); end # Finds an external alias with +name+ in this context # - # source://rdoc//rdoc/context.rb#839 + # source://rdoc//lib/rdoc/context.rb#839 def find_external_alias_named(name); end # Finds a file with +name+ in this context # - # source://rdoc//rdoc/context.rb#853 + # source://rdoc//lib/rdoc/context.rb#853 def find_file_named(name); end # Finds an instance method with +name+ in this context # - # source://rdoc//rdoc/context.rb#860 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#868 + # source://rdoc//lib/rdoc/context.rb#868 def find_local_symbol(symbol); end # Finds a method named +name+ with singleton value +singleton+. # - # source://rdoc//rdoc/context.rb#880 + # source://rdoc//lib/rdoc/context.rb#880 def find_method(name, singleton); end # Finds a instance or module method with +name+ in this context # - # source://rdoc//rdoc/context.rb#893 + # source://rdoc//lib/rdoc/context.rb#893 def find_method_named(name); end # Find a module with +name+ using ruby's scoping rules # - # source://rdoc//rdoc/context.rb#907 + # source://rdoc//lib/rdoc/context.rb#907 def find_module_named(name); end # Look up +symbol+, first as a module, then as a local symbol. # - # source://rdoc//rdoc/context.rb#917 + # source://rdoc//lib/rdoc/context.rb#917 def find_symbol(symbol); end # Look up a module named +symbol+. # - # source://rdoc//rdoc/context.rb#924 + # source://rdoc//lib/rdoc/context.rb#924 def find_symbol_module(symbol); end # The full name for this context. This method is overridden by subclasses. # - # source://rdoc//rdoc/context.rb#957 + # source://rdoc//lib/rdoc/context.rb#957 def full_name; end # Does this context and its methods and constants all have documentation? @@ -1677,49 +1695,49 @@ class RDoc::Context < ::RDoc::CodeObject # # @return [Boolean] # - # source://rdoc//rdoc/context.rb#966 + # source://rdoc//lib/rdoc/context.rb#966 def fully_documented?; end # URL for this with a +prefix+ # - # source://rdoc//rdoc/context.rb#976 + # source://rdoc//lib/rdoc/context.rb#976 def http_url(prefix); end # Files this context is found in # - # source://rdoc//rdoc/context.rb#50 + # source://rdoc//lib/rdoc/context.rb#50 def in_files; end # Modules this context includes # - # source://rdoc//rdoc/context.rb#55 + # source://rdoc//lib/rdoc/context.rb#55 def includes; end # Sets the defaults for methods and so-forth # - # source://rdoc//rdoc/context.rb#145 + # source://rdoc//lib/rdoc/context.rb#145 def initialize_methods_etc; end # Instance attributes # - # source://rdoc//rdoc/context.rb#987 + # source://rdoc//lib/rdoc/context.rb#987 def instance_attributes; end # Instance methods # -- # TODO remove this later # - # source://rdoc//rdoc/context.rb#1003 + # source://rdoc//lib/rdoc/context.rb#1003 def instance_method_list; end # Instance methods # - # source://rdoc//rdoc/context.rb#994 + # source://rdoc//lib/rdoc/context.rb#994 def instance_methods; end # Methods defined in this context # - # source://rdoc//rdoc/context.rb#65 + # source://rdoc//lib/rdoc/context.rb#65 def method_list; end # Breaks method_list into a nested hash by type ('class' or @@ -1728,59 +1746,59 @@ class RDoc::Context < ::RDoc::CodeObject # If +section+ is provided only methods in that RDoc::Context::Section will # be returned. # - # source://rdoc//rdoc/context.rb#1015 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#108 + # source://rdoc//lib/rdoc/context.rb#108 def methods_hash; end # Yields AnyMethod and Attr entries matching the list of names in +methods+. # - # source://rdoc//rdoc/context.rb#1038 + # source://rdoc//lib/rdoc/context.rb#1038 def methods_matching(methods, singleton = T.unsafe(nil), &block); end # Array of modules in this context # - # source://rdoc//rdoc/context.rb#1051 + # source://rdoc//lib/rdoc/context.rb#1051 def modules; end # Hash of modules keyed by module name # - # source://rdoc//rdoc/context.rb#1058 + # source://rdoc//lib/rdoc/context.rb#1058 def modules_hash; end # Name of this class excluding namespace. See also full_name # - # source://rdoc//rdoc/context.rb#70 + # source://rdoc//lib/rdoc/context.rb#70 def name; end # Name to use to generate the url. # #full_name by default. # - # source://rdoc//rdoc/context.rb#1066 + # source://rdoc//lib/rdoc/context.rb#1066 def name_for_path; end # Changes the visibility for new methods to +visibility+ # - # source://rdoc//rdoc/context.rb#1073 + # source://rdoc//lib/rdoc/context.rb#1073 def ongoing_visibility=(visibility); end # Params to be used in the next MethodAttr parsed under this context # - # source://rdoc//rdoc/context.rb#113 + # source://rdoc//lib/rdoc/context.rb#113 def params; end # Params to be used in the next MethodAttr parsed under this context # - # source://rdoc//rdoc/context.rb#113 + # source://rdoc//lib/rdoc/context.rb#113 def params=(_arg0); end # Record +top_level+ as a file +self+ is in. # - # source://rdoc//rdoc/context.rb#1080 + # source://rdoc//lib/rdoc/context.rb#1080 def record_location(top_level); end # Should we remove this context from the documentation? @@ -1794,80 +1812,80 @@ class RDoc::Context < ::RDoc::CodeObject # # @return [Boolean] # - # source://rdoc//rdoc/context.rb#1094 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#1107 + # source://rdoc//lib/rdoc/context.rb#1107 def remove_invisible(min_visibility); end # Only called when min_visibility == :public or :private # - # source://rdoc//rdoc/context.rb#1117 + # source://rdoc//lib/rdoc/context.rb#1117 def remove_invisible_in(array, min_visibility); end # Files this context requires # - # source://rdoc//rdoc/context.rb#75 + # source://rdoc//lib/rdoc/context.rb#75 def requires; end # Tries to resolve unmatched aliases when a method or attribute has just # been added. # - # source://rdoc//rdoc/context.rb#1133 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#1149 + # source://rdoc//lib/rdoc/context.rb#1149 def section_contents; end # Sections in this context # - # source://rdoc//rdoc/context.rb#1173 + # source://rdoc//lib/rdoc/context.rb#1173 def sections; end - # source://rdoc//rdoc/context.rb#1177 + # source://rdoc//lib/rdoc/context.rb#1177 def sections_hash; end # Given an array +names+ of constants, set the visibility of each constant to # +visibility+ # - # source://rdoc//rdoc/context.rb#1202 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#1184 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#1192 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#1213 + # source://rdoc//lib/rdoc/context.rb#1213 def sort_sections; end # Use this section for the next method, attribute or constant added. # - # source://rdoc//rdoc/context.rb#80 + # source://rdoc//lib/rdoc/context.rb#80 def temporary_section; end # Use this section for the next method, attribute or constant added. # - # source://rdoc//rdoc/context.rb#80 + # source://rdoc//lib/rdoc/context.rb#80 def temporary_section=(_arg0); end - # source://rdoc//rdoc/context.rb#1229 + # source://rdoc//lib/rdoc/context.rb#1229 def to_s; end # Return the TopLevel that owns us @@ -1875,36 +1893,36 @@ class RDoc::Context < ::RDoc::CodeObject # FIXME we can be 'owned' by several TopLevel (see #record_location & # #in_files) # - # source://rdoc//rdoc/context.rb#1239 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#87 + # source://rdoc//lib/rdoc/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//rdoc/context.rb#87 + # source://rdoc//lib/rdoc/context.rb#87 def unmatched_alias_lists=(_arg0); end # Upgrades NormalModule +mod+ in +enclosing+ to a +class_type+ # - # source://rdoc//rdoc/context.rb#1249 + # source://rdoc//lib/rdoc/context.rb#1249 def upgrade_to_class(mod, class_type, enclosing); end # Current visibility of this context # - # source://rdoc//rdoc/context.rb#97 + # source://rdoc//lib/rdoc/context.rb#97 def visibility; end # Current visibility of this context # - # source://rdoc//rdoc/context.rb#97 + # source://rdoc//lib/rdoc/context.rb#97 def visibility=(_arg0); end end @@ -1915,6 +1933,8 @@ end # # Sections can be referenced multiple times and will be collapsed into a # single section. +# +# source://rdoc//lib/rdoc/context/section.rb#13 class RDoc::Context::Section include ::RDoc::Text include ::RDoc::Generator::Markup @@ -1923,37 +1943,37 @@ class RDoc::Context::Section # # @return [Section] a new instance of Section # - # source://rdoc//rdoc/context/section.rb#42 + # source://rdoc//lib/rdoc/context/section.rb#42 def initialize(parent, title, comment); end # Sections are equal when they have the same #title # - # source://rdoc//rdoc/context/section.rb#54 + # source://rdoc//lib/rdoc/context/section.rb#54 def ==(other); end # Adds +comment+ to this section # - # source://rdoc//rdoc/context/section.rb#63 + # source://rdoc//lib/rdoc/context/section.rb#63 def add_comment(comment); end # Anchor reference for linking to this section # - # source://rdoc//rdoc/context/section.rb#83 + # source://rdoc//lib/rdoc/context/section.rb#83 def aref; end # Section comment # - # source://rdoc//rdoc/context/section.rb#22 + # source://rdoc//lib/rdoc/context/section.rb#22 def comment; end # Section comments # - # source://rdoc//rdoc/context/section.rb#27 + # source://rdoc//lib/rdoc/context/section.rb#27 def comments; end # Sections are equal when they have the same #title # - # source://rdoc//rdoc/context/section.rb#54 + # source://rdoc//lib/rdoc/context/section.rb#54 def eql?(other); end # Extracts the comment for this section from the original comment block. @@ -1964,69 +1984,71 @@ class RDoc::Context::Section # # :section: The title # # The body # - # source://rdoc//rdoc/context/section.rb#98 + # source://rdoc//lib/rdoc/context/section.rb#98 def extract_comment(comment); end - # source://rdoc//rdoc/context/section.rb#130 + # source://rdoc//lib/rdoc/context/section.rb#130 def hash; end # The files comments in this section come from # - # source://rdoc//rdoc/context/section.rb#137 + # source://rdoc//lib/rdoc/context/section.rb#137 def in_files; end - # source://rdoc//rdoc/context/section.rb#126 + # source://rdoc//lib/rdoc/context/section.rb#126 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//rdoc/context/section.rb#158 + # source://rdoc//lib/rdoc/context/section.rb#158 def marshal_dump; end # De-serializes this Section. The section parent must be restored manually. # - # source://rdoc//rdoc/context/section.rb#169 + # source://rdoc//lib/rdoc/context/section.rb#169 def marshal_load(array); end # Context this Section lives in # - # source://rdoc//rdoc/context/section.rb#32 + # source://rdoc//lib/rdoc/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//rdoc/context/section.rb#180 + # source://rdoc//lib/rdoc/context/section.rb#180 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//rdoc/context/section.rb#208 + # source://rdoc//lib/rdoc/context/section.rb#208 def plain_html; end # Removes a comment from this section if it is from the same file as # +comment+ # - # source://rdoc//rdoc/context/section.rb#216 + # source://rdoc//lib/rdoc/context/section.rb#216 def remove_comment(comment); end # Section title # - # source://rdoc//rdoc/context/section.rb#37 + # source://rdoc//lib/rdoc/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//rdoc/cross_reference.rb#127 + # source://rdoc//lib/rdoc/cross_reference.rb#127 def initialize(context); end # Returns a reference to +name+. @@ -2035,33 +2057,33 @@ class RDoc::CrossReference # returned. If +name+ is escaped +name+ is returned. If +name+ is not # found +text+ is returned. # - # source://rdoc//rdoc/cross_reference.rb#190 + # source://rdoc//lib/rdoc/cross_reference.rb#190 def resolve(name, text); end # Returns a method reference to +name+. # - # source://rdoc//rdoc/cross_reference.rb#137 + # 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//rdoc/cross_reference.rb#121 + # source://rdoc//lib/rdoc/cross_reference.rb#121 def seen; end # Hash of references that have been looked-up to their replacements # - # source://rdoc//rdoc/cross_reference.rb#121 + # source://rdoc//lib/rdoc/cross_reference.rb#121 def seen=(_arg0); end end # Regular expression to match method arguments. # -# source://rdoc//rdoc/cross_reference.rb#28 +# 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//rdoc/cross_reference.rb#23 +# 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 @@ -2076,43 +2098,49 @@ RDoc::CrossReference::METHOD_ARG_REGEXP_STR = T.let(T.unsafe(nil), String) # 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//rdoc/erbio.rb#23 + # 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//rdoc/erbio.rb#30 + # 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//rdoc/erb_partial.rb#12 + # 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//rdoc/encoding.rb#112 + # 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//rdoc/encoding.rb#92 + # source://rdoc//lib/rdoc/encoding.rb#92 def detect_encoding(string); end # Reads the contents of +filename+ and handles any encoding directives in @@ -2124,19 +2152,20 @@ module RDoc::Encoding # If +force_transcode+ is true the document will be transcoded and any # unknown character in the target encoding will be replaced with '?' # - # source://rdoc//rdoc/encoding.rb#32 + # 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//rdoc/encoding.rb#102 + # source://rdoc//lib/rdoc/encoding.rb#102 def remove_magic_comment(string); end end end -# source://rdoc//rdoc/encoding.rb#10 +# 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 @@ -2147,7 +2176,7 @@ class RDoc::Generator::Darkfish # # @return [Darkfish] a new instance of Darkfish # - # source://rdoc//rdoc/generator/darkfish.rb#159 + # source://rdoc//lib/rdoc/generator/darkfish.rb#159 def initialize(store, options); end # Creates a template from its components and the +body_file+. @@ -2155,174 +2184,174 @@ class RDoc::Generator::Darkfish # For backwards compatibility, if +body_file+ contains "--op from the # options for a full path. # - # source://rdoc//rdoc/generator/darkfish.rb#102 + # 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//rdoc/generator/darkfish.rb#191 + # 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//rdoc/generator/darkfish.rb#108 + # source://rdoc//lib/rdoc/generator/darkfish.rb#108 def classes; end # Copies static files from the static_path into the output directory # - # source://rdoc//rdoc/generator/darkfish.rb#265 + # source://rdoc//lib/rdoc/generator/darkfish.rb#265 def copy_static; end # Output progress information if debugging is enabled # - # source://rdoc//rdoc/generator/darkfish.rb#182 + # 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//rdoc/generator/darkfish.rb#113 + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 def dry_run; end # No files will be written when dry_run is true. # - # source://rdoc//rdoc/generator/darkfish.rb#113 + # source://rdoc//lib/rdoc/generator/darkfish.rb#113 def dry_run=(_arg0); end # Directory where generated class HTML files live relative to the output # dir. # - # source://rdoc//rdoc/generator/darkfish.rb#199 + # 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//rdoc/generator/darkfish.rb#119 + # 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//rdoc/generator/darkfish.rb#119 + # source://rdoc//lib/rdoc/generator/darkfish.rb#119 def file_output=(_arg0); end # Files to be displayed by this generator # - # source://rdoc//rdoc/generator/darkfish.rb#124 + # 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//rdoc/generator/darkfish.rb#207 + # 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//rdoc/generator/darkfish.rb#241 + # source://rdoc//lib/rdoc/generator/darkfish.rb#241 def generate; end # Generates a class file for +klass+ # - # source://rdoc//rdoc/generator/darkfish.rb#337 + # source://rdoc//lib/rdoc/generator/darkfish.rb#337 def generate_class(klass, template_file = T.unsafe(nil)); end # Generate a documentation file for each class and module # - # source://rdoc//rdoc/generator/darkfish.rb#368 + # source://rdoc//lib/rdoc/generator/darkfish.rb#368 def generate_class_files; end # Generate a documentation file for each file # - # source://rdoc//rdoc/generator/darkfish.rb#395 + # source://rdoc//lib/rdoc/generator/darkfish.rb#395 def generate_file_files; end # Generate an index page which lists all the classes which are documented. # - # source://rdoc//rdoc/generator/darkfish.rb#303 + # source://rdoc//lib/rdoc/generator/darkfish.rb#303 def generate_index; end # Generate a page file for +file+ # - # source://rdoc//rdoc/generator/darkfish.rb#464 + # source://rdoc//lib/rdoc/generator/darkfish.rb#464 def generate_page(file); end # Generates the 404 page for the RDoc servlet # - # source://rdoc//rdoc/generator/darkfish.rb#493 + # source://rdoc//lib/rdoc/generator/darkfish.rb#493 def generate_servlet_not_found(message); end # Generates the servlet root page for the RDoc servlet # - # source://rdoc//rdoc/generator/darkfish.rb#526 + # source://rdoc//lib/rdoc/generator/darkfish.rb#526 def generate_servlet_root(installed); end # Generate an index page which lists all the classes which are documented. # - # source://rdoc//rdoc/generator/darkfish.rb#553 + # source://rdoc//lib/rdoc/generator/darkfish.rb#553 def generate_table_of_contents; end # Return a list of the documented modules sorted by salience first, then # by name. # - # source://rdoc//rdoc/generator/darkfish.rb#294 + # 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//rdoc/generator/darkfish.rb#652 + # source://rdoc//lib/rdoc/generator/darkfish.rb#652 def get_svninfo(klass); end - # source://rdoc//rdoc/generator/darkfish.rb#584 + # source://rdoc//lib/rdoc/generator/darkfish.rb#584 def install_rdoc_static_file(source, destination, options); end # The JSON index generator for this Darkfish generator # - # source://rdoc//rdoc/generator/darkfish.rb#129 + # source://rdoc//lib/rdoc/generator/darkfish.rb#129 def json_index; end # Methods to be displayed by this generator # - # source://rdoc//rdoc/generator/darkfish.rb#134 + # 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//rdoc/generator/darkfish.rb#139 + # source://rdoc//lib/rdoc/generator/darkfish.rb#139 def modsort; end # The output directory # - # source://rdoc//rdoc/generator/darkfish.rb#154 + # 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//rdoc/generator/darkfish.rb#699 + # 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 @@ -2332,48 +2361,49 @@ class RDoc::Generator::Darkfish # # An io will be yielded which must be captured by binding in the caller. # - # source://rdoc//rdoc/generator/darkfish.rb#717 + # 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//rdoc/generator/darkfish.rb#604 + # source://rdoc//lib/rdoc/generator/darkfish.rb#604 def setup; end # The RDoc::Store that is the source of the generated content # - # source://rdoc//rdoc/generator/darkfish.rb#144 + # source://rdoc//lib/rdoc/generator/darkfish.rb#144 def store; end # The directory where the template files live # - # source://rdoc//rdoc/generator/darkfish.rb#149 + # 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//rdoc/generator/darkfish.rb#764 + # 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//rdoc/generator/darkfish.rb#751 + # 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//rdoc/generator/darkfish.rb#621 + # source://rdoc//lib/rdoc/generator/darkfish.rb#621 def time_delta_string(seconds); end # Copy over the stylesheet into the appropriate place in the output # directory. # - # source://rdoc//rdoc/generator/darkfish.rb#215 + # 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 @@ -2384,63 +2414,63 @@ class RDoc::Generator::JsonIndex # # @return [JsonIndex] a new instance of JsonIndex # - # source://rdoc//rdoc/generator/json_index.rb#94 + # source://rdoc//lib/rdoc/generator/json_index.rb#94 def initialize(parent_generator, options); end # Builds the JSON index as a Hash. # - # source://rdoc//rdoc/generator/json_index.rb#110 + # source://rdoc//lib/rdoc/generator/json_index.rb#110 def build_index; end # The directory classes are written to # - # source://rdoc//rdoc/generator/json_index.rb#271 + # source://rdoc//lib/rdoc/generator/json_index.rb#271 def class_dir; end # Output progress information if debugging is enabled # - # source://rdoc//rdoc/generator/json_index.rb#123 + # source://rdoc//lib/rdoc/generator/json_index.rb#123 def debug_msg(*msg); end # The directory files are written to # - # source://rdoc//rdoc/generator/json_index.rb#278 + # source://rdoc//lib/rdoc/generator/json_index.rb#278 def file_dir; end # Writes the JSON index to disk # - # source://rdoc//rdoc/generator/json_index.rb#131 + # source://rdoc//lib/rdoc/generator/json_index.rb#131 def generate; end # Compress the search_index.js file using gzip # - # source://rdoc//rdoc/generator/json_index.rb#166 + # source://rdoc//lib/rdoc/generator/json_index.rb#166 def generate_gzipped; end - # source://rdoc//rdoc/generator/json_index.rb#86 + # source://rdoc//lib/rdoc/generator/json_index.rb#86 def index; end # Adds classes and modules to the index # - # source://rdoc//rdoc/generator/json_index.rb#211 + # source://rdoc//lib/rdoc/generator/json_index.rb#211 def index_classes; end # Adds methods to the index # - # source://rdoc//rdoc/generator/json_index.rb#230 + # source://rdoc//lib/rdoc/generator/json_index.rb#230 def index_methods; end # Adds pages to the index # - # source://rdoc//rdoc/generator/json_index.rb#251 + # source://rdoc//lib/rdoc/generator/json_index.rb#251 def index_pages; end - # source://rdoc//rdoc/generator/json_index.rb#282 + # source://rdoc//lib/rdoc/generator/json_index.rb#282 def reset(files, classes); end # Removes whitespace and downcases +string+ # - # source://rdoc//rdoc/generator/json_index.rb#296 + # source://rdoc//lib/rdoc/generator/json_index.rb#296 def search_string(string); end end @@ -2496,178 +2526,188 @@ end # % 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//rdoc/generator/pot.rb#68 + # source://rdoc//lib/rdoc/generator/pot.rb#68 def initialize(store, options); end - # source://rdoc//rdoc/generator/pot.rb#85 + # source://rdoc//lib/rdoc/generator/pot.rb#85 def class_dir; end # Writes .pot to disk. # - # source://rdoc//rdoc/generator/pot.rb#76 + # source://rdoc//lib/rdoc/generator/pot.rb#76 def generate; end private - # source://rdoc//rdoc/generator/pot.rb#90 + # 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//rdoc/generator/pot/message_extractor.rb#10 + # 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//rdoc/generator/pot/message_extractor.rb#19 + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#19 def extract; end private - # source://rdoc//rdoc/generator/pot/message_extractor.rb#64 + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#64 def entry(msgid, options); end - # source://rdoc//rdoc/generator/pot/message_extractor.rb#28 + # source://rdoc//lib/rdoc/generator/pot/message_extractor.rb#28 def extract_from_klass(klass); end - # source://rdoc//rdoc/generator/pot/message_extractor.rb#51 + # 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//rdoc/generator/pot/po.rb#10 + # source://rdoc//lib/rdoc/generator/pot/po.rb#10 def initialize; end # Adds a PO entry to the PO. # - # source://rdoc//rdoc/generator/pot/po.rb#18 + # source://rdoc//lib/rdoc/generator/pot/po.rb#18 def add(entry); end # Returns PO format text for the PO. # - # source://rdoc//rdoc/generator/pot/po.rb#29 + # source://rdoc//lib/rdoc/generator/pot/po.rb#29 def to_s; end private - # source://rdoc//rdoc/generator/pot/po.rb#40 + # source://rdoc//lib/rdoc/generator/pot/po.rb#40 def add_header; end - # source://rdoc//rdoc/generator/pot/po.rb#44 + # source://rdoc//lib/rdoc/generator/pot/po.rb#44 def header_entry; end - # source://rdoc//rdoc/generator/pot/po.rb#73 + # 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 valus can be specified by # +options+. # # @return [POEntry] a new instance of POEntry # - # source://rdoc//rdoc/generator/pot/po_entry.rb#29 + # 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//rdoc/generator/pot/po_entry.rb#17 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#17 def extracted_comment; end # The flags of the PO entry # - # source://rdoc//rdoc/generator/pot/po_entry.rb#23 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#23 def flags; end # Merges the PO entry with +other_entry+. # - # source://rdoc//rdoc/generator/pot/po_entry.rb#56 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#56 def merge(other_entry); end # The msgid content # - # source://rdoc//rdoc/generator/pot/po_entry.rb#8 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#8 def msgid; end # The msgstr content # - # source://rdoc//rdoc/generator/pot/po_entry.rb#11 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#11 def msgstr; end # The locations where the PO entry is extracted # - # source://rdoc//rdoc/generator/pot/po_entry.rb#20 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#20 def references; end # Returns the PO entry in PO format. # - # source://rdoc//rdoc/generator/pot/po_entry.rb#41 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#41 def to_s; end # The comment content created by translator (PO editor) # - # source://rdoc//rdoc/generator/pot/po_entry.rb#14 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#14 def translator_comment; end private - # source://rdoc//rdoc/generator/pot/po_entry.rb#120 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#120 def escape(string); end - # source://rdoc//rdoc/generator/pot/po_entry.rb#72 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#72 def format_comment(mark, comment); end - # source://rdoc//rdoc/generator/pot/po_entry.rb#88 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#88 def format_extracted_comment; end - # source://rdoc//rdoc/generator/pot/po_entry.rb#102 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#102 def format_flags; end - # source://rdoc//rdoc/generator/pot/po_entry.rb#109 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#109 def format_message(message); end - # source://rdoc//rdoc/generator/pot/po_entry.rb#92 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#92 def format_references; end - # source://rdoc//rdoc/generator/pot/po_entry.rb#84 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#84 def format_translator_comment; end - # source://rdoc//rdoc/generator/pot/po_entry.rb#137 + # source://rdoc//lib/rdoc/generator/pot/po_entry.rb#137 def merge_array(array1, array2); end - # source://rdoc//rdoc/generator/pot/po_entry.rb#133 + # 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//rdoc/generator/ri.rb#17 + # 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//rdoc/generator/ri.rb#26 + # source://rdoc//lib/rdoc/generator/ri.rb#26 def generate; end end @@ -2677,13 +2717,15 @@ end # # * 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//rdoc/i18n/locale.rb#48 + # source://rdoc//lib/rdoc/i18n/locale.rb#48 def initialize(name); end # Loads translation messages from +locale_directory+/+@name+/rdoc.po @@ -2695,7 +2737,7 @@ class RDoc::I18n::Locale # # Returns +true+ if succeeded, +false+ otherwise. # - # source://rdoc//rdoc/i18n/locale.rb#63 + # source://rdoc//lib/rdoc/i18n/locale.rb#63 def load(locale_directory); end # The name of the locale. It uses IETF language tag format @@ -2704,19 +2746,19 @@ class RDoc::I18n::Locale # See also {BCP 47 - Tags for Identifying # Languages}[http://tools.ietf.org/rfc/bcp/bcp47.txt]. # - # source://rdoc//rdoc/i18n/locale.rb#42 + # 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//rdoc/i18n/locale.rb#98 + # source://rdoc//lib/rdoc/i18n/locale.rb#98 def translate(message); end class << self # Returns the locale object for +locale_name+. # - # source://rdoc//rdoc/i18n/locale.rb#19 + # source://rdoc//lib/rdoc/i18n/locale.rb#19 def [](locale_name); end # Sets the locale object for +locale_name+. @@ -2724,7 +2766,7 @@ class RDoc::I18n::Locale # Normally, this method is not used. This method is useful for # testing. # - # source://rdoc//rdoc/i18n/locale.rb#29 + # source://rdoc//lib/rdoc/i18n/locale.rb#29 def []=(locale_name, locale); end end end @@ -2737,12 +2779,14 @@ end # * 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//rdoc/i18n/text.rb#17 + # source://rdoc//lib/rdoc/i18n/text.rb#17 def initialize(raw); end # Extracts translation target messages and yields each message. @@ -2755,1320 +2799,1321 @@ class RDoc::I18n::Text # # The above content may be added in the future. # - # source://rdoc//rdoc/i18n/text.rb#32 + # source://rdoc//lib/rdoc/i18n/text.rb#32 def extract_messages; end # Translates raw text into +locale+. # - # source://rdoc//rdoc/i18n/text.rb#44 + # source://rdoc//lib/rdoc/i18n/text.rb#44 def translate(locale); end private - # source://rdoc//rdoc/i18n/text.rb#88 + # source://rdoc//lib/rdoc/i18n/text.rb#88 def each_line(raw, &block); end # @yield [part] # - # source://rdoc//rdoc/i18n/text.rb#101 + # source://rdoc//lib/rdoc/i18n/text.rb#101 def emit_empty_line_event(line, line_no); end - # source://rdoc//rdoc/i18n/text.rb#110 + # source://rdoc//lib/rdoc/i18n/text.rb#110 def emit_paragraph_event(paragraph, paragraph_start_line, line_no, &block); end - # source://rdoc//rdoc/i18n/text.rb#60 + # 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//rdoc/markdown.rb#668 + # source://rdoc//lib/rdoc/markdown.rb#668 def initialize(extensions = T.unsafe(nil), debug = T.unsafe(nil)); end # Alphanumeric = %literals.Alphanumeric # - # source://rdoc//rdoc/markdown.rb#14705 + # source://rdoc//lib/rdoc/markdown.rb#14705 def _Alphanumeric; end # AlphanumericAscii = %literals.AlphanumericAscii # - # source://rdoc//rdoc/markdown.rb#14712 + # source://rdoc//lib/rdoc/markdown.rb#14712 def _AlphanumericAscii; end # AtxHeading = AtxStart:s @Sp AtxInline+:a (@Sp /#*/ @Sp)? @Newline { RDoc::Markup::Heading.new(s, a.join) } # - # source://rdoc//rdoc/markdown.rb#1162 + # source://rdoc//lib/rdoc/markdown.rb#1162 def _AtxHeading; end # AtxInline = !@Newline !(@Sp /#*/ @Sp @Newline) Inline # - # source://rdoc//rdoc/markdown.rb#1080 + # source://rdoc//lib/rdoc/markdown.rb#1080 def _AtxInline; end # AtxStart = < /\#{1,6}/ > { text.length } # - # source://rdoc//rdoc/markdown.rb#1136 + # source://rdoc//lib/rdoc/markdown.rb#1136 def _AtxStart; end # AutoLink = (AutoLinkUrl | AutoLinkEmail) # - # source://rdoc//rdoc/markdown.rb#11574 + # source://rdoc//lib/rdoc/markdown.rb#11574 def _AutoLink; end # AutoLinkEmail = "<" "mailto:"? < /[\w+.\/!%~$-]+/i "@" (!@Newline !">" .)+ > ">" { "mailto:#{text}" } # - # source://rdoc//rdoc/markdown.rb#11707 + # source://rdoc//lib/rdoc/markdown.rb#11707 def _AutoLinkEmail; end # AutoLinkUrl = "<" < /[A-Za-z]+/ "://" (!@Newline !">" .)+ > ">" { text } # - # source://rdoc//rdoc/markdown.rb#11592 + # source://rdoc//lib/rdoc/markdown.rb#11592 def _AutoLinkUrl; end # BOM = %literals.BOM # - # source://rdoc//rdoc/markdown.rb#14719 + # source://rdoc//lib/rdoc/markdown.rb#14719 def _BOM; end # BlankLine = @Sp @Newline { "\n" } # - # source://rdoc//rdoc/markdown.rb#14148 + # source://rdoc//lib/rdoc/markdown.rb#14148 def _BlankLine; end # Block = @BlankLine* (BlockQuote | Verbatim | CodeFence | Table | Note | Reference | HorizontalRule | Heading | OrderedList | BulletList | DefinitionList | HtmlBlock | StyleBlock | Para | Plain) # - # source://rdoc//rdoc/markdown.rb#939 + # source://rdoc//lib/rdoc/markdown.rb#939 def _Block; end # BlockQuote = BlockQuoteRaw:a { RDoc::Markup::BlockQuote.new(*a) } # - # source://rdoc//rdoc/markdown.rb#1566 + # source://rdoc//lib/rdoc/markdown.rb#1566 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//rdoc/markdown.rb#1589 + # source://rdoc//lib/rdoc/markdown.rb#1589 def _BlockQuoteRaw; end # Bullet = !HorizontalRule @NonindentSpace /[+*-]/ @Spacechar+ # - # source://rdoc//rdoc/markdown.rb#2154 + # source://rdoc//lib/rdoc/markdown.rb#2154 def _Bullet; end # BulletList = &Bullet (ListTight | ListLoose):a { RDoc::Markup::List.new(:BULLET, *a) } # - # source://rdoc//rdoc/markdown.rb#2198 + # source://rdoc//lib/rdoc/markdown.rb#2198 def _BulletList; end # CharEntity = "&" < /[A-Za-z0-9]+/ > ";" { if entity = HTML_ENTITIES[text] then entity.pack 'U*' else "&#{text};" end } # - # source://rdoc//rdoc/markdown.rb#14812 + # source://rdoc//lib/rdoc/markdown.rb#14812 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//rdoc/markdown.rb#12511 + # source://rdoc//lib/rdoc/markdown.rb#12511 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//rdoc/markdown.rb#15681 + # source://rdoc//lib/rdoc/markdown.rb#15681 def _CodeFence; end # DecEntity = "&#" < /[0-9]+/ > ";" { [text.to_i].pack 'U' } # - # source://rdoc//rdoc/markdown.rb#14776 + # source://rdoc//lib/rdoc/markdown.rb#14776 def _DecEntity; end # DefinitionList = &{ definition_lists? } DefinitionListItem+:list { RDoc::Markup::List.new :NOTE, *list.flatten } # - # source://rdoc//rdoc/markdown.rb#16339 + # source://rdoc//lib/rdoc/markdown.rb#16339 def _DefinitionList; end # DefinitionListDefinition = @NonindentSpace ":" @Space Inlines:a @BlankLine+ { paragraph a } # - # source://rdoc//rdoc/markdown.rb#16482 + # source://rdoc//lib/rdoc/markdown.rb#16482 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//rdoc/markdown.rb#16383 + # source://rdoc//lib/rdoc/markdown.rb#16383 def _DefinitionListItem; end - # DefinitionListLabel = StrChunk:label @Sp @Newline { label } + # DefinitionListLabel = Inline:label @Sp @Newline { label } # - # source://rdoc//rdoc/markdown.rb#16449 + # source://rdoc//lib/rdoc/markdown.rb#16449 def _DefinitionListLabel; end # Digit = [0-9] # - # source://rdoc//rdoc/markdown.rb#14691 + # source://rdoc//lib/rdoc/markdown.rb#14691 def _Digit; end # Doc = BOM? Block*:a { RDoc::Markup::Document.new(*a.compact) } # - # source://rdoc//rdoc/markdown.rb#899 + # source://rdoc//lib/rdoc/markdown.rb#899 def _Doc; end # Emph = (EmphStar | EmphUl) # - # source://rdoc//rdoc/markdown.rb#10283 + # source://rdoc//lib/rdoc/markdown.rb#10283 def _Emph; end # EmphStar = "*" !@Whitespace @StartList:a (!"*" Inline:b { a << b } | StrongStar:b { a << b })+ "*" { emphasis a.join } # - # source://rdoc//rdoc/markdown.rb#10319 + # source://rdoc//lib/rdoc/markdown.rb#10319 def _EmphStar; end # EmphUl = "_" !@Whitespace @StartList:a (!"_" Inline:b { a << b } | StrongUl:b { a << b })+ "_" { emphasis a.join } # - # source://rdoc//rdoc/markdown.rb#10477 + # source://rdoc//lib/rdoc/markdown.rb#10477 def _EmphUl; end # EmptyTitle = "" # - # source://rdoc//rdoc/markdown.rb#12086 + # source://rdoc//lib/rdoc/markdown.rb#12086 def _EmptyTitle; end # Endline = (@LineBreak | @TerminalEndline | @NormalEndline) # - # source://rdoc//rdoc/markdown.rb#9917 + # source://rdoc//lib/rdoc/markdown.rb#9917 def _Endline; end # Entity = (HexEntity | DecEntity | CharEntity):a { a } # - # source://rdoc//rdoc/markdown.rb#9880 + # source://rdoc//lib/rdoc/markdown.rb#9880 def _Entity; end # Enumerator = @NonindentSpace [0-9]+ "." @Spacechar+ # - # source://rdoc//rdoc/markdown.rb#2687 + # source://rdoc//lib/rdoc/markdown.rb#2687 def _Enumerator; end # Eof = !. # - # source://rdoc//rdoc/markdown.rb#14542 + # source://rdoc//lib/rdoc/markdown.rb#14542 def _Eof; end # EscapedChar = "\\" !@Newline < /[:\\`|*_{}\[\]()#+.!><-]/ > { text } # - # source://rdoc//rdoc/markdown.rb#9841 + # source://rdoc//lib/rdoc/markdown.rb#9841 def _EscapedChar; end # ExplicitLink = Label:l "(" @Sp Source:s Spnl Title @Sp ")" { "{#{l}}[#{s}]" } # - # source://rdoc//rdoc/markdown.rb#11147 + # source://rdoc//lib/rdoc/markdown.rb#11147 def _ExplicitLink; end # ExtendedSpecialChar = &{ notes? } "^" # - # source://rdoc//rdoc/markdown.rb#15184 + # source://rdoc//lib/rdoc/markdown.rb#15184 def _ExtendedSpecialChar; end # Heading = (SetextHeading | AtxHeading) # - # source://rdoc//rdoc/markdown.rb#1548 + # source://rdoc//lib/rdoc/markdown.rb#1548 def _Heading; end # HexEntity = /&#x/i < /[0-9a-fA-F]+/ > ";" { [text.to_i(16)].pack 'U' } # - # source://rdoc//rdoc/markdown.rb#14740 + # source://rdoc//lib/rdoc/markdown.rb#14740 def _HexEntity; end # HorizontalRule = @NonindentSpace ("*" @Sp "*" @Sp "*" (@Sp "*")* | "-" @Sp "-" @Sp "-" (@Sp "-")* | "_" @Sp "_" @Sp "_" (@Sp "_")*) @Sp @Newline @BlankLine+ { RDoc::Markup::Rule.new 1 } # - # source://rdoc//rdoc/markdown.rb#1932 + # source://rdoc//lib/rdoc/markdown.rb#1932 def _HorizontalRule; end # HtmlAnchor = HtmlOpenAnchor (HtmlAnchor | !HtmlCloseAnchor .)* HtmlCloseAnchor # - # source://rdoc//rdoc/markdown.rb#2971 + # source://rdoc//lib/rdoc/markdown.rb#2971 def _HtmlAnchor; end # HtmlAttribute = (AlphanumericAscii | "-")+ Spnl ("=" Spnl (Quoted | (!">" Nonspacechar)+))? Spnl # - # source://rdoc//rdoc/markdown.rb#14273 + # source://rdoc//lib/rdoc/markdown.rb#14273 def _HtmlAttribute; end # HtmlBlock = < (HtmlBlockInTags | HtmlComment | HtmlBlockSelfClosing | HtmlUnclosed) > @BlankLine+ { if html? then RDoc::Markup::Raw.new text end } # - # source://rdoc//rdoc/markdown.rb#8768 + # source://rdoc//lib/rdoc/markdown.rb#8768 def _HtmlBlock; end # HtmlBlockAddress = HtmlBlockOpenAddress (HtmlBlockAddress | !HtmlBlockCloseAddress .)* HtmlBlockCloseAddress # - # source://rdoc//rdoc/markdown.rb#3137 + # source://rdoc//lib/rdoc/markdown.rb#3137 def _HtmlBlockAddress; end # HtmlBlockBlockquote = HtmlBlockOpenBlockquote (HtmlBlockBlockquote | !HtmlBlockCloseBlockquote .)* HtmlBlockCloseBlockquote # - # source://rdoc//rdoc/markdown.rb#3303 + # source://rdoc//lib/rdoc/markdown.rb#3303 def _HtmlBlockBlockquote; end # HtmlBlockCenter = HtmlBlockOpenCenter (HtmlBlockCenter | !HtmlBlockCloseCenter .)* HtmlBlockCloseCenter # - # source://rdoc//rdoc/markdown.rb#3469 + # source://rdoc//lib/rdoc/markdown.rb#3469 def _HtmlBlockCenter; end # HtmlBlockCloseAddress = "<" Spnl "/" ("address" | "ADDRESS") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#3085 + # source://rdoc//lib/rdoc/markdown.rb#3085 def _HtmlBlockCloseAddress; end # HtmlBlockCloseBlockquote = "<" Spnl "/" ("blockquote" | "BLOCKQUOTE") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#3251 + # source://rdoc//lib/rdoc/markdown.rb#3251 def _HtmlBlockCloseBlockquote; end # HtmlBlockCloseCenter = "<" Spnl "/" ("center" | "CENTER") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#3417 + # source://rdoc//lib/rdoc/markdown.rb#3417 def _HtmlBlockCloseCenter; end # HtmlBlockCloseDd = "<" Spnl "/" ("dd" | "DD") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#6737 + # source://rdoc//lib/rdoc/markdown.rb#6737 def _HtmlBlockCloseDd; end # HtmlBlockCloseDir = "<" Spnl "/" ("dir" | "DIR") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#3583 + # source://rdoc//lib/rdoc/markdown.rb#3583 def _HtmlBlockCloseDir; end # HtmlBlockCloseDiv = "<" Spnl "/" ("div" | "DIV") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#3749 + # source://rdoc//lib/rdoc/markdown.rb#3749 def _HtmlBlockCloseDiv; end # HtmlBlockCloseDl = "<" Spnl "/" ("dl" | "DL") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#3915 + # source://rdoc//lib/rdoc/markdown.rb#3915 def _HtmlBlockCloseDl; end # HtmlBlockCloseDt = "<" Spnl "/" ("dt" | "DT") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#6903 + # source://rdoc//lib/rdoc/markdown.rb#6903 def _HtmlBlockCloseDt; end # HtmlBlockCloseFieldset = "<" Spnl "/" ("fieldset" | "FIELDSET") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#4081 + # source://rdoc//lib/rdoc/markdown.rb#4081 def _HtmlBlockCloseFieldset; end # HtmlBlockCloseForm = "<" Spnl "/" ("form" | "FORM") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#4247 + # source://rdoc//lib/rdoc/markdown.rb#4247 def _HtmlBlockCloseForm; end # HtmlBlockCloseFrameset = "<" Spnl "/" ("frameset" | "FRAMESET") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#7069 + # source://rdoc//lib/rdoc/markdown.rb#7069 def _HtmlBlockCloseFrameset; end # HtmlBlockCloseH1 = "<" Spnl "/" ("h1" | "H1") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#4413 + # source://rdoc//lib/rdoc/markdown.rb#4413 def _HtmlBlockCloseH1; end # HtmlBlockCloseH2 = "<" Spnl "/" ("h2" | "H2") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#4579 + # source://rdoc//lib/rdoc/markdown.rb#4579 def _HtmlBlockCloseH2; end # HtmlBlockCloseH3 = "<" Spnl "/" ("h3" | "H3") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#4745 + # source://rdoc//lib/rdoc/markdown.rb#4745 def _HtmlBlockCloseH3; end # HtmlBlockCloseH4 = "<" Spnl "/" ("h4" | "H4") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#4911 + # source://rdoc//lib/rdoc/markdown.rb#4911 def _HtmlBlockCloseH4; end # HtmlBlockCloseH5 = "<" Spnl "/" ("h5" | "H5") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#5077 + # source://rdoc//lib/rdoc/markdown.rb#5077 def _HtmlBlockCloseH5; end # HtmlBlockCloseH6 = "<" Spnl "/" ("h6" | "H6") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#5243 + # source://rdoc//lib/rdoc/markdown.rb#5243 def _HtmlBlockCloseH6; end # HtmlBlockCloseHead = "<" Spnl "/" ("head" | "HEAD") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#8552 + # source://rdoc//lib/rdoc/markdown.rb#8552 def _HtmlBlockCloseHead; end # HtmlBlockCloseLi = "<" Spnl "/" ("li" | "LI") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#7235 + # source://rdoc//lib/rdoc/markdown.rb#7235 def _HtmlBlockCloseLi; end # HtmlBlockCloseMenu = "<" Spnl "/" ("menu" | "MENU") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#5409 + # source://rdoc//lib/rdoc/markdown.rb#5409 def _HtmlBlockCloseMenu; end # HtmlBlockCloseNoframes = "<" Spnl "/" ("noframes" | "NOFRAMES") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#5575 + # source://rdoc//lib/rdoc/markdown.rb#5575 def _HtmlBlockCloseNoframes; end # HtmlBlockCloseNoscript = "<" Spnl "/" ("noscript" | "NOSCRIPT") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#5741 + # source://rdoc//lib/rdoc/markdown.rb#5741 def _HtmlBlockCloseNoscript; end # HtmlBlockCloseOl = "<" Spnl "/" ("ol" | "OL") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#5907 + # source://rdoc//lib/rdoc/markdown.rb#5907 def _HtmlBlockCloseOl; end # HtmlBlockCloseP = "<" Spnl "/" ("p" | "P") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#6073 + # source://rdoc//lib/rdoc/markdown.rb#6073 def _HtmlBlockCloseP; end # HtmlBlockClosePre = "<" Spnl "/" ("pre" | "PRE") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#6239 + # source://rdoc//lib/rdoc/markdown.rb#6239 def _HtmlBlockClosePre; end # HtmlBlockCloseScript = "<" Spnl "/" ("script" | "SCRIPT") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#8397 + # source://rdoc//lib/rdoc/markdown.rb#8397 def _HtmlBlockCloseScript; end # HtmlBlockCloseTable = "<" Spnl "/" ("table" | "TABLE") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#6405 + # source://rdoc//lib/rdoc/markdown.rb#6405 def _HtmlBlockCloseTable; end # HtmlBlockCloseTbody = "<" Spnl "/" ("tbody" | "TBODY") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#7401 + # source://rdoc//lib/rdoc/markdown.rb#7401 def _HtmlBlockCloseTbody; end # HtmlBlockCloseTd = "<" Spnl "/" ("td" | "TD") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#7567 + # source://rdoc//lib/rdoc/markdown.rb#7567 def _HtmlBlockCloseTd; end # HtmlBlockCloseTfoot = "<" Spnl "/" ("tfoot" | "TFOOT") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#7733 + # source://rdoc//lib/rdoc/markdown.rb#7733 def _HtmlBlockCloseTfoot; end # HtmlBlockCloseTh = "<" Spnl "/" ("th" | "TH") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#7899 + # source://rdoc//lib/rdoc/markdown.rb#7899 def _HtmlBlockCloseTh; end # HtmlBlockCloseThead = "<" Spnl "/" ("thead" | "THEAD") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#8065 + # source://rdoc//lib/rdoc/markdown.rb#8065 def _HtmlBlockCloseThead; end # HtmlBlockCloseTr = "<" Spnl "/" ("tr" | "TR") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#8231 + # source://rdoc//lib/rdoc/markdown.rb#8231 def _HtmlBlockCloseTr; end # HtmlBlockCloseUl = "<" Spnl "/" ("ul" | "UL") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#6571 + # source://rdoc//lib/rdoc/markdown.rb#6571 def _HtmlBlockCloseUl; end # HtmlBlockDd = HtmlBlockOpenDd (HtmlBlockDd | !HtmlBlockCloseDd .)* HtmlBlockCloseDd # - # source://rdoc//rdoc/markdown.rb#6789 + # source://rdoc//lib/rdoc/markdown.rb#6789 def _HtmlBlockDd; end # HtmlBlockDir = HtmlBlockOpenDir (HtmlBlockDir | !HtmlBlockCloseDir .)* HtmlBlockCloseDir # - # source://rdoc//rdoc/markdown.rb#3635 + # source://rdoc//lib/rdoc/markdown.rb#3635 def _HtmlBlockDir; end # HtmlBlockDiv = HtmlBlockOpenDiv (HtmlBlockDiv | !HtmlBlockCloseDiv .)* HtmlBlockCloseDiv # - # source://rdoc//rdoc/markdown.rb#3801 + # source://rdoc//lib/rdoc/markdown.rb#3801 def _HtmlBlockDiv; end # HtmlBlockDl = HtmlBlockOpenDl (HtmlBlockDl | !HtmlBlockCloseDl .)* HtmlBlockCloseDl # - # source://rdoc//rdoc/markdown.rb#3967 + # source://rdoc//lib/rdoc/markdown.rb#3967 def _HtmlBlockDl; end # HtmlBlockDt = HtmlBlockOpenDt (HtmlBlockDt | !HtmlBlockCloseDt .)* HtmlBlockCloseDt # - # source://rdoc//rdoc/markdown.rb#6955 + # source://rdoc//lib/rdoc/markdown.rb#6955 def _HtmlBlockDt; end # HtmlBlockFieldset = HtmlBlockOpenFieldset (HtmlBlockFieldset | !HtmlBlockCloseFieldset .)* HtmlBlockCloseFieldset # - # source://rdoc//rdoc/markdown.rb#4133 + # source://rdoc//lib/rdoc/markdown.rb#4133 def _HtmlBlockFieldset; end # HtmlBlockForm = HtmlBlockOpenForm (HtmlBlockForm | !HtmlBlockCloseForm .)* HtmlBlockCloseForm # - # source://rdoc//rdoc/markdown.rb#4299 + # source://rdoc//lib/rdoc/markdown.rb#4299 def _HtmlBlockForm; end # HtmlBlockFrameset = HtmlBlockOpenFrameset (HtmlBlockFrameset | !HtmlBlockCloseFrameset .)* HtmlBlockCloseFrameset # - # source://rdoc//rdoc/markdown.rb#7121 + # source://rdoc//lib/rdoc/markdown.rb#7121 def _HtmlBlockFrameset; end # HtmlBlockH1 = HtmlBlockOpenH1 (HtmlBlockH1 | !HtmlBlockCloseH1 .)* HtmlBlockCloseH1 # - # source://rdoc//rdoc/markdown.rb#4465 + # source://rdoc//lib/rdoc/markdown.rb#4465 def _HtmlBlockH1; end # HtmlBlockH2 = HtmlBlockOpenH2 (HtmlBlockH2 | !HtmlBlockCloseH2 .)* HtmlBlockCloseH2 # - # source://rdoc//rdoc/markdown.rb#4631 + # source://rdoc//lib/rdoc/markdown.rb#4631 def _HtmlBlockH2; end # HtmlBlockH3 = HtmlBlockOpenH3 (HtmlBlockH3 | !HtmlBlockCloseH3 .)* HtmlBlockCloseH3 # - # source://rdoc//rdoc/markdown.rb#4797 + # source://rdoc//lib/rdoc/markdown.rb#4797 def _HtmlBlockH3; end # HtmlBlockH4 = HtmlBlockOpenH4 (HtmlBlockH4 | !HtmlBlockCloseH4 .)* HtmlBlockCloseH4 # - # source://rdoc//rdoc/markdown.rb#4963 + # source://rdoc//lib/rdoc/markdown.rb#4963 def _HtmlBlockH4; end # HtmlBlockH5 = HtmlBlockOpenH5 (HtmlBlockH5 | !HtmlBlockCloseH5 .)* HtmlBlockCloseH5 # - # source://rdoc//rdoc/markdown.rb#5129 + # source://rdoc//lib/rdoc/markdown.rb#5129 def _HtmlBlockH5; end # HtmlBlockH6 = HtmlBlockOpenH6 (HtmlBlockH6 | !HtmlBlockCloseH6 .)* HtmlBlockCloseH6 # - # source://rdoc//rdoc/markdown.rb#5295 + # source://rdoc//lib/rdoc/markdown.rb#5295 def _HtmlBlockH6; end # HtmlBlockHead = HtmlBlockOpenHead (!HtmlBlockCloseHead .)* HtmlBlockCloseHead # - # source://rdoc//rdoc/markdown.rb#8604 + # source://rdoc//lib/rdoc/markdown.rb#8604 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//rdoc/markdown.rb#8651 + # source://rdoc//lib/rdoc/markdown.rb#8651 def _HtmlBlockInTags; end # HtmlBlockLi = HtmlBlockOpenLi (HtmlBlockLi | !HtmlBlockCloseLi .)* HtmlBlockCloseLi # - # source://rdoc//rdoc/markdown.rb#7287 + # source://rdoc//lib/rdoc/markdown.rb#7287 def _HtmlBlockLi; end # HtmlBlockMenu = HtmlBlockOpenMenu (HtmlBlockMenu | !HtmlBlockCloseMenu .)* HtmlBlockCloseMenu # - # source://rdoc//rdoc/markdown.rb#5461 + # source://rdoc//lib/rdoc/markdown.rb#5461 def _HtmlBlockMenu; end # HtmlBlockNoframes = HtmlBlockOpenNoframes (HtmlBlockNoframes | !HtmlBlockCloseNoframes .)* HtmlBlockCloseNoframes # - # source://rdoc//rdoc/markdown.rb#5627 + # source://rdoc//lib/rdoc/markdown.rb#5627 def _HtmlBlockNoframes; end # HtmlBlockNoscript = HtmlBlockOpenNoscript (HtmlBlockNoscript | !HtmlBlockCloseNoscript .)* HtmlBlockCloseNoscript # - # source://rdoc//rdoc/markdown.rb#5793 + # source://rdoc//lib/rdoc/markdown.rb#5793 def _HtmlBlockNoscript; end # HtmlBlockOl = HtmlBlockOpenOl (HtmlBlockOl | !HtmlBlockCloseOl .)* HtmlBlockCloseOl # - # source://rdoc//rdoc/markdown.rb#5959 + # source://rdoc//lib/rdoc/markdown.rb#5959 def _HtmlBlockOl; end # HtmlBlockOpenAddress = "<" Spnl ("address" | "ADDRESS") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#3029 + # source://rdoc//lib/rdoc/markdown.rb#3029 def _HtmlBlockOpenAddress; end # HtmlBlockOpenBlockquote = "<" Spnl ("blockquote" | "BLOCKQUOTE") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#3195 + # source://rdoc//lib/rdoc/markdown.rb#3195 def _HtmlBlockOpenBlockquote; end # HtmlBlockOpenCenter = "<" Spnl ("center" | "CENTER") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#3361 + # source://rdoc//lib/rdoc/markdown.rb#3361 def _HtmlBlockOpenCenter; end # HtmlBlockOpenDd = "<" Spnl ("dd" | "DD") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#6681 + # source://rdoc//lib/rdoc/markdown.rb#6681 def _HtmlBlockOpenDd; end # HtmlBlockOpenDir = "<" Spnl ("dir" | "DIR") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#3527 + # source://rdoc//lib/rdoc/markdown.rb#3527 def _HtmlBlockOpenDir; end # HtmlBlockOpenDiv = "<" Spnl ("div" | "DIV") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#3693 + # source://rdoc//lib/rdoc/markdown.rb#3693 def _HtmlBlockOpenDiv; end # HtmlBlockOpenDl = "<" Spnl ("dl" | "DL") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#3859 + # source://rdoc//lib/rdoc/markdown.rb#3859 def _HtmlBlockOpenDl; end # HtmlBlockOpenDt = "<" Spnl ("dt" | "DT") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#6847 + # source://rdoc//lib/rdoc/markdown.rb#6847 def _HtmlBlockOpenDt; end # HtmlBlockOpenFieldset = "<" Spnl ("fieldset" | "FIELDSET") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#4025 + # source://rdoc//lib/rdoc/markdown.rb#4025 def _HtmlBlockOpenFieldset; end # HtmlBlockOpenForm = "<" Spnl ("form" | "FORM") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#4191 + # source://rdoc//lib/rdoc/markdown.rb#4191 def _HtmlBlockOpenForm; end # HtmlBlockOpenFrameset = "<" Spnl ("frameset" | "FRAMESET") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#7013 + # source://rdoc//lib/rdoc/markdown.rb#7013 def _HtmlBlockOpenFrameset; end # HtmlBlockOpenH1 = "<" Spnl ("h1" | "H1") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#4357 + # source://rdoc//lib/rdoc/markdown.rb#4357 def _HtmlBlockOpenH1; end # HtmlBlockOpenH2 = "<" Spnl ("h2" | "H2") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#4523 + # source://rdoc//lib/rdoc/markdown.rb#4523 def _HtmlBlockOpenH2; end # HtmlBlockOpenH3 = "<" Spnl ("h3" | "H3") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#4689 + # source://rdoc//lib/rdoc/markdown.rb#4689 def _HtmlBlockOpenH3; end # HtmlBlockOpenH4 = "<" Spnl ("h4" | "H4") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#4855 + # source://rdoc//lib/rdoc/markdown.rb#4855 def _HtmlBlockOpenH4; end # HtmlBlockOpenH5 = "<" Spnl ("h5" | "H5") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#5021 + # source://rdoc//lib/rdoc/markdown.rb#5021 def _HtmlBlockOpenH5; end # HtmlBlockOpenH6 = "<" Spnl ("h6" | "H6") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#5187 + # source://rdoc//lib/rdoc/markdown.rb#5187 def _HtmlBlockOpenH6; end # HtmlBlockOpenHead = "<" Spnl ("head" | "HEAD") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#8496 + # source://rdoc//lib/rdoc/markdown.rb#8496 def _HtmlBlockOpenHead; end # HtmlBlockOpenLi = "<" Spnl ("li" | "LI") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#7179 + # source://rdoc//lib/rdoc/markdown.rb#7179 def _HtmlBlockOpenLi; end # HtmlBlockOpenMenu = "<" Spnl ("menu" | "MENU") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#5353 + # source://rdoc//lib/rdoc/markdown.rb#5353 def _HtmlBlockOpenMenu; end # HtmlBlockOpenNoframes = "<" Spnl ("noframes" | "NOFRAMES") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#5519 + # source://rdoc//lib/rdoc/markdown.rb#5519 def _HtmlBlockOpenNoframes; end # HtmlBlockOpenNoscript = "<" Spnl ("noscript" | "NOSCRIPT") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#5685 + # source://rdoc//lib/rdoc/markdown.rb#5685 def _HtmlBlockOpenNoscript; end # HtmlBlockOpenOl = "<" Spnl ("ol" | "OL") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#5851 + # source://rdoc//lib/rdoc/markdown.rb#5851 def _HtmlBlockOpenOl; end # HtmlBlockOpenP = "<" Spnl ("p" | "P") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#6017 + # source://rdoc//lib/rdoc/markdown.rb#6017 def _HtmlBlockOpenP; end # HtmlBlockOpenPre = "<" Spnl ("pre" | "PRE") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#6183 + # source://rdoc//lib/rdoc/markdown.rb#6183 def _HtmlBlockOpenPre; end # HtmlBlockOpenScript = "<" Spnl ("script" | "SCRIPT") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#8341 + # source://rdoc//lib/rdoc/markdown.rb#8341 def _HtmlBlockOpenScript; end # HtmlBlockOpenTable = "<" Spnl ("table" | "TABLE") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#6349 + # source://rdoc//lib/rdoc/markdown.rb#6349 def _HtmlBlockOpenTable; end # HtmlBlockOpenTbody = "<" Spnl ("tbody" | "TBODY") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#7345 + # source://rdoc//lib/rdoc/markdown.rb#7345 def _HtmlBlockOpenTbody; end # HtmlBlockOpenTd = "<" Spnl ("td" | "TD") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#7511 + # source://rdoc//lib/rdoc/markdown.rb#7511 def _HtmlBlockOpenTd; end # HtmlBlockOpenTfoot = "<" Spnl ("tfoot" | "TFOOT") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#7677 + # source://rdoc//lib/rdoc/markdown.rb#7677 def _HtmlBlockOpenTfoot; end # HtmlBlockOpenTh = "<" Spnl ("th" | "TH") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#7843 + # source://rdoc//lib/rdoc/markdown.rb#7843 def _HtmlBlockOpenTh; end # HtmlBlockOpenThead = "<" Spnl ("thead" | "THEAD") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#8009 + # source://rdoc//lib/rdoc/markdown.rb#8009 def _HtmlBlockOpenThead; end # HtmlBlockOpenTr = "<" Spnl ("tr" | "TR") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#8175 + # source://rdoc//lib/rdoc/markdown.rb#8175 def _HtmlBlockOpenTr; end # HtmlBlockOpenUl = "<" Spnl ("ul" | "UL") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#6515 + # source://rdoc//lib/rdoc/markdown.rb#6515 def _HtmlBlockOpenUl; end # HtmlBlockP = HtmlBlockOpenP (HtmlBlockP | !HtmlBlockCloseP .)* HtmlBlockCloseP # - # source://rdoc//rdoc/markdown.rb#6125 + # source://rdoc//lib/rdoc/markdown.rb#6125 def _HtmlBlockP; end # HtmlBlockPre = HtmlBlockOpenPre (HtmlBlockPre | !HtmlBlockClosePre .)* HtmlBlockClosePre # - # source://rdoc//rdoc/markdown.rb#6291 + # source://rdoc//lib/rdoc/markdown.rb#6291 def _HtmlBlockPre; end # HtmlBlockScript = HtmlBlockOpenScript (!HtmlBlockCloseScript .)* HtmlBlockCloseScript # - # source://rdoc//rdoc/markdown.rb#8449 + # source://rdoc//lib/rdoc/markdown.rb#8449 def _HtmlBlockScript; end # HtmlBlockSelfClosing = "<" Spnl HtmlBlockType Spnl HtmlAttribute* "/" Spnl ">" # - # source://rdoc//rdoc/markdown.rb#8896 + # source://rdoc//lib/rdoc/markdown.rb#8896 def _HtmlBlockSelfClosing; end # HtmlBlockTable = HtmlBlockOpenTable (HtmlBlockTable | !HtmlBlockCloseTable .)* HtmlBlockCloseTable # - # source://rdoc//rdoc/markdown.rb#6457 + # source://rdoc//lib/rdoc/markdown.rb#6457 def _HtmlBlockTable; end # HtmlBlockTbody = HtmlBlockOpenTbody (HtmlBlockTbody | !HtmlBlockCloseTbody .)* HtmlBlockCloseTbody # - # source://rdoc//rdoc/markdown.rb#7453 + # source://rdoc//lib/rdoc/markdown.rb#7453 def _HtmlBlockTbody; end # HtmlBlockTd = HtmlBlockOpenTd (HtmlBlockTd | !HtmlBlockCloseTd .)* HtmlBlockCloseTd # - # source://rdoc//rdoc/markdown.rb#7619 + # source://rdoc//lib/rdoc/markdown.rb#7619 def _HtmlBlockTd; end # HtmlBlockTfoot = HtmlBlockOpenTfoot (HtmlBlockTfoot | !HtmlBlockCloseTfoot .)* HtmlBlockCloseTfoot # - # source://rdoc//rdoc/markdown.rb#7785 + # source://rdoc//lib/rdoc/markdown.rb#7785 def _HtmlBlockTfoot; end # HtmlBlockTh = HtmlBlockOpenTh (HtmlBlockTh | !HtmlBlockCloseTh .)* HtmlBlockCloseTh # - # source://rdoc//rdoc/markdown.rb#7951 + # source://rdoc//lib/rdoc/markdown.rb#7951 def _HtmlBlockTh; end # HtmlBlockThead = HtmlBlockOpenThead (HtmlBlockThead | !HtmlBlockCloseThead .)* HtmlBlockCloseThead # - # source://rdoc//rdoc/markdown.rb#8117 + # source://rdoc//lib/rdoc/markdown.rb#8117 def _HtmlBlockThead; end # HtmlBlockTr = HtmlBlockOpenTr (HtmlBlockTr | !HtmlBlockCloseTr .)* HtmlBlockCloseTr # - # source://rdoc//rdoc/markdown.rb#8283 + # source://rdoc//lib/rdoc/markdown.rb#8283 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//rdoc/markdown.rb#8951 + # source://rdoc//lib/rdoc/markdown.rb#8951 def _HtmlBlockType; end # HtmlBlockUl = HtmlBlockOpenUl (HtmlBlockUl | !HtmlBlockCloseUl .)* HtmlBlockCloseUl # - # source://rdoc//rdoc/markdown.rb#6623 + # source://rdoc//lib/rdoc/markdown.rb#6623 def _HtmlBlockUl; end # HtmlCloseAnchor = "<" Spnl "/" ("a" | "A") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#2919 + # source://rdoc//lib/rdoc/markdown.rb#2919 def _HtmlCloseAnchor; end # HtmlComment = "" .)* "-->" # - # source://rdoc//rdoc/markdown.rb#14415 + # source://rdoc//lib/rdoc/markdown.rb#14415 def _HtmlComment; end # HtmlOpenAnchor = "<" Spnl ("a" | "A") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#2863 + # source://rdoc//lib/rdoc/markdown.rb#2863 def _HtmlOpenAnchor; end # HtmlTag = "<" Spnl "/"? AlphanumericAscii+ Spnl HtmlAttribute* "/"? Spnl ">" # - # source://rdoc//rdoc/markdown.rb#14462 + # source://rdoc//lib/rdoc/markdown.rb#14462 def _HtmlTag; end # HtmlUnclosed = "<" Spnl HtmlUnclosedType Spnl HtmlAttribute* Spnl ">" # - # source://rdoc//rdoc/markdown.rb#8828 + # source://rdoc//lib/rdoc/markdown.rb#8828 def _HtmlUnclosed; end # HtmlUnclosedType = ("HR" | "hr") # - # source://rdoc//rdoc/markdown.rb#8878 + # source://rdoc//lib/rdoc/markdown.rb#8878 def _HtmlUnclosedType; end # Image = "!" (ExplicitLink | ReferenceLink):a { "rdoc-image:#{a[/\[(.*)\]/, 1]}" } # - # source://rdoc//rdoc/markdown.rb#10972 + # source://rdoc//lib/rdoc/markdown.rb#10972 def _Image; end # InStyleTags = StyleOpen (!StyleClose .)* StyleClose # - # source://rdoc//rdoc/markdown.rb#9281 + # source://rdoc//lib/rdoc/markdown.rb#9281 def _InStyleTags; end # Indent = /\t| / # - # source://rdoc//rdoc/markdown.rb#14860 + # source://rdoc//lib/rdoc/markdown.rb#14860 def _Indent; end # IndentedLine = Indent Line # - # source://rdoc//rdoc/markdown.rb#14867 + # source://rdoc//lib/rdoc/markdown.rb#14867 def _IndentedLine; end # Inline = (Str | @Endline | UlOrStarLine | @Space | Strong | Emph | Strike | Image | Link | NoteReference | InlineNote | Code | RawHtml | Entity | EscapedChar | Symbol) # - # source://rdoc//rdoc/markdown.rb#9586 + # source://rdoc//lib/rdoc/markdown.rb#9586 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//rdoc/markdown.rb#15431 + # source://rdoc//lib/rdoc/markdown.rb#15431 def _InlineNote; end # Inlines = (!@Endline Inline:i { i } | @Endline:c !(&{ github? } Ticks3 /[^`\n]*$/) &Inline { c })+:chunks @Endline? { chunks } # - # source://rdoc//rdoc/markdown.rb#9365 + # source://rdoc//lib/rdoc/markdown.rb#9365 def _Inlines; end # Label = "[" (!"^" &{ notes? } | &. &{ !notes? }) @StartList:a (!"]" Inline:l { a << l })* "]" { a.join.gsub(/\s+/, ' ') } # - # source://rdoc//rdoc/markdown.rb#11907 + # source://rdoc//lib/rdoc/markdown.rb#11907 def _Label; end # Line = @RawLine:a { a } # - # source://rdoc//rdoc/markdown.rb#14938 + # source://rdoc//lib/rdoc/markdown.rb#14938 def _Line; end # LineBreak = " " @NormalEndline { RDoc::Markup::HardBreak.new } # - # source://rdoc//rdoc/markdown.rb#10042 + # source://rdoc//lib/rdoc/markdown.rb#10042 def _LineBreak; end # Link = (ExplicitLink | ReferenceLink | AutoLink) # - # source://rdoc//rdoc/markdown.rb#11011 + # source://rdoc//lib/rdoc/markdown.rb#11011 def _Link; end # ListBlock = !@BlankLine Line:a ListBlockLine*:c { [a, *c] } # - # source://rdoc//rdoc/markdown.rb#2548 + # source://rdoc//lib/rdoc/markdown.rb#2548 def _ListBlock; end # ListBlockLine = !@BlankLine !(Indent? (Bullet | Enumerator)) !HorizontalRule OptionallyIndentedLine # - # source://rdoc//rdoc/markdown.rb#2793 + # source://rdoc//lib/rdoc/markdown.rb#2793 def _ListBlockLine; end # ListContinuationBlock = @StartList:a @BlankLine* { a << "\n" } (Indent ListBlock:b { a.concat b })+ { a } # - # source://rdoc//rdoc/markdown.rb#2592 + # source://rdoc//lib/rdoc/markdown.rb#2592 def _ListContinuationBlock; end # ListItem = (Bullet | Enumerator) @StartList:a ListBlock:b { a << b } (ListContinuationBlock:c { a.push(*c) })* { list_item_from a } # - # source://rdoc//rdoc/markdown.rb#2392 + # source://rdoc//lib/rdoc/markdown.rb#2392 def _ListItem; end # ListItemTight = (Bullet | Enumerator) ListBlock:a (!@BlankLine ListContinuationBlock:b { a.push(*b) })* !ListContinuationBlock { list_item_from a } # - # source://rdoc//rdoc/markdown.rb#2468 + # source://rdoc//lib/rdoc/markdown.rb#2468 def _ListItemTight; end # ListLoose = @StartList:a (ListItem:b @BlankLine* { a << b })+ { a } # - # source://rdoc//rdoc/markdown.rb#2304 + # source://rdoc//lib/rdoc/markdown.rb#2304 def _ListLoose; end # ListTight = ListItemTight+:a @BlankLine* !(Bullet | Enumerator) { a } # - # source://rdoc//rdoc/markdown.rb#2239 + # source://rdoc//lib/rdoc/markdown.rb#2239 def _ListTight; end # Newline = %literals.Newline # - # source://rdoc//rdoc/markdown.rb#14726 + # source://rdoc//lib/rdoc/markdown.rb#14726 def _Newline; end # NonblankIndentedLine = !@BlankLine IndentedLine # - # source://rdoc//rdoc/markdown.rb#1821 + # source://rdoc//lib/rdoc/markdown.rb#1821 def _NonblankIndentedLine; end # NonindentSpace = / {0,3}/ # - # source://rdoc//rdoc/markdown.rb#14853 + # source://rdoc//lib/rdoc/markdown.rb#14853 def _NonindentSpace; end # Nonspacechar = !@Spacechar !@Newline . # - # source://rdoc//rdoc/markdown.rb#14552 + # source://rdoc//lib/rdoc/markdown.rb#14552 def _Nonspacechar; end # NormalChar = !(@SpecialChar | @Spacechar | @Newline) . # - # source://rdoc//rdoc/markdown.rb#14653 + # source://rdoc//lib/rdoc/markdown.rb#14653 def _NormalChar; end # NormalEndline = @Sp @Newline !@BlankLine !">" !AtxStart !(Line /={1,}|-{1,}/ @Newline) { "\n" } # - # source://rdoc//rdoc/markdown.rb#9938 + # source://rdoc//lib/rdoc/markdown.rb#9938 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//rdoc/markdown.rb#15333 + # source://rdoc//lib/rdoc/markdown.rb#15333 def _Note; end # NoteReference = &{ notes? } RawNoteReference:ref { note_for ref } # - # source://rdoc//rdoc/markdown.rb#15207 + # source://rdoc//lib/rdoc/markdown.rb#15207 def _NoteReference; end # Notes = (Note | SkipBlock)* # - # source://rdoc//rdoc/markdown.rb#15538 + # source://rdoc//lib/rdoc/markdown.rb#15538 def _Notes; end # OptionallyIndentedLine = Indent? Line # - # source://rdoc//rdoc/markdown.rb#14888 + # source://rdoc//lib/rdoc/markdown.rb#14888 def _OptionallyIndentedLine; end # OrderedList = &Enumerator (ListTight | ListLoose):a { RDoc::Markup::List.new(:NUMBER, *a) } # - # source://rdoc//rdoc/markdown.rb#2752 + # source://rdoc//lib/rdoc/markdown.rb#2752 def _OrderedList; end # Para = @NonindentSpace Inlines:a @BlankLine+ { paragraph a } # - # source://rdoc//rdoc/markdown.rb#1014 + # source://rdoc//lib/rdoc/markdown.rb#1014 def _Para; end # Plain = Inlines:a { paragraph a } # - # source://rdoc//rdoc/markdown.rb#1057 + # source://rdoc//lib/rdoc/markdown.rb#1057 def _Plain; end # Quoted = ("\"" (!"\"" .)* "\"" | "'" (!"'" .)* "'") # - # source://rdoc//rdoc/markdown.rb#14175 + # source://rdoc//lib/rdoc/markdown.rb#14175 def _Quoted; end # RawHtml = < (HtmlComment | HtmlBlockScript | HtmlTag) > { if html? then text else '' end } # - # source://rdoc//rdoc/markdown.rb#14108 + # source://rdoc//lib/rdoc/markdown.rb#14108 def _RawHtml; end # RawLine = (< /[^\r\n]*/ @Newline > | < .+ > @Eof) { text } # - # source://rdoc//rdoc/markdown.rb#14961 + # source://rdoc//lib/rdoc/markdown.rb#14961 def _RawLine; end # RawNoteBlock = @StartList:a (!@BlankLine !RawNoteReference OptionallyIndentedLine:l { a << l })+ < @BlankLine* > { a << text } { a } # - # source://rdoc//rdoc/markdown.rb#15560 + # source://rdoc//lib/rdoc/markdown.rb#15560 def _RawNoteBlock; end # RawNoteReference = "[^" < (!@Newline !"]" .)+ > "]" { text } # - # source://rdoc//rdoc/markdown.rb#15237 + # source://rdoc//lib/rdoc/markdown.rb#15237 def _RawNoteReference; end # RefSrc = < Nonspacechar+ > { text } # - # source://rdoc//rdoc/markdown.rb#12026 + # source://rdoc//lib/rdoc/markdown.rb#12026 def _RefSrc; end # RefTitle = (RefTitleSingle | RefTitleDouble | RefTitleParens | EmptyTitle) # - # source://rdoc//rdoc/markdown.rb#12062 + # source://rdoc//lib/rdoc/markdown.rb#12062 def _RefTitle; end # RefTitleDouble = Spnl "\"" < (!("\"" @Sp @Newline | @Newline) .)* > "\"" { text } # - # source://rdoc//rdoc/markdown.rb#12185 + # source://rdoc//lib/rdoc/markdown.rb#12185 def _RefTitleDouble; end # RefTitleParens = Spnl "(" < (!(")" @Sp @Newline | @Newline) .)* > ")" { text } # - # source://rdoc//rdoc/markdown.rb#12277 + # source://rdoc//lib/rdoc/markdown.rb#12277 def _RefTitleParens; end # RefTitleSingle = Spnl "'" < (!("'" @Sp @Newline | @Newline) .)* > "'" { text } # - # source://rdoc//rdoc/markdown.rb#12093 + # source://rdoc//lib/rdoc/markdown.rb#12093 def _RefTitleSingle; end # Reference = @NonindentSpace !"[]" Label:label ":" Spnl RefSrc:link RefTitle @BlankLine+ { # TODO use title reference label, link nil } # - # source://rdoc//rdoc/markdown.rb#11832 + # source://rdoc//lib/rdoc/markdown.rb#11832 def _Reference; end # ReferenceLink = (ReferenceLinkDouble | ReferenceLinkSingle) # - # source://rdoc//rdoc/markdown.rb#11032 + # source://rdoc//lib/rdoc/markdown.rb#11032 def _ReferenceLink; end # ReferenceLinkDouble = Label:content < Spnl > !"[]" Label:label { link_to content, label, text } # - # source://rdoc//rdoc/markdown.rb#11050 + # source://rdoc//lib/rdoc/markdown.rb#11050 def _ReferenceLinkDouble; end # ReferenceLinkSingle = Label:content < (Spnl "[]")? > { link_to content, content, text } # - # source://rdoc//rdoc/markdown.rb#11096 + # source://rdoc//lib/rdoc/markdown.rb#11096 def _ReferenceLinkSingle; end # References = (Reference | SkipBlock)* # - # source://rdoc//rdoc/markdown.rb#12369 + # source://rdoc//lib/rdoc/markdown.rb#12369 def _References; end # SetextBottom1 = /={1,}/ @Newline # - # source://rdoc//rdoc/markdown.rb#1262 + # source://rdoc//lib/rdoc/markdown.rb#1262 def _SetextBottom1; end # SetextBottom2 = /-{1,}/ @Newline # - # source://rdoc//rdoc/markdown.rb#1283 + # source://rdoc//lib/rdoc/markdown.rb#1283 def _SetextBottom2; end # SetextHeading = (SetextHeading1 | SetextHeading2) # - # source://rdoc//rdoc/markdown.rb#1244 + # source://rdoc//lib/rdoc/markdown.rb#1244 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//rdoc/markdown.rb#1304 + # source://rdoc//lib/rdoc/markdown.rb#1304 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//rdoc/markdown.rb#1426 + # source://rdoc//lib/rdoc/markdown.rb#1426 def _SetextHeading2; end # SkipBlock = (HtmlBlock | (!"#" !SetextBottom1 !SetextBottom2 !@BlankLine @RawLine)+ @BlankLine* | @BlankLine+ | @RawLine) # - # source://rdoc//rdoc/markdown.rb#15040 + # source://rdoc//lib/rdoc/markdown.rb#15040 def _SkipBlock; end # Source = ("<" < SourceContents > ">" | < SourceContents >) { text } # - # source://rdoc//rdoc/markdown.rb#11206 + # source://rdoc//lib/rdoc/markdown.rb#11206 def _Source; end # SourceContents = ((!"(" !")" !">" Nonspacechar)+ | "(" SourceContents ")")* # - # source://rdoc//rdoc/markdown.rb#11266 + # source://rdoc//lib/rdoc/markdown.rb#11266 def _SourceContents; end # Sp = @Spacechar* # - # source://rdoc//rdoc/markdown.rb#14584 + # source://rdoc//lib/rdoc/markdown.rb#14584 def _Sp; end # Space = @Spacechar+ { " " } # - # source://rdoc//rdoc/markdown.rb#9646 + # source://rdoc//lib/rdoc/markdown.rb#9646 def _Space; end # Spacechar = %literals.Spacechar # - # source://rdoc//rdoc/markdown.rb#14733 + # source://rdoc//lib/rdoc/markdown.rb#14733 def _Spacechar; end # SpecialChar = (/[~*_`&\[\]() { text } | < @Spacechar /\*+/ &@Spacechar > { text }) # - # source://rdoc//rdoc/markdown.rb#10129 + # source://rdoc//lib/rdoc/markdown.rb#10129 def _StarLine; end # StartList = &. { [] } # - # source://rdoc//rdoc/markdown.rb#14914 + # source://rdoc//lib/rdoc/markdown.rb#14914 def _StartList; end # Str = @StartList:a < @NormalChar+ > { a = text } (StrChunk:c { a << c })* { a } # - # source://rdoc//rdoc/markdown.rb#9678 + # source://rdoc//lib/rdoc/markdown.rb#9678 def _Str; end # StrChunk = < (@NormalChar | /_+/ &Alphanumeric)+ > { text } # - # source://rdoc//rdoc/markdown.rb#9751 + # source://rdoc//lib/rdoc/markdown.rb#9751 def _StrChunk; end # Strike = &{ strike? } "~~" !@Whitespace @StartList:a (!"~~" Inline:b { a << b })+ "~~" { strike a.join } # - # source://rdoc//rdoc/markdown.rb#10861 + # source://rdoc//lib/rdoc/markdown.rb#10861 def _Strike; end # Strong = (StrongStar | StrongUl) # - # source://rdoc//rdoc/markdown.rb#10635 + # source://rdoc//lib/rdoc/markdown.rb#10635 def _Strong; end # StrongStar = "**" !@Whitespace @StartList:a (!"**" Inline:b { a << b })+ "**" { strong a.join } # - # source://rdoc//rdoc/markdown.rb#10653 + # source://rdoc//lib/rdoc/markdown.rb#10653 def _StrongStar; end # StrongUl = "__" !@Whitespace @StartList:a (!"__" Inline:b { a << b })+ "__" { strong a.join } # - # source://rdoc//rdoc/markdown.rb#10757 + # source://rdoc//lib/rdoc/markdown.rb#10757 def _StrongUl; end # StyleBlock = < InStyleTags > @BlankLine* { if css? then RDoc::Markup::Raw.new text end } # - # source://rdoc//rdoc/markdown.rb#9328 + # source://rdoc//lib/rdoc/markdown.rb#9328 def _StyleBlock; end # StyleClose = "<" Spnl "/" ("style" | "STYLE") Spnl ">" # - # source://rdoc//rdoc/markdown.rb#9229 + # source://rdoc//lib/rdoc/markdown.rb#9229 def _StyleClose; end # StyleOpen = "<" Spnl ("style" | "STYLE") Spnl HtmlAttribute* ">" # - # source://rdoc//rdoc/markdown.rb#9173 + # source://rdoc//lib/rdoc/markdown.rb#9173 def _StyleOpen; end # Symbol = < @SpecialChar > { text } # - # source://rdoc//rdoc/markdown.rb#10069 + # source://rdoc//lib/rdoc/markdown.rb#10069 def _Symbol; end # Table = &{ github? } TableHead:header TableLine:line TableRow+:body { table = RDoc::Markup::Table.new(header, line, body) } # - # source://rdoc//rdoc/markdown.rb#15937 + # source://rdoc//lib/rdoc/markdown.rb#15937 def _Table; end # TableAlign = < /:?-+:?/ > @Sp { text.start_with?(":") ? (text.end_with?(":") ? :center : :left) : (text.end_with?(":") ? :right : nil) } # - # source://rdoc//rdoc/markdown.rb#16304 + # source://rdoc//lib/rdoc/markdown.rb#16304 def _TableAlign; end # TableAlign2 = "|" @Sp TableAlign # - # source://rdoc//rdoc/markdown.rb#16278 + # source://rdoc//lib/rdoc/markdown.rb#16278 def _TableAlign2; end # TableHead = TableItem2+:items "|"? @Newline { items } # - # source://rdoc//rdoc/markdown.rb#15993 + # source://rdoc//lib/rdoc/markdown.rb#15993 def _TableHead; end # TableItem = < /(?:\\.|[^|\n])+/ > { text.strip.gsub(/\\(.)/, '\1') } # - # source://rdoc//rdoc/markdown.rb#16159 + # source://rdoc//lib/rdoc/markdown.rb#16159 def _TableItem; end # TableItem2 = "|" TableItem # - # source://rdoc//rdoc/markdown.rb#16138 + # source://rdoc//lib/rdoc/markdown.rb#16138 def _TableItem2; end # TableLine = ((TableAlign:align1 TableAlign2*:aligns {[align1, *aligns] }):line | TableAlign2+:line) "|"? @Newline { line } # - # source://rdoc//rdoc/markdown.rb#16185 + # source://rdoc//lib/rdoc/markdown.rb#16185 def _TableLine; end # TableRow = ((TableItem:item1 TableItem2*:items { [item1, *items] }):row | TableItem2+:row) "|"? @Newline { row } # - # source://rdoc//rdoc/markdown.rb#16045 + # source://rdoc//lib/rdoc/markdown.rb#16045 def _TableRow; end # TerminalEndline = @Sp @Newline @Eof # - # source://rdoc//rdoc/markdown.rb#10016 + # source://rdoc//lib/rdoc/markdown.rb#10016 def _TerminalEndline; end # Ticks1 = "`" !"`" # - # source://rdoc//rdoc/markdown.rb#12391 + # source://rdoc//lib/rdoc/markdown.rb#12391 def _Ticks1; end # Ticks2 = "``" !"`" # - # source://rdoc//rdoc/markdown.rb#12415 + # source://rdoc//lib/rdoc/markdown.rb#12415 def _Ticks2; end # Ticks3 = "```" !"`" # - # source://rdoc//rdoc/markdown.rb#12439 + # source://rdoc//lib/rdoc/markdown.rb#12439 def _Ticks3; end # Ticks4 = "````" !"`" # - # source://rdoc//rdoc/markdown.rb#12463 + # source://rdoc//lib/rdoc/markdown.rb#12463 def _Ticks4; end # Ticks5 = "`````" !"`" # - # source://rdoc//rdoc/markdown.rb#12487 + # source://rdoc//lib/rdoc/markdown.rb#12487 def _Ticks5; end # Title = (TitleSingle | TitleDouble | ""):a { a } # - # source://rdoc//rdoc/markdown.rb#11383 + # source://rdoc//lib/rdoc/markdown.rb#11383 def _Title; end # TitleDouble = "\"" (!("\"" @Sp (")" | @Newline)) .)* "\"" # - # source://rdoc//rdoc/markdown.rb#11497 + # source://rdoc//lib/rdoc/markdown.rb#11497 def _TitleDouble; end # TitleSingle = "'" (!("'" @Sp (")" | @Newline)) .)* "'" # - # source://rdoc//rdoc/markdown.rb#11420 + # source://rdoc//lib/rdoc/markdown.rb#11420 def _TitleSingle; end # UlLine = (< /_{4,}/ > { text } | < @Spacechar /_+/ &@Spacechar > { text }) # - # source://rdoc//rdoc/markdown.rb#10206 + # source://rdoc//lib/rdoc/markdown.rb#10206 def _UlLine; end # UlOrStarLine = (UlLine | StarLine):a { a } # - # source://rdoc//rdoc/markdown.rb#10095 + # source://rdoc//lib/rdoc/markdown.rb#10095 def _UlOrStarLine; end # Verbatim = VerbatimChunk+:a { RDoc::Markup::Verbatim.new(*a.flatten) } # - # source://rdoc//rdoc/markdown.rb#1895 + # source://rdoc//lib/rdoc/markdown.rb#1895 def _Verbatim; end # VerbatimChunk = @BlankLine*:a NonblankIndentedLine+:b { a.concat b } # - # source://rdoc//rdoc/markdown.rb#1845 + # source://rdoc//lib/rdoc/markdown.rb#1845 def _VerbatimChunk; end # Whitespace = (@Spacechar | @Newline) # - # source://rdoc//rdoc/markdown.rb#10301 + # source://rdoc//lib/rdoc/markdown.rb#10301 def _Whitespace; end # root = Doc # - # source://rdoc//rdoc/markdown.rb#892 + # source://rdoc//lib/rdoc/markdown.rb#892 def _root; end - # source://rdoc//rdoc/markdown.rb#502 + # source://rdoc//lib/rdoc/markdown.rb#502 def apply(rule); end - # source://rdoc//rdoc/markdown.rb#468 + # source://rdoc//lib/rdoc/markdown.rb#468 def apply_with_args(rule, *args); end - # source://rdoc//rdoc/markdown.rb#610 + # source://rdoc//lib/rdoc/markdown.rb#610 def break_on_newline=(enable); end - # source://rdoc//rdoc/markdown.rb#606 + # source://rdoc//lib/rdoc/markdown.rb#606 def break_on_newline?; end - # source://rdoc//rdoc/markdown.rb#610 + # source://rdoc//lib/rdoc/markdown.rb#610 def css=(enable); end - # source://rdoc//rdoc/markdown.rb#606 + # source://rdoc//lib/rdoc/markdown.rb#606 def css?; end - # source://rdoc//rdoc/markdown.rb#250 + # source://rdoc//lib/rdoc/markdown.rb#250 def current_character(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown.rb#211 + # source://rdoc//lib/rdoc/markdown.rb#211 def current_column(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown.rb#234 + # source://rdoc//lib/rdoc/markdown.rb#234 def current_line(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown.rb#259 + # source://rdoc//lib/rdoc/markdown.rb#259 def current_pos_info(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown.rb#610 + # source://rdoc//lib/rdoc/markdown.rb#610 def definition_lists=(enable); end - # source://rdoc//rdoc/markdown.rb#606 + # source://rdoc//lib/rdoc/markdown.rb#606 def definition_lists?; end # Wraps `text` in emphasis for rdoc inline formatting # - # source://rdoc//rdoc/markdown.rb#683 + # source://rdoc//lib/rdoc/markdown.rb#683 def emphasis(text); end # :category: Extensions # # Enables or disables the extension with `name` # - # source://rdoc//rdoc/markdown.rb#705 + # source://rdoc//lib/rdoc/markdown.rb#705 def extension(name, enable); end # :category: Extensions @@ -4077,65 +4122,65 @@ class RDoc::Markdown # # @return [Boolean] # - # source://rdoc//rdoc/markdown.rb#696 + # source://rdoc//lib/rdoc/markdown.rb#696 def extension?(name); end - # source://rdoc//rdoc/markdown.rb#449 + # source://rdoc//lib/rdoc/markdown.rb#449 def external_invoke(other, rule, *args); end # Returns the value of attribute failed_rule. # - # source://rdoc//rdoc/markdown.rb#371 + # source://rdoc//lib/rdoc/markdown.rb#371 def failed_rule; end # Returns the value of attribute failing_rule_offset. # - # source://rdoc//rdoc/markdown.rb#208 + # source://rdoc//lib/rdoc/markdown.rb#208 def failing_rule_offset; end - # source://rdoc//rdoc/markdown.rb#318 + # source://rdoc//lib/rdoc/markdown.rb#318 def failure_caret; end - # source://rdoc//rdoc/markdown.rb#323 + # source://rdoc//lib/rdoc/markdown.rb#323 def failure_character; end - # source://rdoc//rdoc/markdown.rb#306 + # source://rdoc//lib/rdoc/markdown.rb#306 def failure_info; end - # source://rdoc//rdoc/markdown.rb#327 + # source://rdoc//lib/rdoc/markdown.rb#327 def failure_oneline; end - # source://rdoc//rdoc/markdown.rb#393 + # source://rdoc//lib/rdoc/markdown.rb#393 def get_byte; end - # source://rdoc//rdoc/markdown.rb#271 + # source://rdoc//lib/rdoc/markdown.rb#271 def get_line(no); end - # source://rdoc//rdoc/markdown.rb#285 + # source://rdoc//lib/rdoc/markdown.rb#285 def get_text(start); end - # source://rdoc//rdoc/markdown.rb#610 + # source://rdoc//lib/rdoc/markdown.rb#610 def github=(enable); end - # source://rdoc//rdoc/markdown.rb#606 + # source://rdoc//lib/rdoc/markdown.rb#606 def github?; end - # source://rdoc//rdoc/markdown.rb#535 + # source://rdoc//lib/rdoc/markdown.rb#535 def grow_lr(rule, args, start_pos, m); end - # source://rdoc//rdoc/markdown.rb#610 + # source://rdoc//lib/rdoc/markdown.rb#610 def html=(enable); end - # source://rdoc//rdoc/markdown.rb#606 + # 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//rdoc/markdown.rb#717 + # source://rdoc//lib/rdoc/markdown.rb#717 def inner_parse(text); end - # source://rdoc//rdoc/markdown.rb#267 + # source://rdoc//lib/rdoc/markdown.rb#267 def lines; end # Finds a link reference for `label` and creates a new link to it with @@ -4145,136 +4190,136 @@ class RDoc::Markdown # # @raise [ParseError] # - # source://rdoc//rdoc/markdown.rb#737 + # 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//rdoc/markdown.rb#754 + # source://rdoc//lib/rdoc/markdown.rb#754 def list_item_from(unparsed); end - # source://rdoc//rdoc/markdown.rb#373 + # 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//rdoc/markdown.rb#762 + # 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//rdoc/markdown.rb#776 + # source://rdoc//lib/rdoc/markdown.rb#776 def note_for(ref); end - # source://rdoc//rdoc/markdown.rb#610 + # source://rdoc//lib/rdoc/markdown.rb#610 def notes=(enable); end - # source://rdoc//rdoc/markdown.rb#606 + # source://rdoc//lib/rdoc/markdown.rb#606 def notes?; end # Creates an RDoc::Markup::Paragraph from `parts` and including # extension-specific behavior # - # source://rdoc//rdoc/markdown.rb#793 + # source://rdoc//lib/rdoc/markdown.rb#793 def paragraph(parts); end # Parses `markdown` into an RDoc::Document # - # source://rdoc//rdoc/markdown.rb#808 + # source://rdoc//lib/rdoc/markdown.rb#808 def parse(markdown); end # The internal kpeg parse method # - # source://rdoc//rdoc/markdown.rb#414 + # source://rdoc//lib/rdoc/markdown.rb#414 def peg_parse(rule = T.unsafe(nil)); end # Returns the value of attribute pos. # - # source://rdoc//rdoc/markdown.rb#209 + # 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//rdoc/markdown.rb#209 + # source://rdoc//lib/rdoc/markdown.rb#209 def pos=(_arg0); end - # source://rdoc//rdoc/markdown.rb#221 + # source://rdoc//lib/rdoc/markdown.rb#221 def position_line_offsets; end # @raise [ParseError] # - # source://rdoc//rdoc/markdown.rb#341 + # 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//rdoc/markdown.rb#855 + # source://rdoc//lib/rdoc/markdown.rb#855 def reference(label, link); end # Returns the value of attribute result. # - # source://rdoc//rdoc/markdown.rb#209 + # 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//rdoc/markdown.rb#209 + # source://rdoc//lib/rdoc/markdown.rb#209 def result=(_arg0); end - # source://rdoc//rdoc/markdown.rb#383 + # source://rdoc//lib/rdoc/markdown.rb#383 def scan(reg); end - # source://rdoc//rdoc/markdown.rb#364 + # 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//rdoc/markdown.rb#290 + # source://rdoc//lib/rdoc/markdown.rb#290 def set_string(string, pos); end # :stopdoc: # - # source://rdoc//rdoc/markdown.rb#887 + # 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//rdoc/markdown.rb#196 + # source://rdoc//lib/rdoc/markdown.rb#196 def setup_parser(str, debug = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown.rb#345 + # source://rdoc//lib/rdoc/markdown.rb#345 def show_error(io = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown.rb#297 + # source://rdoc//lib/rdoc/markdown.rb#297 def show_pos; end # Wraps `text` in strike markup for rdoc inline formatting # - # source://rdoc//rdoc/markdown.rb#877 + # source://rdoc//lib/rdoc/markdown.rb#877 def strike(text); end - # source://rdoc//rdoc/markdown.rb#610 + # source://rdoc//lib/rdoc/markdown.rb#610 def strike=(enable); end - # source://rdoc//rdoc/markdown.rb#606 + # source://rdoc//lib/rdoc/markdown.rb#606 def strike?; end # Returns the value of attribute string. # - # source://rdoc//rdoc/markdown.rb#207 + # source://rdoc//lib/rdoc/markdown.rb#207 def string; end # Wraps `text` in strong markup for rdoc inline formatting # - # source://rdoc//rdoc/markdown.rb#866 + # source://rdoc//lib/rdoc/markdown.rb#866 def strong(text); end private @@ -4286,27 +4331,28 @@ class RDoc::Markdown # # @return [Markdown] a new instance of Markdown # - # source://rdoc//rdoc/markdown.rb#188 + # 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//rdoc/markdown.rb#603 + # 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//rdoc/markdown.rb#656 + # source://rdoc//lib/rdoc/markdown.rb#656 def parse(markdown); end - # source://rdoc//rdoc/markdown.rb#566 + # 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 # @@ -4377,6 +4423,8 @@ end # # 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 @@ -4384,175 +4432,176 @@ class RDoc::Markdown::Literals # # @return [Literals] a new instance of Literals # - # source://rdoc//rdoc/markdown/literals.rb#17 + # source://rdoc//lib/rdoc/markdown/literals.rb#17 def initialize(str, debug = T.unsafe(nil)); end # Alphanumeric = /\p{Word}/ # - # source://rdoc//rdoc/markdown/literals.rb#405 + # source://rdoc//lib/rdoc/markdown/literals.rb#405 def _Alphanumeric; end # AlphanumericAscii = /[A-Za-z0-9]/ # - # source://rdoc//rdoc/markdown/literals.rb#412 + # source://rdoc//lib/rdoc/markdown/literals.rb#412 def _AlphanumericAscii; end # BOM = "uFEFF" # - # source://rdoc//rdoc/markdown/literals.rb#419 + # source://rdoc//lib/rdoc/markdown/literals.rb#419 def _BOM; end # Newline = /\n|\r\n?|\p{Zl}|\p{Zp}/ # - # source://rdoc//rdoc/markdown/literals.rb#426 + # source://rdoc//lib/rdoc/markdown/literals.rb#426 def _Newline; end # NonAlphanumeric = /\p{^Word}/ # - # source://rdoc//rdoc/markdown/literals.rb#433 + # source://rdoc//lib/rdoc/markdown/literals.rb#433 def _NonAlphanumeric; end # Spacechar = /\t|\p{Zs}/ # - # source://rdoc//rdoc/markdown/literals.rb#440 + # source://rdoc//lib/rdoc/markdown/literals.rb#440 def _Spacechar; end - # source://rdoc//rdoc/markdown/literals.rb#331 + # source://rdoc//lib/rdoc/markdown/literals.rb#331 def apply(rule); end - # source://rdoc//rdoc/markdown/literals.rb#297 + # source://rdoc//lib/rdoc/markdown/literals.rb#297 def apply_with_args(rule, *args); end - # source://rdoc//rdoc/markdown/literals.rb#79 + # source://rdoc//lib/rdoc/markdown/literals.rb#79 def current_character(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown/literals.rb#40 + # source://rdoc//lib/rdoc/markdown/literals.rb#40 def current_column(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown/literals.rb#63 + # source://rdoc//lib/rdoc/markdown/literals.rb#63 def current_line(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown/literals.rb#88 + # source://rdoc//lib/rdoc/markdown/literals.rb#88 def current_pos_info(target = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown/literals.rb#278 + # source://rdoc//lib/rdoc/markdown/literals.rb#278 def external_invoke(other, rule, *args); end # Returns the value of attribute failed_rule. # - # source://rdoc//rdoc/markdown/literals.rb#200 + # source://rdoc//lib/rdoc/markdown/literals.rb#200 def failed_rule; end # Returns the value of attribute failing_rule_offset. # - # source://rdoc//rdoc/markdown/literals.rb#37 + # source://rdoc//lib/rdoc/markdown/literals.rb#37 def failing_rule_offset; end - # source://rdoc//rdoc/markdown/literals.rb#147 + # source://rdoc//lib/rdoc/markdown/literals.rb#147 def failure_caret; end - # source://rdoc//rdoc/markdown/literals.rb#152 + # source://rdoc//lib/rdoc/markdown/literals.rb#152 def failure_character; end - # source://rdoc//rdoc/markdown/literals.rb#135 + # source://rdoc//lib/rdoc/markdown/literals.rb#135 def failure_info; end - # source://rdoc//rdoc/markdown/literals.rb#156 + # source://rdoc//lib/rdoc/markdown/literals.rb#156 def failure_oneline; end - # source://rdoc//rdoc/markdown/literals.rb#222 + # source://rdoc//lib/rdoc/markdown/literals.rb#222 def get_byte; end - # source://rdoc//rdoc/markdown/literals.rb#100 + # source://rdoc//lib/rdoc/markdown/literals.rb#100 def get_line(no); end - # source://rdoc//rdoc/markdown/literals.rb#114 + # source://rdoc//lib/rdoc/markdown/literals.rb#114 def get_text(start); end - # source://rdoc//rdoc/markdown/literals.rb#364 + # source://rdoc//lib/rdoc/markdown/literals.rb#364 def grow_lr(rule, args, start_pos, m); end - # source://rdoc//rdoc/markdown/literals.rb#96 + # source://rdoc//lib/rdoc/markdown/literals.rb#96 def lines; end - # source://rdoc//rdoc/markdown/literals.rb#202 + # source://rdoc//lib/rdoc/markdown/literals.rb#202 def match_string(str); end - # source://rdoc//rdoc/markdown/literals.rb#243 + # source://rdoc//lib/rdoc/markdown/literals.rb#243 def parse(rule = T.unsafe(nil)); end # Returns the value of attribute pos. # - # source://rdoc//rdoc/markdown/literals.rb#38 + # 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//rdoc/markdown/literals.rb#38 + # source://rdoc//lib/rdoc/markdown/literals.rb#38 def pos=(_arg0); end - # source://rdoc//rdoc/markdown/literals.rb#50 + # source://rdoc//lib/rdoc/markdown/literals.rb#50 def position_line_offsets; end # @raise [ParseError] # - # source://rdoc//rdoc/markdown/literals.rb#170 + # source://rdoc//lib/rdoc/markdown/literals.rb#170 def raise_error; end # Returns the value of attribute result. # - # source://rdoc//rdoc/markdown/literals.rb#38 + # 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//rdoc/markdown/literals.rb#38 + # source://rdoc//lib/rdoc/markdown/literals.rb#38 def result=(_arg0); end - # source://rdoc//rdoc/markdown/literals.rb#212 + # source://rdoc//lib/rdoc/markdown/literals.rb#212 def scan(reg); end - # source://rdoc//rdoc/markdown/literals.rb#193 + # 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//rdoc/markdown/literals.rb#119 + # source://rdoc//lib/rdoc/markdown/literals.rb#119 def set_string(string, pos); end # :startdoc: # :stopdoc: # - # source://rdoc//rdoc/markdown/literals.rb#402 + # 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//rdoc/markdown/literals.rb#25 + # source://rdoc//lib/rdoc/markdown/literals.rb#25 def setup_parser(str, debug = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown/literals.rb#174 + # source://rdoc//lib/rdoc/markdown/literals.rb#174 def show_error(io = T.unsafe(nil)); end - # source://rdoc//rdoc/markdown/literals.rb#126 + # source://rdoc//lib/rdoc/markdown/literals.rb#126 def show_pos; end # Returns the value of attribute string. # - # source://rdoc//rdoc/markdown/literals.rb#36 + # source://rdoc//lib/rdoc/markdown/literals.rb#36 def string; end class << self - # source://rdoc//rdoc/markdown/literals.rb#395 + # 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 # @@ -4618,124 +4667,129 @@ class RDoc::Markdown::Literals::KpegPosInfo < ::Struct end end +# source://rdoc//lib/rdoc/markdown/literals.rb#257 class RDoc::Markdown::Literals::MemoEntry # @return [MemoEntry] a new instance of MemoEntry # - # source://rdoc//rdoc/markdown/literals.rb#258 + # source://rdoc//lib/rdoc/markdown/literals.rb#258 def initialize(ans, pos); end # Returns the value of attribute ans. # - # source://rdoc//rdoc/markdown/literals.rb#266 + # source://rdoc//lib/rdoc/markdown/literals.rb#266 def ans; end # Returns the value of attribute left_rec. # - # source://rdoc//rdoc/markdown/literals.rb#267 + # 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//rdoc/markdown/literals.rb#267 + # source://rdoc//lib/rdoc/markdown/literals.rb#267 def left_rec=(_arg0); end - # source://rdoc//rdoc/markdown/literals.rb#269 + # source://rdoc//lib/rdoc/markdown/literals.rb#269 def move!(ans, pos, result); end # Returns the value of attribute pos. # - # source://rdoc//rdoc/markdown/literals.rb#266 + # source://rdoc//lib/rdoc/markdown/literals.rb#266 def pos; end # Returns the value of attribute result. # - # source://rdoc//rdoc/markdown/literals.rb#266 + # source://rdoc//lib/rdoc/markdown/literals.rb#266 def result; end # Returns the value of attribute set. # - # source://rdoc//rdoc/markdown/literals.rb#266 + # 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//rdoc/markdown/literals.rb#387 + # source://rdoc//lib/rdoc/markdown/literals.rb#387 def initialize(name, rendered); end # Returns the value of attribute name. # - # source://rdoc//rdoc/markdown/literals.rb#392 + # source://rdoc//lib/rdoc/markdown/literals.rb#392 def name; end # Returns the value of attribute rendered. # - # source://rdoc//rdoc/markdown/literals.rb#392 + # 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//rdoc/markdown.rb#429 + # source://rdoc//lib/rdoc/markdown.rb#429 def initialize(ans, pos); end # Returns the value of attribute ans. # - # source://rdoc//rdoc/markdown.rb#437 + # source://rdoc//lib/rdoc/markdown.rb#437 def ans; end # Returns the value of attribute left_rec. # - # source://rdoc//rdoc/markdown.rb#438 + # 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//rdoc/markdown.rb#438 + # source://rdoc//lib/rdoc/markdown.rb#438 def left_rec=(_arg0); end - # source://rdoc//rdoc/markdown.rb#440 + # source://rdoc//lib/rdoc/markdown.rb#440 def move!(ans, pos, result); end # Returns the value of attribute pos. # - # source://rdoc//rdoc/markdown.rb#437 + # source://rdoc//lib/rdoc/markdown.rb#437 def pos; end # Returns the value of attribute result. # - # source://rdoc//rdoc/markdown.rb#437 + # source://rdoc//lib/rdoc/markdown.rb#437 def result; end # Returns the value of attribute set. # - # source://rdoc//rdoc/markdown.rb#437 + # 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//rdoc/markdown.rb#558 + # source://rdoc//lib/rdoc/markdown.rb#558 def initialize(name, rendered); end # Returns the value of attribute name. # - # source://rdoc//rdoc/markdown.rb#563 + # source://rdoc//lib/rdoc/markdown.rb#563 def name; end # Returns the value of attribute rendered. # - # source://rdoc//rdoc/markdown.rb#563 + # source://rdoc//lib/rdoc/markdown.rb#563 def rendered; end end +# source://rdoc//lib/rdoc/markup.rb#106 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 @@ -4743,12 +4797,12 @@ class RDoc::Markup # # @return [Markup] a new instance of Markup # - # source://rdoc//rdoc/markup.rb#146 + # source://rdoc//lib/rdoc/markup.rb#146 def initialize(attribute_manager = T.unsafe(nil)); end # Add to the sequences recognized as general markup. # - # source://rdoc//rdoc/markup.rb#163 + # source://rdoc//lib/rdoc/markup.rb#163 def add_html(tag, name); end # Add to other inline sequences. For example, we could add WikiWords using @@ -4758,73 +4812,79 @@ class RDoc::Markup # # Each wiki word will be presented to the output formatter. # - # source://rdoc//rdoc/markup.rb#175 + # source://rdoc//lib/rdoc/markup.rb#175 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//rdoc/markup.rb#156 + # source://rdoc//lib/rdoc/markup.rb#156 def add_word_pair(start, stop, name); end # An AttributeManager which handles inline markup. # - # source://rdoc//rdoc/markup.rb#111 + # source://rdoc//lib/rdoc/markup.rb#111 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//rdoc/markup.rb#183 + # source://rdoc//lib/rdoc/markup.rb#183 def convert(input, formatter); end class << self # Parses +str+ into an RDoc::Markup::Document. # - # source://rdoc//rdoc/markup.rb#116 + # source://rdoc//lib/rdoc/markup.rb#116 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//rdoc/markup/attr_changer.rb#18 + # source://rdoc//lib/rdoc/markup/attr_changer.rb#18 def inspect; end - # source://rdoc//rdoc/markup/attr_changer.rb#14 + # 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//rdoc/markup/attr_span.rb#10 + # source://rdoc//lib/rdoc/markup/attr_span.rb#10 def initialize(length, exclusive); end # Accesses flags for character +n+ # - # source://rdoc//rdoc/markup/attr_span.rb#31 + # source://rdoc//lib/rdoc/markup/attr_span.rb#31 def [](n); end # Toggles +bits+ from +start+ to +length+ # - # source://rdoc//rdoc/markup/attr_span.rb#17 + # 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//rdoc/markup/attribute_manager.rb#80 + # 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+. @@ -4832,7 +4892,7 @@ class RDoc::Markup::AttributeManager # # am.add_html 'em', :EM # - # source://rdoc//rdoc/markup/attribute_manager.rb#286 + # 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 @@ -4840,7 +4900,7 @@ class RDoc::Markup::AttributeManager # # @am.add_regexp_handling(/((https?:)\S+\w)/, :HYPERLINK) # - # source://rdoc//rdoc/markup/attribute_manager.rb#298 + # 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 @@ -4850,188 +4910,196 @@ class RDoc::Markup::AttributeManager # # @raise [ArgumentError] # - # source://rdoc//rdoc/markup/attribute_manager.rb#261 + # 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//rdoc/markup/attribute_manager.rb#103 + # 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//rdoc/markup/attribute_manager.rb#40 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#40 def attributes; end # Changes the current attribute from +current+ to +new+ # - # source://rdoc//rdoc/markup/attribute_manager.rb#110 + # 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//rdoc/markup/attribute_manager.rb#119 + # 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//rdoc/markup/attribute_manager.rb#154 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#154 def convert_attrs(str, attrs, exclusive = T.unsafe(nil)); end - # source://rdoc//rdoc/markup/attribute_manager.rb#160 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#160 def convert_attrs_matching_word_pairs(str, attrs, exclusive); end - # source://rdoc//rdoc/markup/attribute_manager.rb#185 + # 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//rdoc/markup/attribute_manager.rb#206 + # 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//rdoc/markup/attribute_manager.rb#223 + # 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//rdoc/markup/attribute_manager.rb#135 + # 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//rdoc/markup/attribute_manager.rb#329 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#329 def display_attributes; end # @return [Boolean] # - # source://rdoc//rdoc/markup/attribute_manager.rb#142 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#142 def exclusive?(attr); end # A bits of exclusive maps # - # source://rdoc//rdoc/markup/attribute_manager.rb#74 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#74 def exclusive_bitmap; end # Processes +str+ converting attributes, HTML and regexp handlings # - # source://rdoc//rdoc/markup/attribute_manager.rb#307 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#307 def flow(str); end # This maps HTML tags to the corresponding attribute char # - # source://rdoc//rdoc/markup/attribute_manager.rb#58 + # 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//rdoc/markup/attribute_manager.rb#239 + # 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//rdoc/markup/attribute_manager.rb#47 + # 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//rdoc/markup/attribute_manager.rb#64 + # 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//rdoc/markup/attribute_manager.rb#70 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#70 def regexp_handlings; end # Splits the string into chunks by attribute change # - # source://rdoc//rdoc/markup/attribute_manager.rb#354 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#354 def split_into_flow; end # Unescapes regexp handling sequences of text # - # source://rdoc//rdoc/markup/attribute_manager.rb#251 + # 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//rdoc/markup/attribute_manager.rb#53 + # source://rdoc//lib/rdoc/markup/attribute_manager.rb#53 def word_pair_map; end end -# source://rdoc//rdoc/markup/attribute_manager.rb#147 +# source://rdoc//lib/rdoc/markup/attribute_manager.rb#147 RDoc::Markup::AttributeManager::NON_PRINTING_END = T.let(T.unsafe(nil), String) -# source://rdoc//rdoc/markup/attribute_manager.rb#146 +# 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//rdoc/markup/attributes.rb#16 + # source://rdoc//lib/rdoc/markup/attributes.rb#16 def initialize; end # Returns a string representation of +bitmap+ # - # source://rdoc//rdoc/markup/attributes.rb#46 + # source://rdoc//lib/rdoc/markup/attributes.rb#46 def as_string(bitmap); end # Returns a unique bit for +name+ # - # source://rdoc//rdoc/markup/attributes.rb#29 + # source://rdoc//lib/rdoc/markup/attributes.rb#29 def bitmap_for(name); end # yields each attribute name in +bitmap+ # - # source://rdoc//rdoc/markup/attributes.rb#60 + # 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//rdoc/markup/attributes.rb#11 + # 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//rdoc/markup/blank_line.rb#19 + # source://rdoc//lib/rdoc/markup/blank_line.rb#19 def accept(visitor); end - # source://rdoc//rdoc/markup/blank_line.rb#23 + # source://rdoc//lib/rdoc/markup/blank_line.rb#23 def pretty_print(q); end class << self # RDoc::Markup::BlankLine is a singleton # - # source://rdoc//rdoc/markup/blank_line.rb#12 + # 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//rdoc/markup/block_quote.rb#10 + # 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 @@ -5039,48 +5107,48 @@ class RDoc::Markup::Document # # @return [Document] a new instance of Document # - # source://rdoc//rdoc/markup/document.rb#29 + # source://rdoc//lib/rdoc/markup/document.rb#29 def initialize(*parts); end # Appends +part+ to the document # - # source://rdoc//rdoc/markup/document.rb#40 + # source://rdoc//lib/rdoc/markup/document.rb#40 def <<(part); end - # source://rdoc//rdoc/markup/document.rb#56 + # source://rdoc//lib/rdoc/markup/document.rb#56 def ==(other); end # Runs this document and all its #items through +visitor+ # - # source://rdoc//rdoc/markup/document.rb#65 + # source://rdoc//lib/rdoc/markup/document.rb#65 def accept(visitor); end # Concatenates the given +parts+ onto the document # - # source://rdoc//rdoc/markup/document.rb#76 + # source://rdoc//lib/rdoc/markup/document.rb#76 def concat(parts); end # Enumerator for the parts of this document # - # source://rdoc//rdoc/markup/document.rb#83 + # source://rdoc//lib/rdoc/markup/document.rb#83 def each(&block); end # Does this document have no parts? # # @return [Boolean] # - # source://rdoc//rdoc/markup/document.rb#90 + # 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//rdoc/markup/document.rb#13 + # source://rdoc//lib/rdoc/markup/document.rb#13 def file; end # The file this Document was created from. # - # source://rdoc//rdoc/markup/document.rb#97 + # 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 @@ -5090,46 +5158,46 @@ class RDoc::Markup::Document # # The information in +other+ is preferred over the receiver # - # source://rdoc//rdoc/markup/document.rb#114 + # source://rdoc//lib/rdoc/markup/document.rb#114 def merge(other); end # Does this Document contain other Documents? # # @return [Boolean] # - # source://rdoc//rdoc/markup/document.rb#134 + # 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//rdoc/markup/document.rb#19 + # 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//rdoc/markup/document.rb#19 + # source://rdoc//lib/rdoc/markup/document.rb#19 def omit_headings_below=(_arg0); end # The parts of the Document # - # source://rdoc//rdoc/markup/document.rb#24 + # source://rdoc//lib/rdoc/markup/document.rb#24 def parts; end - # source://rdoc//rdoc/markup/document.rb#138 + # source://rdoc//lib/rdoc/markup/document.rb#138 def pretty_print(q); end # Appends +parts+ to the document # - # source://rdoc//rdoc/markup/document.rb#151 + # 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//rdoc/markup/document.rb#160 + # source://rdoc//lib/rdoc/markup/document.rb#160 def table_of_contents; end end @@ -5142,59 +5210,61 @@ end # 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//rdoc/markup/formatter.rb#48 + # source://rdoc//lib/rdoc/markup/formatter.rb#48 def initialize(options, markup = T.unsafe(nil)); end # Adds +document+ to the output # - # source://rdoc//rdoc/markup/formatter.rb#69 + # 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//rdoc/markup/formatter.rb#83 + # 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//rdoc/markup/formatter.rb#91 + # 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//rdoc/markup/formatter.rb#105 + # 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//rdoc/markup/formatter.rb#113 + # source://rdoc//lib/rdoc/markup/formatter.rb#113 def annotate(tag); end # Marks up +content+ # - # source://rdoc//rdoc/markup/formatter.rb#120 + # source://rdoc//lib/rdoc/markup/formatter.rb#120 def convert(content); end # Converts flow items +flow+ # - # source://rdoc//rdoc/markup/formatter.rb#127 + # 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//rdoc/markup/formatter.rb#150 + # source://rdoc//lib/rdoc/markup/formatter.rb#150 def convert_regexp_handling(target); end # Converts a string to be fancier if desired # - # source://rdoc//rdoc/markup/formatter.rb#176 + # source://rdoc//lib/rdoc/markup/formatter.rb#176 def convert_string(string); end # Use ignore in your subclass to ignore the content of a node. @@ -5204,88 +5274,91 @@ class RDoc::Markup::Formatter # # alias accept_raw ignore # - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def ignore(*node); end # Are we currently inside tt tags? # # @return [Boolean] # - # source://rdoc//rdoc/markup/formatter.rb#194 + # source://rdoc//lib/rdoc/markup/formatter.rb#194 def in_tt?; end # Turns off tags for +item+ on +res+ # - # source://rdoc//rdoc/markup/formatter.rb#216 + # source://rdoc//lib/rdoc/markup/formatter.rb#216 def off_tags(res, item); end # Turns on tags for +item+ on +res+ # - # source://rdoc//rdoc/markup/formatter.rb#201 + # source://rdoc//lib/rdoc/markup/formatter.rb#201 def on_tags(res, item); end # Extracts and a scheme, url and an anchor id from +url+ and returns them. # - # source://rdoc//rdoc/markup/formatter.rb#231 + # source://rdoc//lib/rdoc/markup/formatter.rb#231 def parse_url(url); end # Is +tag+ a tt tag? # # @return [Boolean] # - # source://rdoc//rdoc/markup/formatter.rb#261 + # source://rdoc//lib/rdoc/markup/formatter.rb#261 def tt?(tag); end class << self # Converts a target url to one that is relative to a given path # - # source://rdoc//rdoc/markup/formatter.rb#24 + # 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//rdoc/markup/hard_break.rb#23 + # source://rdoc//lib/rdoc/markup/hard_break.rb#23 def ==(other); end # Calls #accept_hard_break on +visitor+ # - # source://rdoc//rdoc/markup/hard_break.rb#19 + # source://rdoc//lib/rdoc/markup/hard_break.rb#19 def accept(visitor); end - # source://rdoc//rdoc/markup/hard_break.rb#27 + # source://rdoc//lib/rdoc/markup/hard_break.rb#27 def pretty_print(q); end class << self # RDoc::Markup::HardBreak is a singleton # - # source://rdoc//rdoc/markup/hard_break.rb#12 + # 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//rdoc/markup/heading.rb#40 + # source://rdoc//lib/rdoc/markup/heading.rb#40 def accept(visitor); end - # source://rdoc//rdoc/markup/heading.rb#47 + # source://rdoc//lib/rdoc/markup/heading.rb#47 def aref; end - # source://rdoc//rdoc/markup/heading.rb#55 + # source://rdoc//lib/rdoc/markup/heading.rb#55 def label(context = T.unsafe(nil)); end - # source://rdoc//rdoc/markup/heading.rb#68 + # source://rdoc//lib/rdoc/markup/heading.rb#68 def plain_html; end - # source://rdoc//rdoc/markup/heading.rb#72 + # source://rdoc//lib/rdoc/markup/heading.rb#72 def pretty_print(q); end class << self - # source://rdoc//rdoc/markup/heading.rb#22 + # source://rdoc//lib/rdoc/markup/heading.rb#22 def to_html; end - # source://rdoc//rdoc/markup/heading.rb#14 + # source://rdoc//lib/rdoc/markup/heading.rb#14 def to_label; end end end @@ -5294,58 +5367,62 @@ end # 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//rdoc/markup/include.rb#23 + # source://rdoc//lib/rdoc/markup/include.rb#23 def initialize(file, include_path); end - # source://rdoc//rdoc/markup/include.rb#28 + # source://rdoc//lib/rdoc/markup/include.rb#28 def ==(other); end # The filename to be included, without extension # - # source://rdoc//rdoc/markup/include.rb#13 + # source://rdoc//lib/rdoc/markup/include.rb#13 def file; end # Directories to search for #file # - # source://rdoc//rdoc/markup/include.rb#18 + # source://rdoc//lib/rdoc/markup/include.rb#18 def include_path; end - # source://rdoc//rdoc/markup/include.rb#33 + # 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//rdoc/markup/indented_paragraph.rb#16 + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#16 def initialize(indent, *parts); end - # source://rdoc//rdoc/markup/indented_paragraph.rb#22 + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#22 def ==(other); end # Calls #accept_indented_paragraph on +visitor+ # - # source://rdoc//rdoc/markup/indented_paragraph.rb#29 + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#29 def accept(visitor); end # The indent in number of spaces # - # source://rdoc//rdoc/markup/indented_paragraph.rb#10 + # 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//rdoc/markup/indented_paragraph.rb#37 + # source://rdoc//lib/rdoc/markup/indented_paragraph.rb#37 def text(hard_break = T.unsafe(nil)); end end @@ -5369,61 +5446,63 @@ end # 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//rdoc/markup/list.rb#40 + # source://rdoc//lib/rdoc/markup/list.rb#40 def initialize(type = T.unsafe(nil), *items); end # Appends +item+ to the list # - # source://rdoc//rdoc/markup/list.rb#49 + # source://rdoc//lib/rdoc/markup/list.rb#49 def <<(item); end - # source://rdoc//rdoc/markup/list.rb#53 + # source://rdoc//lib/rdoc/markup/list.rb#53 def ==(other); end # Runs this list and all its #items through +visitor+ # - # source://rdoc//rdoc/markup/list.rb#62 + # source://rdoc//lib/rdoc/markup/list.rb#62 def accept(visitor); end # Is the list empty? # # @return [Boolean] # - # source://rdoc//rdoc/markup/list.rb#75 + # source://rdoc//lib/rdoc/markup/list.rb#75 def empty?; end # Items in the list # - # source://rdoc//rdoc/markup/list.rb#34 + # source://rdoc//lib/rdoc/markup/list.rb#34 def items; end # Returns the last item in the list # - # source://rdoc//rdoc/markup/list.rb#82 + # source://rdoc//lib/rdoc/markup/list.rb#82 def last; end - # source://rdoc//rdoc/markup/list.rb#86 + # source://rdoc//lib/rdoc/markup/list.rb#86 def pretty_print(q); end # Appends +items+ to the list # - # source://rdoc//rdoc/markup/list.rb#97 + # source://rdoc//lib/rdoc/markup/list.rb#97 def push(*items); end # The list's type # - # source://rdoc//rdoc/markup/list.rb#29 + # source://rdoc//lib/rdoc/markup/list.rb#29 def type; end # The list's type # - # source://rdoc//rdoc/markup/list.rb#29 + # source://rdoc//lib/rdoc/markup/list.rb#29 def type=(_arg0); end end @@ -5435,74 +5514,78 @@ end # * 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//rdoc/markup/list_item.rb#27 + # source://rdoc//lib/rdoc/markup/list_item.rb#27 def initialize(label = T.unsafe(nil), *parts); end # Appends +part+ to the ListItem # - # source://rdoc//rdoc/markup/list_item.rb#36 + # source://rdoc//lib/rdoc/markup/list_item.rb#36 def <<(part); end - # source://rdoc//rdoc/markup/list_item.rb#40 + # source://rdoc//lib/rdoc/markup/list_item.rb#40 def ==(other); end # Runs this list item and all its #parts through +visitor+ # - # source://rdoc//rdoc/markup/list_item.rb#49 + # source://rdoc//lib/rdoc/markup/list_item.rb#49 def accept(visitor); end # Is the ListItem empty? # # @return [Boolean] # - # source://rdoc//rdoc/markup/list_item.rb#62 + # source://rdoc//lib/rdoc/markup/list_item.rb#62 def empty?; end # The label for the ListItem # - # source://rdoc//rdoc/markup/list_item.rb#17 + # source://rdoc//lib/rdoc/markup/list_item.rb#17 def label; end # The label for the ListItem # - # source://rdoc//rdoc/markup/list_item.rb#17 + # source://rdoc//lib/rdoc/markup/list_item.rb#17 def label=(_arg0); end # Length of parts in the ListItem # - # source://rdoc//rdoc/markup/list_item.rb#69 + # source://rdoc//lib/rdoc/markup/list_item.rb#69 def length; end # Parts of the ListItem # - # source://rdoc//rdoc/markup/list_item.rb#22 + # source://rdoc//lib/rdoc/markup/list_item.rb#22 def parts; end - # source://rdoc//rdoc/markup/list_item.rb#73 + # source://rdoc//lib/rdoc/markup/list_item.rb#73 def pretty_print(q); end # Adds +parts+ to the ListItem # - # source://rdoc//rdoc/markup/list_item.rb#95 + # 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//rdoc/markup/paragraph.rb#10 + # 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//rdoc/markup/paragraph.rb#18 + # source://rdoc//lib/rdoc/markup/paragraph.rb#18 def text(hard_break = T.unsafe(nil)); end end @@ -5519,6 +5602,8 @@ end # # 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 @@ -5526,22 +5611,22 @@ class RDoc::Markup::Parser # # @return [Parser] a new instance of Parser # - # source://rdoc//rdoc/markup/parser.rb#79 + # source://rdoc//lib/rdoc/markup/parser.rb#79 def initialize; end # Builds a Heading of +level+ # - # source://rdoc//rdoc/markup/parser.rb#90 + # source://rdoc//lib/rdoc/markup/parser.rb#90 def build_heading(level); end # Builds a List flush to +margin+ # - # source://rdoc//rdoc/markup/parser.rb#108 + # source://rdoc//lib/rdoc/markup/parser.rb#108 def build_list(margin); end # Builds a Paragraph that is flush to +margin+ # - # source://rdoc//rdoc/markup/parser.rb#208 + # source://rdoc//lib/rdoc/markup/parser.rb#208 def build_paragraph(margin); end # Builds a Verbatim that is indented from +margin+. @@ -5551,22 +5636,22 @@ class RDoc::Markup::Parser # 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//rdoc/markup/parser.rb#243 + # source://rdoc//lib/rdoc/markup/parser.rb#243 def build_verbatim(margin); end # Enables display of debugging information # - # source://rdoc//rdoc/markup/parser.rb#48 + # source://rdoc//lib/rdoc/markup/parser.rb#48 def debug; end # Enables display of debugging information # - # source://rdoc//rdoc/markup/parser.rb#48 + # source://rdoc//lib/rdoc/markup/parser.rb#48 def debug=(_arg0); end # Pulls the next token from the stream. # - # source://rdoc//rdoc/markup/parser.rb#327 + # source://rdoc//lib/rdoc/markup/parser.rb#327 def get; end # Parses the tokens into an array of RDoc::Markup::XXX objects, @@ -5577,22 +5662,22 @@ class RDoc::Markup::Parser # # Returns +parent+. # - # source://rdoc//rdoc/markup/parser.rb#342 + # 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//rdoc/markup/parser.rb#406 + # 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//rdoc/markup/parser.rb#413 + # source://rdoc//lib/rdoc/markup/parser.rb#413 def peek_token; end # Creates the StringScanner # - # source://rdoc//rdoc/markup/parser.rb#468 + # source://rdoc//lib/rdoc/markup/parser.rb#468 def setup_scanner(input); end # Skips the next token if its type is +token_type+. @@ -5601,24 +5686,24 @@ class RDoc::Markup::Parser # # @raise [ParseError] # - # source://rdoc//rdoc/markup/parser.rb#477 + # 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//rdoc/markup/parser.rb#488 + # source://rdoc//lib/rdoc/markup/parser.rb#488 def tokenize(input); end # Token accessor # - # source://rdoc//rdoc/markup/parser.rb#53 + # source://rdoc//lib/rdoc/markup/parser.rb#53 def tokens; end # Returns the current token to the token stream # # @raise [Error] # - # source://rdoc//rdoc/markup/parser.rb#578 + # source://rdoc//lib/rdoc/markup/parser.rb#578 def unget; end class << self @@ -5626,46 +5711,48 @@ class RDoc::Markup::Parser # # Use RDoc::Markup#parse instead of this method. # - # source://rdoc//rdoc/markup/parser.rb#60 + # source://rdoc//lib/rdoc/markup/parser.rb#60 def parse(str); end # Returns a token stream for +str+, for testing # - # source://rdoc//rdoc/markup/parser.rb#70 + # 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//rdoc/markup/parser.rb#425 + # source://rdoc//lib/rdoc/markup/parser.rb#425 def initialize(input); end - # source://rdoc//rdoc/markup/parser.rb#458 + # source://rdoc//lib/rdoc/markup/parser.rb#458 def [](i); end # @return [Boolean] # - # source://rdoc//rdoc/markup/parser.rb#450 + # source://rdoc//lib/rdoc/markup/parser.rb#450 def eos?; end - # source://rdoc//rdoc/markup/parser.rb#454 + # source://rdoc//lib/rdoc/markup/parser.rb#454 def matched; end - # source://rdoc//rdoc/markup/parser.rb#445 + # source://rdoc//lib/rdoc/markup/parser.rb#445 def newline!; end - # source://rdoc//rdoc/markup/parser.rb#441 + # source://rdoc//lib/rdoc/markup/parser.rb#441 def pos; end - # source://rdoc//rdoc/markup/parser.rb#430 + # source://rdoc//lib/rdoc/markup/parser.rb#430 def scan(re); end - # source://rdoc//rdoc/markup/parser.rb#436 + # source://rdoc//lib/rdoc/markup/parser.rb#436 def unscan(s); end end @@ -5682,19 +5769,21 @@ end # 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//rdoc/markup/pre_process.rb#78 + # 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//rdoc/markup/pre_process.rb#288 + # source://rdoc//lib/rdoc/markup/pre_process.rb#288 def find_include_file(name); end # Look for directives in the given +text+. @@ -5711,7 +5800,7 @@ class RDoc::Markup::PreProcess # directive's parameter is set as metadata on the +code_object+. See # RDoc::CodeObject#metadata for details. # - # source://rdoc//rdoc/markup/pre_process.rb#99 + # 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+. @@ -5724,7 +5813,7 @@ class RDoc::Markup::PreProcess # -- # When 1.8.7 support is ditched prefix can be defaulted to '' # - # source://rdoc//rdoc/markup/pre_process.rb#150 + # source://rdoc//lib/rdoc/markup/pre_process.rb#150 def handle_directive(prefix, directive, param, code_object = T.unsafe(nil), encoding = T.unsafe(nil)); end # Handles the :include: _filename_ directive. @@ -5741,19 +5830,19 @@ class RDoc::Markup::PreProcess # TODO shift left the whole file content in that case # TODO comment stop/start #-- and #++ in included file must be processed here # - # source://rdoc//rdoc/markup/pre_process.rb#262 + # source://rdoc//lib/rdoc/markup/pre_process.rb#262 def include_file(name, indent, encoding); end # An RDoc::Options instance that will be filled in with overrides from # directives # - # source://rdoc//rdoc/markup/pre_process.rb#23 + # 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//rdoc/markup/pre_process.rb#23 + # source://rdoc//lib/rdoc/markup/pre_process.rb#23 def options=(_arg0); end class << self @@ -5761,12 +5850,12 @@ class RDoc::Markup::PreProcess # with the result RDoc::Comment (or text String) and the code object for the # comment (if any). # - # source://rdoc//rdoc/markup/pre_process.rb#30 + # source://rdoc//lib/rdoc/markup/pre_process.rb#30 def post_process(&block); end # Registered post-processors # - # source://rdoc//rdoc/markup/pre_process.rb#37 + # 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 @@ -5780,192 +5869,202 @@ class RDoc::Markup::PreProcess # # replace text, etc. # end # - # source://rdoc//rdoc/markup/pre_process.rb#53 + # source://rdoc//lib/rdoc/markup/pre_process.rb#53 def register(directive, &block); end # Registered directives # - # source://rdoc//rdoc/markup/pre_process.rb#60 + # source://rdoc//lib/rdoc/markup/pre_process.rb#60 def registered; end # Clears all registered directives and post-processors # - # source://rdoc//rdoc/markup/pre_process.rb#67 + # 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//rdoc/markup/raw.rb#15 + # source://rdoc//lib/rdoc/markup/raw.rb#15 def initialize(*parts); end # Appends +text+ # - # source://rdoc//rdoc/markup/raw.rb#23 + # source://rdoc//lib/rdoc/markup/raw.rb#23 def <<(text); end - # source://rdoc//rdoc/markup/raw.rb#27 + # source://rdoc//lib/rdoc/markup/raw.rb#27 def ==(other); end # Calls #accept_raw+ on +visitor+ # - # source://rdoc//rdoc/markup/raw.rb#34 + # source://rdoc//lib/rdoc/markup/raw.rb#34 def accept(visitor); end # Appends +other+'s parts # - # source://rdoc//rdoc/markup/raw.rb#41 + # source://rdoc//lib/rdoc/markup/raw.rb#41 def merge(other); end # The component parts of the list # - # source://rdoc//rdoc/markup/raw.rb#10 + # source://rdoc//lib/rdoc/markup/raw.rb#10 def parts; end - # source://rdoc//rdoc/markup/raw.rb#45 + # source://rdoc//lib/rdoc/markup/raw.rb#45 def pretty_print(q); end # Appends +texts+ onto this Paragraph # - # source://rdoc//rdoc/markup/raw.rb#58 + # source://rdoc//lib/rdoc/markup/raw.rb#58 def push(*texts); end # The raw text # - # source://rdoc//rdoc/markup/raw.rb#65 + # 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//rdoc/markup/regexp_handling.rb#20 + # 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//rdoc/markup/regexp_handling.rb#27 + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#27 def ==(o); end - # source://rdoc//rdoc/markup/regexp_handling.rb#31 + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#31 def inspect; end # Regexp handling text # - # source://rdoc//rdoc/markup/regexp_handling.rb#15 + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 def text; end # Regexp handling text # - # source://rdoc//rdoc/markup/regexp_handling.rb#15 + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#15 def text=(_arg0); end - # source://rdoc//rdoc/markup/regexp_handling.rb#36 + # source://rdoc//lib/rdoc/markup/regexp_handling.rb#36 def to_s; end # Regexp handling type # - # source://rdoc//rdoc/markup/regexp_handling.rb#10 + # 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//rdoc/markup/rule.rb#10 + # source://rdoc//lib/rdoc/markup/rule.rb#10 def accept(visitor); end - # source://rdoc//rdoc/markup/rule.rb#14 + # 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//rdoc/markup/table.rb#16 + # source://rdoc//lib/rdoc/markup/table.rb#16 def initialize(header, align, body); end # :stopdoc: # - # source://rdoc//rdoc/markup/table.rb#21 + # source://rdoc//lib/rdoc/markup/table.rb#21 def ==(other); end - # source://rdoc//rdoc/markup/table.rb#28 + # source://rdoc//lib/rdoc/markup/table.rb#28 def accept(visitor); end # alignments of each column # - # source://rdoc//rdoc/markup/table.rb#10 + # source://rdoc//lib/rdoc/markup/table.rb#10 def align; end # alignments of each column # - # source://rdoc//rdoc/markup/table.rb#10 + # source://rdoc//lib/rdoc/markup/table.rb#10 def align=(_arg0); end # body texts of each column # - # source://rdoc//rdoc/markup/table.rb#13 + # source://rdoc//lib/rdoc/markup/table.rb#13 def body; end # body texts of each column # - # source://rdoc//rdoc/markup/table.rb#13 + # source://rdoc//lib/rdoc/markup/table.rb#13 def body=(_arg0); end # headers of each column # - # source://rdoc//rdoc/markup/table.rb#7 + # source://rdoc//lib/rdoc/markup/table.rb#7 def header; end # headers of each column # - # source://rdoc//rdoc/markup/table.rb#7 + # source://rdoc//lib/rdoc/markup/table.rb#7 def header=(_arg0); end - # source://rdoc//rdoc/markup/table.rb#32 + # 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//rdoc/markup/to_ansi.rb#10 + # 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//rdoc/markup/to_ansi.rb#31 + # 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//rdoc/markup/to_ansi.rb#55 + # source://rdoc//lib/rdoc/markup/to_ansi.rb#55 def accept_list_item_start(list_item); end # Maps attributes to ANSI sequences # - # source://rdoc//rdoc/markup/to_ansi.rb#22 + # source://rdoc//lib/rdoc/markup/to_ansi.rb#22 def init_tags; end # Starts accepting with a reset screen # - # source://rdoc//rdoc/markup/to_ansi.rb#87 + # source://rdoc//lib/rdoc/markup/to_ansi.rb#87 def start_accepting; end end @@ -5973,42 +6072,51 @@ end # 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//rdoc/markup/to_bs.rb#13 + # source://rdoc//lib/rdoc/markup/to_bs.rb#13 def initialize(markup = T.unsafe(nil)); end # Makes heading text bold. # - # source://rdoc//rdoc/markup/to_bs.rb#33 + # 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//rdoc/markup/to_bs.rb#46 + # 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//rdoc/markup/to_bs.rb#59 + # source://rdoc//lib/rdoc/markup/to_bs.rb#84 def convert_regexp_handling(target); end # Adds bold or underline mixed with backspaces # - # source://rdoc//rdoc/markup/to_bs.rb#66 + # 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//rdoc/markup/to_bs.rb#24 + # 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 @@ -6016,114 +6124,114 @@ class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter # # @return [ToHtml] a new instance of ToHtml # - # source://rdoc//rdoc/markup/to_html.rb#45 + # 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//rdoc/markup/to_html.rb#291 + # source://rdoc//lib/rdoc/markup/to_html.rb#291 def accept_blank_line(blank_line); end # Adds +block_quote+ to the output # - # source://rdoc//rdoc/markup/to_html.rb#190 + # 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//rdoc/markup/to_html.rb#299 + # source://rdoc//lib/rdoc/markup/to_html.rb#299 def accept_heading(heading); end # Finishes consumption of +list+ # - # source://rdoc//rdoc/markup/to_html.rb#262 + # source://rdoc//lib/rdoc/markup/to_html.rb#262 def accept_list_end(list); end # Finishes consumption of +list_item+ # - # source://rdoc//rdoc/markup/to_html.rb#284 + # 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//rdoc/markup/to_html.rb#273 + # 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//rdoc/markup/to_html.rb#253 + # source://rdoc//lib/rdoc/markup/to_html.rb#253 def accept_list_start(list); end # Adds +paragraph+ to the output # - # source://rdoc//rdoc/markup/to_html.rb#203 + # source://rdoc//lib/rdoc/markup/to_html.rb#203 def accept_paragraph(paragraph); end # Adds +raw+ to the output # - # source://rdoc//rdoc/markup/to_html.rb#320 + # source://rdoc//lib/rdoc/markup/to_html.rb#320 def accept_raw(raw); end # Adds +rule+ to the output # - # source://rdoc//rdoc/markup/to_html.rb#246 + # source://rdoc//lib/rdoc/markup/to_html.rb#246 def accept_rule(rule); end # Adds +table+ to the output # - # source://rdoc//rdoc/markup/to_html.rb#327 + # source://rdoc//lib/rdoc/markup/to_html.rb#327 def accept_table(header, body, aligns); end # Adds +verbatim+ to the output # - # source://rdoc//rdoc/markup/to_html.rb#216 + # 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//rdoc/markup/to_html.rb#33 + # 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//rdoc/markup/to_html.rb#33 + # source://rdoc//lib/rdoc/markup/to_html.rb#33 def code_object=(_arg0); end # CGI-escapes +text+ # - # source://rdoc//rdoc/markup/to_html.rb#352 + # source://rdoc//lib/rdoc/markup/to_html.rb#352 def convert_string(text); end # Returns the generated output # - # source://rdoc//rdoc/markup/to_html.rb#183 + # source://rdoc//lib/rdoc/markup/to_html.rb#183 def end_accepting; end # Path to this document for relative links # - # source://rdoc//rdoc/markup/to_html.rb#38 + # source://rdoc//lib/rdoc/markup/to_html.rb#38 def from_path; end # Path to this document for relative links # - # source://rdoc//rdoc/markup/to_html.rb#38 + # 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//rdoc/markup/to_html.rb#360 + # source://rdoc//lib/rdoc/markup/to_html.rb#360 def gen_url(url, text); end - # source://rdoc//rdoc/markup/to_html.rb#85 + # source://rdoc//lib/rdoc/markup/to_html.rb#85 def handle_RDOCLINK(url); end # +target+ is a
# - # source://rdoc//rdoc/markup/to_html.rb#110 + # 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: @@ -6137,7 +6245,7 @@ class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter # link::: # Reference to a local file relative to the output directory. # - # source://rdoc//rdoc/markup/to_html.rb#126 + # 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. @@ -6148,81 +6256,83 @@ class RDoc::Markup::ToHtml < ::RDoc::Markup::Formatter # 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//rdoc/markup/to_html.rb#141 + # 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//rdoc/markup/to_html.rb#149 + # 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//rdoc/markup/to_html.rb#385 + # source://rdoc//lib/rdoc/markup/to_html.rb#385 def html_list_name(list_type, open_tag); end - # source://rdoc//rdoc/markup/to_html.rb#26 + # source://rdoc//lib/rdoc/markup/to_html.rb#26 def in_list_entry; end # Adds regexp handlings about link notations. # - # source://rdoc//rdoc/markup/to_html.rb#80 + # source://rdoc//lib/rdoc/markup/to_html.rb#80 def init_link_notation_regexp_handlings; end # Adds regexp handlings. # - # source://rdoc//rdoc/markup/to_html.rb#70 + # source://rdoc//lib/rdoc/markup/to_html.rb#70 def init_regexp_handlings; end # Maps attributes to HTML tags # - # source://rdoc//rdoc/markup/to_html.rb#394 + # source://rdoc//lib/rdoc/markup/to_html.rb#394 def init_tags; end - # source://rdoc//rdoc/markup/to_html.rb#27 + # source://rdoc//lib/rdoc/markup/to_html.rb#27 def list; end # Returns the HTML end-tag for +list_type+ # - # source://rdoc//rdoc/markup/to_html.rb#420 + # 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//rdoc/markup/to_html.rb#404 + # 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//rdoc/markup/to_html.rb#434 + # source://rdoc//lib/rdoc/markup/to_html.rb#434 def parseable?(text); end - # source://rdoc//rdoc/markup/to_html.rb#25 + # source://rdoc//lib/rdoc/markup/to_html.rb#25 def res; end # Prepares the visitor for HTML generation # - # source://rdoc//rdoc/markup/to_html.rb#174 + # source://rdoc//lib/rdoc/markup/to_html.rb#174 def start_accepting; end # Converts +item+ to HTML using RDoc::Text#to_html # - # source://rdoc//rdoc/markup/to_html.rb#448 + # source://rdoc//lib/rdoc/markup/to_html.rb#448 def to_html(item); end end -# source://rdoc//rdoc/markup/to_html.rb#65 +# 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 @@ -6232,29 +6342,29 @@ class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml # @raise [ArgumentError] # @return [ToHtmlCrossref] a new instance of ToHtmlCrossref # - # source://rdoc//rdoc/markup/to_html_crossref.rb#32 + # 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//rdoc/markup/to_html_crossref.rb#19 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 def context; end # RDoc::CodeObject for generating references # - # source://rdoc//rdoc/markup/to_html_crossref.rb#19 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#19 def context=(_arg0); 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//rdoc/markup/to_html_crossref.rb#61 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#61 def cross_reference(name, text = T.unsafe(nil), code = T.unsafe(nil)); end # Generates links for rdoc-ref: scheme URLs and allows # RDoc::Markup::ToHtml to handle other schemes. # - # source://rdoc//rdoc/markup/to_html_crossref.rb#131 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#131 def gen_url(url, text); end # We're invoked when any text matches the CROSSREF pattern. If we find the @@ -6263,13 +6373,13 @@ class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml # example, ToHtml is found, even without the RDoc::Markup:: prefix, # because we look for it in module Markup first. # - # source://rdoc//rdoc/markup/to_html_crossref.rb#83 + # 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//rdoc/markup/to_html_crossref.rb#102 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#102 def handle_regexp_HYPERLINK(target); end # +target+ is an rdoc-schemed link that will be converted into a hyperlink. @@ -6279,29 +6389,31 @@ class RDoc::Markup::ToHtmlCrossref < ::RDoc::Markup::ToHtml # All other contents are handled by # {the superclass}[rdoc-ref:RDoc::Markup::ToHtml#handle_regexp_RDOCLINK] # - # source://rdoc//rdoc/markup/to_html_crossref.rb#116 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#116 def handle_regexp_RDOCLINK(target); end - # source://rdoc//rdoc/markup/to_html_crossref.rb#46 + # 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//rdoc/markup/to_html_crossref.rb#141 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#141 def link(name, text, code = T.unsafe(nil)); end # Should we show '#' characters on method references? # - # source://rdoc//rdoc/markup/to_html_crossref.rb#24 + # source://rdoc//lib/rdoc/markup/to_html_crossref.rb#24 def show_hash; end # Should we show '#' characters on method references? # - # source://rdoc//rdoc/markup/to_html_crossref.rb#24 + # 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+ @@ -6309,135 +6421,135 @@ class RDoc::Markup::ToHtmlSnippet < ::RDoc::Markup::ToHtml # # @return [ToHtmlSnippet] a new instance of ToHtmlSnippet # - # source://rdoc//rdoc/markup/to_html_snippet.rb#37 + # 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//rdoc/markup/to_html_snippet.rb#53 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#53 def accept_heading(heading); end # Finishes consumption of +list_item+ # - # source://rdoc//rdoc/markup/to_html_snippet.rb#85 + # 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//rdoc/markup/to_html_snippet.rb#91 + # 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//rdoc/markup/to_html_snippet.rb#98 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#98 def accept_list_start(list); end # Adds +paragraph+ to the output # - # source://rdoc//rdoc/markup/to_html_snippet.rb#72 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#72 def accept_paragraph(paragraph); end # Raw sections are untrusted and ignored # - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_raw(*node); end # Rules are ignored # - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_rule(*node); end # Adds +verbatim+ to the output # - # source://rdoc//rdoc/markup/to_html_snippet.rb#107 + # 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//rdoc/markup/to_html_snippet.rb#198 + # 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//rdoc/markup/to_html_snippet.rb#10 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#10 def character_limit; end # The number of characters seen so far. # - # source://rdoc//rdoc/markup/to_html_snippet.rb#15 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#15 def characters; end # Marks up +content+ # - # source://rdoc//rdoc/markup/to_html_snippet.rb#207 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#207 def convert(content); end # Converts flow items +flow+ # - # source://rdoc//rdoc/markup/to_html_snippet.rb#218 + # 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//rdoc/markup/to_html_snippet.rb#171 + # 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//rdoc/markup/to_html_snippet.rb#131 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#131 def handle_regexp_CROSSREF(target); end # +target+ is a
# - # source://rdoc//rdoc/markup/to_html_snippet.rb#138 + # 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//rdoc/markup/to_html_snippet.rb#191 + # 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//rdoc/markup/to_html_snippet.rb#146 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#146 def list_item_start(list_item, list_type); end # The attribute bitmask # - # source://rdoc//rdoc/markup/to_html_snippet.rb#20 + # 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//rdoc/markup/to_html_snippet.rb#264 + # 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//rdoc/markup/to_html_snippet.rb#254 + # 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//rdoc/markup/to_html_snippet.rb#25 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#25 def paragraph_limit; end # Count of paragraphs found # - # source://rdoc//rdoc/markup/to_html_snippet.rb#30 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#30 def paragraphs; end # Prepares the visitor for HTML snippet generation # - # source://rdoc//rdoc/markup/to_html_snippet.rb#122 + # 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//rdoc/markup/to_html_snippet.rb#273 + # source://rdoc//lib/rdoc/markup/to_html_snippet.rb#273 def truncate(text); end end @@ -6447,645 +6559,663 @@ end # # 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//rdoc/markup/to_joined_paragraph.rb#12 + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#12 def initialize; end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_block_quote(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_heading(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_end(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_item_end(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_item_start(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # 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//rdoc/markup/to_joined_paragraph.rb#25 + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#25 def accept_paragraph(paragraph); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_raw(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_rule(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_table(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_verbatim(*node); end - # source://rdoc//rdoc/markup/to_joined_paragraph.rb#19 + # source://rdoc//lib/rdoc/markup/to_joined_paragraph.rb#19 def end_accepting; end - # source://rdoc//rdoc/markup/to_joined_paragraph.rb#16 + # 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//rdoc/markup/to_label.rb#16 + # source://rdoc//lib/rdoc/markup/to_label.rb#16 def initialize(markup = T.unsafe(nil)); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_blank_line(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_block_quote(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_heading(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_end(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_item_end(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_item_start(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_start(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_paragraph(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_raw(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_rule(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_verbatim(*node); end # Converts +text+ to an HTML-safe label # - # source://rdoc//rdoc/markup/to_label.rb#32 + # source://rdoc//lib/rdoc/markup/to_label.rb#32 def convert(text); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # 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//rdoc/markup/to_label.rb#42 + # source://rdoc//lib/rdoc/markup/to_label.rb#42 def handle_regexp_CROSSREF(target); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # 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//rdoc/markup/to_label.rb#51 + # source://rdoc//lib/rdoc/markup/to_label.rb#51 def handle_regexp_TIDYLINK(target); end - # source://rdoc//rdoc/markup/to_label.rb#11 + # source://rdoc//lib/rdoc/markup/to_label.rb#11 def res; end - # source://rdoc//rdoc/markup/formatter.rb#188 + # 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//rdoc/markup/to_markdown.rb#12 + # source://rdoc//lib/rdoc/markup/to_markdown.rb#12 def initialize(markup = T.unsafe(nil)); end # Finishes consumption of `list` # - # source://rdoc//rdoc/markup/to_markdown.rb#47 + # source://rdoc//lib/rdoc/markup/to_markdown.rb#47 def accept_list_end(list); end # Finishes consumption of `list_item` # - # source://rdoc//rdoc/markup/to_markdown.rb#56 + # 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//rdoc/markup/to_markdown.rb#75 + # 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//rdoc/markup/to_markdown.rb#100 + # source://rdoc//lib/rdoc/markup/to_markdown.rb#100 def accept_list_start(list); end # Adds `rule` to the output # - # source://rdoc//rdoc/markup/to_markdown.rb#117 + # source://rdoc//lib/rdoc/markup/to_markdown.rb#117 def accept_rule(rule); end # Outputs `verbatim` indented 4 columns # - # source://rdoc//rdoc/markup/to_markdown.rb#126 + # 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//rdoc/markup/to_markdown.rb#140 + # source://rdoc//lib/rdoc/markup/to_markdown.rb#140 def gen_url(url, text); end # Handles rdoc- type links for footnotes. # - # source://rdoc//rdoc/markup/to_markdown.rb#149 + # source://rdoc//lib/rdoc/markup/to_markdown.rb#149 def handle_rdoc_link(url); end # Adds a newline to the output # - # source://rdoc//rdoc/markup/to_markdown.rb#40 + # 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//rdoc/markup/to_markdown.rb#187 + # 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//rdoc/markup/to_markdown.rb#169 + # source://rdoc//lib/rdoc/markup/to_markdown.rb#169 def handle_regexp_TIDYLINK(target); end # Maps attributes to HTML sequences # - # source://rdoc//rdoc/markup/to_markdown.rb#31 + # 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//rdoc/markup/to_rdoc.rb#45 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#45 def initialize(markup = T.unsafe(nil)); end # Adds +blank_line+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#77 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#77 def accept_blank_line(blank_line); end # Adds +paragraph+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#84 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#84 def accept_block_quote(block_quote); end # Adds +heading+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#99 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#99 def accept_heading(heading); end # Adds +paragraph+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#203 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#211 def accept_indented_paragraph(paragraph); end # Finishes consumption of +list+ # - # source://rdoc//rdoc/markup/to_rdoc.rb#110 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#110 def accept_list_end(list); end # Finishes consumption of +list_item+ # - # source://rdoc//rdoc/markup/to_rdoc.rb#119 + # 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//rdoc/markup/to_rdoc.rb#143 + # 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//rdoc/markup/to_rdoc.rb#168 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#176 def accept_list_start(list); end # Adds +paragraph+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#195 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#203 def accept_paragraph(paragraph); end # Adds +raw+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#213 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#221 def accept_raw(raw); end # Adds +rule+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#220 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#228 def accept_rule(rule); end # Adds +table+ to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#243 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#251 def accept_table(header, body, aligns); end # Outputs +verbatim+ indented 2 columns # - # source://rdoc//rdoc/markup/to_rdoc.rb#229 + # 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//rdoc/markup/to_rdoc.rb#271 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#279 def attributes(text); end # Returns the generated output # - # source://rdoc//rdoc/markup/to_rdoc.rb#279 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#287 def end_accepting; end # Adds a newline to the output # - # source://rdoc//rdoc/markup/to_rdoc.rb#295 + # 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//rdoc/markup/to_rdoc.rb#286 + # 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//rdoc/markup/to_rdoc.rb#10 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 def indent; end # Current indent amount for output in characters # - # source://rdoc//rdoc/markup/to_rdoc.rb#10 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#10 def indent=(_arg0); end # Maps attributes to HTML sequences # - # source://rdoc//rdoc/markup/to_rdoc.rb#68 + # 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//rdoc/markup/to_rdoc.rb#20 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#20 def list_index; end # Stack of list types # - # source://rdoc//rdoc/markup/to_rdoc.rb#25 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#25 def list_type; end # Stack of list widths for indentation # - # source://rdoc//rdoc/markup/to_rdoc.rb#30 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#30 def list_width; end # Prefix for the next list item. See #use_prefix # - # source://rdoc//rdoc/markup/to_rdoc.rb#35 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#35 def prefix; end # Output accumulator # - # source://rdoc//rdoc/markup/to_rdoc.rb#40 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#40 def res; end # Prepares the visitor for text generation # - # source://rdoc//rdoc/markup/to_rdoc.rb#302 + # 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//rdoc/markup/to_rdoc.rb#316 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#324 def use_prefix; end # Output width in characters # - # source://rdoc//rdoc/markup/to_rdoc.rb#15 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 def width; end # Output width in characters # - # source://rdoc//rdoc/markup/to_rdoc.rb#15 + # source://rdoc//lib/rdoc/markup/to_rdoc.rb#15 def width=(_arg0); end # Wraps +text+ to #width # - # source://rdoc//rdoc/markup/to_rdoc.rb#326 + # 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//rdoc/markup/to_table_of_contents.rb#27 + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#27 def initialize; end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_blank_line(*node); end # :stopdoc: # - # source://rdoc//rdoc/markup/formatter.rb#188 + # 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//rdoc/markup/to_table_of_contents.rb#36 + # 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//rdoc/markup/to_table_of_contents.rb#45 + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#45 def accept_heading(heading); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_end(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_end_bullet(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_item_end(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_item_start(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_list_start(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_paragraph(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_raw(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_rule(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_table(*node); end - # source://rdoc//rdoc/markup/formatter.rb#188 + # source://rdoc//lib/rdoc/markup/formatter.rb#188 def accept_verbatim(*node); end # Returns the table of contents # - # source://rdoc//rdoc/markup/to_table_of_contents.rb#52 + # 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//rdoc/markup/to_table_of_contents.rb#25 + # 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//rdoc/markup/to_table_of_contents.rb#25 + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#25 def omit_headings_below=(_arg0); end # Output accumulator # - # source://rdoc//rdoc/markup/to_table_of_contents.rb#20 + # source://rdoc//lib/rdoc/markup/to_table_of_contents.rb#20 def res; end # Prepares the visitor for text generation # - # source://rdoc//rdoc/markup/to_table_of_contents.rb#59 + # 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//rdoc/markup/to_table_of_contents.rb#67 + # 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//rdoc/markup/to_table_of_contents.rb#13 + # 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//rdoc/markup/to_test.rb#55 + # source://rdoc//lib/rdoc/markup/to_test.rb#55 def accept_blank_line(blank_line); end - # source://rdoc//rdoc/markup/to_test.rb#59 + # source://rdoc//lib/rdoc/markup/to_test.rb#59 def accept_heading(heading); end - # source://rdoc//rdoc/markup/to_test.rb#44 + # source://rdoc//lib/rdoc/markup/to_test.rb#44 def accept_list_end(list); end - # source://rdoc//rdoc/markup/to_test.rb#52 + # source://rdoc//lib/rdoc/markup/to_test.rb#52 def accept_list_item_end(list_item); end - # source://rdoc//rdoc/markup/to_test.rb#48 + # source://rdoc//lib/rdoc/markup/to_test.rb#48 def accept_list_item_start(list_item); end - # source://rdoc//rdoc/markup/to_test.rb#33 + # source://rdoc//lib/rdoc/markup/to_test.rb#33 def accept_list_start(list); end - # source://rdoc//rdoc/markup/to_test.rb#21 + # source://rdoc//lib/rdoc/markup/to_test.rb#21 def accept_paragraph(paragraph); end - # source://rdoc//rdoc/markup/to_test.rb#25 + # source://rdoc//lib/rdoc/markup/to_test.rb#25 def accept_raw(raw); end - # source://rdoc//rdoc/markup/to_test.rb#63 + # source://rdoc//lib/rdoc/markup/to_test.rb#63 def accept_rule(rule); end - # source://rdoc//rdoc/markup/to_test.rb#29 + # source://rdoc//lib/rdoc/markup/to_test.rb#29 def accept_verbatim(verbatim); end - # source://rdoc//rdoc/markup/to_test.rb#17 + # source://rdoc//lib/rdoc/markup/to_test.rb#17 def end_accepting; end # :section: Visitor # - # source://rdoc//rdoc/markup/to_test.rb#12 + # 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//rdoc/markup/to_tt_only.rb#21 + # 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//rdoc/markup/to_tt_only.rb#71 + # 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//rdoc/markup/to_tt_only.rb#30 + # 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//rdoc/markup/to_tt_only.rb#71 + # 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//rdoc/markup/to_tt_only.rb#37 + # 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//rdoc/markup/to_tt_only.rb#71 + # 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//rdoc/markup/to_tt_only.rb#51 + # 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//rdoc/markup/to_tt_only.rb#44 + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#44 def accept_list_start(list); end # Adds +paragraph+ to the output # - # source://rdoc//rdoc/markup/to_tt_only.rb#63 + # 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//rdoc/markup/to_tt_only.rb#71 + # 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//rdoc/markup/to_tt_only.rb#71 + # 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//rdoc/markup/to_tt_only.rb#71 + # 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//rdoc/markup/to_tt_only.rb#71 + # 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//rdoc/markup/to_tt_only.rb#107 + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#107 def end_accepting; end # Stack of list types # - # source://rdoc//rdoc/markup/to_tt_only.rb#11 + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#11 def list_type; end # Output accumulator # - # source://rdoc//rdoc/markup/to_tt_only.rb#16 + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#16 def res; end # Prepares the visitor for gathering tt sections # - # source://rdoc//rdoc/markup/to_tt_only.rb#114 + # source://rdoc//lib/rdoc/markup/to_tt_only.rb#114 def start_accepting; end # Extracts tt sections from +text+ # - # source://rdoc//rdoc/markup/to_tt_only.rb#84 + # 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//rdoc/markup/verbatim.rb#12 + # source://rdoc//lib/rdoc/markup/verbatim.rb#12 def initialize(*parts); end - # source://rdoc//rdoc/markup/verbatim.rb#18 + # source://rdoc//lib/rdoc/markup/verbatim.rb#18 def ==(other); end # Calls #accept_verbatim on +visitor+ # - # source://rdoc//rdoc/markup/verbatim.rb#25 + # source://rdoc//lib/rdoc/markup/verbatim.rb#25 def accept(visitor); end # Format of this verbatim section # - # source://rdoc//rdoc/markup/verbatim.rb#10 + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 def format; end # Format of this verbatim section # - # source://rdoc//rdoc/markup/verbatim.rb#10 + # source://rdoc//lib/rdoc/markup/verbatim.rb#10 def format=(_arg0); end # Collapses 3+ newlines into two newlines # - # source://rdoc//rdoc/markup/verbatim.rb#32 + # source://rdoc//lib/rdoc/markup/verbatim.rb#32 def normalize; end - # source://rdoc//rdoc/markup/verbatim.rb#53 + # source://rdoc//lib/rdoc/markup/verbatim.rb#53 def pretty_print(q); end # Is this verbatim section Ruby code? # # @return [Boolean] # - # source://rdoc//rdoc/markup/verbatim.rb#71 + # source://rdoc//lib/rdoc/markup/verbatim.rb#71 def ruby?; end # The text of the section # - # source://rdoc//rdoc/markup/verbatim.rb#79 + # 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/method_attr.rb#5 class RDoc::MethodAttr < ::RDoc::CodeObject include ::Comparable @@ -7096,15 +7226,15 @@ class RDoc::MethodAttr < ::RDoc::CodeObject # # @return [MethodAttr] a new instance of MethodAttr # - # source://rdoc//rdoc/method_attr.rb#78 + # source://rdoc//lib/rdoc/method_attr.rb#78 def initialize(text, name); end # Order by #singleton then #name # - # source://rdoc//rdoc/method_attr.rb#113 + # source://rdoc//lib/rdoc/method_attr.rb#113 def <=>(other); end - # source://rdoc//rdoc/method_attr.rb#121 + # source://rdoc//lib/rdoc/method_attr.rb#121 def ==(other); end # Abstract method. Contexts in their building phase call this @@ -7117,7 +7247,7 @@ class RDoc::MethodAttr < ::RDoc::CodeObject # # @raise [NotImplementedError] # - # source://rdoc//rdoc/method_attr.rb#209 + # source://rdoc//lib/rdoc/method_attr.rb#209 def add_alias(an_alias, context); end # Prepend +src+ with line numbers. Relies on the first line of a source @@ -7128,50 +7258,50 @@ class RDoc::MethodAttr < ::RDoc::CodeObject # If it has this comment then line numbers are added to +src+ and the , # line dddd portion of the comment is removed. # - # source://rdoc//rdoc/generator/markup.rb#77 + # source://rdoc//lib/rdoc/generator/markup.rb#77 def add_line_numbers(src); end # Array of other names for this method/attribute # - # source://rdoc//rdoc/method_attr.rb#32 + # source://rdoc//lib/rdoc/method_attr.rb#32 def aliases; end # HTML fragment reference for this method # - # source://rdoc//rdoc/method_attr.rb#216 + # source://rdoc//lib/rdoc/method_attr.rb#216 def aref; end # Prefix for +aref+, defined by subclasses. # # @raise [NotImplementedError] # - # source://rdoc//rdoc/method_attr.rb#225 + # source://rdoc//lib/rdoc/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//rdoc/method_attr.rb#64 + # source://rdoc//lib/rdoc/method_attr.rb#64 def arglists; end # Parameters yielded by the called block # - # source://rdoc//rdoc/method_attr.rb#49 + # source://rdoc//lib/rdoc/method_attr.rb#49 def block_params; end # Attempts to sanitize the content passed by the Ruby parser: # remove outer parentheses, etc. # - # source://rdoc//rdoc/method_attr.rb#233 + # source://rdoc//lib/rdoc/method_attr.rb#233 def block_params=(value); end # Different ways to call this method # - # source://rdoc//rdoc/method_attr.rb#59 + # source://rdoc//lib/rdoc/method_attr.rb#59 def call_seq; end # Different ways to call this method # - # source://rdoc//rdoc/method_attr.rb#59 + # source://rdoc//lib/rdoc/method_attr.rb#59 def call_seq=(_arg0); end # A method/attribute is documented if any of the following is true: @@ -7181,61 +7311,61 @@ class RDoc::MethodAttr < ::RDoc::CodeObject # # @return [Boolean] # - # source://rdoc//rdoc/method_attr.rb#132 + # source://rdoc//lib/rdoc/method_attr.rb#132 def documented?; end - # source://rdoc//rdoc/method_attr.rb#178 + # source://rdoc//lib/rdoc/method_attr.rb#178 def find_method_or_attribute(name); end - # source://rdoc//rdoc/method_attr.rb#166 + # source://rdoc//lib/rdoc/method_attr.rb#166 def find_see; end # Full method/attribute name including namespace # - # source://rdoc//rdoc/method_attr.rb#300 + # source://rdoc//lib/rdoc/method_attr.rb#300 def full_name; end # HTML id-friendly method/attribute name # - # source://rdoc//rdoc/method_attr.rb#291 + # source://rdoc//lib/rdoc/method_attr.rb#291 def html_name; end - # source://rdoc//rdoc/method_attr.rb#105 + # source://rdoc//lib/rdoc/method_attr.rb#105 def initialize_visibility; end - # source://rdoc//rdoc/method_attr.rb#304 + # source://rdoc//lib/rdoc/method_attr.rb#304 def inspect; end # The method/attribute we're aliasing # - # source://rdoc//rdoc/method_attr.rb#37 + # source://rdoc//lib/rdoc/method_attr.rb#37 def is_alias_for; end # The method/attribute we're aliasing # - # source://rdoc//rdoc/method_attr.rb#37 + # source://rdoc//lib/rdoc/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//rdoc/generator/markup.rb#101 + # source://rdoc//lib/rdoc/generator/markup.rb#101 def markup_code; end # Name of this method/attribute. # - # source://rdoc//rdoc/method_attr.rb#12 + # source://rdoc//lib/rdoc/method_attr.rb#12 def name; end # Name of this method/attribute. # - # source://rdoc//rdoc/method_attr.rb#12 + # source://rdoc//lib/rdoc/method_attr.rb#12 def name=(_arg0); end # '::' for a class method/attribute, '#' for an instance method. # - # source://rdoc//rdoc/method_attr.rb#319 + # source://rdoc//lib/rdoc/method_attr.rb#319 def name_prefix; end # Name for output to HTML. For class methods the full name with a "." is @@ -7244,46 +7374,46 @@ class RDoc::MethodAttr < ::RDoc::CodeObject # # This is to help prevent people from using :: to call class methods. # - # source://rdoc//rdoc/method_attr.rb#330 + # source://rdoc//lib/rdoc/method_attr.rb#330 def output_name(context); end # Pretty parameter list for this method # - # source://rdoc//rdoc/method_attr.rb#69 + # source://rdoc//lib/rdoc/method_attr.rb#69 def param_seq; end # Parameters for this method # - # source://rdoc//rdoc/method_attr.rb#54 + # source://rdoc//lib/rdoc/method_attr.rb#54 def params; end # Parameters for this method # - # source://rdoc//rdoc/method_attr.rb#54 + # source://rdoc//lib/rdoc/method_attr.rb#54 def params=(_arg0); end # Name of our parent with special handling for un-marshaled methods # - # source://rdoc//rdoc/method_attr.rb#360 + # source://rdoc//lib/rdoc/method_attr.rb#360 def parent_name; end # Path to this method for use with HTML generator output. # - # source://rdoc//rdoc/method_attr.rb#353 + # source://rdoc//lib/rdoc/method_attr.rb#353 def path; end # Method/attribute name with class/instance indicator # - # source://rdoc//rdoc/method_attr.rb#339 + # source://rdoc//lib/rdoc/method_attr.rb#339 def pretty_name; end - # source://rdoc//rdoc/method_attr.rb#364 + # source://rdoc//lib/rdoc/method_attr.rb#364 def pretty_print(q); end # Used by RDoc::Generator::JsonIndex to create a record for the search # engine. # - # source://rdoc//rdoc/method_attr.rb#398 + # source://rdoc//lib/rdoc/method_attr.rb#398 def search_record; end # A method/attribute to look at, @@ -7299,85 +7429,87 @@ class RDoc::MethodAttr < ::RDoc::CodeObject # Templates may generate a "see also ..." if this method/attribute # has documentation, and "see ..." if it does not. # - # source://rdoc//rdoc/method_attr.rb#152 + # source://rdoc//lib/rdoc/method_attr.rb#152 def see; end # Is this a singleton method/attribute? # - # source://rdoc//rdoc/method_attr.rb#22 + # source://rdoc//lib/rdoc/method_attr.rb#22 def singleton; end # Is this a singleton method/attribute? # - # source://rdoc//rdoc/method_attr.rb#22 + # source://rdoc//lib/rdoc/method_attr.rb#22 def singleton=(_arg0); end # Sets the store for this class or module and its contained code objects. # - # source://rdoc//rdoc/method_attr.rb#160 + # source://rdoc//lib/rdoc/method_attr.rb#160 def store=(store); end # Source file token stream # - # source://rdoc//rdoc/method_attr.rb#27 + # source://rdoc//lib/rdoc/method_attr.rb#27 def text; end - # source://rdoc//rdoc/method_attr.rb#410 + # source://rdoc//lib/rdoc/method_attr.rb#410 def to_s; end # Type of method/attribute (class or instance) # - # source://rdoc//rdoc/method_attr.rb#346 + # source://rdoc//lib/rdoc/method_attr.rb#346 def type; end # public, protected, private # - # source://rdoc//rdoc/method_attr.rb#17 + # source://rdoc//lib/rdoc/method_attr.rb#17 def visibility; end # public, protected, private # - # source://rdoc//rdoc/method_attr.rb#17 + # source://rdoc//lib/rdoc/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//rdoc/method_attr.rb#101 + # source://rdoc//lib/rdoc/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/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//rdoc/mixin.rb#16 + # source://rdoc//lib/rdoc/mixin.rb#16 def initialize(name, comment); end # Mixins are sorted by name # - # source://rdoc//rdoc/mixin.rb#26 + # source://rdoc//lib/rdoc/mixin.rb#26 def <=>(other); end - # source://rdoc//rdoc/mixin.rb#32 + # source://rdoc//lib/rdoc/mixin.rb#32 def ==(other); end - # source://rdoc//rdoc/mixin.rb#32 + # source://rdoc//lib/rdoc/mixin.rb#32 def eql?(other); end # Full name based on #module # - # source://rdoc//rdoc/mixin.rb#41 + # source://rdoc//lib/rdoc/mixin.rb#41 def full_name; end - # source://rdoc//rdoc/mixin.rb#46 + # source://rdoc//lib/rdoc/mixin.rb#46 def hash; end - # source://rdoc//rdoc/mixin.rb#50 + # source://rdoc//lib/rdoc/mixin.rb#50 def inspect; end # Attempts to locate the included module object. Returns the name if not @@ -7396,86 +7528,90 @@ class RDoc::Mixin < ::RDoc::CodeObject # # As of the beginning of October, 2011, no gem includes nonexistent modules. # - # source://rdoc//rdoc/mixin.rb#75 + # source://rdoc//lib/rdoc/mixin.rb#75 def module; end # Name of included module # - # source://rdoc//rdoc/mixin.rb#11 + # source://rdoc//lib/rdoc/mixin.rb#11 def name; end # Name of included module # - # source://rdoc//rdoc/mixin.rb#11 + # source://rdoc//lib/rdoc/mixin.rb#11 def name=(_arg0); end # Sets the store for this class or module and its contained code objects. # - # source://rdoc//rdoc/mixin.rb#110 + # source://rdoc//lib/rdoc/mixin.rb#110 def store=(store); end - # source://rdoc//rdoc/mixin.rb#116 + # source://rdoc//lib/rdoc/mixin.rb#116 def to_s; end end # A normal class, neither singleton nor anonymous +# +# source://rdoc//lib/rdoc/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//rdoc/normal_class.rb#12 + # source://rdoc//lib/rdoc/normal_class.rb#12 def ancestors; end - # source://rdoc//rdoc/normal_class.rb#24 + # source://rdoc//lib/rdoc/normal_class.rb#24 def aref_prefix; end # The definition of this class, class MyClassName # - # source://rdoc//rdoc/normal_class.rb#31 + # source://rdoc//lib/rdoc/normal_class.rb#31 def definition; end - # source://rdoc//rdoc/normal_class.rb#35 + # source://rdoc//lib/rdoc/normal_class.rb#35 def direct_ancestors; end - # source://rdoc//rdoc/normal_class.rb#39 + # source://rdoc//lib/rdoc/normal_class.rb#39 def inspect; end - # source://rdoc//rdoc/normal_class.rb#56 + # source://rdoc//lib/rdoc/normal_class.rb#56 def pretty_print(q); end - # source://rdoc//rdoc/normal_class.rb#47 + # source://rdoc//lib/rdoc/normal_class.rb#47 def to_s; end end # A normal module, like NormalClass +# +# source://rdoc//lib/rdoc/normal_module.rb#5 class RDoc::NormalModule < ::RDoc::ClassModule - # source://rdoc//rdoc/normal_module.rb#7 + # source://rdoc//lib/rdoc/normal_module.rb#7 def aref_prefix; end # The definition of this module, module MyModuleName # - # source://rdoc//rdoc/normal_module.rb#21 + # source://rdoc//lib/rdoc/normal_module.rb#21 def definition; end - # source://rdoc//rdoc/normal_module.rb#11 + # source://rdoc//lib/rdoc/normal_module.rb#11 def inspect; end # This is a module, returns true # # @return [Boolean] # - # source://rdoc//rdoc/normal_module.rb#28 + # source://rdoc//lib/rdoc/normal_module.rb#28 def module?; end - # source://rdoc//rdoc/normal_module.rb#32 + # source://rdoc//lib/rdoc/normal_module.rb#32 def pretty_print(q); end # Modules don't have one, raises NoMethodError # # @raise [NoMethodError] # - # source://rdoc//rdoc/normal_module.rb#69 + # source://rdoc//lib/rdoc/normal_module.rb#69 def superclass; end end @@ -7547,342 +7683,344 @@ end # 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//rdoc/options.rb#346 + # source://rdoc//lib/rdoc/options.rb#347 def initialize(loaded_options = T.unsafe(nil)); end - # source://rdoc//rdoc/options.rb#459 + # source://rdoc//lib/rdoc/options.rb#460 def ==(other); end # Character-set for HTML output. #encoding is preferred over #charset # - # source://rdoc//rdoc/options.rb#151 + # source://rdoc//lib/rdoc/options.rb#152 def charset; end # Character-set for HTML output. #encoding is preferred over #charset # - # source://rdoc//rdoc/options.rb#151 + # source://rdoc//lib/rdoc/options.rb#152 def charset=(_arg0); end # Check that the files on the command line exist # - # source://rdoc//rdoc/options.rb#483 + # source://rdoc//lib/rdoc/options.rb#484 def check_files; end # Ensure only one generator is loaded # - # source://rdoc//rdoc/options.rb#504 + # source://rdoc//lib/rdoc/options.rb#505 def check_generator; end # If true, only report on undocumented files # - # source://rdoc//rdoc/options.rb#243 + # source://rdoc//lib/rdoc/options.rb#244 def coverage_report; end # If true, only report on undocumented files # - # source://rdoc//rdoc/options.rb#243 + # 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//rdoc/options.rb#516 + # source://rdoc//lib/rdoc/options.rb#517 def default_title=(string); end # If true, RDoc will not write any files. # - # source://rdoc//rdoc/options.rb#156 + # source://rdoc//lib/rdoc/options.rb#157 def dry_run; end # If true, RDoc will not write any files. # - # source://rdoc//rdoc/options.rb#156 + # source://rdoc//lib/rdoc/options.rb#157 def dry_run=(_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//rdoc/options.rb#163 + # 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//rdoc/options.rb#163 + # source://rdoc//lib/rdoc/options.rb#164 def encoding=(_arg0); end # Create a regexp for #exclude # - # source://rdoc//rdoc/options.rb#544 + # source://rdoc//lib/rdoc/options.rb#545 def exclude; end # Files matching this pattern will be excluded # - # source://rdoc//rdoc/options.rb#168 + # source://rdoc//lib/rdoc/options.rb#169 def exclude=(_arg0); end # The list of files to be processed # - # source://rdoc//rdoc/options.rb#173 + # source://rdoc//lib/rdoc/options.rb#174 def files; end # The list of files to be processed # - # source://rdoc//rdoc/options.rb#173 + # 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//rdoc/options.rb#560 + # source://rdoc//lib/rdoc/options.rb#561 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//rdoc/options.rb#601 + # source://rdoc//lib/rdoc/options.rb#602 def finish_page_dir; end # Create the output even if the output directory does not look # like an rdoc output directory # - # source://rdoc//rdoc/options.rb#179 + # 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//rdoc/options.rb#179 + # source://rdoc//lib/rdoc/options.rb#180 def force_output=(_arg0); end # Scan newer sources than the flag file if true. # - # source://rdoc//rdoc/options.rb#184 + # source://rdoc//lib/rdoc/options.rb#185 def force_update; end # Scan newer sources than the flag file if true. # - # source://rdoc//rdoc/options.rb#184 + # source://rdoc//lib/rdoc/options.rb#185 def force_update=(_arg0); end # Formatter to mark up text with # - # source://rdoc//rdoc/options.rb#189 + # source://rdoc//lib/rdoc/options.rb#190 def formatter; end # Formatter to mark up text with # - # source://rdoc//rdoc/options.rb#189 + # source://rdoc//lib/rdoc/options.rb#190 def formatter=(_arg0); end # Description of the output generator (set with the --format option) # - # source://rdoc//rdoc/options.rb#194 + # source://rdoc//lib/rdoc/options.rb#195 def generator; end # Description of the output generator (set with the --format option) # - # source://rdoc//rdoc/options.rb#194 + # source://rdoc//lib/rdoc/options.rb#195 def generator=(_arg0); end # Returns a properly-space list of generators and their descriptions. # - # source://rdoc//rdoc/options.rb#620 + # source://rdoc//lib/rdoc/options.rb#621 def generator_descriptions; end # For #== # - # source://rdoc//rdoc/options.rb#199 + # 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//rdoc/options.rb#205 + # 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//rdoc/options.rb#205 + # 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//rdoc/options.rb#211 + # 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//rdoc/options.rb#211 + # source://rdoc//lib/rdoc/options.rb#212 def hyperlink_all=(_arg0); end - # source://rdoc//rdoc/options.rb#351 + # source://rdoc//lib/rdoc/options.rb#352 def init_ivars; end - # source://rdoc//rdoc/options.rb#396 + # source://rdoc//lib/rdoc/options.rb#397 def init_with(map); end # Include line numbers in the source code # - # source://rdoc//rdoc/options.rb#216 + # source://rdoc//lib/rdoc/options.rb#217 def line_numbers; end # Include line numbers in the source code # - # source://rdoc//rdoc/options.rb#216 + # source://rdoc//lib/rdoc/options.rb#217 def line_numbers=(_arg0); end # The output locale. # - # source://rdoc//rdoc/options.rb#221 + # source://rdoc//lib/rdoc/options.rb#222 def locale; end # The output locale. # - # source://rdoc//rdoc/options.rb#221 + # source://rdoc//lib/rdoc/options.rb#222 def locale=(_arg0); end # The directory where locale data live. # - # source://rdoc//rdoc/options.rb#226 + # source://rdoc//lib/rdoc/options.rb#227 def locale_dir; end # The directory where locale data live. # - # source://rdoc//rdoc/options.rb#226 + # 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//rdoc/options.rb#232 + # 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//rdoc/options.rb#232 + # source://rdoc//lib/rdoc/options.rb#233 def main_page=(_arg0); end # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' # and 'rd' are also built-in. # - # source://rdoc//rdoc/options.rb#238 + # source://rdoc//lib/rdoc/options.rb#239 def markup; end # The default markup format. The default is 'rdoc'. 'markdown', 'tomdoc' # and 'rd' are also built-in. # - # source://rdoc//rdoc/options.rb#238 + # source://rdoc//lib/rdoc/options.rb#239 def markup=(_arg0); end # The name of the output directory # - # source://rdoc//rdoc/options.rb#248 + # source://rdoc//lib/rdoc/options.rb#249 def op_dir; end # The name of the output directory # - # source://rdoc//rdoc/options.rb#248 + # source://rdoc//lib/rdoc/options.rb#249 def op_dir=(_arg0); end # The OptionParser for this instance # - # source://rdoc//rdoc/options.rb#253 + # source://rdoc//lib/rdoc/options.rb#254 def option_parser; end # The OptionParser for this instance # - # source://rdoc//rdoc/options.rb#253 + # source://rdoc//lib/rdoc/options.rb#254 def option_parser=(_arg0); end # Output heading decorations? # - # source://rdoc//rdoc/options.rb#257 + # source://rdoc//lib/rdoc/options.rb#258 def output_decoration; end # Output heading decorations? # - # source://rdoc//rdoc/options.rb#257 + # source://rdoc//lib/rdoc/options.rb#258 def output_decoration=(_arg0); end - # source://rdoc//rdoc/options.rb#427 + # source://rdoc//lib/rdoc/options.rb#428 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//rdoc/options.rb#263 + # 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//rdoc/options.rb#263 + # source://rdoc//lib/rdoc/options.rb#264 def page_dir=(_arg0); end # Parses command line options. # - # source://rdoc//rdoc/options.rb#646 + # source://rdoc//lib/rdoc/options.rb#647 def parse(argv); end # Is RDoc in pipe mode? # - # source://rdoc//rdoc/options.rb#268 + # source://rdoc//lib/rdoc/options.rb#269 def pipe; end # Is RDoc in pipe mode? # - # source://rdoc//rdoc/options.rb#268 + # source://rdoc//lib/rdoc/options.rb#269 def pipe=(_arg0); end # Don't display progress as we process the files # - # source://rdoc//rdoc/options.rb#1191 + # source://rdoc//lib/rdoc/options.rb#1192 def quiet; end # Set quietness to +bool+ # - # source://rdoc//rdoc/options.rb#1198 + # source://rdoc//lib/rdoc/options.rb#1199 def quiet=(bool); end # Array of directories to search for files to satisfy an :include: # - # source://rdoc//rdoc/options.rb#273 + # source://rdoc//lib/rdoc/options.rb#274 def rdoc_include; end # Array of directories to search for files to satisfy an :include: # - # source://rdoc//rdoc/options.rb#273 + # 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//rdoc/options.rb#280 + # 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//rdoc/options.rb#280 + # source://rdoc//lib/rdoc/options.rb#281 def root=(_arg0); end # Removes directories from +path+ that are outside the current directory # - # source://rdoc//rdoc/options.rb#1205 + # source://rdoc//lib/rdoc/options.rb#1206 def sanitize_path(path); end # Set up an output generator for the named +generator_name+. @@ -7891,117 +8029,117 @@ class RDoc::Options # the options instance. This allows generators to add custom options or set # default options. # - # source://rdoc//rdoc/options.rb#1232 + # source://rdoc//lib/rdoc/options.rb#1233 def setup_generator(generator_name = T.unsafe(nil)); end # Include the '#' at the front of hyperlinked instance method names # - # source://rdoc//rdoc/options.rb#285 + # source://rdoc//lib/rdoc/options.rb#286 def show_hash; end # Include the '#' at the front of hyperlinked instance method names # - # source://rdoc//rdoc/options.rb#285 + # source://rdoc//lib/rdoc/options.rb#286 def show_hash=(_arg0); end # Indicates if files of test suites should be skipped # - # source://rdoc//rdoc/options.rb#344 + # source://rdoc//lib/rdoc/options.rb#345 def skip_tests; end # Indicates if files of test suites should be skipped # - # source://rdoc//rdoc/options.rb#344 + # source://rdoc//lib/rdoc/options.rb#345 def skip_tests=(_arg0); end # Directory to copy static files from # - # source://rdoc//rdoc/options.rb#290 + # source://rdoc//lib/rdoc/options.rb#291 def static_path; end # Directory to copy static files from # - # source://rdoc//rdoc/options.rb#290 + # source://rdoc//lib/rdoc/options.rb#291 def static_path=(_arg0); end # The number of columns in a tab # - # source://rdoc//rdoc/options.rb#295 + # source://rdoc//lib/rdoc/options.rb#296 def tab_width; end # The number of columns in a tab # - # source://rdoc//rdoc/options.rb#295 + # source://rdoc//lib/rdoc/options.rb#296 def tab_width=(_arg0); end # Template to be used when generating output # - # source://rdoc//rdoc/options.rb#300 + # source://rdoc//lib/rdoc/options.rb#301 def template; end # Template to be used when generating output # - # source://rdoc//rdoc/options.rb#300 + # source://rdoc//lib/rdoc/options.rb#301 def template=(_arg0); end # Directory the template lives in # - # source://rdoc//rdoc/options.rb#305 + # source://rdoc//lib/rdoc/options.rb#306 def template_dir; end # Directory the template lives in # - # source://rdoc//rdoc/options.rb#305 + # source://rdoc//lib/rdoc/options.rb#306 def template_dir=(_arg0); end # Finds the template dir for +template+ # - # source://rdoc//rdoc/options.rb#1254 + # source://rdoc//lib/rdoc/options.rb#1255 def template_dir_for(template); end # Additional template stylesheets # - # source://rdoc//rdoc/options.rb#310 + # source://rdoc//lib/rdoc/options.rb#311 def template_stylesheets; end # Additional template stylesheets # - # source://rdoc//rdoc/options.rb#310 + # source://rdoc//lib/rdoc/options.rb#311 def template_stylesheets=(_arg0); end # Documentation title # - # source://rdoc//rdoc/options.rb#315 + # source://rdoc//lib/rdoc/options.rb#316 def title; end # Documentation title # - # source://rdoc//rdoc/options.rb#315 + # source://rdoc//lib/rdoc/options.rb#316 def title=(_arg0); end # For dumping YAML # - # source://rdoc//rdoc/options.rb#523 + # source://rdoc//lib/rdoc/options.rb#524 def to_yaml(*options); end # Should RDoc update the timestamps in the output dir? # - # source://rdoc//rdoc/options.rb#320 + # source://rdoc//lib/rdoc/options.rb#321 def update_output_dir; end # Should RDoc update the timestamps in the output dir? # - # source://rdoc//rdoc/options.rb#320 + # source://rdoc//lib/rdoc/options.rb#321 def update_output_dir=(_arg0); end # Verbosity, zero means quiet # - # source://rdoc//rdoc/options.rb#325 + # source://rdoc//lib/rdoc/options.rb#326 def verbosity; end # Verbosity, zero means quiet # - # source://rdoc//rdoc/options.rb#325 + # source://rdoc//lib/rdoc/options.rb#326 def verbosity=(_arg0); end # Minimum visibility of a documented method. One of +:public+, +:protected+, @@ -8010,7 +8148,7 @@ class RDoc::Options # The +:nodoc+ visibility ignores all directives related to visibility. The # directive. # - # source://rdoc//rdoc/options.rb#340 + # source://rdoc//lib/rdoc/options.rb#341 def visibility; end # Sets the minimum visibility of a documented method. @@ -8020,31 +8158,31 @@ class RDoc::Options # When +:all+ is passed, visibility is set to +:private+, similarly to # RDOCOPT="--all", see #visibility for more information. # - # source://rdoc//rdoc/options.rb#1271 + # source://rdoc//lib/rdoc/options.rb#1272 def visibility=(visibility); end # Displays a warning using Kernel#warn if we're being verbose # - # source://rdoc//rdoc/options.rb#1283 + # source://rdoc//lib/rdoc/options.rb#1284 def warn(message); end # URL of web cvs frontend # - # source://rdoc//rdoc/options.rb#330 + # source://rdoc//lib/rdoc/options.rb#331 def webcvs; end # URL of web cvs frontend # - # source://rdoc//rdoc/options.rb#330 + # source://rdoc//lib/rdoc/options.rb#331 def webcvs=(_arg0); end # Writes the YAML file .rdoc_options to the current directory containing the # parsed options. # - # source://rdoc//rdoc/options.rb#1291 + # source://rdoc//lib/rdoc/options.rb#1292 def write_options; end - # source://rdoc//rdoc/options.rb#423 + # source://rdoc//lib/rdoc/options.rb#424 def yaml_initialize(tag, map); end class << self @@ -8053,7 +8191,7 @@ class RDoc::Options # # @raise [RDoc::Error] # - # source://rdoc//rdoc/options.rb#1305 + # source://rdoc//lib/rdoc/options.rb#1306 def load_options; end end end @@ -8085,6 +8223,8 @@ end # # 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 @@ -8093,24 +8233,24 @@ class RDoc::Parser # # @return [Parser] a new instance of Parser # - # source://rdoc//rdoc/parser.rb#252 + # source://rdoc//lib/rdoc/parser.rb#254 def initialize(top_level, file_name, content, options, stats); end # The name of the file being parsed # - # source://rdoc//rdoc/parser.rb#52 + # source://rdoc//lib/rdoc/parser.rb#52 def file_name; end # Normalizes tabs in +body+ # - # source://rdoc//rdoc/parser.rb#272 + # source://rdoc//lib/rdoc/parser.rb#274 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//rdoc/parser.rb#58 + # 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 @@ -8118,36 +8258,36 @@ class RDoc::Parser # # @return [Boolean] # - # source://rdoc//rdoc/parser.rb#74 + # source://rdoc//lib/rdoc/parser.rb#74 def binary?(file); end # Return a parser that can handle a particular extension # - # source://rdoc//rdoc/parser.rb#107 + # 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//rdoc/parser.rb#120 + # 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//rdoc/parser.rb#141 + # 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//rdoc/parser.rb#167 + # source://rdoc//lib/rdoc/parser.rb#169 def for(top_level, file_name, content, options, stats); end # Record which file types this parser can understand. # # It is ok to call this multiple times. # - # source://rdoc//rdoc/parser.rb#201 + # source://rdoc//lib/rdoc/parser.rb#203 def parse_files_matching(regexp); end # An Array of arrays that maps file extension (or name) regular @@ -8155,12 +8295,12 @@ class RDoc::Parser # # Use parse_files_matching to register a parser's file extensions. # - # source://rdoc//rdoc/parser.rb#45 + # source://rdoc//lib/rdoc/parser.rb#45 def parsers; end # Removes an emacs-style modeline from the first line of the document # - # source://rdoc//rdoc/parser.rb#208 + # source://rdoc//lib/rdoc/parser.rb#210 def remove_modeline(content); end # If there is a markup: parser_name comment at the front of the @@ -8179,7 +8319,7 @@ class RDoc::Parser # # Any comment style may be used to hide the markup comment. # - # source://rdoc//rdoc/parser.rb#229 + # source://rdoc//lib/rdoc/parser.rb#231 def use_markup(content); end # Checks if +file+ is a zip file in disguise. Signatures from @@ -8187,7 +8327,7 @@ class RDoc::Parser # # @return [Boolean] # - # source://rdoc//rdoc/parser.rb#94 + # source://rdoc//lib/rdoc/parser.rb#94 def zip?(file); end end end @@ -8305,6 +8445,8 @@ end # * 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 @@ -8313,85 +8455,85 @@ class RDoc::Parser::C < ::RDoc::Parser # # @return [C] a new instance of C # - # source://rdoc//rdoc/parser/c.rb#171 + # source://rdoc//lib/rdoc/parser/c.rb#171 def initialize(top_level, file_name, content, options, stats); end # Add alias, either from a direct alias definition, or from two # method that reference the same function. # - # source://rdoc//rdoc/parser/c.rb#250 + # 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//rdoc/parser/c.rb#133 + # source://rdoc//lib/rdoc/parser/c.rb#133 def classes; end # C file the parser is parsing # - # source://rdoc//rdoc/parser/c.rb#138 + # source://rdoc//lib/rdoc/parser/c.rb#138 def content; end # C file the parser is parsing # - # source://rdoc//rdoc/parser/c.rb#138 + # source://rdoc//lib/rdoc/parser/c.rb#138 def content=(_arg0); end # Scans #content for rb_define_alias # - # source://rdoc//rdoc/parser/c.rb#222 + # source://rdoc//lib/rdoc/parser/c.rb#222 def do_aliases; end # Scans #content for rb_attr and rb_define_attr # - # source://rdoc//rdoc/parser/c.rb#263 + # source://rdoc//lib/rdoc/parser/c.rb#263 def do_attrs; end # Scans #content for boot_defclass # - # source://rdoc//rdoc/parser/c.rb#286 + # 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//rdoc/parser/c.rb#298 + # 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//rdoc/parser/c.rb#396 + # source://rdoc//lib/rdoc/parser/c.rb#396 def do_constants; end # Scans #content for rb_include_module # - # source://rdoc//rdoc/parser/c.rb#442 + # source://rdoc//lib/rdoc/parser/c.rb#442 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//rdoc/parser/c.rb#458 + # source://rdoc//lib/rdoc/parser/c.rb#458 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//rdoc/parser/c.rb#507 + # source://rdoc//lib/rdoc/parser/c.rb#507 def do_missing; end # Dependencies from a missing enclosing class to the classes in # missing_dependencies that depend upon it. # - # source://rdoc//rdoc/parser/c.rb#144 + # 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//rdoc/parser/c.rb#523 + # source://rdoc//lib/rdoc/parser/c.rb#523 def find_alias_comment(class_name, new_name, old_name); end # Finds a comment for rb_define_attr, rb_attr or Document-attr. @@ -8402,17 +8544,17 @@ class RDoc::Parser::C < ::RDoc::Parser # +read+ and +write+ are the read/write flags ('1' or '0'). Either both or # neither must be provided. # - # source://rdoc//rdoc/parser/c.rb#541 + # source://rdoc//lib/rdoc/parser/c.rb#541 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//rdoc/parser/c.rb#598 + # source://rdoc//lib/rdoc/parser/c.rb#598 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//rdoc/parser/c.rb#682 + # source://rdoc//lib/rdoc/parser/c.rb#682 def find_class(raw_name, name, base_name = T.unsafe(nil)); end # Look for class or module documentation above Init_+class_name+(void), @@ -8440,45 +8582,45 @@ class RDoc::Parser::C < ::RDoc::Parser # */ # VALUE cFoo = rb_define_class("Foo", rb_cObject); # - # source://rdoc//rdoc/parser/c.rb#723 + # source://rdoc//lib/rdoc/parser/c.rb#723 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//rdoc/parser/c.rb#779 + # source://rdoc//lib/rdoc/parser/c.rb#789 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//rdoc/parser/c.rb#796 + # source://rdoc//lib/rdoc/parser/c.rb#806 def find_modifiers(comment, meth_obj); end # Finds a Document-method override for +meth_obj+ on +class_name+ # - # source://rdoc//rdoc/parser/c.rb#806 + # source://rdoc//lib/rdoc/parser/c.rb#816 def find_override_comment(class_name, meth_obj); end # Generate a Ruby-method table # - # source://rdoc//rdoc/parser/c.rb#574 + # source://rdoc//lib/rdoc/parser/c.rb#574 def gen_body_table(file_content); end # Generate a const table # - # source://rdoc//rdoc/parser/c.rb#756 + # source://rdoc//lib/rdoc/parser/c.rb#756 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//rdoc/parser/c.rb#828 + # source://rdoc//lib/rdoc/parser/c.rb#838 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//rdoc/parser/c.rb#857 + # source://rdoc//lib/rdoc/parser/c.rb#867 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 @@ -8490,35 +8632,35 @@ class RDoc::Parser::C < ::RDoc::Parser # Will override INT2FIX(300) with the value +300+ in the output # RDoc. Values may include quotes and escaped colons (\:). # - # source://rdoc//rdoc/parser/c.rb#922 + # source://rdoc//lib/rdoc/parser/c.rb#932 def handle_constants(type, var_name, const_name, definition); end # Removes #ifdefs that would otherwise confuse us # - # source://rdoc//rdoc/parser/c.rb#972 + # source://rdoc//lib/rdoc/parser/c.rb#982 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//rdoc/parser/c.rb#981 + # source://rdoc//lib/rdoc/parser/c.rb#991 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//rdoc/parser/c.rb#1051 + # source://rdoc//lib/rdoc/parser/c.rb#1061 def handle_singleton(sclass_var, class_var); end # Maps C variable names to names of Ruby classes (and singleton classes) # - # source://rdoc//rdoc/parser/c.rb#149 + # 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//rdoc/parser/c.rb#1062 + # source://rdoc//lib/rdoc/parser/c.rb#1072 def load_variable_map(map_name); end # Look for directives in a normal comment block: @@ -8529,55 +8671,55 @@ class RDoc::Parser::C < ::RDoc::Parser # # This method modifies the +comment+ # - # source://rdoc//rdoc/parser/c.rb#1091 + # source://rdoc//lib/rdoc/parser/c.rb#1101 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//rdoc/parser/c.rb#155 + # source://rdoc//lib/rdoc/parser/c.rb#155 def missing_dependencies; end # Creates a RDoc::Comment instance. # - # source://rdoc//rdoc/parser/c.rb#1221 + # source://rdoc//lib/rdoc/parser/c.rb#1231 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//rdoc/parser/c.rb#1110 + # source://rdoc//lib/rdoc/parser/c.rb#1120 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//rdoc/parser/c.rb#1193 + # source://rdoc//lib/rdoc/parser/c.rb#1203 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//rdoc/parser/c.rb#1201 + # source://rdoc//lib/rdoc/parser/c.rb#1211 def scan; end # Maps C variable names to names of Ruby singleton classes # - # source://rdoc//rdoc/parser/c.rb#160 + # source://rdoc//lib/rdoc/parser/c.rb#160 def singleton_classes; end # The TopLevel items in the parsed file belong to # - # source://rdoc//rdoc/parser/c.rb#165 + # source://rdoc//lib/rdoc/parser/c.rb#165 def top_level; end end # :stopdoc: # -# source://rdoc//rdoc/parser/c.rb#126 +# source://rdoc//lib/rdoc/parser/c.rb#126 RDoc::Parser::C::BOOL_ARG_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rdoc//rdoc/parser/c.rb#127 +# source://rdoc//lib/rdoc/parser/c.rb#127 RDoc::Parser::C::TRUE_VALUES = T.let(T.unsafe(nil), Array) # A ChangeLog file parser. @@ -8589,6 +8731,8 @@ RDoc::Parser::C::TRUE_VALUES = T.let(T.unsafe(nil), Array) # 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 @@ -8597,34 +8741,34 @@ class RDoc::Parser::ChangeLog < ::RDoc::Parser # Continued function listings are joined together as a single entry. # Continued descriptions are joined to make a single paragraph. # - # source://rdoc//rdoc/parser/changelog.rb#26 + # 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//rdoc/parser/changelog.rb#44 + # 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//rdoc/parser/changelog.rb#66 + # 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//rdoc/parser/changelog.rb#83 + # source://rdoc//lib/rdoc/parser/changelog.rb#83 def create_items(items); end # Groups +entries+ by date. # - # source://rdoc//rdoc/parser/changelog.rb#103 + # 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//rdoc/parser/changelog.rb#119 + # source://rdoc//lib/rdoc/parser/changelog.rb#119 def parse_date(date); end # Parses the entries in the ChangeLog. @@ -8641,49 +8785,52 @@ class RDoc::Parser::ChangeLog < ::RDoc::Parser # [ 'README.EXT: Converted to RDoc format', # 'README.EXT.ja: ditto']] # - # source://rdoc//rdoc/parser/changelog.rb#149 + # source://rdoc//lib/rdoc/parser/changelog.rb#149 def parse_entries; end # Converts the ChangeLog into an RDoc::Markup::Document # - # source://rdoc//rdoc/parser/changelog.rb#206 + # 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#222 module RDoc::Parser::ChangeLog::Git # Returns a list of ChangeLog entries as # RDoc::Parser::ChangeLog::Git::LogEntry list for the given # +entries+. # - # source://rdoc//rdoc/parser/changelog.rb#262 + # source://rdoc//lib/rdoc/parser/changelog.rb#262 def create_entries(entries); end # Parses the entries in the Git commit logs # - # source://rdoc//rdoc/parser/changelog.rb#235 + # source://rdoc//lib/rdoc/parser/changelog.rb#235 def parse_entries; end # Parses auxiliary info. Currentry `base-url` to expand # references is effective. # - # source://rdoc//rdoc/parser/changelog.rb#227 + # source://rdoc//lib/rdoc/parser/changelog.rb#227 def parse_info(info); end end -# source://rdoc//rdoc/parser/changelog.rb#271 +# source://rdoc//lib/rdoc/parser/changelog.rb#271 RDoc::Parser::ChangeLog::Git::HEADING_LEVEL = T.let(T.unsafe(nil), Integer) +# source://rdoc//lib/rdoc/parser/changelog.rb#270 class RDoc::Parser::ChangeLog::Git::LogEntry < ::Struct # @return [LogEntry] a new instance of LogEntry # - # source://rdoc//rdoc/parser/changelog.rb#273 + # source://rdoc//lib/rdoc/parser/changelog.rb#273 def initialize(base, commit, author, email, date, contents); end - # source://rdoc//rdoc/parser/changelog.rb#313 + # source://rdoc//lib/rdoc/parser/changelog.rb#313 def accept(visitor); end - # source://rdoc//rdoc/parser/changelog.rb#294 + # source://rdoc//lib/rdoc/parser/changelog.rb#294 def aref; end # Returns the value of attribute author @@ -8752,16 +8899,16 @@ class RDoc::Parser::ChangeLog::Git::LogEntry < ::Struct # @return [Object] the newly set value def email=(_); end - # source://rdoc//rdoc/parser/changelog.rb#298 + # source://rdoc//lib/rdoc/parser/changelog.rb#298 def label(context = T.unsafe(nil)); end - # source://rdoc//rdoc/parser/changelog.rb#290 + # source://rdoc//lib/rdoc/parser/changelog.rb#290 def level; end - # source://rdoc//rdoc/parser/changelog.rb#330 + # source://rdoc//lib/rdoc/parser/changelog.rb#330 def pretty_print(q); end - # source://rdoc//rdoc/parser/changelog.rb#302 + # source://rdoc//lib/rdoc/parser/changelog.rb#302 def text; end class << self @@ -8775,67 +8922,73 @@ 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//rdoc/parser/markdown.rb#15 + # 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//rdoc/parser/rd.rb#15 + # 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//rdoc/parser/ripper_state_lex.rb#576 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#576 def initialize(code); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#322 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#322 def get_squashed_tk; end private - # source://rdoc//rdoc/parser/ripper_state_lex.rb#465 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#465 def get_embdoc_tk(tk); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#474 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#474 def get_heredoc_tk(heredoc_name, indent); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#549 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#549 def get_op_tk(tk); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#447 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#447 def get_regexp_tk(tk); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#420 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#420 def get_string_tk(tk); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#373 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#373 def get_symbol_tk(tk); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#511 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#511 def get_words_tk(tk); end # @return [Boolean] # - # source://rdoc//rdoc/parser/ripper_state_lex.rb#499 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#499 def heredoc_end?(name, indent, tk); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#493 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#493 def retrieve_heredoc_info(tk); end class << self @@ -8843,85 +8996,87 @@ class RDoc::Parser::RipperStateLex # # @return [Boolean] # - # source://rdoc//rdoc/parser/ripper_state_lex.rb#597 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#597 def end?(token); end # Returns tokens parsed from +code+. # - # source://rdoc//rdoc/parser/ripper_state_lex.rb#584 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#584 def parse(code); end end end -# source://rdoc//rdoc/parser/ripper_state_lex.rb#20 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#20 RDoc::Parser::RipperStateLex::EXPR_ARG = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#31 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#31 RDoc::Parser::RipperStateLex::EXPR_ARG_ANY = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#16 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#16 RDoc::Parser::RipperStateLex::EXPR_BEG = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#30 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#30 RDoc::Parser::RipperStateLex::EXPR_BEG_ANY = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#25 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#25 RDoc::Parser::RipperStateLex::EXPR_CLASS = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#21 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#21 RDoc::Parser::RipperStateLex::EXPR_CMDARG = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#24 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#24 RDoc::Parser::RipperStateLex::EXPR_DOT = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#17 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#17 RDoc::Parser::RipperStateLex::EXPR_END = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#18 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#18 RDoc::Parser::RipperStateLex::EXPR_ENDARG = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#19 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#19 RDoc::Parser::RipperStateLex::EXPR_ENDFN = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#32 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#32 RDoc::Parser::RipperStateLex::EXPR_END_ANY = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#28 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#28 RDoc::Parser::RipperStateLex::EXPR_FITEM = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#23 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#23 RDoc::Parser::RipperStateLex::EXPR_FNAME = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#26 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#26 RDoc::Parser::RipperStateLex::EXPR_LABEL = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#27 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#27 RDoc::Parser::RipperStateLex::EXPR_LABELED = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#22 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#22 RDoc::Parser::RipperStateLex::EXPR_MID = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#15 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#15 RDoc::Parser::RipperStateLex::EXPR_NONE = T.let(T.unsafe(nil), Integer) -# source://rdoc//rdoc/parser/ripper_state_lex.rb#29 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#29 RDoc::Parser::RipperStateLex::EXPR_VALUE = T.let(T.unsafe(nil), Integer) +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#312 class RDoc::Parser::RipperStateLex::InnerStateLex < ::Ripper::Filter # @return [InnerStateLex] a new instance of InnerStateLex # - # source://rdoc//rdoc/parser/ripper_state_lex.rb#313 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#313 def initialize(code); end - # source://rdoc//rdoc/parser/ripper_state_lex.rb#317 + # source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#317 def on_default(event, tok, data); end end # TODO: Remove this constants after Ruby 2.4 EOL # -# source://rdoc//rdoc/parser/ripper_state_lex.rb#11 +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#11 RDoc::Parser::RipperStateLex::RIPPER_HAS_LEX_STATE = T.let(T.unsafe(nil), TrueClass) +# source://rdoc//lib/rdoc/parser/ripper_state_lex.rb#13 class RDoc::Parser::RipperStateLex::Token < ::Struct # Returns the value of attribute char_no # @@ -9115,6 +9270,8 @@ 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#144 class RDoc::Parser::Ruby < ::RDoc::Parser include ::RDoc::TokenStream include ::RDoc::Parser::RubyTools @@ -9123,56 +9280,56 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # @return [Ruby] a new instance of Ruby # - # source://rdoc//rdoc/parser/ruby.rb#164 + # source://rdoc//lib/rdoc/parser/ruby.rb#164 def initialize(top_level, file_name, content, options, stats); end # Look for the first comment in a file that isn't a shebang line. # - # source://rdoc//rdoc/parser/ruby.rb#236 + # source://rdoc//lib/rdoc/parser/ruby.rb#236 def collect_first_comment; end # Consumes trailing whitespace from the token stream # - # source://rdoc//rdoc/parser/ruby.rb#279 + # source://rdoc//lib/rdoc/parser/ruby.rb#279 def consume_trailing_spaces; end # Creates a new attribute in +container+ with +name+. # - # source://rdoc//rdoc/parser/ruby.rb#286 + # source://rdoc//lib/rdoc/parser/ruby.rb#286 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//rdoc/parser/ruby.rb#300 + # source://rdoc//lib/rdoc/parser/ruby.rb#300 def create_module_alias(container, constant, rhs_name); end # Aborts with +msg+ # - # source://rdoc//rdoc/parser/ruby.rb#313 + # source://rdoc//lib/rdoc/parser/ruby.rb#313 def error(msg); end # Looks for a true or false token. # - # source://rdoc//rdoc/parser/ruby.rb#322 + # source://rdoc//lib/rdoc/parser/ruby.rb#322 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//rdoc/parser/ruby.rb#340 + # source://rdoc//lib/rdoc/parser/ruby.rb#340 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//rdoc/parser/ruby.rb#423 + # source://rdoc//lib/rdoc/parser/ruby.rb#423 def get_class_specification; end # Parse a constant, which might be qualified by one or more class or module # names # - # source://rdoc//rdoc/parser/ruby.rb#456 + # source://rdoc//lib/rdoc/parser/ruby.rb#456 def get_constant; end # Little hack going on here. In the statement: @@ -9182,28 +9339,28 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # 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//rdoc/parser/ruby.rb#558 + # source://rdoc//lib/rdoc/parser/ruby.rb#558 def get_end_token(tk); end # Get an included module that may be surrounded by parens # - # source://rdoc//rdoc/parser/ruby.rb#473 + # source://rdoc//lib/rdoc/parser/ruby.rb#473 def get_included_module_with_optional_parens; end # Retrieves the method container for a singleton method. # - # source://rdoc//rdoc/parser/ruby.rb#578 + # source://rdoc//lib/rdoc/parser/ruby.rb#578 def get_method_container(container, name_t); end # Extracts a name or symbol from the token stream. # - # source://rdoc//rdoc/parser/ruby.rb#621 + # source://rdoc//lib/rdoc/parser/ruby.rb#621 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//rdoc/parser/ruby.rb#194 + # source://rdoc//lib/rdoc/parser/ruby.rb#194 def get_tkread_clean(pattern, replacement); end # Extracts the visibility information for the visibility token +tk+ @@ -9213,7 +9370,7 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # +singleton+ if the methods following should be converted to singleton # methods. # - # source://rdoc//rdoc/parser/ruby.rb#208 + # source://rdoc//lib/rdoc/parser/ruby.rb#208 def get_visibility_information(tk, single); end # Look for directives in a normal comment block: @@ -9223,108 +9380,108 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # This routine modifies its +comment+ parameter. # - # source://rdoc//rdoc/parser/ruby.rb#661 + # source://rdoc//lib/rdoc/parser/ruby.rb#661 def look_for_directives_in(container, comment); end # Adds useful info about the parser to +message+ # - # source://rdoc//rdoc/parser/ruby.rb#681 + # source://rdoc//lib/rdoc/parser/ruby.rb#681 def make_message(message); end # Creates a comment with the correct format # - # source://rdoc//rdoc/parser/ruby.rb#693 + # source://rdoc//lib/rdoc/parser/ruby.rb#693 def new_comment(comment, line_no = T.unsafe(nil)); end # Parses an +alias+ in +context+ with +comment+ # - # source://rdoc//rdoc/parser/ruby.rb#762 + # source://rdoc//lib/rdoc/parser/ruby.rb#762 def parse_alias(context, single, tk, comment); end # Creates an RDoc::Attr for the name following +tk+, setting the comment to # +comment+. # - # source://rdoc//rdoc/parser/ruby.rb#704 + # source://rdoc//lib/rdoc/parser/ruby.rb#704 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//rdoc/parser/ruby.rb#733 + # source://rdoc//lib/rdoc/parser/ruby.rb#733 def parse_attr_accessor(context, single, tk, comment); end # Extracts call parameters from the token stream. # - # source://rdoc//rdoc/parser/ruby.rb#801 + # source://rdoc//lib/rdoc/parser/ruby.rb#803 def parse_call_parameters(tk); end # Parses a class in +context+ with +comment+ # - # source://rdoc//rdoc/parser/ruby.rb#844 + # source://rdoc//lib/rdoc/parser/ruby.rb#846 def parse_class(container, single, tk, comment); end # Parses and creates a regular class # - # source://rdoc//rdoc/parser/ruby.rb#878 + # source://rdoc//lib/rdoc/parser/ruby.rb#880 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//rdoc/parser/ruby.rb#918 + # source://rdoc//lib/rdoc/parser/ruby.rb#920 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//rdoc/parser/ruby.rb#1083 + # source://rdoc//lib/rdoc/parser/ruby.rb#1085 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//rdoc/parser/ruby.rb#1111 + # source://rdoc//lib/rdoc/parser/ruby.rb#1113 def parse_comment_attr(container, type, name, comment); end - # source://rdoc//rdoc/parser/ruby.rb#1123 + # source://rdoc//lib/rdoc/parser/ruby.rb#1125 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//rdoc/parser/ruby.rb#1162 + # source://rdoc//lib/rdoc/parser/ruby.rb#1164 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//rdoc/parser/ruby.rb#957 + # source://rdoc//lib/rdoc/parser/ruby.rb#959 def parse_constant(container, tk, comment, ignore_constants = T.unsafe(nil)); end - # source://rdoc//rdoc/parser/ruby.rb#1024 + # source://rdoc//lib/rdoc/parser/ruby.rb#1026 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//rdoc/parser/ruby.rb#2094 + # source://rdoc//lib/rdoc/parser/ruby.rb#2103 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//rdoc/parser/ruby.rb#1197 + # source://rdoc//lib/rdoc/parser/ruby.rb#1199 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//rdoc/parser/ruby.rb#1235 + # source://rdoc//lib/rdoc/parser/ruby.rb#1237 def parse_identifier(container, single, tk, comment); end # Parses an +included+ with a block feature of ActiveSupport::Concern. # - # source://rdoc//rdoc/parser/ruby.rb#1217 + # source://rdoc//lib/rdoc/parser/ruby.rb#1219 def parse_included_with_activesupport_concern(container, comment); end # Parses a meta-programmed attribute and creates an RDoc::Attr. @@ -9355,34 +9512,34 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # end # - # source://rdoc//rdoc/parser/ruby.rb#1299 + # source://rdoc//lib/rdoc/parser/ruby.rb#1301 def parse_meta_attr(context, single, tk, comment); end # Parses a meta-programmed method # - # source://rdoc//rdoc/parser/ruby.rb#1333 + # source://rdoc//lib/rdoc/parser/ruby.rb#1335 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//rdoc/parser/ruby.rb#1379 + # source://rdoc//lib/rdoc/parser/ruby.rb#1381 def parse_meta_method_name(comment, tk); end # Parses the parameters and block for a meta-programmed method. # - # source://rdoc//rdoc/parser/ruby.rb#1403 + # source://rdoc//lib/rdoc/parser/ruby.rb#1405 def parse_meta_method_params(container, single, meth, tk, comment); end # Parses a normal method defined by +def+ # - # source://rdoc//rdoc/parser/ruby.rb#1435 + # source://rdoc//lib/rdoc/parser/ruby.rb#1437 def parse_method(container, single, tk, comment); end # Parses a method that needs to be ignored. # - # source://rdoc//rdoc/parser/ruby.rb#1514 + # source://rdoc//lib/rdoc/parser/ruby.rb#1522 def parse_method_dummy(container); end # Parses the name of a method in +container+. @@ -9390,25 +9547,25 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # Returns the method name, the container it is in (for def Foo.name) and if # it is a singleton or regular method. # - # source://rdoc//rdoc/parser/ruby.rb#1527 + # source://rdoc//lib/rdoc/parser/ruby.rb#1535 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//rdoc/parser/ruby.rb#1554 + # source://rdoc//lib/rdoc/parser/ruby.rb#1562 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//rdoc/parser/ruby.rb#1572 + # source://rdoc//lib/rdoc/parser/ruby.rb#1580 def parse_method_name_singleton(container, name_t); end # Extracts +yield+ parameters from +method+ # - # source://rdoc//rdoc/parser/ruby.rb#1616 + # source://rdoc//lib/rdoc/parser/ruby.rb#1624 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 @@ -9418,69 +9575,69 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # and add this as the block_params for the method # - # source://rdoc//rdoc/parser/ruby.rb#1683 + # source://rdoc//lib/rdoc/parser/ruby.rb#1691 def parse_method_parameters(method); end # Parses the parameters and body of +meth+ # - # source://rdoc//rdoc/parser/ruby.rb#1484 + # source://rdoc//lib/rdoc/parser/ruby.rb#1492 def parse_method_params_and_body(container, single, meth, added_container); end # Parses an RDoc::NormalModule in +container+ with +comment+ # - # source://rdoc//rdoc/parser/ruby.rb#1698 + # source://rdoc//lib/rdoc/parser/ruby.rb#1706 def parse_module(container, single, tk, comment); end # Parses an RDoc::Require in +context+ containing +comment+ # - # source://rdoc//rdoc/parser/ruby.rb#1720 + # source://rdoc//lib/rdoc/parser/ruby.rb#1728 def parse_require(context, comment); end # Parses a rescue # - # source://rdoc//rdoc/parser/ruby.rb#1741 + # source://rdoc//lib/rdoc/parser/ruby.rb#1749 def parse_rescue; end # The core of the Ruby parser. # - # source://rdoc//rdoc/parser/ruby.rb#1772 + # source://rdoc//lib/rdoc/parser/ruby.rb#1780 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//rdoc/parser/ruby.rb#1962 + # source://rdoc//lib/rdoc/parser/ruby.rb#1971 def parse_symbol_arg(no = T.unsafe(nil)); end # Parses up to +no+ symbol arguments surrounded by () and places them in # +args+. # - # source://rdoc//rdoc/parser/ruby.rb#1977 + # source://rdoc//lib/rdoc/parser/ruby.rb#1986 def parse_symbol_arg_paren(no); end # Parses up to +no+ symbol arguments separated by spaces and places them in # +args+. # - # source://rdoc//rdoc/parser/ruby.rb#2005 + # source://rdoc//lib/rdoc/parser/ruby.rb#2014 def parse_symbol_arg_space(no, tk); end # Returns symbol text from the next token # - # source://rdoc//rdoc/parser/ruby.rb#2036 + # source://rdoc//lib/rdoc/parser/ruby.rb#2045 def parse_symbol_in_arg; end # Parses statements in the top-level +container+ # - # source://rdoc//rdoc/parser/ruby.rb#2053 + # source://rdoc//lib/rdoc/parser/ruby.rb#2062 def parse_top_level_statements(container); end # Determines the visibility in +container+ from +tk+ # - # source://rdoc//rdoc/parser/ruby.rb#2071 + # source://rdoc//lib/rdoc/parser/ruby.rb#2080 def parse_visibility(container, single, tk); end # Determines the block parameter for +context+ # - # source://rdoc//rdoc/parser/ruby.rb#2110 + # source://rdoc//lib/rdoc/parser/ruby.rb#2119 def parse_yield(context, single, tk, method); end # Directives are modifier comments that can appear after class, module, or @@ -9495,7 +9652,7 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # the name is in +allowed+. A directive can be found anywhere up to the end # of the current line. # - # source://rdoc//rdoc/parser/ruby.rb#2131 + # source://rdoc//lib/rdoc/parser/ruby.rb#2140 def read_directive(allowed); end # Handles directives following the definition for +context+ (any @@ -9503,140 +9660,144 @@ class RDoc::Parser::Ruby < ::RDoc::Parser # # See also RDoc::Markup::PreProcess#handle_directive # - # source://rdoc//rdoc/parser/ruby.rb#2163 + # source://rdoc//lib/rdoc/parser/ruby.rb#2172 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//rdoc/parser/ruby.rb#2182 + # source://rdoc//lib/rdoc/parser/ruby.rb#2191 def record_location(container); end # Retrieve comment body without =begin/=end # - # source://rdoc//rdoc/parser/ruby.rb#1761 + # source://rdoc//lib/rdoc/parser/ruby.rb#1769 def retrieve_comment_body(tk); end # Scans this Ruby file for Ruby constructs # - # source://rdoc//rdoc/parser/ruby.rb#2194 + # source://rdoc//lib/rdoc/parser/ruby.rb#2203 def scan; end # skip the var [in] part of a 'for' statement # - # source://rdoc//rdoc/parser/ruby.rb#2282 + # source://rdoc//lib/rdoc/parser/ruby.rb#2291 def skip_for_variable; end # Skips the next method in +container+ # - # source://rdoc//rdoc/parser/ruby.rb#2293 + # source://rdoc//lib/rdoc/parser/ruby.rb#2302 def skip_method(container); end # while, until, and for have an optional do # - # source://rdoc//rdoc/parser/ruby.rb#2241 + # source://rdoc//lib/rdoc/parser/ruby.rb#2250 def skip_optional_do_after_expression; end # Skip opening parentheses and yield the block. # Skip closing parentheses too when exists. # - # source://rdoc//rdoc/parser/ruby.rb#401 + # source://rdoc//lib/rdoc/parser/ruby.rb#401 def skip_parentheses(&block); end # Skip spaces until a comment is found # - # source://rdoc//rdoc/parser/ruby.rb#2302 + # source://rdoc//lib/rdoc/parser/ruby.rb#2311 def skip_tkspace_comment(skip_nl = T.unsafe(nil)); end # Marks containers between +container+ and +ancestor+ as ignored # - # source://rdoc//rdoc/parser/ruby.rb#646 + # source://rdoc//lib/rdoc/parser/ruby.rb#646 def suppress_parents(container, ancestor); end # Return +true+ if +tk+ is a newline. # # @return [Boolean] # - # source://rdoc//rdoc/parser/ruby.rb#186 + # source://rdoc//lib/rdoc/parser/ruby.rb#186 def tk_nl?(tk); end # Updates visibility in +container+ from +vis_type+ and +vis+. # - # source://rdoc//rdoc/parser/ruby.rb#2314 + # source://rdoc//lib/rdoc/parser/ruby.rb#2323 def update_visibility(container, vis_type, vis, singleton); end # Prints +message+ to +$stderr+ unless we're being quiet # - # source://rdoc//rdoc/parser/ruby.rb#2359 + # source://rdoc//lib/rdoc/parser/ruby.rb#2368 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//rdoc/parser/ruby_tools.rb#10 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#10 def add_token_listener(obj); end # Fetches the next token from the scanner # - # source://rdoc//rdoc/parser/ruby_tools.rb#18 + # 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//rdoc/parser/ruby_tools.rb#52 + # 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//rdoc/parser/ruby_tools.rb#73 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#73 def get_tkread; end # Peek equivalent for get_tkread # - # source://rdoc//rdoc/parser/ruby_tools.rb#82 + # 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//rdoc/parser/ruby_tools.rb#89 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#89 def peek_tk; end # Removes the token listener +obj+ # - # source://rdoc//rdoc/parser/ruby_tools.rb#97 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#97 def remove_token_listener(obj); end # Resets the tools # - # source://rdoc//rdoc/parser/ruby_tools.rb#104 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#104 def reset; end # Skips whitespace tokens including newlines # - # source://rdoc//rdoc/parser/ruby_tools.rb#115 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#115 def skip_tkspace; end # Skips whitespace tokens excluding newlines # - # source://rdoc//rdoc/parser/ruby_tools.rb#129 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#129 def skip_tkspace_without_nl; end # Has +obj+ listen to tokens # - # source://rdoc//rdoc/parser/ruby_tools.rb#143 + # source://rdoc//lib/rdoc/parser/ruby_tools.rb#143 def token_listener(obj); end # Returns +tk+ to the scanner # - # source://rdoc//rdoc/parser/ruby_tools.rb#153 + # 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 @@ -9644,15 +9805,15 @@ class RDoc::Parser::Simple < ::RDoc::Parser # # @return [Simple] a new instance of Simple # - # source://rdoc//rdoc/parser/simple.rb#17 + # source://rdoc//lib/rdoc/parser/simple.rb#17 def initialize(top_level, file_name, content, options, stats); end - # source://rdoc//rdoc/parser/simple.rb#12 + # source://rdoc//lib/rdoc/parser/simple.rb#12 def content; end # Removes the encoding magic comment from +text+ # - # source://rdoc//rdoc/parser/simple.rb#41 + # source://rdoc//lib/rdoc/parser/simple.rb#41 def remove_coding_comment(text); end # Removes private comments. @@ -9661,366 +9822,370 @@ class RDoc::Parser::Simple < ::RDoc::Parser # dashes at the beginning of the line. Three or more dashes are considered # to be a rule and ignored. # - # source://rdoc//rdoc/parser/simple.rb#52 + # 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//rdoc/parser/simple.rb#28 + # source://rdoc//lib/rdoc/parser/simple.rb#28 def scan; end end -# racc/parser.rb 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//rdoc/rd.rb#78 + # 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//rdoc/rd/block_parser.rb#699 + # source://rdoc//lib/rdoc/rd/block_parser.rb#695 def initialize; end # reduce 0 omitted # - # source://rdoc//rdoc/rd/block_parser.rb#1334 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1330 def _reduce_1(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1376 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1372 def _reduce_10(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1381 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1377 def _reduce_11(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1386 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1382 def _reduce_12(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1394 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1390 def _reduce_13(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1400 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1396 def _reduce_14(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1407 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1403 def _reduce_15(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1412 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1408 def _reduce_16(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1417 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1413 def _reduce_17(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1428 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1424 def _reduce_18(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1439 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1435 def _reduce_19(val, _values, result); end # @raise [ParseError] # - # source://rdoc//rdoc/rd/block_parser.rb#1339 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1335 def _reduce_2(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1445 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1441 def _reduce_20(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1451 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1447 def _reduce_21(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1457 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1453 def _reduce_22(val, _values, result); end # reduce 26 omitted # - # source://rdoc//rdoc/rd/block_parser.rb#1473 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1469 def _reduce_27(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1479 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1475 def _reduce_28(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1485 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1481 def _reduce_29(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1344 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1340 def _reduce_3(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1491 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1487 def _reduce_30(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1496 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1492 def _reduce_31(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1501 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1497 def _reduce_32(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1507 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1503 def _reduce_33(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1512 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1508 def _reduce_34(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1517 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1513 def _reduce_35(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1523 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1519 def _reduce_36(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1529 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1525 def _reduce_37(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1534 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1530 def _reduce_38(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1539 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1535 def _reduce_39(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1349 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1345 def _reduce_4(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1545 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1541 def _reduce_40(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1551 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1547 def _reduce_41(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1556 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1552 def _reduce_42(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1561 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1557 def _reduce_43(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1569 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1565 def _reduce_44(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1575 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1571 def _reduce_45(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1580 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1576 def _reduce_46(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1585 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1581 def _reduce_47(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1591 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1587 def _reduce_48(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1597 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1593 def _reduce_49(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1354 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1350 def _reduce_5(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1603 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1599 def _reduce_50(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1609 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1605 def _reduce_51(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1615 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1611 def _reduce_52(val, _values, result); end # reduce 53 omitted # - # source://rdoc//rdoc/rd/block_parser.rb#1622 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1618 def _reduce_54(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1627 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1623 def _reduce_55(val, _values, result); end # reduce 56 omitted # - # source://rdoc//rdoc/rd/block_parser.rb#1634 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1630 def _reduce_57(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1359 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1355 def _reduce_6(val, _values, result); end # reduce 61 omitted # - # source://rdoc//rdoc/rd/block_parser.rb#1647 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1643 def _reduce_62(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1653 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1649 def _reduce_63(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1659 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1655 def _reduce_64(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1665 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1661 def _reduce_65(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1671 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1667 def _reduce_66(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1677 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1673 def _reduce_67(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1682 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1678 def _reduce_68(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1687 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1683 def _reduce_69(val, _values, result); end # reduce 70 omitted # - # source://rdoc//rdoc/rd/block_parser.rb#1694 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1690 def _reduce_71(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1699 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1695 def _reduce_72(val, _values, result); end # reduce 7 omitted # - # source://rdoc//rdoc/rd/block_parser.rb#1366 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1362 def _reduce_8(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1371 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1367 def _reduce_9(val, _values, result); end - # source://rdoc//rdoc/rd/block_parser.rb#1704 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1700 def _reduce_none(val, _values, result); end # Adds footnote +content+ to the document # - # source://rdoc//rdoc/rd/block_parser.rb#1049 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1045 def add_footnote(content); end # Adds label +label+ to the document # - # source://rdoc//rdoc/rd/block_parser.rb#1063 + # 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//rdoc/rd/block_parser.rb#1032 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1028 def content(values); end # Footnotes for this document # - # source://rdoc//rdoc/rd/block_parser.rb#683 + # source://rdoc//lib/rdoc/rd/block_parser.rb#679 def footnotes; end # Path to find included files in # - # source://rdoc//rdoc/rd/block_parser.rb#693 + # source://rdoc//lib/rdoc/rd/block_parser.rb#689 def include_path; end # Path to find included files in # - # source://rdoc//rdoc/rd/block_parser.rb#693 + # source://rdoc//lib/rdoc/rd/block_parser.rb#689 def include_path=(_arg0); end # Labels for items in this document # - # source://rdoc//rdoc/rd/block_parser.rb#688 + # source://rdoc//lib/rdoc/rd/block_parser.rb#684 def labels; end # Current line number # - # source://rdoc//rdoc/rd/block_parser.rb#987 + # source://rdoc//lib/rdoc/rd/block_parser.rb#983 def line_index; end # Returns the next token from the document # - # source://rdoc//rdoc/rd/block_parser.rb#755 + # 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//rdoc/rd/block_parser.rb#971 + # source://rdoc//lib/rdoc/rd/block_parser.rb#967 def on_error(et, ev, _values); end # Creates a paragraph for +value+ # - # source://rdoc//rdoc/rd/block_parser.rb#1039 + # source://rdoc//lib/rdoc/rd/block_parser.rb#1035 def paragraph(value); end # Parses +src+ and returns an RDoc::Markup::Document. # - # source://rdoc//rdoc/rd/block_parser.rb#711 + # source://rdoc//lib/rdoc/rd/block_parser.rb#707 def parse(src); end private # Cuts off excess whitespace in +src+ # - # source://rdoc//rdoc/rd/block_parser.rb#935 + # source://rdoc//lib/rdoc/rd/block_parser.rb#931 def cut_off(src); end # Formats line numbers +line_numbers+ prettily # - # source://rdoc//rdoc/rd/block_parser.rb#1023 + # 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//rdoc/rd/block_parser.rb#1004 + # 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//rdoc/rd/block_parser.rb#917 + # source://rdoc//lib/rdoc/rd/block_parser.rb#913 def if_current_indent_equal(indent); end # Parses subtree +src+ # - # source://rdoc//rdoc/rd/block_parser.rb#994 + # source://rdoc//lib/rdoc/rd/block_parser.rb#990 def parse_subtree(src); end - # source://rdoc//rdoc/rd/block_parser.rb#962 + # source://rdoc//lib/rdoc/rd/block_parser.rb#958 def set_term_to_element(parent, term); end end -# source://rdoc//rdoc/rd/block_parser.rb#1328 +# 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//rdoc/rd/inline.rb#34 + # source://rdoc//lib/rdoc/rd/inline.rb#34 def initialize(rdoc, reference); end - # source://rdoc//rdoc/rd/inline.rb#42 + # 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//rdoc/rd/inline.rb#50 + # source://rdoc//lib/rdoc/rd/inline.rb#50 def append(more); end - # source://rdoc//rdoc/rd/inline.rb#65 + # source://rdoc//lib/rdoc/rd/inline.rb#65 def inspect; end # The markup of this reference in RDoc format # - # source://rdoc//rdoc/rd/inline.rb#15 + # source://rdoc//lib/rdoc/rd/inline.rb#15 def rdoc; end # The text of the reference # - # source://rdoc//rdoc/rd/inline.rb#10 + # source://rdoc//lib/rdoc/rd/inline.rb#10 def reference; end # The markup of this reference in RDoc format # - # source://rdoc//rdoc/rd/inline.rb#15 + # source://rdoc//lib/rdoc/rd/inline.rb#15 def to_s; end class << self @@ -10029,239 +10194,241 @@ class RDoc::RD::Inline # +rdoc+ may be another Inline or a String. If +reference+ is not given it # will use the text from +rdoc+. # - # source://rdoc//rdoc/rd/inline.rb#23 + # 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//rdoc/rd/inline_parser.rb#738 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#734 def initialize(block_parser); end # reduce 100 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1750 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1746 def _reduce_101(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1757 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1753 def _reduce_102(val, _values, result); end # reduce 108 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1775 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1771 def _reduce_109(val, _values, result); end # reduce 110 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1782 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1778 def _reduce_111(val, _values, result); end # reduce 112 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1790 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1786 def _reduce_113(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1795 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1791 def _reduce_114(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1800 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1796 def _reduce_115(val, _values, result); end # reduce 12 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1413 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1409 def _reduce_13(val, _values, result); end # reduce 135 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1845 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1841 def _reduce_136(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1420 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1416 def _reduce_14(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1427 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1423 def _reduce_15(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1434 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1430 def _reduce_16(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1441 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1437 def _reduce_17(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1449 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1445 def _reduce_18(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1455 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1451 def _reduce_19(val, _values, result); end # reduce 1 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1385 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1381 def _reduce_2(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1463 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1459 def _reduce_20(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1469 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1465 def _reduce_21(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1478 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1474 def _reduce_22(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1484 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1480 def _reduce_23(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1490 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1486 def _reduce_24(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1496 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1492 def _reduce_25(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1505 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1501 def _reduce_26(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1511 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1507 def _reduce_27(val, _values, result); end # reduce 28 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1520 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1516 def _reduce_29(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1390 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1386 def _reduce_3(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1525 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1521 def _reduce_30(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1530 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1526 def _reduce_31(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1536 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1532 def _reduce_32(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1542 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1538 def _reduce_33(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1548 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1544 def _reduce_34(val, _values, result); end # reduce 35 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1556 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1552 def _reduce_36(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1561 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1557 def _reduce_37(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1566 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1562 def _reduce_38(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1572 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1568 def _reduce_39(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1578 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1574 def _reduce_40(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1584 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1580 def _reduce_41(val, _values, result); end # reduce 42 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1592 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1588 def _reduce_43(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1598 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1594 def _reduce_44(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1604 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1600 def _reduce_45(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1610 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1606 def _reduce_46(val, _values, result); end # reduce 56 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1636 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1632 def _reduce_57(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1642 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1638 def _reduce_58(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1648 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1644 def _reduce_59(val, _values, result); end - # source://rdoc//rdoc/rd/inline_parser.rb#1654 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1650 def _reduce_60(val, _values, result); end # reduce 61 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1661 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1657 def _reduce_62(val, _values, result); end # reduce 63 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1669 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1665 def _reduce_64(val, _values, result); end # reduce 77 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1701 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#1697 def _reduce_78(val, _values, result); end # reduce 137 omitted # - # source://rdoc//rdoc/rd/inline_parser.rb#1852 + # 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//rdoc/rd/inline_parser.rb#887 + # 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//rdoc/rd/inline_parser.rb#756 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#752 def next_token; end # Returns words following an error # - # source://rdoc//rdoc/rd/inline_parser.rb#876 + # 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//rdoc/rd/inline_parser.rb#836 + # 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//rdoc/rd/inline_parser.rb#745 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#741 def parse(inline); end # Returns words before the error # - # source://rdoc//rdoc/rd/inline_parser.rb#853 + # 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//rdoc/rd/inline_parser.rb#864 + # source://rdoc//lib/rdoc/rd/inline_parser.rb#860 def last_line(src); end end -# source://rdoc//rdoc/rd/inline_parser.rb#1377 +# 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 @@ -10282,13 +10449,15 @@ RDoc::RD::InlineParser::Racc_debug_parser = T.let(T.unsafe(nil), FalseClass) # # 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//rdoc/rdoc.rb#100 + # source://rdoc//lib/rdoc/rdoc.rb#100 def initialize; end # Generates documentation or a coverage report depending upon the settings @@ -10304,52 +10473,52 @@ class RDoc::RDoc # 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//rdoc/rdoc.rb#450 + # source://rdoc//lib/rdoc/rdoc.rb#450 def document(options); end # Report an error message and exit # # @raise [RDoc::Error] # - # source://rdoc//rdoc/rdoc.rb#113 + # 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//rdoc/rdoc.rb#121 + # 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//rdoc/rdoc.rb#515 + # source://rdoc//lib/rdoc/rdoc.rb#515 def generate; end # Generator instance used for creating output # - # source://rdoc//rdoc/rdoc.rb#52 + # source://rdoc//lib/rdoc/rdoc.rb#52 def generator; end # Generator instance used for creating output # - # source://rdoc//rdoc/rdoc.rb#52 + # source://rdoc//lib/rdoc/rdoc.rb#52 def generator=(_arg0); end # Turns RDoc from stdin into HTML # - # source://rdoc//rdoc/rdoc.rb#142 + # source://rdoc//lib/rdoc/rdoc.rb#142 def handle_pipe; end # Installs a siginfo handler that prints the current filename. # - # source://rdoc//rdoc/rdoc.rb#157 + # source://rdoc//lib/rdoc/rdoc.rb#157 def install_siginfo_handler; end # Hash of files and their last modified times. # - # source://rdoc//rdoc/rdoc.rb#57 + # 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 @@ -10357,7 +10526,7 @@ class RDoc::RDoc # files. However we may well contain subdirectories which must be tested # for .document files. # - # source://rdoc//rdoc/rdoc.rb#323 + # 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 @@ -10371,106 +10540,106 @@ class RDoc::RDoc # The effect of this is that if you want a file with a non-standard # extension parsed, you must name it explicitly. # - # source://rdoc//rdoc/rdoc.rb#275 + # 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//rdoc/rdoc.rb#62 + # source://rdoc//lib/rdoc/rdoc.rb#62 def options; end # RDoc options # - # source://rdoc//rdoc/rdoc.rb#62 + # 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//rdoc/rdoc.rb#240 + # 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//rdoc/rdoc.rb#249 + # 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//rdoc/rdoc.rb#332 + # source://rdoc//lib/rdoc/rdoc.rb#332 def parse_file(filename); end # Parse each file on the command line, recursively entering directories. # - # source://rdoc//rdoc/rdoc.rb#404 + # source://rdoc//lib/rdoc/rdoc.rb#404 def parse_files(files); end # Removes a siginfo handler and replaces the previous # - # source://rdoc//rdoc/rdoc.rb#534 + # source://rdoc//lib/rdoc/rdoc.rb#534 def remove_siginfo_handler; end # Removes file extensions known to be unparseable from +files+ and TAGS # files for emacs and vim. # - # source://rdoc//rdoc/rdoc.rb#428 + # source://rdoc//lib/rdoc/rdoc.rb#428 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//rdoc/rdoc.rb#170 + # 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//rdoc/rdoc.rb#67 + # source://rdoc//lib/rdoc/rdoc.rb#67 def stats; end # The current documentation store # - # source://rdoc//rdoc/rdoc.rb#72 + # 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//rdoc/rdoc.rb#215 + # source://rdoc//lib/rdoc/rdoc.rb#215 def store=(store); end # Update the flag file in an output directory. # - # source://rdoc//rdoc/rdoc.rb#223 + # 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//rdoc/rdoc.rb#77 + # source://rdoc//lib/rdoc/rdoc.rb#77 def add_generator(klass); end # Active RDoc::RDoc instance # - # source://rdoc//rdoc/rdoc.rb#85 + # source://rdoc//lib/rdoc/rdoc.rb#85 def current; end # Sets the active RDoc::RDoc instance # - # source://rdoc//rdoc/rdoc.rb#92 + # 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//rdoc/rdoc.rb#46 +# 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//rdoc/rdoc.rb#41 +# 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. @@ -10487,134 +10656,136 @@ RDoc::RDoc::UNCONDITIONALLY_SKIPPED_DIRECTORIES = T.let(T.unsafe(nil), Array) # * 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//rdoc/ri/driver.rb#391 + # source://rdoc//lib/rdoc/ri/driver.rb#391 def initialize(initial_options = T.unsafe(nil)); end # Adds paths for undocumented classes +also_in+ to +out+ # - # source://rdoc//rdoc/ri/driver.rb#429 + # source://rdoc//lib/rdoc/ri/driver.rb#429 def add_also_in(out, also_in); end # Adds a class header to +out+ for class +name+ which is described in # +classes+. # - # source://rdoc//rdoc/ri/driver.rb#446 + # source://rdoc//lib/rdoc/ri/driver.rb#446 def add_class(out, name, classes); end # Adds +extends+ to +out+ # - # source://rdoc//rdoc/ri/driver.rb#473 + # source://rdoc//lib/rdoc/ri/driver.rb#473 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//rdoc/ri/driver.rb#481 + # source://rdoc//lib/rdoc/ri/driver.rb#481 def add_extension_modules(out, type, extensions); end # Renders multiple included +modules+ from +store+ to +out+. # - # source://rdoc//rdoc/ri/driver.rb#499 + # source://rdoc//lib/rdoc/ri/driver.rb#499 def add_extension_modules_multiple(out, store, modules); end # Adds a single extension module +include+ from +store+ to +out+ # - # source://rdoc//rdoc/ri/driver.rb#526 + # source://rdoc//lib/rdoc/ri/driver.rb#526 def add_extension_modules_single(out, store, include); end # Adds "(from ...)" to +out+ for +store+ # - # source://rdoc//rdoc/ri/driver.rb#466 + # source://rdoc//lib/rdoc/ri/driver.rb#466 def add_from(out, store); end # Adds +includes+ to +out+ # - # source://rdoc//rdoc/ri/driver.rb#540 + # source://rdoc//lib/rdoc/ri/driver.rb#540 def add_includes(out, includes); end # Looks up the method +name+ and adds it to +out+ # - # source://rdoc//rdoc/ri/driver.rb#547 + # source://rdoc//lib/rdoc/ri/driver.rb#547 def add_method(out, name); end # Adds documentation for all methods in +klass+ to +out+ # - # source://rdoc//rdoc/ri/driver.rb#558 + # source://rdoc//lib/rdoc/ri/driver.rb#558 def add_method_documentation(out, klass); end # Adds a list of +methods+ to +out+ with a heading of +name+ # - # source://rdoc//rdoc/ri/driver.rb#571 + # source://rdoc//lib/rdoc/ri/driver.rb#571 def add_method_list(out, methods, name); end # Returns ancestor classes of +klass+ # - # source://rdoc//rdoc/ri/driver.rb#591 + # source://rdoc//lib/rdoc/ri/driver.rb#591 def ancestors_of(klass); end - # source://rdoc//rdoc/ri/driver.rb#926 + # source://rdoc//lib/rdoc/ri/driver.rb#926 def check_did_you_mean; end # For RubyGems backwards compatibility # - # source://rdoc//rdoc/ri/driver.rb#622 + # source://rdoc//lib/rdoc/ri/driver.rb#622 def class_cache; end # Builds a RDoc::Markup::Document from +found+, +klasess+ and +includes+ # - # source://rdoc//rdoc/ri/driver.rb#628 + # source://rdoc//lib/rdoc/ri/driver.rb#628 def class_document(name, found, klasses, includes, extends); end # Adds the class +comment+ to +out+. # - # source://rdoc//rdoc/ri/driver.rb#650 + # source://rdoc//lib/rdoc/ri/driver.rb#650 def class_document_comment(out, comment); end # Adds the constants from +klass+ to the Document +out+. # - # source://rdoc//rdoc/ri/driver.rb#670 + # source://rdoc//lib/rdoc/ri/driver.rb#670 def class_document_constants(out, klass); end # Hash mapping a known class or module to the stores it can be loaded from # - # source://rdoc//rdoc/ri/driver.rb#694 + # source://rdoc//lib/rdoc/ri/driver.rb#694 def classes; end # Returns the stores wherein +name+ is found along with the classes, # extends and includes that match it # - # source://rdoc//rdoc/ri/driver.rb#714 + # source://rdoc//lib/rdoc/ri/driver.rb#714 def classes_and_includes_and_extends_for(name); end # Completes +name+ based on the caches. For Readline # - # source://rdoc//rdoc/ri/driver.rb#739 + # source://rdoc//lib/rdoc/ri/driver.rb#739 def complete(name); end - # source://rdoc//rdoc/ri/driver.rb#750 + # source://rdoc//lib/rdoc/ri/driver.rb#750 def complete_klass(name, klass, selector, method, completions); end - # source://rdoc//rdoc/ri/driver.rb#769 + # source://rdoc//lib/rdoc/ri/driver.rb#769 def complete_method(name, klass, selector, completions); end # Converts +document+ to text and writes it to the pager # - # source://rdoc//rdoc/ri/driver.rb#789 + # source://rdoc//lib/rdoc/ri/driver.rb#789 def display(document); end # Outputs formatted RI data for class +name+. Groups undocumented classes # - # source://rdoc//rdoc/ri/driver.rb#802 + # source://rdoc//lib/rdoc/ri/driver.rb#802 def display_class(name); end # Outputs formatted RI data for method +name+ # - # source://rdoc//rdoc/ri/driver.rb#818 + # source://rdoc//lib/rdoc/ri/driver.rb#818 def display_method(name); end # Outputs formatted RI data for the class or method +name+. @@ -10622,39 +10793,39 @@ class RDoc::RI::Driver # 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//rdoc/ri/driver.rb#832 + # source://rdoc//lib/rdoc/ri/driver.rb#832 def display_name(name); end # Displays each name in +name+ # - # source://rdoc//rdoc/ri/driver.rb#861 + # source://rdoc//lib/rdoc/ri/driver.rb#861 def display_names(names); end # Outputs formatted RI data for page +name+. # - # source://rdoc//rdoc/ri/driver.rb#872 + # source://rdoc//lib/rdoc/ri/driver.rb#872 def display_page(name); end # Outputs a formatted RI page list for the pages in +store+. # - # source://rdoc//rdoc/ri/driver.rb#903 + # source://rdoc//lib/rdoc/ri/driver.rb#903 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//rdoc/ri/driver.rb#947 + # source://rdoc//lib/rdoc/ri/driver.rb#947 def expand_class(klass); end # Expands the class portion of +name+ into a fully-qualified class. See # #expand_class. # - # source://rdoc//rdoc/ri/driver.rb#965 + # source://rdoc//lib/rdoc/ri/driver.rb#965 def expand_name(name); end # Filters the methods in +found+ trying to find a match for +name+. # - # source://rdoc//rdoc/ri/driver.rb#981 + # source://rdoc//lib/rdoc/ri/driver.rb#981 def filter_methods(found, name); end # Yields items matching +name+ including the store they were found in, the @@ -10662,7 +10833,7 @@ class RDoc::RI::Driver # types of methods to look up (from #method_type), and the method name being # searched for # - # source://rdoc//rdoc/ri/driver.rb#999 + # source://rdoc//lib/rdoc/ri/driver.rb#999 def find_methods(name); end # Finds a store that matches +name+ which can be the name of a gem, "ruby", @@ -10672,73 +10843,73 @@ class RDoc::RI::Driver # # @raise [RDoc::RI::Driver::NotFoundError] # - # source://rdoc//rdoc/ri/driver.rb#1045 + # source://rdoc//lib/rdoc/ri/driver.rb#1045 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//rdoc/ri/driver.rb#1062 + # source://rdoc//lib/rdoc/ri/driver.rb#1062 def formatter(io); end # Runs ri interactively using Readline if it is available. # - # source://rdoc//rdoc/ri/driver.rb#1075 + # source://rdoc//lib/rdoc/ri/driver.rb#1075 def interactive; end # Lists classes known to ri starting with +names+. If +names+ is empty all # known classes are shown. # - # source://rdoc//rdoc/ri/driver.rb#1114 + # source://rdoc//lib/rdoc/ri/driver.rb#1114 def list_known_classes(names = T.unsafe(nil)); end # Returns an Array of methods matching +name+ # - # source://rdoc//rdoc/ri/driver.rb#1146 + # source://rdoc//lib/rdoc/ri/driver.rb#1146 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//rdoc/ri/driver.rb#1185 + # source://rdoc//lib/rdoc/ri/driver.rb#1185 def load_method(store, cache, klass, type, name); end # Returns an Array of RI data for methods matching +name+ # - # source://rdoc//rdoc/ri/driver.rb#1208 + # source://rdoc//lib/rdoc/ri/driver.rb#1208 def load_methods_matching(name); end # Returns a filtered list of methods matching +name+ # - # source://rdoc//rdoc/ri/driver.rb#1229 + # source://rdoc//lib/rdoc/ri/driver.rb#1229 def lookup_method(name); end # Builds a RDoc::Markup::Document from +found+, +klasses+ and +includes+ # - # source://rdoc//rdoc/ri/driver.rb#1254 + # source://rdoc//lib/rdoc/ri/driver.rb#1254 def method_document(name, filtered); end # Returns the type of method (:both, :instance, :class) for +selector+ # - # source://rdoc//rdoc/ri/driver.rb#1272 + # source://rdoc//lib/rdoc/ri/driver.rb#1272 def method_type(selector); end # Returns a regular expression for +name+ that will match an # RDoc::AnyMethod's name. # - # source://rdoc//rdoc/ri/driver.rb#1284 + # source://rdoc//lib/rdoc/ri/driver.rb#1284 def name_regexp(name); end # Paginates output through a pager program. # - # source://rdoc//rdoc/ri/driver.rb#1298 + # source://rdoc//lib/rdoc/ri/driver.rb#1298 def page; end # Are we using a pager? # # @return [Boolean] # - # source://rdoc//rdoc/ri/driver.rb#1316 + # source://rdoc//lib/rdoc/ri/driver.rb#1316 def paging?; end # Extracts the class, selector and method name parts from +name+ like @@ -10747,146 +10918,152 @@ class RDoc::RI::Driver # NOTE: Given Foo::Bar, Bar is considered a class even though it may be a # method # - # source://rdoc//rdoc/ri/driver.rb#1327 + # source://rdoc//lib/rdoc/ri/driver.rb#1327 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//rdoc/ri/driver.rb#1359 + # source://rdoc//lib/rdoc/ri/driver.rb#1359 def render_class(out, store, klass, also_in); end - # source://rdoc//rdoc/ri/driver.rb#1389 + # source://rdoc//lib/rdoc/ri/driver.rb#1389 def render_method(out, store, method, name); end - # source://rdoc//rdoc/ri/driver.rb#1409 + # source://rdoc//lib/rdoc/ri/driver.rb#1409 def render_method_arguments(out, arglists); end - # source://rdoc//rdoc/ri/driver.rb#1418 + # source://rdoc//lib/rdoc/ri/driver.rb#1418 def render_method_comment(out, method, alias_for = T.unsafe(nil)); end - # source://rdoc//rdoc/ri/driver.rb#1436 + # source://rdoc//lib/rdoc/ri/driver.rb#1436 def render_method_superclass(out, method); end # Looks up and displays ri data according to the options given. # - # source://rdoc//rdoc/ri/driver.rb#1448 + # source://rdoc//lib/rdoc/ri/driver.rb#1448 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//rdoc/ri/driver.rb#1468 + # source://rdoc//lib/rdoc/ri/driver.rb#1468 def setup_pager; end # Show all method documentation following a class or module # - # source://rdoc//rdoc/ri/driver.rb#62 + # source://rdoc//lib/rdoc/ri/driver.rb#62 def show_all; end # Show all method documentation following a class or module # - # source://rdoc//rdoc/ri/driver.rb#62 + # source://rdoc//lib/rdoc/ri/driver.rb#62 def show_all=(_arg0); end # Starts a WEBrick server for ri. # - # source://rdoc//rdoc/ri/driver.rb#1494 + # source://rdoc//lib/rdoc/ri/driver.rb#1494 def start_server; end # An RDoc::RI::Store for each entry in the RI path # - # source://rdoc//rdoc/ri/driver.rb#67 + # source://rdoc//lib/rdoc/ri/driver.rb#67 def stores; end # An RDoc::RI::Store for each entry in the RI path # - # source://rdoc//rdoc/ri/driver.rb#67 + # source://rdoc//lib/rdoc/ri/driver.rb#67 def stores=(_arg0); end # Controls the user of the pager vs $stdout # - # source://rdoc//rdoc/ri/driver.rb#72 + # source://rdoc//lib/rdoc/ri/driver.rb#72 def use_stdout; end # Controls the user of the pager vs $stdout # - # source://rdoc//rdoc/ri/driver.rb#72 + # source://rdoc//lib/rdoc/ri/driver.rb#72 def use_stdout=(_arg0); end class << self # Default options for ri # - # source://rdoc//rdoc/ri/driver.rb#77 + # source://rdoc//lib/rdoc/ri/driver.rb#77 def default_options; end # Dump +data_path+ using pp # - # source://rdoc//rdoc/ri/driver.rb#98 + # source://rdoc//lib/rdoc/ri/driver.rb#98 def dump(data_path); end # Parses +argv+ and returns a Hash of options # - # source://rdoc//rdoc/ri/driver.rb#109 + # source://rdoc//lib/rdoc/ri/driver.rb#109 def process_args(argv); end # Runs the ri command line executable using +argv+ # - # source://rdoc//rdoc/ri/driver.rb#376 + # source://rdoc//lib/rdoc/ri/driver.rb#376 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//rdoc/ri/driver.rb#37 + # source://rdoc//lib/rdoc/ri/driver.rb#37 def initialize(klass, suggestion_proc = T.unsafe(nil)); end - # source://rdoc//rdoc/ri/driver.rb#49 + # source://rdoc//lib/rdoc/ri/driver.rb#49 def message; end # Name that wasn't found # - # source://rdoc//rdoc/ri/driver.rb#45 + # source://rdoc//lib/rdoc/ri/driver.rb#45 def name; end end # For RubyGems backwards compatibility +# +# source://rdoc//lib/rdoc/ri/formatter.rb#5 module RDoc::RI::Formatter; end -# source://rdoc//rdoc/ri/store.rb#4 +# source://rdoc//lib/rdoc/ri/store.rb#4 RDoc::RI::Store = RDoc::Store # A file loaded by \#require +# +# source://rdoc//lib/rdoc/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//rdoc/require.rb#15 + # source://rdoc//lib/rdoc/require.rb#15 def initialize(name, comment); end - # source://rdoc//rdoc/require.rb#22 + # source://rdoc//lib/rdoc/require.rb#22 def inspect; end # Name of the required file # - # source://rdoc//rdoc/require.rb#10 + # source://rdoc//lib/rdoc/require.rb#10 def name; end # Name of the required file # - # source://rdoc//rdoc/require.rb#10 + # source://rdoc//lib/rdoc/require.rb#10 def name=(_arg0); end - # source://rdoc//rdoc/require.rb#31 + # source://rdoc//lib/rdoc/require.rb#31 def to_s; end # The RDoc::TopLevel corresponding to this require, or +nil+ if not found. # - # source://rdoc//rdoc/require.rb#38 + # source://rdoc//lib/rdoc/require.rb#38 def top_level; end end @@ -10909,6 +11086,8 @@ end # base path when mounting: # # server.mount '/rdoc', RDoc::Servlet, '/rdoc' +# +# source://rdoc//lib/rdoc/servlet.rb#34 class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet # Creates a new WEBrick servlet. # @@ -10921,22 +11100,22 @@ class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet # # @return [Servlet] a new instance of Servlet # - # source://rdoc//rdoc/servlet.rb#69 + # source://rdoc//lib/rdoc/servlet.rb#69 def initialize(server, stores, cache, mount_path = T.unsafe(nil), extra_doc_dirs = T.unsafe(nil)); end # Serves the asset at the path in +req+ for +generator_name+ via +res+. # - # source://rdoc//rdoc/servlet.rb#100 + # source://rdoc//lib/rdoc/servlet.rb#100 def asset(generator_name, req, res); end # Maps an asset type to its path on the filesystem # - # source://rdoc//rdoc/servlet.rb#42 + # source://rdoc//lib/rdoc/servlet.rb#42 def asset_dirs; end # GET request entry point. Fills in +res+ for the path, etc. in +req+. # - # source://rdoc//rdoc/servlet.rb#119 + # source://rdoc//lib/rdoc/servlet.rb#119 def do_GET(req, res); end # Fills in +res+ with the class, module or page for +req+ from +store+. @@ -10945,36 +11124,36 @@ class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet # module or page name (/RDoc/Servlet.html becomes RDoc::Servlet). # +generator+ is used to create the page. # - # source://rdoc//rdoc/servlet.rb#152 + # source://rdoc//lib/rdoc/servlet.rb#152 def documentation_page(store, generator, path, req, res); end # Creates the JSON search index on +res+ for the given +store+. +generator+ # must respond to \#json_index to build. +req+ is ignored. # - # source://rdoc//rdoc/servlet.rb#171 + # source://rdoc//lib/rdoc/servlet.rb#171 def documentation_search(store, generator, req, res); end # Returns the RDoc::Store and path relative to +mount_path+ for # documentation at +path+. # - # source://rdoc//rdoc/servlet.rb#185 + # source://rdoc//lib/rdoc/servlet.rb#185 def documentation_source(path); end # Generates an error page for the +exception+ while handling +req+ on +res+. # - # source://rdoc//rdoc/servlet.rb#203 + # source://rdoc//lib/rdoc/servlet.rb#203 def error(exception, req, res); end # Instantiates a Darkfish generator for +store+ # - # source://rdoc//rdoc/servlet.rb#246 + # source://rdoc//lib/rdoc/servlet.rb#246 def generator_for(store); end # Handles the If-Modified-Since HTTP header on +req+ for +path+. If the # file has not been modified a Not Modified response is returned. If the # file has been modified a Last-Modified header is added to +res+. # - # source://rdoc//rdoc/servlet.rb#267 + # source://rdoc//lib/rdoc/servlet.rb#267 def if_modified_since(req, res, path = T.unsafe(nil)); end # Returns an Array of installed documentation. @@ -10984,75 +11163,79 @@ class RDoc::Servlet < ::WEBrick::HTTPServlet::AbstractServlet # documentation exists, the type of documentation (See RDoc::RI::Paths#each) # and the filesystem to the RDoc::Store for the documentation. # - # source://rdoc//rdoc/servlet.rb#290 + # source://rdoc//lib/rdoc/servlet.rb#290 def installed_docs; end # Returns a 404 page built by +generator+ for +req+ on +res+. # - # source://rdoc//rdoc/servlet.rb#318 + # source://rdoc//lib/rdoc/servlet.rb#318 def not_found(generator, req, res, message = T.unsafe(nil)); end # An RDoc::Options instance used for rendering options # - # source://rdoc//rdoc/servlet.rb#47 + # source://rdoc//lib/rdoc/servlet.rb#47 def options; end # Enumerates the ri paths. See RDoc::RI::Paths#each # - # source://rdoc//rdoc/servlet.rb#327 + # source://rdoc//lib/rdoc/servlet.rb#327 def ri_paths(&block); end # Generates the root page on +res+. +req+ is ignored. # - # source://rdoc//rdoc/servlet.rb#334 + # source://rdoc//lib/rdoc/servlet.rb#334 def root(req, res); end # Generates a search index for the root page on +res+. +req+ is ignored. # - # source://rdoc//rdoc/servlet.rb#345 + # source://rdoc//lib/rdoc/servlet.rb#345 def root_search(req, res); end # Displays documentation for +req+ on +res+, whether that be HTML or some # asset. # - # source://rdoc//rdoc/servlet.rb#395 + # source://rdoc//lib/rdoc/servlet.rb#395 def show_documentation(req, res); end # Returns an RDoc::Store for the given +source_name+ ('ruby' or a gem name). # - # source://rdoc//rdoc/servlet.rb#419 + # source://rdoc//lib/rdoc/servlet.rb#419 def store_for(source_name); end class << self # Creates an instance of this servlet that shares cached data between # requests. # - # source://rdoc//rdoc/servlet.rb#53 + # source://rdoc//lib/rdoc/servlet.rb#53 def get_instance(server, *options); end end end # A singleton class +# +# source://rdoc//lib/rdoc/single_class.rb#5 class RDoc::SingleClass < ::RDoc::ClassModule # Adds the superclass to the included modules. # - # source://rdoc//rdoc/single_class.rb#10 + # source://rdoc//lib/rdoc/single_class.rb#10 def ancestors; end - # source://rdoc//rdoc/single_class.rb#14 + # source://rdoc//lib/rdoc/single_class.rb#14 def aref_prefix; end # The definition of this singleton class, class << MyClassName # - # source://rdoc//rdoc/single_class.rb#21 + # source://rdoc//lib/rdoc/single_class.rb#21 def definition; end - # source://rdoc//rdoc/single_class.rb#25 + # source://rdoc//lib/rdoc/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 @@ -11061,58 +11244,58 @@ class RDoc::Stats # # @return [Stats] a new instance of Stats # - # source://rdoc//rdoc/stats.rb#29 + # 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//rdoc/stats.rb#52 + # source://rdoc//lib/rdoc/stats.rb#52 def add_alias(as); end # Records the parsing of an attribute +attribute+ # - # source://rdoc//rdoc/stats.rb#59 + # source://rdoc//lib/rdoc/stats.rb#59 def add_attribute(attribute); end # Records the parsing of a class +klass+ # - # source://rdoc//rdoc/stats.rb#66 + # source://rdoc//lib/rdoc/stats.rb#66 def add_class(klass); end # Records the parsing of +constant+ # - # source://rdoc//rdoc/stats.rb#73 + # source://rdoc//lib/rdoc/stats.rb#73 def add_constant(constant); end # Records the parsing of +file+ # - # source://rdoc//rdoc/stats.rb#80 + # source://rdoc//lib/rdoc/stats.rb#80 def add_file(file); end # Records the parsing of +method+ # - # source://rdoc//rdoc/stats.rb#88 + # source://rdoc//lib/rdoc/stats.rb#88 def add_method(method); end # Records the parsing of a module +mod+ # - # source://rdoc//rdoc/stats.rb#95 + # 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//rdoc/stats.rb#102 + # 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//rdoc/stats.rb#110 + # source://rdoc//lib/rdoc/stats.rb#110 def calculate; end # Output level for the coverage report # - # source://rdoc//rdoc/stats.rb#13 + # source://rdoc//lib/rdoc/stats.rb#13 def coverage_level; end # Sets coverage report level. Accepted values are: @@ -11121,22 +11304,22 @@ class RDoc::Stats # 0:: Classes, modules, constants, attributes, methods # 1:: Level 0 + method parameters # - # source://rdoc//rdoc/stats.rb#158 + # source://rdoc//lib/rdoc/stats.rb#158 def coverage_level=(level); end # Returns the length and number of undocumented items in +collection+. # - # source://rdoc//rdoc/stats.rb#167 + # 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//rdoc/stats.rb#175 + # source://rdoc//lib/rdoc/stats.rb#175 def done_adding; end # Count of files parsed during parsing # - # source://rdoc//rdoc/stats.rb#18 + # source://rdoc//lib/rdoc/stats.rb#18 def files_so_far; end # The documentation status of this project. +true+ when 100%, +false+ when @@ -11146,158 +11329,164 @@ class RDoc::Stats # # @return [Boolean] # - # source://rdoc//rdoc/stats.rb#185 + # source://rdoc//lib/rdoc/stats.rb#185 def fully_documented?; end # A report that says you did a great job! # - # source://rdoc//rdoc/stats.rb#192 + # source://rdoc//lib/rdoc/stats.rb#192 def great_job; end # Total number of files found # - # source://rdoc//rdoc/stats.rb#23 + # source://rdoc//lib/rdoc/stats.rb#23 def num_files; end # Calculates the percentage of items documented. # - # source://rdoc//rdoc/stats.rb#204 + # source://rdoc//lib/rdoc/stats.rb#204 def percent_doc; end # Returns a report on which items are not documented # - # source://rdoc//rdoc/stats.rb#218 + # source://rdoc//lib/rdoc/stats.rb#218 def report; end # Returns a report on undocumented attributes in ClassModule +cm+ # - # source://rdoc//rdoc/stats.rb#259 + # source://rdoc//lib/rdoc/stats.rb#259 def report_attributes(cm); end # Returns a report on undocumented items in ClassModule +cm+ # - # source://rdoc//rdoc/stats.rb#277 + # source://rdoc//lib/rdoc/stats.rb#277 def report_class_module(cm); end # Returns a report on undocumented constants in ClassModule +cm+ # - # source://rdoc//rdoc/stats.rb#329 + # source://rdoc//lib/rdoc/stats.rb#329 def report_constants(cm); end # Returns a report on undocumented methods in ClassModule +cm+ # - # source://rdoc//rdoc/stats.rb#351 + # source://rdoc//lib/rdoc/stats.rb#351 def report_methods(cm); end # Returns a summary of the collected statistics. # - # source://rdoc//rdoc/stats.rb#389 + # 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//rdoc/stats.rb#439 + # 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//rdoc/stats/normal.rb#15 + # source://rdoc//lib/rdoc/stats/normal.rb#15 def begin_adding; end - # source://rdoc//rdoc/stats/normal.rb#54 + # source://rdoc//lib/rdoc/stats/normal.rb#54 def done_adding; end # Prints a file with a progress bar # - # source://rdoc//rdoc/stats/normal.rb#23 + # 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//rdoc/stats/quiet.rb#10 + # source://rdoc//lib/rdoc/stats/quiet.rb#10 def initialize(num_files); end # Prints a message at the beginning of parsing # - # source://rdoc//rdoc/stats/quiet.rb#17 + # source://rdoc//lib/rdoc/stats/quiet.rb#17 def begin_adding(*_arg0); end # Prints when RDoc is done # - # source://rdoc//rdoc/stats/quiet.rb#57 + # source://rdoc//lib/rdoc/stats/quiet.rb#57 def done_adding(*_arg0); end # Prints when an alias is added # - # source://rdoc//rdoc/stats/quiet.rb#22 + # source://rdoc//lib/rdoc/stats/quiet.rb#22 def print_alias(*_arg0); end # Prints when an attribute is added # - # source://rdoc//rdoc/stats/quiet.rb#27 + # source://rdoc//lib/rdoc/stats/quiet.rb#27 def print_attribute(*_arg0); end # Prints when a class is added # - # source://rdoc//rdoc/stats/quiet.rb#32 + # source://rdoc//lib/rdoc/stats/quiet.rb#32 def print_class(*_arg0); end # Prints when a constant is added # - # source://rdoc//rdoc/stats/quiet.rb#37 + # source://rdoc//lib/rdoc/stats/quiet.rb#37 def print_constant(*_arg0); end # Prints when a file is added # - # source://rdoc//rdoc/stats/quiet.rb#42 + # source://rdoc//lib/rdoc/stats/quiet.rb#42 def print_file(*_arg0); end # Prints when a method is added # - # source://rdoc//rdoc/stats/quiet.rb#47 + # source://rdoc//lib/rdoc/stats/quiet.rb#47 def print_method(*_arg0); end # Prints when a module is added # - # source://rdoc//rdoc/stats/quiet.rb#52 + # 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//rdoc/stats/verbose.rb#11 + # source://rdoc//lib/rdoc/stats/verbose.rb#11 def nodoc(co); end - # source://rdoc//rdoc/stats/verbose.rb#15 + # source://rdoc//lib/rdoc/stats/verbose.rb#15 def print_alias(as); end - # source://rdoc//rdoc/stats/verbose.rb#19 + # source://rdoc//lib/rdoc/stats/verbose.rb#19 def print_attribute(attribute); end - # source://rdoc//rdoc/stats/verbose.rb#23 + # source://rdoc//lib/rdoc/stats/verbose.rb#23 def print_class(klass); end - # source://rdoc//rdoc/stats/verbose.rb#27 + # source://rdoc//lib/rdoc/stats/verbose.rb#27 def print_constant(constant); end - # source://rdoc//rdoc/stats/verbose.rb#31 + # source://rdoc//lib/rdoc/stats/verbose.rb#31 def print_file(files_so_far, file); end - # source://rdoc//rdoc/stats/verbose.rb#36 + # source://rdoc//lib/rdoc/stats/verbose.rb#36 def print_method(method); end - # source://rdoc//rdoc/stats/verbose.rb#40 + # source://rdoc//lib/rdoc/stats/verbose.rb#40 def print_module(mod); end end @@ -11320,117 +11509,119 @@ end # } # -- # 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//rdoc/store.rb#127 + # 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//rdoc/store.rb#169 + # source://rdoc//lib/rdoc/store.rb#169 def add_c_enclosure(variable, namespace); end # Adds C variables from an RDoc::Parser::C # - # source://rdoc//rdoc/store.rb#176 + # 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//rdoc/store.rb#188 + # 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//rdoc/store.rb#212 + # source://rdoc//lib/rdoc/store.rb#212 def all_classes; end # Returns all classes and modules discovered by RDoc # - # source://rdoc//rdoc/store.rb#219 + # source://rdoc//lib/rdoc/store.rb#219 def all_classes_and_modules; end # All TopLevels known to RDoc # - # source://rdoc//rdoc/store.rb#226 + # source://rdoc//lib/rdoc/store.rb#226 def all_files; end # Returns all modules discovered by RDoc # - # source://rdoc//rdoc/store.rb#233 + # source://rdoc//lib/rdoc/store.rb#233 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//rdoc/store.rb#242 + # source://rdoc//lib/rdoc/store.rb#242 def ancestors; end # Attributes cache accessor. Maps a class to an Array of its attributes. # - # source://rdoc//rdoc/store.rb#249 + # source://rdoc//lib/rdoc/store.rb#249 def attributes; end # Maps C variables to class or module names for each parsed C file. # - # source://rdoc//rdoc/store.rb#80 + # 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//rdoc/store.rb#73 + # source://rdoc//lib/rdoc/store.rb#73 def c_enclosure_classes; end - # source://rdoc//rdoc/store.rb#75 + # 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//rdoc/store.rb#85 + # source://rdoc//lib/rdoc/store.rb#85 def c_singleton_class_variables; end # The contents of the Store # - # source://rdoc//rdoc/store.rb#112 + # source://rdoc//lib/rdoc/store.rb#112 def cache; end # Path to the cache file # - # source://rdoc//rdoc/store.rb#256 + # source://rdoc//lib/rdoc/store.rb#256 def cache_path; end # Path to the ri data for +klass_name+ # - # source://rdoc//rdoc/store.rb#263 + # source://rdoc//lib/rdoc/store.rb#263 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//rdoc/store.rb#272 + # source://rdoc//lib/rdoc/store.rb#272 def class_methods; end # Path where data for +klass_name+ will be stored (methods or class data) # - # source://rdoc//rdoc/store.rb#279 + # source://rdoc//lib/rdoc/store.rb#279 def class_path(klass_name); end # Hash of all classes known to RDoc # - # source://rdoc//rdoc/store.rb#286 + # source://rdoc//lib/rdoc/store.rb#286 def classes_hash; end # Removes empty items and ensures item in each collection are unique and # sorted # - # source://rdoc//rdoc/store.rb#294 + # source://rdoc//lib/rdoc/store.rb#294 def clean_cache_collection(collection); end # Prepares the RDoc code object tree for use by a generator. @@ -11448,68 +11639,68 @@ class RDoc::Store # # See also RDoc::Context#remove_from_documentation? # - # source://rdoc//rdoc/store.rb#322 + # source://rdoc//lib/rdoc/store.rb#322 def complete(min_visibility); end # If true this Store will not write any files # - # source://rdoc//rdoc/store.rb#90 + # source://rdoc//lib/rdoc/store.rb#90 def dry_run; end # If true this Store will not write any files # - # source://rdoc//rdoc/store.rb#90 + # source://rdoc//lib/rdoc/store.rb#90 def dry_run=(_arg0); end # The encoding of the contents in the Store # - # source://rdoc//rdoc/store.rb#117 + # source://rdoc//lib/rdoc/store.rb#117 def encoding; end # The encoding of the contents in the Store # - # source://rdoc//rdoc/store.rb#117 + # source://rdoc//lib/rdoc/store.rb#117 def encoding=(_arg0); end # Hash of all files known to RDoc # - # source://rdoc//rdoc/store.rb#362 + # source://rdoc//lib/rdoc/store.rb#362 def files_hash; end # Finds the enclosure (namespace) for the given C +variable+. # - # source://rdoc//rdoc/store.rb#369 + # source://rdoc//lib/rdoc/store.rb#369 def find_c_enclosure(variable); end # Finds the class with +name+ in all discovered classes # - # source://rdoc//rdoc/store.rb#394 + # source://rdoc//lib/rdoc/store.rb#394 def find_class_named(name); end # Finds the class with +name+ starting in namespace +from+ # - # source://rdoc//rdoc/store.rb#401 + # source://rdoc//lib/rdoc/store.rb#401 def find_class_named_from(name, from); end # Finds the class or module with +name+ # - # source://rdoc//rdoc/store.rb#419 + # source://rdoc//lib/rdoc/store.rb#419 def find_class_or_module(name); end # Finds the file with +name+ in all discovered files # - # source://rdoc//rdoc/store.rb#427 + # source://rdoc//lib/rdoc/store.rb#427 def find_file_named(name); end # Finds the module with +name+ in all discovered modules # - # source://rdoc//rdoc/store.rb#434 + # source://rdoc//lib/rdoc/store.rb#434 def find_module_named(name); end # Returns the RDoc::TopLevel that is a text file and has the given # +file_name+ # - # source://rdoc//rdoc/store.rb#442 + # source://rdoc//lib/rdoc/store.rb#442 def find_text_page(file_name); end # Finds unique classes/modules defined in +all_hash+, @@ -11518,7 +11709,7 @@ class RDoc::Store # -- # TODO aliases should be registered by Context#add_module_alias # - # source://rdoc//rdoc/store.rb#455 + # source://rdoc//lib/rdoc/store.rb#455 def find_unique(all_hash); end # Fixes the erroneous BasicObject < Object in 1.9. @@ -11529,149 +11720,149 @@ class RDoc::Store # We fix BasicObject right away if we are running in a Ruby # version >= 1.9. # - # source://rdoc//rdoc/store.rb#474 + # source://rdoc//lib/rdoc/store.rb#474 def fix_basic_object_inheritance; end # Friendly rendition of #path # - # source://rdoc//rdoc/store.rb#483 + # source://rdoc//lib/rdoc/store.rb#483 def friendly_path; end - # source://rdoc//rdoc/store.rb#495 + # source://rdoc//lib/rdoc/store.rb#495 def inspect; end # Instance methods cache accessor. Maps a class to an Array of its # instance methods (not full name). # - # source://rdoc//rdoc/store.rb#503 + # source://rdoc//lib/rdoc/store.rb#503 def instance_methods; end # Loads all items from this store into memory. This recreates a # documentation tree for use by a generator # - # source://rdoc//rdoc/store.rb#511 + # source://rdoc//lib/rdoc/store.rb#511 def load_all; end # Loads cache file for this store # - # source://rdoc//rdoc/store.rb#559 + # source://rdoc//lib/rdoc/store.rb#559 def load_cache; end # Loads ri data for +klass_name+ and hooks it up to this store. # - # source://rdoc//rdoc/store.rb#600 + # source://rdoc//lib/rdoc/store.rb#598 def load_class(klass_name); end # Loads ri data for +klass_name+ # - # source://rdoc//rdoc/store.rb#618 + # source://rdoc//lib/rdoc/store.rb#616 def load_class_data(klass_name); end # Loads ri data for +method_name+ in +klass_name+ # - # source://rdoc//rdoc/store.rb#633 + # source://rdoc//lib/rdoc/store.rb#629 def load_method(klass_name, method_name); end # Loads ri data for +page_name+ # - # source://rdoc//rdoc/store.rb#653 + # source://rdoc//lib/rdoc/store.rb#645 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//rdoc/store.rb#671 + # source://rdoc//lib/rdoc/store.rb#661 def main; end # Sets the main page for this RDoc store. # - # source://rdoc//rdoc/store.rb#678 + # source://rdoc//lib/rdoc/store.rb#668 def main=(page); end # Converts the variable => ClassModule map +variables+ from a C parser into # a variable => class name map. # - # source://rdoc//rdoc/store.rb#686 + # source://rdoc//lib/rdoc/store.rb#676 def make_variable_map(variables); end # Path to the ri data for +method_name+ in +klass_name+ # - # source://rdoc//rdoc/store.rb#699 + # source://rdoc//lib/rdoc/store.rb#689 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//rdoc/store.rb#713 + # source://rdoc//lib/rdoc/store.rb#703 def module_names; end # Hash of all modules known to RDoc # - # source://rdoc//rdoc/store.rb#720 + # source://rdoc//lib/rdoc/store.rb#710 def modules_hash; end # Returns the RDoc::TopLevel that is a text file and has the given +name+ # - # source://rdoc//rdoc/store.rb#727 + # source://rdoc//lib/rdoc/store.rb#717 def page(name); end # Path to the ri data for +page_name+ # - # source://rdoc//rdoc/store.rb#736 + # source://rdoc//lib/rdoc/store.rb#726 def page_file(page_name); end # Path this store reads or writes # - # source://rdoc//rdoc/store.rb#95 + # source://rdoc//lib/rdoc/store.rb#95 def path; end # Path this store reads or writes # - # source://rdoc//rdoc/store.rb#95 + # 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//rdoc/store.rb#101 + # 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//rdoc/store.rb#101 + # 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//rdoc/store.rb#747 + # source://rdoc//lib/rdoc/store.rb#737 def remove_nodoc(all_hash); end # Saves all entries in the store # - # source://rdoc//rdoc/store.rb#757 + # source://rdoc//lib/rdoc/store.rb#747 def save; end # Writes the cache file for this store # - # source://rdoc//rdoc/store.rb#782 + # source://rdoc//lib/rdoc/store.rb#772 def save_cache; end # Writes the ri data for +klass+ (or module) # - # source://rdoc//rdoc/store.rb#809 + # source://rdoc//lib/rdoc/store.rb#799 def save_class(klass); end # Writes the ri data for +method+ on +klass+ # - # source://rdoc//rdoc/store.rb#883 + # source://rdoc//lib/rdoc/store.rb#873 def save_method(klass, method); end # Writes the ri data for +page+ # - # source://rdoc//rdoc/store.rb#906 + # source://rdoc//lib/rdoc/store.rb#896 def save_page(page); end # Source of the contents of this store. @@ -11682,88 +11873,98 @@ class RDoc::Store # ri directory the store is "site". For other stores the source is the # #path. # - # source://rdoc//rdoc/store.rb#932 + # source://rdoc//lib/rdoc/store.rb#922 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//rdoc/store.rb#946 + # source://rdoc//lib/rdoc/store.rb#936 def title; end # Sets the title page for this RDoc store. # - # source://rdoc//rdoc/store.rb#953 + # source://rdoc//lib/rdoc/store.rb#943 def title=(title); end # Type of ri datastore this was loaded from. See RDoc::RI::Driver, # RDoc::RI::Paths. # - # source://rdoc//rdoc/store.rb#107 + # 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//rdoc/store.rb#107 + # 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//rdoc/store.rb#962 + # source://rdoc//lib/rdoc/store.rb#952 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//rdoc/store.rb#970 + # source://rdoc//lib/rdoc/store.rb#960 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//rdoc/store.rb#978 + # source://rdoc//lib/rdoc/store.rb#968 def unique_modules; end # The lazy constants alias will be discovered in passing # - # source://rdoc//rdoc/store.rb#122 + # 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//rdoc/store.rb#203 + # source://rdoc//lib/rdoc/store.rb#203 def update_parser_of_file(absolute_name, parser); end + + private + + # source://rdoc//lib/rdoc/store.rb#973 + def marshal_load(file); end end +# source://rdoc//lib/rdoc/store.rb#977 +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//rdoc/store.rb#57 + # source://rdoc//lib/rdoc/store.rb#57 def initialize(store, file, name); end # The file the #name should be saved as # - # source://rdoc//rdoc/store.rb#46 + # source://rdoc//lib/rdoc/store.rb#46 def file; end - # source://rdoc//rdoc/store.rb#63 + # source://rdoc//lib/rdoc/store.rb#63 def message; end # The name of the object the #file would be loaded from # - # source://rdoc//rdoc/store.rb#51 + # source://rdoc//lib/rdoc/store.rb#51 def name; end # The store the file should exist in # - # source://rdoc//rdoc/store.rb#41 + # source://rdoc//lib/rdoc/store.rb#41 def store; end end @@ -11825,6 +12026,8 @@ end # # 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. @@ -11833,264 +12036,266 @@ class RDoc::Task < ::Rake::TaskLib # @yield [_self] # @yieldparam _self [RDoc::Task] the object that the method was called on # - # source://rdoc//rdoc/task.rb#158 + # source://rdoc//lib/rdoc/task.rb#158 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//rdoc/task.rb#288 + # source://rdoc//lib/rdoc/task.rb#288 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//rdoc/task.rb#174 + # source://rdoc//lib/rdoc/task.rb#174 def check_names(names); end # Task description for the clobber rdoc task or its renamed equivalent # - # source://rdoc//rdoc/task.rb#188 + # source://rdoc//lib/rdoc/task.rb#188 def clobber_task_description; end # Task description for the coverage task or its renamed description # - # source://rdoc//rdoc/task.rb#309 + # source://rdoc//lib/rdoc/task.rb#309 def coverage_task_description; end # Sets default task values # - # source://rdoc//rdoc/task.rb#195 + # source://rdoc//lib/rdoc/task.rb#195 def defaults; end # Create the tasks defined by this task lib. # - # source://rdoc//rdoc/task.rb#224 + # source://rdoc//lib/rdoc/task.rb#224 def define; end # Whether to run the rdoc process as an external shell (default is false) # - # source://rdoc//rdoc/task.rb#152 + # source://rdoc//lib/rdoc/task.rb#152 def external; end # Whether to run the rdoc process as an external shell (default is false) # - # source://rdoc//rdoc/task.rb#152 + # source://rdoc//lib/rdoc/task.rb#152 def external=(_arg0); end # Name of format generator (--format) used by rdoc. (defaults to # rdoc's default) # - # source://rdoc//rdoc/task.rb#137 + # source://rdoc//lib/rdoc/task.rb#137 def generator; end # Name of format generator (--format) used by rdoc. (defaults to # rdoc's default) # - # source://rdoc//rdoc/task.rb#137 + # source://rdoc//lib/rdoc/task.rb#137 def generator=(_arg0); end # All source is inline now. This method is deprecated # - # source://rdoc//rdoc/task.rb#209 + # source://rdoc//lib/rdoc/task.rb#209 def inline_source; end # All source is inline now. This method is deprecated # - # source://rdoc//rdoc/task.rb#217 + # source://rdoc//lib/rdoc/task.rb#217 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//rdoc/task.rb#126 + # source://rdoc//lib/rdoc/task.rb#126 def main; end # Name of file to be used as the main, top level file of the RDoc. (default # is none) # - # source://rdoc//rdoc/task.rb#126 + # source://rdoc//lib/rdoc/task.rb#126 def main=(_arg0); end # Comment markup format. rdoc, rd and tomdoc are supported. (default is # 'rdoc') # - # source://rdoc//rdoc/task.rb#110 + # source://rdoc//lib/rdoc/task.rb#110 def markup; end # Comment markup format. rdoc, rd and tomdoc are supported. (default is # 'rdoc') # - # source://rdoc//rdoc/task.rb#110 + # source://rdoc//lib/rdoc/task.rb#110 def markup=(_arg0); end # Name of the main, top level task. (default is :rdoc) # - # source://rdoc//rdoc/task.rb#104 + # source://rdoc//lib/rdoc/task.rb#104 def name; end # Name of the main, top level task. (default is :rdoc) # - # source://rdoc//rdoc/task.rb#104 + # source://rdoc//lib/rdoc/task.rb#104 def name=(_arg0); end # List of options that will be supplied to RDoc # - # source://rdoc//rdoc/task.rb#272 + # source://rdoc//lib/rdoc/task.rb#272 def option_list; end # Additional list of options to be passed rdoc. (default is []) # - # source://rdoc//rdoc/task.rb#147 + # source://rdoc//lib/rdoc/task.rb#147 def options; end # Additional list of options to be passed rdoc. (default is []) # - # source://rdoc//rdoc/task.rb#147 + # source://rdoc//lib/rdoc/task.rb#147 def options=(_arg0); end # Name of directory to receive the html output files. (default is "html") # - # source://rdoc//rdoc/task.rb#115 + # source://rdoc//lib/rdoc/task.rb#115 def rdoc_dir; end # Name of directory to receive the html output files. (default is "html") # - # source://rdoc//rdoc/task.rb#115 + # source://rdoc//lib/rdoc/task.rb#115 def rdoc_dir=(_arg0); end # List of files to be included in the rdoc generation. (default is []) # - # source://rdoc//rdoc/task.rb#142 + # source://rdoc//lib/rdoc/task.rb#142 def rdoc_files; end # List of files to be included in the rdoc generation. (default is []) # - # source://rdoc//rdoc/task.rb#142 + # source://rdoc//lib/rdoc/task.rb#142 def rdoc_files=(_arg0); end # Task description for the rdoc task or its renamed equivalent # - # source://rdoc//rdoc/task.rb#295 + # source://rdoc//lib/rdoc/task.rb#295 def rdoc_task_description; end # Task description for the rerdoc task or its renamed description # - # source://rdoc//rdoc/task.rb#302 + # source://rdoc//lib/rdoc/task.rb#302 def rerdoc_task_description; end # Name of template to be used by rdoc. (defaults to rdoc's default) # - # source://rdoc//rdoc/task.rb#131 + # source://rdoc//lib/rdoc/task.rb#131 def template; end # Name of template to be used by rdoc. (defaults to rdoc's default) # - # source://rdoc//rdoc/task.rb#131 + # source://rdoc//lib/rdoc/task.rb#131 def template=(_arg0); end # Title of RDoc documentation. (defaults to rdoc's default) # - # source://rdoc//rdoc/task.rb#120 + # source://rdoc//lib/rdoc/task.rb#120 def title; end # Title of RDoc documentation. (defaults to rdoc's default) # - # source://rdoc//rdoc/task.rb#120 + # source://rdoc//lib/rdoc/task.rb#120 def title=(_arg0); end private - # source://rdoc//rdoc/task.rb#326 + # source://rdoc//lib/rdoc/task.rb#326 def clobber_task_name; end - # source://rdoc//rdoc/task.rb#340 + # source://rdoc//lib/rdoc/task.rb#340 def coverage_task_name; end - # source://rdoc//rdoc/task.rb#315 + # source://rdoc//lib/rdoc/task.rb#315 def rdoc_target; end - # source://rdoc//rdoc/task.rb#319 + # source://rdoc//lib/rdoc/task.rb#319 def rdoc_task_name; end - # source://rdoc//rdoc/task.rb#333 + # source://rdoc//lib/rdoc/task.rb#333 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//rdoc/text.rb#63 + # source://rdoc//lib/rdoc/text.rb#63 def expand_tabs(text); end # Flush +text+ left based on the shortest line # - # source://rdoc//rdoc/text.rb#82 + # source://rdoc//lib/rdoc/text.rb#82 def flush_left(text); end # The language for this text. This affects stripping comments # markers. # - # source://rdoc//rdoc/text.rb#17 + # source://rdoc//lib/rdoc/text.rb#17 def language; end # The language for this text. This affects stripping comments # markers. # - # source://rdoc//rdoc/text.rb#17 + # 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//rdoc/text.rb#101 + # source://rdoc//lib/rdoc/text.rb#101 def markup(text); end # Strips hashes, expands tabs then flushes +text+ to the left # - # source://rdoc//rdoc/text.rb#117 + # source://rdoc//lib/rdoc/text.rb#117 def normalize_comment(text); end # Normalizes +text+ then builds a RDoc::Markup::Document from it # - # source://rdoc//rdoc/text.rb#135 + # 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//rdoc/text.rb#149 + # source://rdoc//lib/rdoc/text.rb#149 def snippet(text, limit = T.unsafe(nil)); end # Strips leading # characters from +text+ # - # source://rdoc//rdoc/text.rb#158 + # source://rdoc//lib/rdoc/text.rb#158 def strip_hashes(text); end # Strips leading and trailing \n characters from +text+ # - # source://rdoc//rdoc/text.rb#170 + # source://rdoc//lib/rdoc/text.rb#170 def strip_newlines(text); end # Strips /* */ style comments # - # source://rdoc//rdoc/text.rb#177 + # source://rdoc//lib/rdoc/text.rb#177 def strip_stars(text); end - # source://rdoc//rdoc/text.rb#200 + # source://rdoc//lib/rdoc/text.rb#200 def to_html(text); end # Wraps +txt+ to +line_len+ # - # source://rdoc//rdoc/text.rb#287 + # 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//rdoc/text.rb#55 + # source://rdoc//lib/rdoc/text.rb#55 def encode_fallback(character, encoding, fallback); end end end @@ -12098,7 +12303,7 @@ end # Character class to be separated by a space when concatenating # lines. # -# source://rdoc//rdoc/text.rb#320 +# 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 @@ -12106,40 +12311,42 @@ RDoc::Text::SPACE_SEPARATED_LETTER_CLASS = T.let(T.unsafe(nil), Regexp) # 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//rdoc/token_stream.rb#84 + # source://rdoc//lib/rdoc/token_stream.rb#84 def add_token(token); end # Adds +tokens+ to the collected tokens # - # source://rdoc//rdoc/token_stream.rb#77 + # source://rdoc//lib/rdoc/token_stream.rb#77 def add_tokens(tokens); end # Starts collecting tokens # - # source://rdoc//rdoc/token_stream.rb#91 + # source://rdoc//lib/rdoc/token_stream.rb#91 def collect_tokens; end # Remove the last token from the collected tokens # - # source://rdoc//rdoc/token_stream.rb#100 + # source://rdoc//lib/rdoc/token_stream.rb#100 def pop_token; end # Starts collecting tokens # - # source://rdoc//rdoc/token_stream.rb#91 + # source://rdoc//lib/rdoc/token_stream.rb#91 def start_collecting_tokens; end # Current token stream # - # source://rdoc//rdoc/token_stream.rb#107 + # source://rdoc//lib/rdoc/token_stream.rb#107 def token_stream; end # Returns a string representation of the token stream # - # source://rdoc//rdoc/token_stream.rb#114 + # source://rdoc//lib/rdoc/token_stream.rb#114 def tokens_to_s; end class << self @@ -12147,7 +12354,7 @@ module RDoc::TokenStream # elements. Some tokens types are wrapped in spans # with the given class names. Other token types are not wrapped in spans. # - # source://rdoc//rdoc/token_stream.rb#16 + # source://rdoc//lib/rdoc/token_stream.rb#16 def to_html(token_stream); end end end @@ -12189,12 +12396,14 @@ end # # 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#42 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//rdoc/tom_doc.rb#130 + # source://rdoc//lib/rdoc/tom_doc.rb#130 def initialize; end # Internal: Builds a heading from the token stream @@ -12203,7 +12412,7 @@ class RDoc::TomDoc < ::RDoc::Markup::Parser # # Returns an RDoc::Markup::Heading # - # source://rdoc//rdoc/tom_doc.rb#143 + # source://rdoc//lib/rdoc/tom_doc.rb#143 def build_heading(level); end # Internal: Builds a paragraph from the token stream @@ -12212,7 +12421,7 @@ class RDoc::TomDoc < ::RDoc::Markup::Parser # # Returns an RDoc::Markup::Paragraph. # - # source://rdoc//rdoc/tom_doc.rb#173 + # source://rdoc//lib/rdoc/tom_doc.rb#173 def build_paragraph(margin); end # Internal: Builds a verbatim from the token stream. A verbatim in the @@ -12223,12 +12432,12 @@ class RDoc::TomDoc < ::RDoc::Markup::Parser # # Returns an RDoc::Markup::Verbatim # - # source://rdoc//rdoc/tom_doc.rb#159 + # source://rdoc//lib/rdoc/tom_doc.rb#159 def build_verbatim(margin); end # Detects a section change to "Returns" and adds a heading # - # source://rdoc//rdoc/tom_doc.rb#213 + # source://rdoc//lib/rdoc/tom_doc.rb#213 def parse_text(parent, indent); end # Internal: Turns text into an Array of tokens @@ -12237,12 +12446,12 @@ class RDoc::TomDoc < ::RDoc::Markup::Parser # # Returns self. # - # source://rdoc//rdoc/tom_doc.rb#231 + # source://rdoc//lib/rdoc/tom_doc.rb#231 def tokenize(text); end # Internal: Token accessor # - # source://rdoc//rdoc/tom_doc.rb#46 + # source://rdoc//lib/rdoc/tom_doc.rb#46 def tokens; end class << self @@ -12251,7 +12460,7 @@ class RDoc::TomDoc < ::RDoc::Markup::Parser # # Returns nothing. # - # source://rdoc//rdoc/tom_doc.rb#53 + # source://rdoc//lib/rdoc/tom_doc.rb#53 def add_post_processor; end # Public: Parses TomDoc from text @@ -12269,7 +12478,7 @@ class RDoc::TomDoc < ::RDoc::Markup::Parser # # Returns an RDoc::Markup::Document representing the TomDoc format. # - # source://rdoc//rdoc/tom_doc.rb#84 + # source://rdoc//lib/rdoc/tom_doc.rb#84 def parse(text); end # Internal: Extracts the Signature section's method signature @@ -12279,12 +12488,14 @@ class RDoc::TomDoc < ::RDoc::Markup::Parser # # Returns a String containing the signature and nil if not # - # source://rdoc//rdoc/tom_doc.rb#100 + # source://rdoc//lib/rdoc/tom_doc.rb#100 def signature(comment); end end end # A TopLevel context is a representation of the contents of a single file +# +# source://rdoc//lib/rdoc/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 @@ -12292,72 +12503,72 @@ class RDoc::TopLevel < ::RDoc::Context # # @return [TopLevel] a new instance of TopLevel # - # source://rdoc//rdoc/top_level.rb#43 + # source://rdoc//lib/rdoc/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//rdoc/top_level.rb#67 + # source://rdoc//lib/rdoc/top_level.rb#67 def ==(other); end # Absolute name of this file # - # source://rdoc//rdoc/top_level.rb#22 + # source://rdoc//lib/rdoc/top_level.rb#22 def absolute_name; end # Absolute name of this file # - # source://rdoc//rdoc/top_level.rb#22 + # source://rdoc//lib/rdoc/top_level.rb#22 def absolute_name=(_arg0); end # Adds +an_alias+ to +Object+ instead of +self+. # - # source://rdoc//rdoc/top_level.rb#76 + # source://rdoc//lib/rdoc/top_level.rb#76 def add_alias(an_alias); end # Adds +constant+ to +Object+ instead of +self+. # - # source://rdoc//rdoc/top_level.rb#85 + # source://rdoc//lib/rdoc/top_level.rb#85 def add_constant(constant); end # Adds +include+ to +Object+ instead of +self+. # - # source://rdoc//rdoc/top_level.rb#94 + # source://rdoc//lib/rdoc/top_level.rb#94 def add_include(include); end # Adds +method+ to +Object+ instead of +self+. # - # source://rdoc//rdoc/top_level.rb#103 + # source://rdoc//lib/rdoc/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//rdoc/top_level.rb#113 + # source://rdoc//lib/rdoc/top_level.rb#113 def add_to_classes_or_modules(mod); end # Base name of this file # - # source://rdoc//rdoc/top_level.rb#120 + # source://rdoc//lib/rdoc/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//rdoc/top_level.rb#29 + # source://rdoc//lib/rdoc/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//rdoc/generator/markup.rb#149 + # source://rdoc//lib/rdoc/generator/markup.rb#149 def cvs_url; end - # source://rdoc//rdoc/top_level.rb#31 + # source://rdoc//lib/rdoc/top_level.rb#31 def diagram; end - # source://rdoc//rdoc/top_level.rb#31 + # source://rdoc//lib/rdoc/top_level.rb#31 def diagram=(_arg0); end # Only a TopLevel that contains text file) will be displayed. See also @@ -12365,22 +12576,22 @@ class RDoc::TopLevel < ::RDoc::Context # # @return [Boolean] # - # source://rdoc//rdoc/top_level.rb#130 + # source://rdoc//lib/rdoc/top_level.rb#130 def display?; end # An RDoc::TopLevel is equal to another with the same relative_name # - # source://rdoc//rdoc/top_level.rb#67 + # source://rdoc//lib/rdoc/top_level.rb#67 def eql?(other); end # This TopLevel's File::Stat struct # - # source://rdoc//rdoc/top_level.rb#12 + # source://rdoc//lib/rdoc/top_level.rb#12 def file_stat; end # This TopLevel's File::Stat struct # - # source://rdoc//rdoc/top_level.rb#12 + # source://rdoc//lib/rdoc/top_level.rb#12 def file_stat=(_arg0); end # See RDoc::TopLevel::find_class_or_module @@ -12388,115 +12599,117 @@ class RDoc::TopLevel < ::RDoc::Context # TODO Why do we search through all classes/modules found, not just the # ones of this instance? # - # source://rdoc//rdoc/top_level.rb#140 + # source://rdoc//lib/rdoc/top_level.rb#140 def find_class_or_module(name); end # Finds a class or module named +symbol+ # - # source://rdoc//rdoc/top_level.rb#147 + # source://rdoc//lib/rdoc/top_level.rb#147 def find_local_symbol(symbol); end # Finds a module or class with +name+ # - # source://rdoc//rdoc/top_level.rb#154 + # source://rdoc//lib/rdoc/top_level.rb#154 def find_module_named(name); end # Returns the relative name of this file # - # source://rdoc//rdoc/top_level.rb#161 + # source://rdoc//lib/rdoc/top_level.rb#161 def full_name; end # An RDoc::TopLevel has the same hash as another with the same # relative_name # - # source://rdoc//rdoc/top_level.rb#169 + # source://rdoc//lib/rdoc/top_level.rb#169 def hash; end # URL for this with a +prefix+ # - # source://rdoc//rdoc/top_level.rb#176 + # source://rdoc//lib/rdoc/top_level.rb#176 def http_url(prefix); end - # source://rdoc//rdoc/top_level.rb#182 + # source://rdoc//lib/rdoc/top_level.rb#182 def inspect; end # Time this file was last modified, if known # - # source://rdoc//rdoc/top_level.rb#194 + # source://rdoc//lib/rdoc/top_level.rb#194 def last_modified; end # Dumps this TopLevel for use by ri. See also #marshal_load # - # source://rdoc//rdoc/top_level.rb#201 + # source://rdoc//lib/rdoc/top_level.rb#201 def marshal_dump; end # Loads this TopLevel from +array+. # - # source://rdoc//rdoc/top_level.rb#213 + # source://rdoc//lib/rdoc/top_level.rb#213 def marshal_load(array); end # Base name of this file # - # source://rdoc//rdoc/top_level.rb#120 + # source://rdoc//lib/rdoc/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//rdoc/top_level.rb#227 + # source://rdoc//lib/rdoc/top_level.rb#227 def object_class; end # Base name of this file without the extension # - # source://rdoc//rdoc/top_level.rb#238 + # source://rdoc//lib/rdoc/top_level.rb#238 def page_name; end # The parser class that processed this file # - # source://rdoc//rdoc/top_level.rb#36 + # source://rdoc//lib/rdoc/top_level.rb#36 def parser; end # Sets the parser for this toplevel context, also the store. # - # source://rdoc//rdoc/top_level.rb#58 + # source://rdoc//lib/rdoc/top_level.rb#58 def parser=(val); end # Path to this file for use with HTML generator output. # - # source://rdoc//rdoc/top_level.rb#248 + # source://rdoc//lib/rdoc/top_level.rb#248 def path; end - # source://rdoc//rdoc/top_level.rb#252 + # source://rdoc//lib/rdoc/top_level.rb#252 def pretty_print(q); end # Relative name of this file # - # source://rdoc//rdoc/top_level.rb#17 + # source://rdoc//lib/rdoc/top_level.rb#17 def relative_name; end # Relative name of this file # - # source://rdoc//rdoc/top_level.rb#17 + # source://rdoc//lib/rdoc/top_level.rb#17 def relative_name=(_arg0); end # Search record used by RDoc::Generator::JsonIndex # - # source://rdoc//rdoc/top_level.rb#266 + # source://rdoc//lib/rdoc/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//rdoc/top_level.rb#283 + # source://rdoc//lib/rdoc/top_level.rb#283 def text?; end - # source://rdoc//rdoc/top_level.rb#287 + # source://rdoc//lib/rdoc/top_level.rb#287 def to_s; end end # :stopdoc: +# +# source://rdoc//lib/rdoc/task.rb#347 module Rake extend ::FileUtils::StreamUtils_ extend ::FileUtils @@ -12504,5 +12717,5 @@ end # For backwards compatibility # -# source://rdoc//rdoc/task.rb#352 +# source://rdoc//lib/rdoc/task.rb#352 Rake::RDocTask = RDoc::Task diff --git a/sorbet/rbi/gems/regexp_parser@2.9.0.rbi b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi similarity index 99% rename from sorbet/rbi/gems/regexp_parser@2.9.0.rbi rename to sorbet/rbi/gems/regexp_parser@2.9.2.rbi index 34ad4f2a7..584c4553e 100644 --- a/sorbet/rbi/gems/regexp_parser@2.9.0.rbi +++ b/sorbet/rbi/gems/regexp_parser@2.9.2.rbi @@ -4,6 +4,7 @@ # 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 @@ -1132,7 +1133,7 @@ end # source://regexp_parser//lib/regexp_parser/expression/classes/keep.rb#2 module Regexp::Expression::Keep; end -# TOOD: in regexp_parser v3.0.0 this should possibly be a Subexpression +# 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 @@ -2368,7 +2369,7 @@ class Regexp::Parser # source://regexp_parser//lib/regexp_parser/parser.rb#262 def assign_effective_number(exp); end - # Assigns referenced expressions to refering expressions, e.g. if there is + # 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. # diff --git a/sorbet/rbi/gems/reline@0.4.2.rbi b/sorbet/rbi/gems/reline@0.4.2.rbi deleted file mode 100644 index 0564327ce..000000000 --- a/sorbet/rbi/gems/reline@0.4.2.rbi +++ /dev/null @@ -1,2338 +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#550 - def core; end - - # source://reline//lib/reline.rb#546 - def encoding_system_needs; end - - # source://reline//lib/reline.rb#527 - def insert_text(*args, &block); end - - # source://reline//lib/reline.rb#570 - def line_editor; end - - # source://reline//lib/reline.rb#566 - def ungetc(c); end - - # source://reline//lib/reline.rb#574 - def update_iogate; end - end -end - -# source://reline//lib/reline/ansi.rb#5 -class Reline::ANSI - class << self - # source://reline//lib/reline/ansi.rb#345 - def clear_screen; end - - # source://reline//lib/reline/ansi.rb#254 - def cursor_pos; end - - # source://reline//lib/reline/ansi.rb#360 - def deprep(otio); end - - # @return [Boolean] - # - # source://reline//lib/reline/ansi.rb#215 - def empty_buffer?; end - - # source://reline//lib/reline/ansi.rb#37 - def encoding; end - - # source://reline//lib/reline/ansi.rb#333 - def erase_after_cursor; end - - # source://reline//lib/reline/ansi.rb#237 - def get_screen_size; end - - # if the usage expects to wait indefinitely, use Float::INFINITY for timeout_second - # - # source://reline//lib/reline/ansi.rb#203 - def getc(timeout_second); end - - # source://reline//lib/reline/ansi.rb#176 - def getc_with_bracketed_paste(timeout_second); end - - # source://reline//lib/reline/ansi.rb#309 - def hide_cursor; end - - # @return [Boolean] - # - # source://reline//lib/reline/ansi.rb#211 - def in_pasting?; end - - # source://reline//lib/reline/ansi.rb#156 - def inner_getc(timeout_second); end - - # source://reline//lib/reline/ansi.rb#142 - def input=(val); end - - # source://reline//lib/reline/ansi.rb#289 - def move_cursor_column(x); end - - # source://reline//lib/reline/ansi.rb#301 - def move_cursor_down(x); end - - # source://reline//lib/reline/ansi.rb#293 - def move_cursor_up(x); end - - # source://reline//lib/reline/ansi.rb#147 - def output=(val); end - - # source://reline//lib/reline/ansi.rb#355 - def prep; end - - # source://reline//lib/reline/ansi.rb#226 - 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/ansi.rb#339 - def scroll_down(x); end - - # source://reline//lib/reline/ansi.rb#45 - def set_default_key_bindings(config, allow_terminfo: T.unsafe(nil)); end - - # source://reline//lib/reline/ansi.rb#67 - def set_default_key_bindings_ansi_cursor(config); end - - # source://reline//lib/reline/ansi.rb#106 - def set_default_key_bindings_comprehensive_list(config); end - - # source://reline//lib/reline/ansi.rb#89 - def set_default_key_bindings_terminfo(config); end - - # source://reline//lib/reline/ansi.rb#247 - def set_screen_size(rows, columns); end - - # source://reline//lib/reline/ansi.rb#351 - def set_winch_handler(&handler); end - - # source://reline//lib/reline/ansi.rb#321 - def show_cursor; end - - # source://reline//lib/reline/ansi.rb#222 - def ungetc(c); end - - # @return [Boolean] - # - # source://reline//lib/reline/ansi.rb#41 - def win?; end - - # source://reline//lib/reline/ansi.rb#151 - def with_raw_input; end - end -end - -# source://reline//lib/reline/ansi.rb#18 -Reline::ANSI::ANSI_CURSOR_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) - -# source://reline//lib/reline/ansi.rb#6 -Reline::ANSI::CAPNAME_KEY_BINDINGS = T.let(T.unsafe(nil), Hash) - -# source://reline//lib/reline/ansi.rb#175 -Reline::ANSI::END_BRACKETED_PASTE = T.let(T.unsafe(nil), String) - -# source://reline//lib/reline/ansi.rb#174 -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#50 - def initialize; end - - # source://reline//lib/reline/config.rb#172 - def add_default_key_binding(keystroke, target); end - - # source://reline//lib/reline/config.rb#168 - def add_default_key_binding_by_keymap(keymap, keystroke, target); end - - # source://reline//lib/reline/config.rb#160 - def add_oneshot_key_binding(keystroke, target); end - - # Returns the value of attribute autocompletion. - # - # source://reline//lib/reline/config.rb#48 - def autocompletion; end - - # Sets the attribute autocompletion - # - # @param value the value to set the attribute autocompletion to. - # - # source://reline//lib/reline/config.rb#48 - def autocompletion=(_arg0); end - - # source://reline//lib/reline/config.rb#342 - def bind_key(key, func_name); end - - # source://reline//lib/reline/config.rb#45 - def bind_tty_special_chars; end - - # source://reline//lib/reline/config.rb#45 - def bind_tty_special_chars=(_arg0); end - - # source://reline//lib/reline/config.rb#259 - def bind_variable(name, value); end - - # source://reline//lib/reline/config.rb#45 - def blink_matching_paren; end - - # source://reline//lib/reline/config.rb#45 - def blink_matching_paren=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def byte_oriented; end - - # source://reline//lib/reline/config.rb#45 - def byte_oriented=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def completion_ignore_case; end - - # source://reline//lib/reline/config.rb#45 - def completion_ignore_case=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def convert_meta; end - - # source://reline//lib/reline/config.rb#45 - def convert_meta=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def disable_completion; end - - # source://reline//lib/reline/config.rb#45 - def disable_completion=(_arg0); end - - # source://reline//lib/reline/config.rb#87 - def editing_mode; end - - # source://reline//lib/reline/config.rb#91 - def editing_mode=(val); end - - # @return [Boolean] - # - # source://reline//lib/reline/config.rb#95 - def editing_mode_is?(*val); end - - # source://reline//lib/reline/config.rb#45 - def emacs_mode_string; end - - # source://reline//lib/reline/config.rb#45 - def emacs_mode_string=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def enable_bracketed_paste; end - - # source://reline//lib/reline/config.rb#45 - def enable_bracketed_paste=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def enable_keypad; end - - # source://reline//lib/reline/config.rb#45 - def enable_keypad=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def expand_tilde; end - - # source://reline//lib/reline/config.rb#45 - def expand_tilde=(_arg0); end - - # source://reline//lib/reline/config.rb#229 - def handle_directive(directive, file, no); end - - # source://reline//lib/reline/config.rb#45 - def history_preserve_point; end - - # source://reline//lib/reline/config.rb#45 - def history_preserve_point=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def history_size; end - - # source://reline//lib/reline/config.rb#45 - def history_size=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def horizontal_scroll_mode; end - - # source://reline//lib/reline/config.rb#45 - def horizontal_scroll_mode=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def input_meta; end - - # source://reline//lib/reline/config.rb#45 - def input_meta=(_arg0); end - - # source://reline//lib/reline/config.rb#103 - def inputrc_path; end - - # source://reline//lib/reline/config.rb#45 - def isearch_terminators; end - - # source://reline//lib/reline/config.rb#45 - def isearch_terminators=(_arg0); end - - # source://reline//lib/reline/config.rb#152 - def key_bindings; end - - # source://reline//lib/reline/config.rb#356 - def key_notation_to_code(notation); end - - # source://reline//lib/reline/config.rb#99 - def keymap; end - - # source://reline//lib/reline/config.rb#45 - def keyseq_timeout; end - - # source://reline//lib/reline/config.rb#45 - def keyseq_timeout=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def mark_directories; end - - # source://reline//lib/reline/config.rb#45 - def mark_directories=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def mark_modified_lines; end - - # source://reline//lib/reline/config.rb#45 - def mark_modified_lines=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def mark_symlinked_directories; end - - # source://reline//lib/reline/config.rb#45 - def mark_symlinked_directories=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def match_hidden_files; end - - # source://reline//lib/reline/config.rb#45 - def match_hidden_files=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def meta_flag; end - - # source://reline//lib/reline/config.rb#45 - def meta_flag=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def output_meta; end - - # source://reline//lib/reline/config.rb#45 - def output_meta=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def page_completions; end - - # source://reline//lib/reline/config.rb#45 - def page_completions=(_arg0); end - - # source://reline//lib/reline/config.rb#390 - def parse_keyseq(str); end - - # source://reline//lib/reline/config.rb#45 - def prefer_visible_bell; end - - # source://reline//lib/reline/config.rb#45 - def prefer_visible_bell=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def print_completions_horizontally; end - - # source://reline//lib/reline/config.rb#45 - def print_completions_horizontally=(_arg0); end - - # source://reline//lib/reline/config.rb#133 - def read(file = T.unsafe(nil)); end - - # source://reline//lib/reline/config.rb#182 - def read_lines(lines, file = T.unsafe(nil)); end - - # source://reline//lib/reline/config.rb#76 - def reset; end - - # source://reline//lib/reline/config.rb#176 - def reset_default_key_bindings; end - - # source://reline//lib/reline/config.rb#164 - def reset_oneshot_key_bindings; end - - # source://reline//lib/reline/config.rb#337 - def retrieve_string(str); end - - # source://reline//lib/reline/config.rb#45 - def show_all_if_ambiguous; end - - # source://reline//lib/reline/config.rb#45 - def show_all_if_ambiguous=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def show_all_if_unmodified; end - - # source://reline//lib/reline/config.rb#45 - def show_all_if_unmodified=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def show_mode_in_prompt; end - - # source://reline//lib/reline/config.rb#45 - 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#45 - def vi_cmd_mode_string; end - - # source://reline//lib/reline/config.rb#45 - def vi_cmd_mode_string=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def vi_ins_mode_string; end - - # source://reline//lib/reline/config.rb#45 - def vi_ins_mode_string=(_arg0); end - - # source://reline//lib/reline/config.rb#45 - def visible_stats; end - - # source://reline//lib/reline/config.rb#45 - def visible_stats=(_arg0); end - - private - - # source://reline//lib/reline/config.rb#129 - def default_inputrc_path; end - - # @return [Boolean] - # - # source://reline//lib/reline/config.rb#398 - 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#43 -Reline::Config::VARIABLE_NAME_SYMBOLS = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline.rb#48 -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#76 - def initialize; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#170 - def add_dialog_proc(name_sym, p, context = T.unsafe(nil)); end - - # source://reline//lib/reline.rb#473 - def ambiguous_width; end - - # source://reline//lib/reline.rb#63 - def auto_indent_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#155 - def auto_indent_proc=(p); end - - # source://reline//lib/reline.rb#63 - def basic_quote_characters; end - - # source://reline//lib/reline.rb#112 - def basic_quote_characters=(v); end - - # source://reline//lib/reline.rb#63 - def basic_word_break_characters; end - - # source://reline//lib/reline.rb#104 - def basic_word_break_characters=(v); end - - # source://reline//lib/reline.rb#63 - def completer_quote_characters; end - - # source://reline//lib/reline.rb#116 - def completer_quote_characters=(v); end - - # source://reline//lib/reline.rb#63 - def completer_word_break_characters; end - - # source://reline//lib/reline.rb#108 - def completer_word_break_characters=(v); end - - # source://reline//lib/reline.rb#63 - def completion_append_character; end - - # source://reline//lib/reline.rb#92 - def completion_append_character=(val); end - - # source://reline//lib/reline.rb#132 - def completion_case_fold; end - - # source://reline//lib/reline.rb#128 - def completion_case_fold=(v); end - - # source://reline//lib/reline.rb#63 - def completion_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#140 - def completion_proc=(p); end - - # source://reline//lib/reline.rb#136 - def completion_quote_character; end - - # Returns the value of attribute config. - # - # source://reline//lib/reline.rb#65 - def config; end - - # Sets the attribute config - # - # @param value the value to set the attribute config to. - # - # source://reline//lib/reline.rb#65 - def config=(_arg0); end - - # source://reline//lib/reline.rb#180 - def dialog_proc(name_sym); end - - # source://reline//lib/reline.rb#63 - def dig_perfect_match_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#164 - def dig_perfect_match_proc=(p); end - - # source://reline//lib/reline.rb#204 - def emacs_editing_mode; end - - # @return [Boolean] - # - # source://reline//lib/reline.rb#213 - def emacs_editing_mode?; end - - # source://reline//lib/reline.rb#88 - def encoding; end - - # source://reline//lib/reline.rb#63 - def filename_quote_characters; end - - # source://reline//lib/reline.rb#120 - def filename_quote_characters=(v); end - - # source://reline//lib/reline.rb#217 - def get_screen_size; end - - # @raise [TypeError] - # - # source://reline//lib/reline.rb#184 - def input=(val); end - - # source://reline//lib/reline.rb#84 - def io_gate; end - - # Returns the value of attribute key_stroke. - # - # source://reline//lib/reline.rb#66 - 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#66 - def key_stroke=(_arg0); end - - # Returns the value of attribute last_incremental_search. - # - # source://reline//lib/reline.rb#68 - 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#68 - def last_incremental_search=(_arg0); end - - # Returns the value of attribute line_editor. - # - # source://reline//lib/reline.rb#67 - 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#67 - def line_editor=(_arg0); end - - # Returns the value of attribute output. - # - # source://reline//lib/reline.rb#69 - def output; end - - # @raise [TypeError] - # - # source://reline//lib/reline.rb#191 - def output=(val); end - - # source://reline//lib/reline.rb#63 - def output_modifier_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#145 - def output_modifier_proc=(p); end - - # source://reline//lib/reline.rb#63 - def pre_input_hook; end - - # source://reline//lib/reline.rb#160 - def pre_input_hook=(p); end - - # source://reline//lib/reline.rb#63 - def prompt_proc; end - - # @raise [ArgumentError] - # - # source://reline//lib/reline.rb#150 - def prompt_proc=(p); end - - # source://reline//lib/reline.rb#286 - def readline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil)); end - - # source://reline//lib/reline.rb#267 - def readmultiline(prompt = T.unsafe(nil), add_hist = T.unsafe(nil), &confirm_multiline_termination); end - - # source://reline//lib/reline.rb#63 - def special_prefixes; end - - # source://reline//lib/reline.rb#124 - def special_prefixes=(v); end - - # source://reline//lib/reline.rb#199 - def vi_editing_mode; end - - # @return [Boolean] - # - # source://reline//lib/reline.rb#209 - def vi_editing_mode?; end - - private - - # source://reline//lib/reline.rb#300 - def inner_readline(prompt, add_hist, multiline, &confirm_multiline_termination); end - - # source://reline//lib/reline.rb#478 - def may_req_ambiguous_char_width; end - - # source://reline//lib/reline.rb#431 - def read_2nd_character_of_key_sequence(keyseq_timeout, buffer, c, block); end - - # source://reline//lib/reline.rb#459 - def read_escaped_key(keyseq_timeout, c, block); end - - # GNU Readline waits for "keyseq-timeout" milliseconds to see if the ESC - # is followed by a character, and times out and treats it as a standalone - # ESC if the second character does not arrive. If the second character - # comes before timed out, it is treated as a modifier key with the - # meta-property of meta-key, so that it can be distinguished from - # multibyte characters with the 8th bit turned on. - # - # GNU Readline will wait for the 2nd character with "keyseq-timeout" - # milli-seconds but wait forever after 3rd characters. - # - # source://reline//lib/reline.rb#392 - def read_io(keyseq_timeout, &block); end -end - -# source://reline//lib/reline.rb#49 -Reline::Core::ATTR_READER_NAMES = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline.rb#265 -Reline::DEFAULT_DIALOG_CONTEXT = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline.rb#221 -Reline::DEFAULT_DIALOG_PROC_AUTOCOMPLETE = T.let(T.unsafe(nil), Proc) - -# 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/general_io.rb#3 -class Reline::GeneralIO - class << self - # source://reline//lib/reline/general_io.rb#88 - def clear_screen; end - - # source://reline//lib/reline/general_io.rb#63 - def cursor_pos; end - - # source://reline//lib/reline/general_io.rb#114 - def deprep(otio); end - - # source://reline//lib/reline/general_io.rb#13 - def encoding; end - - # source://reline//lib/reline/general_io.rb#82 - def erase_after_cursor; end - - # source://reline//lib/reline/general_io.rb#107 - def finish_pasting; end - - # source://reline//lib/reline/general_io.rb#59 - def get_screen_size; end - - # source://reline//lib/reline/general_io.rb#41 - def getc(_timeout_second); end - - # source://reline//lib/reline/general_io.rb#67 - def hide_cursor; end - - # @return [Boolean] - # - # source://reline//lib/reline/general_io.rb#99 - def in_pasting?; end - - # source://reline//lib/reline/general_io.rb#33 - def input=(val); end - - # source://reline//lib/reline/general_io.rb#73 - def move_cursor_column(val); end - - # source://reline//lib/reline/general_io.rb#79 - def move_cursor_down(val); end - - # source://reline//lib/reline/general_io.rb#76 - def move_cursor_up(val); end - - # source://reline//lib/reline/general_io.rb#111 - def prep; end - - # source://reline//lib/reline/general_io.rb#4 - def reset(encoding: T.unsafe(nil)); end - - # source://reline//lib/reline/general_io.rb#85 - def scroll_down(val); end - - # source://reline//lib/reline/general_io.rb#27 - def set_default_key_bindings(_); end - - # source://reline//lib/reline/general_io.rb#91 - def set_screen_size(rows, columns); end - - # source://reline//lib/reline/general_io.rb#94 - def set_winch_handler(&handler); end - - # source://reline//lib/reline/general_io.rb#70 - def show_cursor; end - - # source://reline//lib/reline/general_io.rb#103 - def start_pasting; end - - # source://reline//lib/reline/general_io.rb#55 - def ungetc(c); end - - # @return [Boolean] - # - # source://reline//lib/reline/general_io.rb#23 - def win?; end - - # source://reline//lib/reline/general_io.rb#37 - def with_raw_input; end - end -end - -# source://reline//lib/reline.rb#607 -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.rb#598 -Reline::IOGate = Reline::ANSI - -# source://reline//lib/reline.rb#20 -class Reline::Key < ::Struct - # @return [Boolean] - # - # source://reline//lib/reline.rb#21 - def ==(other); end - - # 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 combined_char - # - # @return [Object] the current value of combined_char - def combined_char; end - - # Sets the attribute combined_char - # - # @param value [Object] the value to set the attribute combined_char to. - # @return [Object] the newly set value - def combined_char=(_); end - - # @return [Boolean] - # - # source://reline//lib/reline.rb#21 - def match?(other); end - - # Returns the value of attribute with_meta - # - # @return [Object] the current value of with_meta - def with_meta; end - - # Sets the attribute with_meta - # - # @param value [Object] the value to set the attribute with_meta to. - # @return [Object] the newly set value - def with_meta=(_); 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#8 - def initialize; end - - # source://reline//lib/reline/key_actor/base.rb#12 - def default_key_bindings; end - - # source://reline//lib/reline/key_actor/base.rb#4 - def get_method(key); end - - # source://reline//lib/reline/key_actor/base.rb#16 - def reset_default_key_bindings; end -end - -# source://reline//lib/reline/key_actor/base.rb#2 -Reline::KeyActor::Base::MAPPING = T.let(T.unsafe(nil), Array) - -# 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::ViCommand::MAPPING = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/key_actor/vi_insert.rb#2 -Reline::KeyActor::ViInsert::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#6 - def initialize(config); end - - # source://reline//lib/reline/key_stroke.rb#10 - def compress_meta_key(ary); end - - # @return [Boolean] - # - # source://reline//lib/reline/key_stroke.rb#46 - def equal?(me, other); end - - # source://reline//lib/reline/key_stroke.rb#87 - def expand(input); end - - # source://reline//lib/reline/key_stroke.rb#71 - def match_status(input); end - - # @return [Boolean] - # - # source://reline//lib/reline/key_stroke.rb#22 - def start_with?(me, other); end - - private - - # source://reline//lib/reline/key_stroke.rb#145 - def key_mapping; end - - # returns match status of CSI/SS3 sequence and matched length - # - # source://reline//lib/reline/key_stroke.rb#116 - def match_unknown_escape_sequence(input); 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) - -# 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#57 - def initialize(config, encoding); end - - # source://reline//lib/reline/line_editor.rb#639 - 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#16 - 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#16 - def auto_indent_proc=(_arg0); end - - # Returns the value of attribute byte_pointer. - # - # source://reline//lib/reline/line_editor.rb#10 - def byte_pointer; end - - # source://reline//lib/reline/line_editor.rb#1839 - def byte_pointer=(val); end - - # source://reline//lib/reline/line_editor.rb#1610 - def call_completion_proc; end - - # source://reline//lib/reline/line_editor.rb#1618 - def call_completion_proc_with_checking_args(pre, target, post); end - - # Returns the value of attribute completion_append_character. - # - # source://reline//lib/reline/line_editor.rb#13 - 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#13 - def completion_append_character=(_arg0); end - - # Returns the value of attribute completion_proc. - # - # source://reline//lib/reline/line_editor.rb#12 - 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#12 - def completion_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#1757 - def confirm_multiline_termination; end - - # Returns the value of attribute confirm_multiline_termination_proc. - # - # source://reline//lib/reline/line_editor.rb#11 - 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#11 - def confirm_multiline_termination_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#1779 - def delete_text(start = T.unsafe(nil), length = T.unsafe(nil)); end - - # Returns the value of attribute dig_perfect_match_proc. - # - # source://reline//lib/reline/line_editor.rb#18 - 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#18 - def dig_perfect_match_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#1226 - def editing_mode; end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#252 - def eof?; end - - # source://reline//lib/reline/line_editor.rb#248 - def finalize; end - - # source://reline//lib/reline/line_editor.rb#1865 - def finish; end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#1861 - def finished?; end - - # source://reline//lib/reline/line_editor.rb#1535 - def input_key(key); end - - # source://reline//lib/reline/line_editor.rb#1767 - def insert_text(text); end - - # source://reline//lib/reline/line_editor.rb#63 - def io_gate; end - - # source://reline//lib/reline/line_editor.rb#932 - def just_move_cursor; end - - # TODO: undo - # TODO: Use "private alias_method" idiom after drop Ruby 2.5. - # - # source://reline//lib/reline/line_editor.rb#9 - def line; end - - # source://reline//lib/reline/line_editor.rb#318 - def multiline_off; end - - # source://reline//lib/reline/line_editor.rb#314 - def multiline_on; end - - # Sets the attribute output - # - # @param value the value to set the attribute output to. - # - # source://reline//lib/reline/line_editor.rb#19 - def output=(_arg0); end - - # Returns the value of attribute output_modifier_proc. - # - # source://reline//lib/reline/line_editor.rb#14 - 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#14 - def output_modifier_proc=(_arg0); end - - # Returns the value of attribute pre_input_hook. - # - # source://reline//lib/reline/line_editor.rb#17 - def pre_input_hook; end - - # Sets the attribute pre_input_hook - # - # @param value the value to set the attribute pre_input_hook to. - # - # source://reline//lib/reline/line_editor.rb#17 - def pre_input_hook=(_arg0); end - - # Returns the value of attribute prompt_proc. - # - # source://reline//lib/reline/line_editor.rb#15 - 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#15 - def prompt_proc=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#426 - def rerender; end - - # source://reline//lib/reline/line_editor.rb#420 - def rerender_all; end - - # source://reline//lib/reline/line_editor.rb#154 - def reset(prompt = T.unsafe(nil), encoding:); end - - # source://reline//lib/reline/line_editor.rb#296 - def reset_line; end - - # source://reline//lib/reline/line_editor.rb#256 - def reset_variables(prompt = T.unsafe(nil), encoding:); end - - # source://reline//lib/reline/line_editor.rb#185 - def resize; end - - # source://reline//lib/reline/line_editor.rb#1679 - def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#67 - def set_pasting_state(in_pasting); end - - # source://reline//lib/reline/line_editor.rb#225 - def set_signal_handlers; end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#71 - def simplified_rendering?; end - - # source://reline//lib/reline/line_editor.rb#1853 - def whole_buffer; end - - # source://reline//lib/reline/line_editor.rb#1846 - def whole_lines; end - - # source://reline//lib/reline/line_editor.rb#1418 - def wrap_method_call(method_symbol, method_obj, key, with_operator = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#1408 - def argumentable?(method_obj); end - - # source://reline//lib/reline/line_editor.rb#2030 - def backward_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2520 - def backward_delete_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2698 - def backward_kill_word(key); end - - # source://reline//lib/reline/line_editor.rb#2679 - def backward_word(key); end - - # source://reline//lib/reline/line_editor.rb#2054 - def beginning_of_line(key); end - - # source://reline//lib/reline/line_editor.rb#1877 - def byteinsert(str, byte_pointer, other); end - - # source://reline//lib/reline/line_editor.rb#1871 - def byteslice!(str, byte_pointer, size); end - - # source://reline//lib/reline/line_editor.rb#322 - def calculate_height_by_lines(lines, prompt); end - - # source://reline//lib/reline/line_editor.rb#340 - def calculate_height_by_width(width); end - - # source://reline//lib/reline/line_editor.rb#378 - def calculate_nearest_cursor(line_to_calc = T.unsafe(nil), cursor = T.unsafe(nil), started_from = T.unsafe(nil), byte_pointer = T.unsafe(nil), update = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#875 - def calculate_scroll_partial_screen(highest_in_all, cursor_y); end - - # source://reline//lib/reline/line_editor.rb#1884 - def calculate_width(str, allow_escape_code = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2745 - def capitalize_word(key); end - - # source://reline//lib/reline/line_editor.rb#81 - def check_mode_string; end - - # source://reline//lib/reline/line_editor.rb#101 - def check_multiline_prompt(buffer, force_recalc: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#859 - def clear_dialog(cursor_column); end - - # source://reline//lib/reline/line_editor.rb#868 - def clear_dialog_with_trap_key(cursor_column); end - - # source://reline//lib/reline/line_editor.rb#2665 - def clear_screen(key); end - - # source://reline//lib/reline/line_editor.rb#1205 - def clear_screen_buffer(prompt, prompt_list, prompt_width); end - - # source://reline//lib/reline/line_editor.rb#1280 - def complete(list, just_show_list = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1234 - def complete_internal_proc(list, is_menu); end - - # source://reline//lib/reline/line_editor.rb#2801 - def copy_for_vi(text); end - - # source://reline//lib/reline/line_editor.rb#2597 - def delete_char(key); end - - # source://reline//lib/reline/line_editor.rb#2624 - def delete_char_or_list(key); end - - # source://reline//lib/reline/line_editor.rb#671 - def dialog_range(dialog, dialog_y); end - - # source://reline//lib/reline/line_editor.rb#2757 - def downcase_word(key); end - - # source://reline//lib/reline/line_editor.rb#3100 - def ed_argument_digit(key); end - - # source://reline//lib/reline/line_editor.rb#2665 - def ed_clear_screen(key); end - - # source://reline//lib/reline/line_editor.rb#3012 - def ed_delete_next_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2930 - def ed_delete_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2698 - 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#1941 - def ed_digit(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#1941 - def ed_insert(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#2548 - def ed_kill_line(key); end - - # source://reline//lib/reline/line_editor.rb#2054 - def ed_move_to_beg(key); end - - # source://reline//lib/reline/line_editor.rb#2059 - def ed_move_to_end(key); end - - # source://reline//lib/reline/line_editor.rb#2487 - def ed_newline(key); end - - # source://reline//lib/reline/line_editor.rb#2010 - def ed_next_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2439 - def ed_next_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2030 - def ed_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2388 - def ed_prev_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2679 - def ed_prev_word(key); end - - # source://reline//lib/reline/line_editor.rb#1994 - def ed_quoted_insert(str, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2336 - def ed_search_next_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2289 - def ed_search_prev_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2710 - def ed_transpose_chars(key); end - - # source://reline//lib/reline/line_editor.rb#2730 - def ed_transpose_words(key); end - - # do nothing - # - # source://reline//lib/reline/line_editor.rb#1911 - def ed_unassigned(key); end - - # source://reline//lib/reline/line_editor.rb#2745 - def em_capitol_case(key); end - - # source://reline//lib/reline/line_editor.rb#2597 - def em_delete(key); end - - # source://reline//lib/reline/line_editor.rb#2688 - def em_delete_next_word(key); end - - # source://reline//lib/reline/line_editor.rb#2624 - def em_delete_or_list(key); end - - # source://reline//lib/reline/line_editor.rb#2520 - def em_delete_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3284 - 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#2586 - def em_kill_line(key); end - - # source://reline//lib/reline/line_editor.rb#2789 - def em_kill_region(key); end - - # source://reline//lib/reline/line_editor.rb#2757 - def em_lower_case(key); end - - # source://reline//lib/reline/line_editor.rb#3295 - def em_meta_next(key); end - - # source://reline//lib/reline/line_editor.rb#2670 - def em_next_word(key); end - - # source://reline//lib/reline/line_editor.rb#3279 - def em_set_mark(key); end - - # source://reline//lib/reline/line_editor.rb#2773 - def em_upper_case(key); end - - # source://reline//lib/reline/line_editor.rb#2636 - def em_yank(key); end - - # source://reline//lib/reline/line_editor.rb#2648 - def em_yank_pop(key); end - - # source://reline//lib/reline/line_editor.rb#2059 - def end_of_line(key); end - - # source://reline//lib/reline/line_editor.rb#3284 - def exchange_point_and_mark(key); end - - # source://reline//lib/reline/line_editor.rb#2010 - def forward_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2284 - def forward_search_history(key); end - - # source://reline//lib/reline/line_editor.rb#2670 - def forward_word(key); end - - # source://reline//lib/reline/line_editor.rb#2074 - def generate_searcher; end - - # source://reline//lib/reline/line_editor.rb#2289 - def history_search_backward(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2336 - def history_search_forward(key, arg: T.unsafe(nil)); end - - # @return [Boolean] - # - # source://reline//lib/reline/line_editor.rb#1412 - def inclusive?(method_obj); end - - # source://reline//lib/reline/line_editor.rb#2192 - def incremental_search_history(key); end - - # source://reline//lib/reline/line_editor.rb#332 - def insert_new_line(cursor_line, next_line); end - - # source://reline//lib/reline/line_editor.rb#1888 - def key_delete(key); end - - # source://reline//lib/reline/line_editor.rb#1896 - 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#2548 - 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#2586 - def kill_whole_line(key); end - - # source://reline//lib/reline/line_editor.rb#2688 - def kill_word(key); end - - # source://reline//lib/reline/line_editor.rb#1230 - def menu(target, list); end - - # source://reline//lib/reline/line_editor.rb#1182 - def modify_lines(before, force_recalc: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1324 - def move_completed_list(list, direction); end - - # source://reline//lib/reline/line_editor.rb#368 - def move_cursor_down(val); end - - # source://reline//lib/reline/line_editor.rb#359 - def move_cursor_up(val); end - - # source://reline//lib/reline/line_editor.rb#2439 - def next_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1495 - def normal_char(key); end - - # source://reline//lib/reline/line_editor.rb#658 - def padding_space_with_escape_sequences(str, width); end - - # source://reline//lib/reline/line_editor.rb#2388 - def previous_history(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1640 - def process_auto_indent; end - - # source://reline//lib/reline/line_editor.rb#1913 - def process_insert(force: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1438 - def process_key(key, method_symbol); end - - # source://reline//lib/reline/line_editor.rb#1994 - def quoted_insert(str, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#665 - def range_subtract(base_ranges, subtract_ranges); end - - # source://reline//lib/reline/line_editor.rb#649 - def render_dialog(cursor_column); end - - # source://reline//lib/reline/line_editor.rb#677 - def render_dialog_changes(changes, cursor_column); end - - # source://reline//lib/reline/line_editor.rb#1085 - def render_partial(prompt, prompt_width, line_to_render, this_started_from, with_control: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#1059 - def render_whole_lines(lines, prompt, prompt_width); end - - # source://reline//lib/reline/line_editor.rb#908 - def rerender_added_newline(prompt, prompt_width, prompt_list); end - - # source://reline//lib/reline/line_editor.rb#1004 - def rerender_all_lines; end - - # source://reline//lib/reline/line_editor.rb#960 - def rerender_changed_current_line; end - - # source://reline//lib/reline/line_editor.rb#2279 - def reverse_search_history(key); end - - # source://reline//lib/reline/line_editor.rb#1370 - def run_for_operators(key, method_symbol, &block); end - - # source://reline//lib/reline/line_editor.rb#348 - def scroll_down(val); end - - # source://reline//lib/reline/line_editor.rb#3168 - def search_next_char(key, arg, need_prev_char: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3225 - 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#1941 - def self_insert(key); end - - # source://reline//lib/reline/line_editor.rb#3279 - def set_mark(key); end - - # source://reline//lib/reline/line_editor.rb#1192 - def show_menu; end - - # source://reline//lib/reline/line_editor.rb#344 - def split_by_width(str, max_width); end - - # source://reline//lib/reline/line_editor.rb#2710 - def transpose_chars(key); end - - # source://reline//lib/reline/line_editor.rb#2730 - def transpose_words(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#2571 - def unix_line_discard(key); end - - # source://reline//lib/reline/line_editor.rb#2789 - def unix_word_rubout(key); end - - # source://reline//lib/reline/line_editor.rb#2773 - def upcase_word(key); end - - # source://reline//lib/reline/line_editor.rb#769 - def update_each_dialog(dialog, cursor_column); end - - # source://reline//lib/reline/line_editor.rb#2811 - def vi_add(key); end - - # source://reline//lib/reline/line_editor.rb#2925 - def vi_add_at_eol(key); end - - # source://reline//lib/reline/line_editor.rb#2951 - def vi_change_meta(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2816 - def vi_command_mode(key); end - - # source://reline//lib/reline/line_editor.rb#2969 - def vi_delete_meta(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2900 - def vi_delete_prev_char(key); end - - # source://reline//lib/reline/line_editor.rb#2881 - def vi_end_big_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2996 - def vi_end_of_transmission(key); end - - # source://reline//lib/reline/line_editor.rb#2842 - def vi_end_word(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2996 - def vi_eof_maybe(key); end - - # source://reline//lib/reline/line_editor.rb#2050 - def vi_first_print(key); end - - # source://reline//lib/reline/line_editor.rb#3054 - def vi_histedit(key); end - - # source://reline//lib/reline/line_editor.rb#2807 - def vi_insert(key); end - - # source://reline//lib/reline/line_editor.rb#2920 - def vi_insert_at_bol(key); end - - # source://reline//lib/reline/line_editor.rb#3265 - 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#2571 - def vi_kill_line_prev(key); end - - # source://reline//lib/reline/line_editor.rb#2996 - def vi_list_or_eof(key); end - - # source://reline//lib/reline/line_editor.rb#2816 - def vi_movement_mode(key); end - - # source://reline//lib/reline/line_editor.rb#2861 - def vi_next_big_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3160 - def vi_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2822 - def vi_next_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3088 - def vi_paste_next(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3076 - def vi_paste_prev(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2871 - def vi_prev_big_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3217 - def vi_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2832 - def vi_prev_word(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3132 - def vi_replace_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2284 - def vi_search_next(key); end - - # source://reline//lib/reline/line_editor.rb#2279 - def vi_search_prev(key); end - - # source://reline//lib/reline/line_editor.rb#3117 - def vi_to_column(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3031 - def vi_to_history_line(key); end - - # source://reline//lib/reline/line_editor.rb#3164 - def vi_to_next_char(key, arg: T.unsafe(nil), inclusive: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#3221 - def vi_to_prev_char(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2984 - def vi_yank(key, arg: T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#2946 - def vi_zero(key); end - - # source://reline//lib/reline/line_editor.rb#2636 - def yank(key); end - - # source://reline//lib/reline/line_editor.rb#2648 - def yank_pop(key); end -end - -# source://reline//lib/reline/line_editor.rb#51 -class Reline::LineEditor::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#44 -Reline::LineEditor::CompletionState::COMPLETION = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#46 -Reline::LineEditor::CompletionState::JOURNEY = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#45 -Reline::LineEditor::CompletionState::MENU = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#47 -Reline::LineEditor::CompletionState::MENU_WITH_PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#43 -Reline::LineEditor::CompletionState::NORMAL = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#48 -Reline::LineEditor::CompletionState::PERFECT_MATCH = T.let(T.unsafe(nil), Symbol) - -# source://reline//lib/reline/line_editor.rb#648 -Reline::LineEditor::DIALOG_DEFAULT_HEIGHT = T.let(T.unsafe(nil), Integer) - -# source://reline//lib/reline/line_editor.rb#592 -class Reline::LineEditor::Dialog - # @return [Dialog] a new instance of Dialog - # - # source://reline//lib/reline/line_editor.rb#596 - def initialize(name, config, proc_scope); end - - # source://reline//lib/reline/line_editor.rb#620 - def call(key); end - - # Returns the value of attribute column. - # - # source://reline//lib/reline/line_editor.rb#594 - def column; end - - # Sets the attribute column - # - # @param value the value to set the attribute column to. - # - # source://reline//lib/reline/line_editor.rb#594 - def column=(_arg0); end - - # Returns the value of attribute contents. - # - # source://reline//lib/reline/line_editor.rb#593 - def contents; end - - # source://reline//lib/reline/line_editor.rb#613 - def contents=(contents); end - - # Returns the value of attribute name. - # - # source://reline//lib/reline/line_editor.rb#593 - def name; end - - # Returns the value of attribute pointer. - # - # source://reline//lib/reline/line_editor.rb#594 - def pointer; end - - # Sets the attribute pointer - # - # @param value the value to set the attribute pointer to. - # - # source://reline//lib/reline/line_editor.rb#594 - def pointer=(_arg0); end - - # Returns the value of attribute scroll_top. - # - # source://reline//lib/reline/line_editor.rb#594 - 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#594 - def scroll_top=(_arg0); end - - # source://reline//lib/reline/line_editor.rb#605 - def set_cursor_pos(col, row); end - - # Returns the value of attribute trap_key. - # - # source://reline//lib/reline/line_editor.rb#594 - 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#594 - def trap_key=(_arg0); end - - # Returns the value of attribute vertical_offset. - # - # source://reline//lib/reline/line_editor.rb#594 - 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#594 - def vertical_offset=(_arg0); end - - # Returns the value of attribute width. - # - # source://reline//lib/reline/line_editor.rb#593 - def width; end - - # source://reline//lib/reline/line_editor.rb#609 - def width=(v); end -end - -# source://reline//lib/reline/line_editor.rb#515 -class Reline::LineEditor::DialogProcScope - # @return [DialogProcScope] a new instance of DialogProcScope - # - # source://reline//lib/reline/line_editor.rb#516 - def initialize(line_editor, config, proc_to_exec, context); end - - # source://reline//lib/reline/line_editor.rb#587 - def call; end - - # source://reline//lib/reline/line_editor.rb#532 - def call_completion_proc_with_checking_args(pre, target, post); end - - # source://reline//lib/reline/line_editor.rb#579 - def completion_journey_data; end - - # source://reline//lib/reline/line_editor.rb#583 - def config; end - - # source://reline//lib/reline/line_editor.rb#524 - def context; end - - # source://reline//lib/reline/line_editor.rb#557 - def cursor_pos; end - - # source://reline//lib/reline/line_editor.rb#540 - def dialog; end - - # source://reline//lib/reline/line_editor.rb#561 - def just_cursor_moving; end - - # source://reline//lib/reline/line_editor.rb#553 - def key; end - - # source://reline//lib/reline/line_editor.rb#573 - def preferred_dialog_height; end - - # source://reline//lib/reline/line_editor.rb#528 - def retrieve_completion_block(set_completion_quote_character = T.unsafe(nil)); end - - # source://reline//lib/reline/line_editor.rb#569 - def screen_height; end - - # source://reline//lib/reline/line_editor.rb#565 - def screen_width; end - - # source://reline//lib/reline/line_editor.rb#544 - def set_cursor_pos(col, row); end - - # source://reline//lib/reline/line_editor.rb#536 - def set_dialog(dialog); end - - # source://reline//lib/reline/line_editor.rb#549 - def set_key(key); end -end - -# source://reline//lib/reline/line_editor.rb#55 -Reline::LineEditor::MINIMUM_SCROLLBAR_HEIGHT = T.let(T.unsafe(nil), Integer) - -# source://reline//lib/reline/line_editor.rb#52 -class Reline::LineEditor::MenuInfo < ::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 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#54 -Reline::LineEditor::PROMPT_LIST_CACHE_TIMEOUT = T.let(T.unsafe(nil), Float) - -# source://reline//lib/reline/line_editor.rb#21 -Reline::LineEditor::VI_MOTIONS = T.let(T.unsafe(nil), Array) - -# source://reline//lib/reline/terminfo.rb#12 -module Reline::Terminfo - extend ::Fiddle - extend ::Fiddle::CParser - extend ::Fiddle::Importer - - class << self - # source://reline//lib/reline/terminfo.rb#32 - def curses_dl; end - - # source://reline//lib/reline/terminfo.rb#17 - def curses_dl_files; end - - # @return [Boolean] - # - # source://reline//lib/reline/terminfo.rb#151 - def enabled?; end - - # source://reline//lib/reline/terminfo.rb#80 - def setupterm(term, fildes); end - - # @raise [TerminfoError] - # - # source://reline//lib/reline/terminfo.rb#127 - def tigetflag(capname); end - - # @raise [TerminfoError] - # - # source://reline//lib/reline/terminfo.rb#139 - def tigetnum(capname); end - - # @raise [TerminfoError] - # - # source://reline//lib/reline/terminfo.rb#109 - def tigetstr(capname); end - - # source://reline//lib/reline/terminfo.rb#119 - def tiparm(str, *args); end - end -end - -# source://reline//lib/reline/terminfo.rb#103 -class Reline::Terminfo::StringWithTiparm < ::String - # for method chain - # - # source://reline//lib/reline/terminfo.rb#104 - def tiparm(*args); end -end - -# 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#105 - def calculate_width(str, allow_escape_code = T.unsafe(nil)); end - - # source://reline//lib/reline/unicode.rb#307 - def ed_transpose_words(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#267 - def em_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#287 - def em_big_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#218 - def em_forward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#238 - 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#85 - def get_mbchar_width(mbchar); end - - # source://reline//lib/reline/unicode.rb#204 - def get_next_mbchar_size(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#209 - def get_prev_mbchar_size(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#131 - def split_by_width(str, max_width, encoding = T.unsafe(nil)); end - - # Take a chunk of a String cut by width with escape sequences. - # - # source://reline//lib/reline/unicode.rb#175 - def take_range(str, start_col, max_width); end - - # source://reline//lib/reline/unicode.rb#596 - def vi_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#458 - def vi_big_backward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#428 - def vi_big_forward_end_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#408 - def vi_big_forward_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#628 - def vi_first_print(line); end - - # source://reline//lib/reline/unicode.rb#519 - def vi_forward_end_word(line, byte_pointer); end - - # source://reline//lib/reline/unicode.rb#478 - def vi_forward_word(line, byte_pointer, drop_terminate_spaces = T.unsafe(nil)); end - end -end - -# source://reline//lib/reline/unicode.rb#40 -Reline::Unicode::CSI_REGEXP = T.let(T.unsafe(nil), Regexp) - -# Ambiguous -# -# source://reline//lib/reline/unicode/east_asian_width.rb#158 -Reline::Unicode::EastAsianWidth::TYPE_A = T.let(T.unsafe(nil), Regexp) - -# Fullwidth -# -# source://reline//lib/reline/unicode/east_asian_width.rb#6 -Reline::Unicode::EastAsianWidth::TYPE_F = T.let(T.unsafe(nil), Regexp) - -# Halfwidth -# -# source://reline//lib/reline/unicode/east_asian_width.rb#13 -Reline::Unicode::EastAsianWidth::TYPE_H = T.let(T.unsafe(nil), Regexp) - -# Neutral -# -# source://reline//lib/reline/unicode/east_asian_width.rb#341 -Reline::Unicode::EastAsianWidth::TYPE_N = T.let(T.unsafe(nil), Regexp) - -# Narrow -# -# source://reline//lib/reline/unicode/east_asian_width.rb#147 -Reline::Unicode::EastAsianWidth::TYPE_NA = T.let(T.unsafe(nil), Regexp) - -# Wide -# -# source://reline//lib/reline/unicode/east_asian_width.rb#24 -Reline::Unicode::EastAsianWidth::TYPE_W = T.let(T.unsafe(nil), Regexp) - -# 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#57 -Reline::Unicode::HalfwidthDakutenHandakuten = T.let(T.unsafe(nil), Regexp) - -# source://reline//lib/reline/unicode.rb#59 -Reline::Unicode::MBCharWidthRE = T.let(T.unsafe(nil), Regexp) - -# 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/reline@0.5.9.rbi b/sorbet/rbi/gems/reline@0.5.9.rbi new file mode 100644 index 000000000..13fa313b6 --- /dev/null +++ b/sorbet/rbi/gems/reline@0.5.9.rbi @@ -0,0 +1,9 @@ +# typed: true + +# 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`. + + +# THIS IS AN EMPTY RBI FILE. +# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/rexml@3.2.6.rbi b/sorbet/rbi/gems/rexml@3.3.8.rbi similarity index 90% rename from sorbet/rbi/gems/rexml@3.2.6.rbi rename to sorbet/rbi/gems/rexml@3.3.8.rbi index c8d67b58d..cd650399a 100644 --- a/sorbet/rbi/gems/rexml@3.2.6.rbi +++ b/sorbet/rbi/gems/rexml@3.3.8.rbi @@ -1,9 +1,10 @@ -# typed: true +# typed: false # DO NOT EDIT MANUALLY # This is an autogenerated file for types exported from the `rexml` gem. # Please instead update this file by running `bin/tapioca gem rexml`. + # This class needs: # * Documentation # * Work! Not all types of attlists are intelligently parsed, so we just @@ -112,7 +113,7 @@ class REXML::Attribute # Returns a copy of this attribute # - # source://rexml//lib/rexml/attribute.rb#163 + # source://rexml//lib/rexml/attribute.rb#164 def clone; end # source://rexml//lib/rexml/attribute.rb#132 @@ -128,7 +129,7 @@ class REXML::Attribute # # Returns this attribute # - # source://rexml//lib/rexml/attribute.rb#171 + # source://rexml//lib/rexml/attribute.rb#172 def element=(element); end # Creates (and returns) a hash from both the name and value @@ -136,7 +137,7 @@ class REXML::Attribute # source://rexml//lib/rexml/attribute.rb#111 def hash; end - # source://rexml//lib/rexml/attribute.rb#197 + # source://rexml//lib/rexml/attribute.rb#198 def inspect; end # Returns the namespace URL, if defined, or nil otherwise @@ -164,13 +165,13 @@ class REXML::Attribute # source://rexml//lib/rexml/attribute.rb#95 def namespace(arg = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#193 + # source://rexml//lib/rexml/attribute.rb#194 def node_type; end # The normalized value of this attribute. That is, the attribute with # entities intact. # - # source://rexml//lib/rexml/attribute.rb#157 + # source://rexml//lib/rexml/attribute.rb#158 def normalized=(new_normalized); end # Returns the namespace of the attribute. @@ -190,7 +191,7 @@ class REXML::Attribute # # This method is usually not called directly. # - # source://rexml//lib/rexml/attribute.rb#184 + # source://rexml//lib/rexml/attribute.rb#185 def remove; end # Returns the attribute value, with entities replaced @@ -216,17 +217,17 @@ class REXML::Attribute # Writes this attribute (EG, puts 'key="value"' to the output) # - # source://rexml//lib/rexml/attribute.rb#189 + # source://rexml//lib/rexml/attribute.rb#190 def write(output, indent = T.unsafe(nil)); end - # source://rexml//lib/rexml/attribute.rb#203 + # source://rexml//lib/rexml/attribute.rb#204 def xpath; end end # A class that defines the set of Attributes of an Element and provides # operations for accessing elements in that set. # -# source://rexml//lib/rexml/element.rb#2141 +# source://rexml//lib/rexml/element.rb#2137 class REXML::Attributes < ::Hash # :call-seq: # new(element) @@ -247,7 +248,7 @@ class REXML::Attributes < ::Hash # # @return [Attributes] a new instance of Attributes # - # source://rexml//lib/rexml/element.rb#2160 + # source://rexml//lib/rexml/element.rb#2156 def initialize(element); end # :call-seq: @@ -270,7 +271,7 @@ class REXML::Attributes < ::Hash # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' # attrs.include?('baz') # => true # - # source://rexml//lib/rexml/element.rb#2537 + # source://rexml//lib/rexml/element.rb#2522 def <<(attribute); end # :call-seq: @@ -294,7 +295,7 @@ class REXML::Attributes < ::Hash # # Related: get_attribute (returns an \Attribute object). # - # source://rexml//lib/rexml/element.rb#2185 + # source://rexml//lib/rexml/element.rb#2181 def [](name); end # :call-seq: @@ -320,7 +321,7 @@ class REXML::Attributes < ::Hash # attrs['baz:att'] = nil # attrs.include?('baz:att') # => false # - # source://rexml//lib/rexml/element.rb#2369 + # source://rexml//lib/rexml/element.rb#2365 def []=(name, value); end # :call-seq: @@ -343,7 +344,7 @@ class REXML::Attributes < ::Hash # attrs.add(REXML::Attribute.new('baz', '3')) # => baz='3' # attrs.include?('baz') # => true # - # source://rexml//lib/rexml/element.rb#2537 + # source://rexml//lib/rexml/element.rb#2522 def add(attribute); end # :call-seq: @@ -374,7 +375,7 @@ class REXML::Attributes < ::Hash # attrs.delete(attr) # => # => # attrs.delete(attr) # => # => # - # source://rexml//lib/rexml/element.rb#2490 + # source://rexml//lib/rexml/element.rb#2475 def delete(attribute); end # :call-seq: @@ -393,7 +394,7 @@ class REXML::Attributes < ::Hash # attrs = ele.attributes # attrs.delete_all('att') # => [att='<'] # - # source://rexml//lib/rexml/element.rb#2559 + # source://rexml//lib/rexml/element.rb#2544 def delete_all(name); end # :call-seq: @@ -418,7 +419,7 @@ class REXML::Attributes < ::Hash # ["bar:att", "2"] # ["att", "<"] # - # source://rexml//lib/rexml/element.rb#2287 + # source://rexml//lib/rexml/element.rb#2283 def each; end # :call-seq: @@ -443,7 +444,7 @@ class REXML::Attributes < ::Hash # [REXML::Attribute, bar:att='2'] # [REXML::Attribute, att='<'] # - # source://rexml//lib/rexml/element.rb#2254 + # source://rexml//lib/rexml/element.rb#2250 def each_attribute; end # :call-seq: @@ -465,7 +466,7 @@ class REXML::Attributes < ::Hash # attrs.get_attribute('att') # => att='<' # attrs.get_attribute('nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#2313 + # source://rexml//lib/rexml/element.rb#2309 def get_attribute(name); end # :call-seq: @@ -485,7 +486,7 @@ class REXML::Attributes < ::Hash # attrs.get_attribute_ns('http://foo', 'att') # => foo:att='1' # attrs.get_attribute_ns('http://foo', 'nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#2585 + # source://rexml//lib/rexml/element.rb#2570 def get_attribute_ns(namespace, name); end # :call-seq: @@ -502,7 +503,7 @@ class REXML::Attributes < ::Hash # ele = d.root.elements['//ele'] # => # ele.attributes.length # => 3 # - # source://rexml//lib/rexml/element.rb#2225 + # source://rexml//lib/rexml/element.rb#2221 def length; end # :call-seq: @@ -514,7 +515,7 @@ class REXML::Attributes < ::Hash # d = REXML::Document.new(xml_string) # d.root.attributes.namespaces # => {"xmlns"=>"foo", "x"=>"bar", "y"=>"twee"} # - # source://rexml//lib/rexml/element.rb#2446 + # source://rexml//lib/rexml/element.rb#2431 def namespaces; end # :call-seq: @@ -528,7 +529,7 @@ class REXML::Attributes < ::Hash # d = REXML::Document.new(xml_string) # d.root.attributes.prefixes # => ["x", "y"] # - # source://rexml//lib/rexml/element.rb#2421 + # source://rexml//lib/rexml/element.rb#2406 def prefixes; end # :call-seq: @@ -545,7 +546,7 @@ class REXML::Attributes < ::Hash # ele = d.root.elements['//ele'] # => # ele.attributes.length # => 3 # - # source://rexml//lib/rexml/element.rb#2225 + # source://rexml//lib/rexml/element.rb#2221 def size; end # :call-seq: @@ -564,7 +565,7 @@ class REXML::Attributes < ::Hash # attrs = ele.attributes.to_a # => [foo:att='1', bar:att='2', att='<'] # attrs.first.class # => REXML::Attribute # - # source://rexml//lib/rexml/element.rb#2207 + # source://rexml//lib/rexml/element.rb#2203 def to_a; end end @@ -1037,7 +1038,7 @@ class REXML::Document < ::REXML::Element # d.add(REXML::Element.new('foo')) # d.to_s # => "" # - # source://rexml//lib/rexml/document.rb#170 + # source://rexml//lib/rexml/document.rb#172 def <<(child); end # :call-seq: @@ -1074,7 +1075,7 @@ class REXML::Document < ::REXML::Element # d.add(REXML::Element.new('foo')) # d.to_s # => "" # - # source://rexml//lib/rexml/document.rb#170 + # source://rexml//lib/rexml/document.rb#172 def add(child); end # :call-seq: @@ -1084,7 +1085,7 @@ class REXML::Document < ::REXML::Element # # REXML::Element.add_element(name_or_element, attributes) # - # source://rexml//lib/rexml/document.rb#209 + # source://rexml//lib/rexml/document.rb#211 def add_element(arg = T.unsafe(nil), arg2 = T.unsafe(nil)); end # :call-seq: @@ -1093,7 +1094,7 @@ class REXML::Document < ::REXML::Element # Returns the new document resulting from executing # Document.new(self). See Document.new. # - # source://rexml//lib/rexml/document.rb#120 + # source://rexml//lib/rexml/document.rb#122 def clone; end # :call-seq: @@ -1106,10 +1107,10 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.doctype.class # => nil # - # source://rexml//lib/rexml/document.rb#241 + # source://rexml//lib/rexml/document.rb#243 def doctype; end - # source://rexml//lib/rexml/document.rb#442 + # source://rexml//lib/rexml/document.rb#446 def document; end # :call-seq: @@ -1122,20 +1123,39 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.encoding # => "UTF-8" # - # source://rexml//lib/rexml/document.rb#290 + # source://rexml//lib/rexml/document.rb#292 def encoding; end # Returns the value of attribute entity_expansion_count. # - # source://rexml//lib/rexml/document.rb#433 + # source://rexml//lib/rexml/document.rb#435 def entity_expansion_count; end + # Sets the attribute entity_expansion_limit + # + # @param value the value to set the attribute entity_expansion_limit to. + # + # source://rexml//lib/rexml/document.rb#436 + def entity_expansion_limit=(_arg0); end + + # Returns the value of attribute entity_expansion_text_limit. + # + # source://rexml//lib/rexml/document.rb#437 + def entity_expansion_text_limit; end + + # Sets the attribute entity_expansion_text_limit + # + # @param value the value to set the attribute entity_expansion_text_limit to. + # + # source://rexml//lib/rexml/document.rb#437 + def entity_expansion_text_limit=(_arg0); end + # :call-seq: # expanded_name -> empty_string # # Returns an empty string. # - # source://rexml//lib/rexml/document.rb#129 + # source://rexml//lib/rexml/document.rb#131 def expanded_name; end # :call-seq: @@ -1145,7 +1165,7 @@ class REXML::Document < ::REXML::Element # d = doc_type # d ? d.name : "UNDEFINED" # - # source://rexml//lib/rexml/document.rb#129 + # source://rexml//lib/rexml/document.rb#131 def name; end # :call-seq: @@ -1153,10 +1173,10 @@ class REXML::Document < ::REXML::Element # # Returns the symbol +:document+. # - # source://rexml//lib/rexml/document.rb#110 + # source://rexml//lib/rexml/document.rb#112 def node_type; end - # source://rexml//lib/rexml/document.rb#435 + # source://rexml//lib/rexml/document.rb#439 def record_entity_expansion; end # :call-seq: @@ -1169,7 +1189,7 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.root # => nil # - # source://rexml//lib/rexml/document.rb#225 + # source://rexml//lib/rexml/document.rb#227 def root; end # :call-seq: @@ -1185,7 +1205,7 @@ class REXML::Document < ::REXML::Element # # @return [Boolean] # - # source://rexml//lib/rexml/document.rb#305 + # source://rexml//lib/rexml/document.rb#307 def stand_alone?; end # :call-seq: @@ -1199,7 +1219,7 @@ class REXML::Document < ::REXML::Element # d = REXML::Document.new('') # d.version # => "1.0" # - # source://rexml//lib/rexml/document.rb#275 + # source://rexml//lib/rexml/document.rb#277 def version; end # :call-seq: @@ -1258,7 +1278,7 @@ class REXML::Document < ::REXML::Element # instead of encoding in XML declaration. # Defaults to nil. It means encoding in XML declaration is used. # - # source://rexml//lib/rexml/document.rb#365 + # source://rexml//lib/rexml/document.rb#367 def write(*arguments); end # :call-seq: @@ -1274,12 +1294,12 @@ class REXML::Document < ::REXML::Element # d.xml_decl.class # => REXML::XMLDecl # d.xml_decl.to_s # => "" # - # source://rexml//lib/rexml/document.rb#258 + # source://rexml//lib/rexml/document.rb#260 def xml_decl; end private - # source://rexml//lib/rexml/document.rb#447 + # source://rexml//lib/rexml/document.rb#451 def build(source); end class << self @@ -1287,31 +1307,31 @@ class REXML::Document < ::REXML::Element # # Deprecated. Use REXML::Security.entity_expansion_limit= instead. # - # source://rexml//lib/rexml/document.rb#415 + # source://rexml//lib/rexml/document.rb#417 def entity_expansion_limit; end # Set the entity expansion limit. By default the limit is set to 10000. # # Deprecated. Use REXML::Security.entity_expansion_limit= instead. # - # source://rexml//lib/rexml/document.rb#408 + # source://rexml//lib/rexml/document.rb#410 def entity_expansion_limit=(val); end # Get the entity expansion limit. By default the limit is set to 10240. # # Deprecated. Use REXML::Security.entity_expansion_text_limit instead. # - # source://rexml//lib/rexml/document.rb#429 + # source://rexml//lib/rexml/document.rb#431 def entity_expansion_text_limit; end # Set the entity expansion limit. By default the limit is set to 10240. # # Deprecated. Use REXML::Security.entity_expansion_text_limit= instead. # - # source://rexml//lib/rexml/document.rb#422 + # source://rexml//lib/rexml/document.rb#424 def entity_expansion_text_limit=(val); end - # source://rexml//lib/rexml/document.rb#401 + # source://rexml//lib/rexml/document.rb#403 def parse_stream(source, listener); end end end @@ -1577,7 +1597,7 @@ end # #attributes:: Returns the REXML::Attributes object for the element. # #context:: Returns or sets the context hash for the element. # -# source://rexml//lib/rexml/element.rb#279 +# source://rexml//lib/rexml/element.rb#271 class REXML::Element < ::REXML::Parent include ::REXML::XMLTokens include ::REXML::Namespace @@ -1620,7 +1640,7 @@ class REXML::Element < ::REXML::Parent # # @return [Element] a new instance of Element # - # source://rexml//lib/rexml/element.rb#327 + # source://rexml//lib/rexml/element.rb#319 def initialize(arg = T.unsafe(nil), parent = T.unsafe(nil), context = T.unsafe(nil)); end # :call-seq: @@ -1662,7 +1682,7 @@ class REXML::Element < ::REXML::Parent # root[:attr] # => "value" # root[:nosuch] # => nil # - # source://rexml//lib/rexml/element.rb#1245 + # source://rexml//lib/rexml/element.rb#1246 def [](name_or_index); end # :call-seq: @@ -1691,7 +1711,7 @@ class REXML::Element < ::REXML::Parent # e.add_attribute(a) # => attr='VALUE' # e['attr'] # => "VALUE" # - # source://rexml//lib/rexml/element.rb#1349 + # source://rexml//lib/rexml/element.rb#1345 def add_attribute(key, value = T.unsafe(nil)); end # :call-seq: @@ -1717,7 +1737,7 @@ class REXML::Element < ::REXML::Parent # a = [['foo' => 'bar'], ['baz' => 'bat']] # e.add_attributes(a) # - # source://rexml//lib/rexml/element.rb#1380 + # source://rexml//lib/rexml/element.rb#1376 def add_attributes(hash); end # :call-seq: @@ -1754,7 +1774,7 @@ class REXML::Element < ::REXML::Parent # e0.add_element(e1, {'bat' => '0', 'bam' => '1'}) # e0[1] # => # - # source://rexml//lib/rexml/element.rb#731 + # source://rexml//lib/rexml/element.rb#732 def add_element(element, attrs = T.unsafe(nil)); end # :call-seq: @@ -1775,7 +1795,7 @@ class REXML::Element < ::REXML::Parent # e.add_namespace('baz', 'bat') # e.namespaces # => {"xmlns"=>"bar", "baz"=>"bat"} # - # source://rexml//lib/rexml/element.rb#654 + # source://rexml//lib/rexml/element.rb#655 def add_namespace(prefix, uri = T.unsafe(nil)); end # :call-seq: @@ -1817,7 +1837,7 @@ class REXML::Element < ::REXML::Parent # a.add_text(REXML::Text.new('baz')) # a.to_a # => ["foo", , "bar", "baz", "baz"] # - # source://rexml//lib/rexml/element.rb#1146 + # source://rexml//lib/rexml/element.rb#1147 def add_text(text); end # :call-seq: @@ -1849,13 +1869,13 @@ class REXML::Element < ::REXML::Parent # document.root.attribute("x") # => x='x' # document.root.attribute("x", "a") # => a:x='a:x' # - # source://rexml//lib/rexml/element.rb#1286 + # source://rexml//lib/rexml/element.rb#1287 def attribute(name, namespace = T.unsafe(nil)); end # Mechanisms for accessing attributes and child elements of this # element. # - # source://rexml//lib/rexml/element.rb#286 + # source://rexml//lib/rexml/element.rb#278 def attributes; end # :call-seq: @@ -1874,7 +1894,7 @@ class REXML::Element < ::REXML::Parent # cds.frozen? # => true # cds.map {|cd| cd.class } # => [REXML::CData, REXML::CData] # - # source://rexml//lib/rexml/element.rb#1424 + # source://rexml//lib/rexml/element.rb#1420 def cdatas; end # :call-seq: @@ -1887,7 +1907,7 @@ class REXML::Element < ::REXML::Parent # e.add_attributes({'bar' => 0, 'baz' => 1}) # e.clone # => # - # source://rexml//lib/rexml/element.rb#391 + # source://rexml//lib/rexml/element.rb#383 def clone; end # :call-seq: @@ -1907,19 +1927,19 @@ class REXML::Element < ::REXML::Parent # cs.map {|c| c.class } # => [REXML::Comment, REXML::Comment] # cs.map {|c| c.to_s } # => ["foo", "bar"] # - # source://rexml//lib/rexml/element.rb#1445 + # source://rexml//lib/rexml/element.rb#1441 def comments; end # The context holds information about the processing environment, such as # whitespace handling. # - # source://rexml//lib/rexml/element.rb#289 + # source://rexml//lib/rexml/element.rb#281 def context; end # The context holds information about the processing environment, such as # whitespace handling. # - # source://rexml//lib/rexml/element.rb#289 + # source://rexml//lib/rexml/element.rb#281 def context=(_arg0); end # :call-seq: @@ -1933,7 +1953,7 @@ class REXML::Element < ::REXML::Parent # e.delete_attribute('bar') # => # e.delete_attribute('bar') # => nil # - # source://rexml//lib/rexml/element.rb#1399 + # source://rexml//lib/rexml/element.rb#1395 def delete_attribute(key); end # :call-seq: @@ -1973,7 +1993,7 @@ class REXML::Element < ::REXML::Parent # a.delete_element('//c') # => # a.delete_element('//c') # => nil # - # source://rexml//lib/rexml/element.rb#777 + # source://rexml//lib/rexml/element.rb#778 def delete_element(element); end # :call-seq: @@ -1998,7 +2018,7 @@ class REXML::Element < ::REXML::Parent # d.root.delete_namespace('nosuch') # d.to_s # => "" # - # source://rexml//lib/rexml/element.rb#686 + # source://rexml//lib/rexml/element.rb#687 def delete_namespace(namespace = T.unsafe(nil)); end # :call-seq: @@ -2022,7 +2042,7 @@ class REXML::Element < ::REXML::Parent # # Related: #root, #root_node. # - # source://rexml//lib/rexml/element.rb#478 + # source://rexml//lib/rexml/element.rb#475 def document; end # :call-seq: @@ -2041,7 +2061,7 @@ class REXML::Element < ::REXML::Parent # ... # # - # source://rexml//lib/rexml/element.rb#929 + # source://rexml//lib/rexml/element.rb#930 def each_element(xpath = T.unsafe(nil), &block); end # :call-seq: @@ -2093,7 +2113,7 @@ class REXML::Element < ::REXML::Parent # # # - # source://rexml//lib/rexml/element.rb#846 + # source://rexml//lib/rexml/element.rb#847 def each_element_with_attribute(key, value = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end # :call-seq: @@ -2143,13 +2163,13 @@ class REXML::Element < ::REXML::Parent # # ... # - # source://rexml//lib/rexml/element.rb#903 + # source://rexml//lib/rexml/element.rb#904 def each_element_with_text(text = T.unsafe(nil), max = T.unsafe(nil), name = T.unsafe(nil), &block); end # Mechanisms for accessing attributes and child elements of this # element. # - # source://rexml//lib/rexml/element.rb#286 + # source://rexml//lib/rexml/element.rb#278 def elements; end # :call-seq: @@ -2167,7 +2187,7 @@ class REXML::Element < ::REXML::Parent # d = REXML::Document.new(xml_string) # d.root.get_elements('//a') # => [ ... , ] # - # source://rexml//lib/rexml/element.rb#948 + # source://rexml//lib/rexml/element.rb#949 def get_elements(xpath); end # :call-seq: @@ -2187,7 +2207,7 @@ class REXML::Element < ::REXML::Parent # # d.root.get_text(1) # => "this is bold!" # - # source://rexml//lib/rexml/element.rb#1052 + # source://rexml//lib/rexml/element.rb#1053 def get_text(path = T.unsafe(nil)); end # :call-seq: @@ -2202,7 +2222,7 @@ class REXML::Element < ::REXML::Parent # # @return [Boolean] # - # source://rexml//lib/rexml/element.rb#1319 + # source://rexml//lib/rexml/element.rb#1315 def has_attributes?; end # :call-seq: @@ -2219,7 +2239,7 @@ class REXML::Element < ::REXML::Parent # # @return [Boolean] # - # source://rexml//lib/rexml/element.rb#793 + # source://rexml//lib/rexml/element.rb#794 def has_elements?; end # :call-seq: @@ -2236,7 +2256,7 @@ class REXML::Element < ::REXML::Parent # # @return [Boolean] # - # source://rexml//lib/rexml/element.rb#1001 + # source://rexml//lib/rexml/element.rb#1002 def has_text?; end # :call-seq: @@ -2246,7 +2266,7 @@ class REXML::Element < ::REXML::Parent # # See {Element Context}[../doc/rexml/context_rdoc.html]. # - # source://rexml//lib/rexml/element.rb#516 + # source://rexml//lib/rexml/element.rb#513 def ignore_whitespace_nodes; end # :call-seq: @@ -2270,7 +2290,7 @@ class REXML::Element < ::REXML::Parent # e.add_element(REXML::Element.new('baz')) # e.inspect # => " ... " # - # source://rexml//lib/rexml/element.rb#366 + # source://rexml//lib/rexml/element.rb#358 def inspect; end # :call-seq: @@ -2290,7 +2310,7 @@ class REXML::Element < ::REXML::Parent # is.map {|i| i.class } # => [REXML::Instruction, REXML::Instruction] # is.map {|i| i.to_s } # => ["", ""] # - # source://rexml//lib/rexml/element.rb#1466 + # source://rexml//lib/rexml/element.rb#1462 def instructions; end # :call-seq: @@ -2313,7 +2333,7 @@ class REXML::Element < ::REXML::Parent # b.namespace('y') # => "2" # b.namespace('nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#621 + # source://rexml//lib/rexml/element.rb#618 def namespace(prefix = T.unsafe(nil)); end # :call-seq: @@ -2335,7 +2355,7 @@ class REXML::Element < ::REXML::Parent # d.elements['//b'].namespaces # => {"x"=>"1", "y"=>"2"} # d.elements['//c'].namespaces # => {"x"=>"1", "y"=>"2", "z"=>"3"} # - # source://rexml//lib/rexml/element.rb#594 + # source://rexml//lib/rexml/element.rb#591 def namespaces; end # :call-seq: @@ -2348,7 +2368,7 @@ class REXML::Element < ::REXML::Parent # d.root.elements['b'].next_element #-> # d.root.elements['c'].next_element #-> nil # - # source://rexml//lib/rexml/element.rb#962 + # source://rexml//lib/rexml/element.rb#963 def next_element; end # :call-seq: @@ -2360,7 +2380,7 @@ class REXML::Element < ::REXML::Parent # a = d.root # => # a.node_type # => :element # - # source://rexml//lib/rexml/element.rb#1167 + # source://rexml//lib/rexml/element.rb#1168 def node_type; end # :call-seq: @@ -2382,7 +2402,7 @@ class REXML::Element < ::REXML::Parent # d.elements['//b'].prefixes # => ["x", "y"] # d.elements['//c'].prefixes # => ["x", "y", "z"] # - # source://rexml//lib/rexml/element.rb#568 + # source://rexml//lib/rexml/element.rb#565 def prefixes; end # :call-seq: @@ -2395,7 +2415,7 @@ class REXML::Element < ::REXML::Parent # d.root.elements['c'].previous_element #-> # d.root.elements['b'].previous_element #-> nil # - # source://rexml//lib/rexml/element.rb#978 + # source://rexml//lib/rexml/element.rb#979 def previous_element; end # :call-seq: @@ -2408,7 +2428,7 @@ class REXML::Element < ::REXML::Parent # The evaluation is tested against +expanded_name+, and so is namespace # sensitive. # - # source://rexml//lib/rexml/element.rb#536 + # source://rexml//lib/rexml/element.rb#533 def raw; end # :call-seq: @@ -2428,7 +2448,7 @@ class REXML::Element < ::REXML::Parent # # Related: #root_node, #document. # - # source://rexml//lib/rexml/element.rb#451 + # source://rexml//lib/rexml/element.rb#443 def root; end # :call-seq: @@ -2466,7 +2486,7 @@ class REXML::Element < ::REXML::Parent # # Related: #root, #document. # - # source://rexml//lib/rexml/element.rb#430 + # source://rexml//lib/rexml/element.rb#422 def root_node; end # :call-seq: @@ -2493,7 +2513,7 @@ class REXML::Element < ::REXML::Parent # Note also that the text note is retrieved by method get_text, # and so is always normalized text. # - # source://rexml//lib/rexml/element.rb#1029 + # source://rexml//lib/rexml/element.rb#1030 def text(path = T.unsafe(nil)); end # :call-seq: @@ -2521,7 +2541,7 @@ class REXML::Element < ::REXML::Parent # # d.root.text = nil #-> '' # - # source://rexml//lib/rexml/element.rb#1088 + # source://rexml//lib/rexml/element.rb#1089 def text=(text); end # :call-seq: @@ -2536,7 +2556,7 @@ class REXML::Element < ::REXML::Parent # ts.map {|t| t.class } # => [REXML::Text, REXML::Text] # ts.map {|t| t.to_s } # => ["text", "more"] # - # source://rexml//lib/rexml/element.rb#1482 + # source://rexml//lib/rexml/element.rb#1478 def texts; end # :call-seq: @@ -2550,7 +2570,7 @@ class REXML::Element < ::REXML::Parent # The evaluation is tested against the element's +expanded_name+, # and so is namespace-sensitive. # - # source://rexml//lib/rexml/element.rb#493 + # source://rexml//lib/rexml/element.rb#490 def whitespace; end # == DEPRECATED @@ -2576,7 +2596,7 @@ class REXML::Element < ::REXML::Parent # doc.write( out ) #-> doc is written to the string 'out' # doc.write( $stdout ) #-> doc written to the console # - # source://rexml//lib/rexml/element.rb#1508 + # source://rexml//lib/rexml/element.rb#1504 def write(output = T.unsafe(nil), indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end # :call-seq: @@ -2599,17 +2619,17 @@ class REXML::Element < ::REXML::Parent # e = REXML::Element.new('foo') # e.xpath # => "foo" # - # source://rexml//lib/rexml/element.rb#1191 + # source://rexml//lib/rexml/element.rb#1192 def xpath; end private - # source://rexml//lib/rexml/element.rb#1525 + # source://rexml//lib/rexml/element.rb#1521 def __to_xpath_helper(node); end # A private helper method # - # source://rexml//lib/rexml/element.rb#1540 + # source://rexml//lib/rexml/element.rb#1536 def each_with_something(test, max = T.unsafe(nil), name = T.unsafe(nil)); end end @@ -2663,7 +2683,7 @@ end # elements = d.root.elements # elements # => # ... > # -# source://rexml//lib/rexml/element.rb#1595 +# source://rexml//lib/rexml/element.rb#1591 class REXML::Elements include ::Enumerable @@ -2680,7 +2700,7 @@ class REXML::Elements # # @return [Elements] a new instance of Elements # - # source://rexml//lib/rexml/element.rb#1608 + # source://rexml//lib/rexml/element.rb#1604 def initialize(parent); end # :call-seq: @@ -2745,7 +2765,7 @@ class REXML::Elements # element.parent # => ... # element.context # => {:raw=>:all} # - # source://rexml//lib/rexml/element.rb#1925 + # source://rexml//lib/rexml/element.rb#1921 def <<(element = T.unsafe(nil)); end # :call-seq: @@ -2801,7 +2821,7 @@ class REXML::Elements # eles[4, 'book'] # => ... # eles[5, 'book'] # => nil # - # source://rexml//lib/rexml/element.rb#1680 + # source://rexml//lib/rexml/element.rb#1676 def [](index, name = T.unsafe(nil)); end # :call-seq: @@ -2840,7 +2860,7 @@ class REXML::Elements # eles[50] = REXML::Text.new('bar') # => "bar" # eles.size # => 5 # - # source://rexml//lib/rexml/element.rb#1735 + # source://rexml//lib/rexml/element.rb#1731 def []=(index, element); end # :call-seq: @@ -2905,7 +2925,7 @@ class REXML::Elements # element.parent # => ... # element.context # => {:raw=>:all} # - # source://rexml//lib/rexml/element.rb#1925 + # source://rexml//lib/rexml/element.rb#1921 def add(element = T.unsafe(nil)); end # :call-seq: @@ -2925,7 +2945,7 @@ class REXML::Elements # xpath = '//book [@category="web"]' # elements.collect(xpath) {|element| element.size } # => [17, 9] # - # source://rexml//lib/rexml/element.rb#1988 + # source://rexml//lib/rexml/element.rb#1984 def collect(xpath = T.unsafe(nil)); end # :call-seq: @@ -2969,7 +2989,7 @@ class REXML::Elements # elements.delete('//book [@category="children"]') # => ... # elements.delete('//nosuch') # => nil # - # source://rexml//lib/rexml/element.rb#1825 + # source://rexml//lib/rexml/element.rb#1821 def delete(element); end # :call-seq: @@ -2989,7 +3009,7 @@ class REXML::Elements # elements.size # => 0 # elements.delete_all('//book') # => [] # - # source://rexml//lib/rexml/element.rb#1851 + # source://rexml//lib/rexml/element.rb#1847 def delete_all(xpath); end # :call-seq: @@ -3020,7 +3040,7 @@ class REXML::Elements # ... # ... # - # source://rexml//lib/rexml/element.rb#1967 + # source://rexml//lib/rexml/element.rb#1963 def each(xpath = T.unsafe(nil)); end # :call-seq: @@ -3035,7 +3055,7 @@ class REXML::Elements # # @return [Boolean] # - # source://rexml//lib/rexml/element.rb#1755 + # source://rexml//lib/rexml/element.rb#1751 def empty?; end # :call-seq: @@ -3052,7 +3072,7 @@ class REXML::Elements # elements.index(ele_4) # => 3 # elements.index(ele_3) # => -1 # - # source://rexml//lib/rexml/element.rb#1773 + # source://rexml//lib/rexml/element.rb#1769 def index(element); end # :call-seq: @@ -3132,7 +3152,7 @@ class REXML::Elements # total += element.size # end # => 26 # - # source://rexml//lib/rexml/element.rb#2073 + # source://rexml//lib/rexml/element.rb#2069 def inject(xpath = T.unsafe(nil), initial = T.unsafe(nil)); end # :call-seq: @@ -3146,7 +3166,7 @@ class REXML::Elements # elements = REXML::Elements.new(d.root) # elements.parent == d.root # => true # - # source://rexml//lib/rexml/element.rb#1623 + # source://rexml//lib/rexml/element.rb#1619 def parent; end # :call-seq: @@ -3158,7 +3178,7 @@ class REXML::Elements # d.root.elements.size # => 3 # Three elements. # d.root.size # => 6 # Three elements plus three text nodes.. # - # source://rexml//lib/rexml/element.rb#2097 + # source://rexml//lib/rexml/element.rb#2093 def size; end # :call-seq: @@ -3179,14 +3199,14 @@ class REXML::Elements # # elements.to_a('//c') # => [] # - # source://rexml//lib/rexml/element.rb#2121 + # source://rexml//lib/rexml/element.rb#2117 def to_a(xpath = T.unsafe(nil)); end private # Private helper class. Removes quotes from quoted strings # - # source://rexml//lib/rexml/element.rb#2129 + # source://rexml//lib/rexml/element.rb#2125 def literalize(name); end end @@ -3228,65 +3248,54 @@ class REXML::Entity < ::REXML::Child # # @return [Entity] a new instance of Entity # - # source://rexml//lib/rexml/entity.rb#33 + # source://rexml//lib/rexml/entity.rb#34 def initialize(stream, value = T.unsafe(nil), parent = T.unsafe(nil), reference = T.unsafe(nil)); end # Returns the value of attribute external. # - # source://rexml//lib/rexml/entity.rb#22 + # source://rexml//lib/rexml/entity.rb#23 def external; end # Returns the value of attribute name. # - # source://rexml//lib/rexml/entity.rb#22 + # source://rexml//lib/rexml/entity.rb#23 def name; end # Returns the value of attribute ndata. # - # source://rexml//lib/rexml/entity.rb#22 + # source://rexml//lib/rexml/entity.rb#23 def ndata; end # Returns the value of this entity unprocessed -- raw. This is the # normalized value; that is, with all %ent; and &ent; entities intact # - # source://rexml//lib/rexml/entity.rb#85 + # source://rexml//lib/rexml/entity.rb#86 def normalized; end - # source://rexml//lib/rexml/entity.rb#138 - def parent=(other); end - # Returns the value of attribute pubid. # - # source://rexml//lib/rexml/entity.rb#22 + # source://rexml//lib/rexml/entity.rb#23 def pubid; end # Returns the value of attribute ref. # - # source://rexml//lib/rexml/entity.rb#22 + # source://rexml//lib/rexml/entity.rb#23 def ref; end # Returns this entity as a string. See write(). # - # source://rexml//lib/rexml/entity.rb#119 + # source://rexml//lib/rexml/entity.rb#120 def to_s; end # Evaluates to the unnormalized value of this entity; that is, replacing - # all entities -- both %ent; and &ent; entities. This differs from - # +value()+ in that +value+ only replaces %ent; entities. + # &ent; entities. # # source://rexml//lib/rexml/entity.rb#73 def unnormalized; end - # Returns the value of this entity. At the moment, only internal entities - # are processed. If the value contains internal references (IE, - # %blah;), those are replaced with their values. IE, if the doctype - # contains: - # - # - # then: - # doctype.entity('yada').value #-> "nanoo bar nanoo" + # Returns the value of attribute value. # - # source://rexml//lib/rexml/entity.rb#134 + # source://rexml//lib/rexml/entity.rb#23 def value; end # Write out a fully formed, correct entity definition (assuming the Entity @@ -3298,21 +3307,16 @@ class REXML::Entity < ::REXML::Child # indent:: # *DEPRECATED* and ignored # - # source://rexml//lib/rexml/entity.rb#97 + # source://rexml//lib/rexml/entity.rb#98 def write(out, indent = T.unsafe(nil)); end - private - - # source://rexml//lib/rexml/entity.rb#144 - def resolve_value; end - class << self # Evaluates whether the given string matches an entity definition, # returning true if so, and false otherwise. # # @return [Boolean] # - # source://rexml//lib/rexml/entity.rb#66 + # source://rexml//lib/rexml/entity.rb#67 def matches?(string); end end end @@ -3453,47 +3457,44 @@ end # A Source that wraps an IO. See the Source class for method # documentation # -# source://rexml//lib/rexml/source.rb#159 +# source://rexml//lib/rexml/source.rb#182 class REXML::IOSource < ::REXML::Source # block_size has been deprecated # # @return [IOSource] a new instance of IOSource # - # source://rexml//lib/rexml/source.rb#163 + # source://rexml//lib/rexml/source.rb#186 def initialize(arg, block_size = T.unsafe(nil), encoding = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#215 - def consume(pattern); end - # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#244 + # source://rexml//lib/rexml/source.rb#274 def current_line; end # @return [Boolean] # - # source://rexml//lib/rexml/source.rb#235 + # source://rexml//lib/rexml/source.rb#269 def empty?; end - # source://rexml//lib/rexml/source.rb#219 - def match(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#246 + def ensure_buffer; end - # source://rexml//lib/rexml/source.rb#239 - def position; end + # source://rexml//lib/rexml/source.rb#250 + def match(pattern, cons = T.unsafe(nil)); end # source://rexml//lib/rexml/source.rb#207 - def read; end + def read(term = T.unsafe(nil), min_bytes = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#184 - def scan(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#228 + def read_until(term); end private - # source://rexml//lib/rexml/source.rb#286 + # source://rexml//lib/rexml/source.rb#316 def encoding_updated; end - # source://rexml//lib/rexml/source.rb#266 - def readline; end + # source://rexml//lib/rexml/source.rb#296 + def readline(term = T.unsafe(nil)); end end # Represents an XML Instruction; IE, @@ -3816,7 +3817,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#6 def initialize(message, source = T.unsafe(nil), parser = T.unsafe(nil), exception = T.unsafe(nil)); end - # source://rexml//lib/rexml/parseexception.rb#48 + # source://rexml//lib/rexml/parseexception.rb#49 def context; end # Returns the value of attribute continued_exception. @@ -3831,7 +3832,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#4 def continued_exception=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#43 + # source://rexml//lib/rexml/parseexception.rb#44 def line; end # Returns the value of attribute parser. @@ -3846,7 +3847,7 @@ class REXML::ParseException < ::RuntimeError # source://rexml//lib/rexml/parseexception.rb#4 def parser=(_arg0); end - # source://rexml//lib/rexml/parseexception.rb#38 + # source://rexml//lib/rexml/parseexception.rb#39 def position; end # Returns the value of attribute source. @@ -3885,36 +3886,55 @@ end # # Nat Price gave me some good ideas for the API. # -# source://rexml//lib/rexml/parsers/baseparser.rb#29 +# source://rexml//lib/rexml/parsers/baseparser.rb#57 class REXML::Parsers::BaseParser # @return [BaseParser] a new instance of BaseParser # - # source://rexml//lib/rexml/parsers/baseparser.rb#115 + # source://rexml//lib/rexml/parsers/baseparser.rb#163 def initialize(source); end - # source://rexml//lib/rexml/parsers/baseparser.rb#120 + # source://rexml//lib/rexml/parsers/baseparser.rb#172 def add_listener(listener); end # Returns true if there are no more events # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#146 + # source://rexml//lib/rexml/parsers/baseparser.rb#203 def empty?; end - # source://rexml//lib/rexml/parsers/baseparser.rb#438 + # source://rexml//lib/rexml/parsers/baseparser.rb#535 def entity(reference, entities); end + # Returns the value of attribute entity_expansion_count. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#177 + def entity_expansion_count; end + + # Sets the attribute entity_expansion_limit + # + # @param value the value to set the attribute entity_expansion_limit to. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#178 + def entity_expansion_limit=(_arg0); end + + # Sets the attribute entity_expansion_text_limit + # + # @param value the value to set the attribute entity_expansion_text_limit to. + # + # source://rexml//lib/rexml/parsers/baseparser.rb#179 + def entity_expansion_text_limit=(_arg0); end + # Returns true if there are more events. Synonymous with !empty? # # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#151 + # source://rexml//lib/rexml/parsers/baseparser.rb#208 def has_next?; end # Escapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#449 + # source://rexml//lib/rexml/parsers/baseparser.rb#546 def normalize(input, entities = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Peek at the +depth+ event in the stack. The first element on the stack @@ -3924,75 +3944,126 @@ class REXML::Parsers::BaseParser # event, so you can effectively pre-parse the entire document (pull the # entire thing into memory) using this method. # - # source://rexml//lib/rexml/parsers/baseparser.rb#167 + # source://rexml//lib/rexml/parsers/baseparser.rb#224 def peek(depth = T.unsafe(nil)); end - # source://rexml//lib/rexml/parsers/baseparser.rb#136 + # source://rexml//lib/rexml/parsers/baseparser.rb#193 def position; end # Returns the next event. This is a +PullEvent+ object. # - # source://rexml//lib/rexml/parsers/baseparser.rb#182 + # source://rexml//lib/rexml/parsers/baseparser.rb#239 def pull; end # Returns the value of attribute source. # - # source://rexml//lib/rexml/parsers/baseparser.rb#124 + # source://rexml//lib/rexml/parsers/baseparser.rb#176 def source; end - # source://rexml//lib/rexml/parsers/baseparser.rb#126 + # source://rexml//lib/rexml/parsers/baseparser.rb#181 def stream=(source); end # Unescapes all possible entities # - # source://rexml//lib/rexml/parsers/baseparser.rb#465 + # source://rexml//lib/rexml/parsers/baseparser.rb#562 def unnormalize(string, entities = T.unsafe(nil), filter = T.unsafe(nil)); end # Push an event back on the head of the stream. This method # has (theoretically) infinite depth. # - # source://rexml//lib/rexml/parsers/baseparser.rb#157 + # source://rexml//lib/rexml/parsers/baseparser.rb#214 def unshift(token); end private + # source://rexml//lib/rexml/parsers/baseparser.rb#607 + def add_namespace(prefix, uri); end + # @return [Boolean] # - # source://rexml//lib/rexml/parsers/baseparser.rb#495 + # source://rexml//lib/rexml/parsers/baseparser.rb#640 def need_source_encoding_update?(xml_declaration_encoding); end - # source://rexml//lib/rexml/parsers/baseparser.rb#589 - def parse_attributes(prefixes, curr_ns); end + # source://rexml//lib/rexml/parsers/baseparser.rb#760 + def parse_attributes(prefixes); end - # source://rexml//lib/rexml/parsers/baseparser.rb#514 + # source://rexml//lib/rexml/parsers/baseparser.rb#659 def parse_id(base_error_message, accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#542 + # source://rexml//lib/rexml/parsers/baseparser.rb#687 def parse_id_invalid_details(accept_external_id:, accept_public_id:); end - # source://rexml//lib/rexml/parsers/baseparser.rb#501 + # source://rexml//lib/rexml/parsers/baseparser.rb#646 def parse_name(base_error_message); end - # source://rexml//lib/rexml/parsers/baseparser.rb#580 + # source://rexml//lib/rexml/parsers/baseparser.rb#622 + def pop_namespaces_restore; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#725 def process_instruction; end - # source://rexml//lib/rexml/parsers/baseparser.rb#190 + # source://rexml//lib/rexml/parsers/baseparser.rb#249 def pull_event; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#616 + def push_namespaces_restore; end + + # source://rexml//lib/rexml/parsers/baseparser.rb#633 + def record_entity_expansion(delta = T.unsafe(nil)); end end -# source://rexml//lib/rexml/parsers/baseparser.rb#102 +# source://rexml//lib/rexml/parsers/baseparser.rb#130 REXML::Parsers::BaseParser::EXTERNAL_ID_PUBLIC = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#103 +# source://rexml//lib/rexml/parsers/baseparser.rb#131 REXML::Parsers::BaseParser::EXTERNAL_ID_SYSTEM = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#104 +# source://rexml//lib/rexml/parsers/baseparser.rb#132 REXML::Parsers::BaseParser::PUBLIC_ID = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#38 +# source://rexml//lib/rexml/parsers/baseparser.rb#143 +module REXML::Parsers::BaseParser::Private; end + +# source://rexml//lib/rexml/parsers/baseparser.rb#147 +REXML::Parsers::BaseParser::Private::ATTLISTDECL_END = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#152 +REXML::Parsers::BaseParser::Private::CARRIAGE_RETURN_NEWLINE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#153 +REXML::Parsers::BaseParser::Private::CHARACTER_REFERENCES = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#146 +REXML::Parsers::BaseParser::Private::CLOSE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#154 +REXML::Parsers::BaseParser::Private::DEFAULT_ENTITIES_PATTERNS = T.let(T.unsafe(nil), Hash) + +# source://rexml//lib/rexml/parsers/baseparser.rb#151 +REXML::Parsers::BaseParser::Private::ENTITYDECL_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#149 +REXML::Parsers::BaseParser::Private::GEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#148 +REXML::Parsers::BaseParser::Private::NAME_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#150 +REXML::Parsers::BaseParser::Private::PEDECL_PATTERN = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#144 +REXML::Parsers::BaseParser::Private::PEREFERENCE_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#145 +REXML::Parsers::BaseParser::Private::TAG_PATTERN = T.let(T.unsafe(nil), Regexp) + +# source://rexml//lib/rexml/parsers/baseparser.rb#159 +REXML::Parsers::BaseParser::Private::XML_PREFIXED_NAMESPACE = T.let(T.unsafe(nil), String) + +# source://rexml//lib/rexml/parsers/baseparser.rb#66 REXML::Parsers::BaseParser::QNAME = T.let(T.unsafe(nil), Regexp) -# source://rexml//lib/rexml/parsers/baseparser.rb#37 +# source://rexml//lib/rexml/parsers/baseparser.rb#65 REXML::Parsers::BaseParser::QNAME_STR = T.let(T.unsafe(nil), String) # source://rexml//lib/rexml/parsers/streamparser.rb#6 @@ -4006,6 +4077,15 @@ class REXML::Parsers::StreamParser def add_listener(listener); end # source://rexml//lib/rexml/parsers/streamparser.rb#17 + def entity_expansion_count; end + + # source://rexml//lib/rexml/parsers/streamparser.rb#21 + def entity_expansion_limit=(limit); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#25 + def entity_expansion_text_limit=(limit); end + + # source://rexml//lib/rexml/parsers/streamparser.rb#29 def parse; end end @@ -4187,7 +4267,7 @@ end # A Source can be searched for patterns, and wraps buffers and other # objects and provides consumption of text # -# source://rexml//lib/rexml/source.rb#31 +# source://rexml//lib/rexml/source.rb#51 class REXML::Source include ::REXML::Encoding @@ -4198,88 +4278,82 @@ class REXML::Source # @param encoding if non-null, sets the encoding of the source to this # @return [Source] a new instance of Source # - # source://rexml//lib/rexml/source.rb#43 + # source://rexml//lib/rexml/source.rb#71 def initialize(arg, encoding = T.unsafe(nil)); end # The current buffer (what we're going to read next) # - # source://rexml//lib/rexml/source.rb#34 + # source://rexml//lib/rexml/source.rb#83 def buffer; end - # source://rexml//lib/rexml/source.rb#87 - def consume(pattern); end + # source://rexml//lib/rexml/source.rb#93 + def buffer_encoding=(encoding); end # @return the current line in the source # - # source://rexml//lib/rexml/source.rb#117 + # source://rexml//lib/rexml/source.rb#142 def current_line; end + # source://rexml//lib/rexml/source.rb#87 + def drop_parsed_content; end + # @return [Boolean] true if the Source is exhausted # - # source://rexml//lib/rexml/source.rb#108 + # source://rexml//lib/rexml/source.rb#137 def empty?; end # Returns the value of attribute encoding. # - # source://rexml//lib/rexml/source.rb#37 + # source://rexml//lib/rexml/source.rb#55 def encoding; end # Inherited from Encoding # Overridden to support optimized en/decoding # - # source://rexml//lib/rexml/source.rb#56 + # source://rexml//lib/rexml/source.rb#99 def encoding=(enc); end + # source://rexml//lib/rexml/source.rb#117 + def ensure_buffer; end + # The line number of the last consumed text # - # source://rexml//lib/rexml/source.rb#36 + # source://rexml//lib/rexml/source.rb#54 def line; end - # source://rexml//lib/rexml/source.rb#101 + # source://rexml//lib/rexml/source.rb#120 def match(pattern, cons = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#91 - def match_to(char, pattern); end + # source://rexml//lib/rexml/source.rb#128 + def position; end - # source://rexml//lib/rexml/source.rb#95 - def match_to_consume(char, pattern); end + # source://rexml//lib/rexml/source.rb#132 + def position=(pos); end - # source://rexml//lib/rexml/source.rb#112 - def position; end + # source://rexml//lib/rexml/source.rb#104 + def read(term = T.unsafe(nil)); end - # source://rexml//lib/rexml/source.rb#84 - def read; end - - # Scans the source for a given pattern. Note, that this is not your - # usual scan() method. For one thing, the pattern argument has some - # requirements; for another, the source can be consumed. You can easily - # confuse this method. Originally, the patterns were easier - # to construct and this method more robust, because this method - # generated search regexps on the fly; however, this was - # computationally expensive and slowed down the entire REXML package - # considerably, since this is by far the most commonly called method. - # /^\s*(#{your pattern, with no groups})(.*)/. The first group - # will be returned; the second group is used if the consume flag is - # set. - # everything after it in the Source. - # pattern is not found. - # - # @param pattern must be a Regexp, and must be in the form of - # @param consume if true, the pattern returned will be consumed, leaving - # @return the pattern, if found, or nil if the Source is empty or the - # - # source://rexml//lib/rexml/source.rb#77 - def scan(pattern, cons = T.unsafe(nil)); end + # source://rexml//lib/rexml/source.rb#107 + def read_until(term); end private - # source://rexml//lib/rexml/source.rb#125 + # source://rexml//lib/rexml/source.rb#151 def detect_encoding; end - # source://rexml//lib/rexml/source.rb#146 + # source://rexml//lib/rexml/source.rb#169 def encoding_updated; end end +# source://rexml//lib/rexml/source.rb#57 +module REXML::Source::Private; end + +# source://rexml//lib/rexml/source.rb#59 +REXML::Source::Private::PRE_DEFINED_TERM_PATTERNS = T.let(T.unsafe(nil), Hash) + +# source://rexml//lib/rexml/source.rb#58 +REXML::Source::Private::SCANNER_RESET_SIZE = T.let(T.unsafe(nil), Integer) + # Represents text nodes in an XML document # # source://rexml//lib/rexml/text.rb#11 @@ -4334,33 +4408,33 @@ class REXML::Text < ::REXML::Child # +returns+ the text itself to enable method chain like # 'text << "XXX" << "YYY"'. # - # source://rexml//lib/rexml/text.rb#194 + # source://rexml//lib/rexml/text.rb#214 def <<(to_append); end # +other+ a String or a Text # +returns+ the result of (to_s <=> arg.to_s) # - # source://rexml//lib/rexml/text.rb#203 + # source://rexml//lib/rexml/text.rb#223 def <=>(other); end - # source://rexml//lib/rexml/text.rb#184 + # source://rexml//lib/rexml/text.rb#204 def clone; end - # source://rexml//lib/rexml/text.rb#207 + # source://rexml//lib/rexml/text.rb#227 def doctype; end # @return [Boolean] # - # source://rexml//lib/rexml/text.rb#179 + # source://rexml//lib/rexml/text.rb#199 def empty?; end - # source://rexml//lib/rexml/text.rb#278 + # source://rexml//lib/rexml/text.rb#299 def indent_text(string, level = T.unsafe(nil), style = T.unsafe(nil), indentfirstline = T.unsafe(nil)); end - # source://rexml//lib/rexml/text.rb#233 + # source://rexml//lib/rexml/text.rb#253 def inspect; end - # source://rexml//lib/rexml/text.rb#175 + # source://rexml//lib/rexml/text.rb#195 def node_type; end # source://rexml//lib/rexml/text.rb#125 @@ -4390,7 +4464,7 @@ class REXML::Text < ::REXML::Child # u = Text.new( "sean russell", false, nil, true ) # u.to_s #-> "sean russell" # - # source://rexml//lib/rexml/text.rb#228 + # source://rexml//lib/rexml/text.rb#248 def to_s; end # Returns the string value of this text. This is the text without @@ -4407,7 +4481,7 @@ class REXML::Text < ::REXML::Child # u = Text.new( "sean russell", false, nil, true ) # u.value #-> "sean russell" # - # source://rexml//lib/rexml/text.rb#250 + # source://rexml//lib/rexml/text.rb#270 def value; end # Sets the contents of this text node. This expects the text to be @@ -4418,16 +4492,16 @@ class REXML::Text < ::REXML::Child # e[0].value = "bar" # bar # e[0].value = "" # <a> # - # source://rexml//lib/rexml/text.rb#261 + # source://rexml//lib/rexml/text.rb#282 def value=(val); end - # source://rexml//lib/rexml/text.rb#267 + # source://rexml//lib/rexml/text.rb#288 def wrap(string, width, addnewline = T.unsafe(nil)); end # == DEPRECATED # See REXML::Formatters # - # source://rexml//lib/rexml/text.rb#293 + # source://rexml//lib/rexml/text.rb#314 def write(writer, indent = T.unsafe(nil), transitive = T.unsafe(nil), ie_hack = T.unsafe(nil)); end # Writes out text, substituting special characters beforehand. @@ -4445,18 +4519,18 @@ class REXML::Text < ::REXML::Child # } # puts ascOut # - # source://rexml//lib/rexml/text.rb#325 + # source://rexml//lib/rexml/text.rb#346 def write_with_substitution(out, input); end # FIXME # This probably won't work properly # - # source://rexml//lib/rexml/text.rb#305 + # source://rexml//lib/rexml/text.rb#326 def xpath; end private - # source://rexml//lib/rexml/text.rb#338 + # source://rexml//lib/rexml/text.rb#359 def clear_cache; end class << self @@ -4465,23 +4539,23 @@ class REXML::Text < ::REXML::Child # source://rexml//lib/rexml/text.rb#131 def check(string, pattern, doctype); end - # source://rexml//lib/rexml/text.rb#407 + # source://rexml//lib/rexml/text.rb#429 def expand(ref, doctype, filter); end # Escapes all possible entities # - # source://rexml//lib/rexml/text.rb#370 + # source://rexml//lib/rexml/text.rb#391 def normalize(input, doctype = T.unsafe(nil), entity_filter = T.unsafe(nil)); end # Reads text, substituting entities # - # source://rexml//lib/rexml/text.rb#344 + # source://rexml//lib/rexml/text.rb#365 def read_with_substitution(input, illegal = T.unsafe(nil)); end # Unescapes all possible entities # - # source://rexml//lib/rexml/text.rb#394 - def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil)); end + # source://rexml//lib/rexml/text.rb#415 + def unnormalize(string, doctype = T.unsafe(nil), filter = T.unsafe(nil), illegal = T.unsafe(nil), entity_expansion_text_limit: T.unsafe(nil)); end end end @@ -4607,24 +4681,24 @@ end # @private # -# source://rexml//lib/rexml/xpath_parser.rb#959 +# source://rexml//lib/rexml/xpath_parser.rb#963 class REXML::XPathNode # @return [XPathNode] a new instance of XPathNode # - # source://rexml//lib/rexml/xpath_parser.rb#961 + # source://rexml//lib/rexml/xpath_parser.rb#965 def initialize(node, context = T.unsafe(nil)); end # Returns the value of attribute context. # - # source://rexml//lib/rexml/xpath_parser.rb#960 + # source://rexml//lib/rexml/xpath_parser.rb#964 def context; end - # source://rexml//lib/rexml/xpath_parser.rb#970 + # source://rexml//lib/rexml/xpath_parser.rb#974 def position; end # Returns the value of attribute raw_node. # - # source://rexml//lib/rexml/xpath_parser.rb#960 + # source://rexml//lib/rexml/xpath_parser.rb#964 def raw_node; end end @@ -4673,25 +4747,25 @@ class REXML::XPathParser private - # source://rexml//lib/rexml/xpath_parser.rb#775 + # source://rexml//lib/rexml/xpath_parser.rb#779 def child(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#916 + # source://rexml//lib/rexml/xpath_parser.rb#920 def compare(a, operator, b); end - # source://rexml//lib/rexml/xpath_parser.rb#678 + # source://rexml//lib/rexml/xpath_parser.rb#682 def descendant(nodeset, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#689 + # source://rexml//lib/rexml/xpath_parser.rb#693 def descendant_recursive(raw_node, new_nodeset, new_nodes, include_self); end - # source://rexml//lib/rexml/xpath_parser.rb#938 + # source://rexml//lib/rexml/xpath_parser.rb#942 def each_unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#637 + # source://rexml//lib/rexml/xpath_parser.rb#641 def enter(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#815 + # source://rexml//lib/rexml/xpath_parser.rb#819 def equality_relational_compare(set1, op, set2); end # source://rexml//lib/rexml/xpath_parser.rb#591 @@ -4706,10 +4780,10 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#582 def filter_nodeset(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#745 + # source://rexml//lib/rexml/xpath_parser.rb#749 def following(node); end - # source://rexml//lib/rexml/xpath_parser.rb#756 + # source://rexml//lib/rexml/xpath_parser.rb#760 def following_node_of(node); end # Returns a String namespace for a node, given a prefix @@ -4721,19 +4795,19 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#163 def get_namespace(node, prefix); end - # source://rexml//lib/rexml/xpath_parser.rb#642 + # source://rexml//lib/rexml/xpath_parser.rb#646 def leave(tag, *args); end - # source://rexml//lib/rexml/xpath_parser.rb#763 + # source://rexml//lib/rexml/xpath_parser.rb#767 def next_sibling_node(node); end # source://rexml//lib/rexml/xpath_parser.rb#477 def node_test(path_stack, nodesets, any_type: T.unsafe(nil)); end - # source://rexml//lib/rexml/xpath_parser.rb#802 + # source://rexml//lib/rexml/xpath_parser.rb#806 def norm(b); end - # source://rexml//lib/rexml/xpath_parser.rb#890 + # source://rexml//lib/rexml/xpath_parser.rb#894 def normalize_compare_values(a, operator, b); end # Builds a nodeset of all of the preceding nodes of the supplied node, @@ -4741,10 +4815,10 @@ class REXML::XPathParser # preceding:: includes every element in the document that precedes this node, # except for ancestors # - # source://rexml//lib/rexml/xpath_parser.rb#708 + # source://rexml//lib/rexml/xpath_parser.rb#712 def preceding(node); end - # source://rexml//lib/rexml/xpath_parser.rb#730 + # source://rexml//lib/rexml/xpath_parser.rb#734 def preceding_node_of(node); end # Reorders an array of nodes so that they are in document order @@ -4756,7 +4830,7 @@ class REXML::XPathParser # I wouldn't have to do this. Maybe add a document IDX for each node? # Problems with mutable documents. Or, rewrite everything. # - # source://rexml//lib/rexml/xpath_parser.rb#655 + # source://rexml//lib/rexml/xpath_parser.rb#659 def sort(array_of_nodes, order); end # source://rexml//lib/rexml/xpath_parser.rb#441 @@ -4767,13 +4841,13 @@ class REXML::XPathParser # source://rexml//lib/rexml/xpath_parser.rb#154 def strict?; end - # source://rexml//lib/rexml/xpath_parser.rb#630 + # source://rexml//lib/rexml/xpath_parser.rb#634 def trace(*args); end - # source://rexml//lib/rexml/xpath_parser.rb#950 + # source://rexml//lib/rexml/xpath_parser.rb#954 def unnode(nodeset); end - # source://rexml//lib/rexml/xpath_parser.rb#877 + # source://rexml//lib/rexml/xpath_parser.rb#881 def value_type(value); end end diff --git a/sorbet/rbi/gems/rspec-core@3.12.2.rbi b/sorbet/rbi/gems/rspec-core@3.13.0.rbi similarity index 95% rename from sorbet/rbi/gems/rspec-core@3.12.2.rbi rename to sorbet/rbi/gems/rspec-core@3.13.0.rbi index b52773f23..dde30f65f 100644 --- a/sorbet/rbi/gems/rspec-core@3.12.2.rbi +++ b/sorbet/rbi/gems/rspec-core@3.13.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rspec-core` gem. # Please instead update this file by running `bin/tapioca gem rspec-core`. + module ERB::Escape private @@ -416,7 +417,7 @@ class RSpec::Core::Configuration # # @return [Configuration] a new instance of Configuration # - # source://rspec-core//lib/rspec/core/configuration.rb#509 + # source://rspec-core//lib/rspec/core/configuration.rb#528 def initialize; end # Adds a formatter to the set RSpec will use for this run. @@ -433,7 +434,7 @@ class RSpec::Core::Configuration # the configured `output_stream` (`$stdout`, by default) will be used. # @see RSpec::Core::Formatters::Protocol # - # source://rspec-core//lib/rspec/core/configuration.rb#975 + # source://rspec-core//lib/rspec/core/configuration.rb#996 def add_formatter(formatter, output = T.unsafe(nil)); end # Adds a custom setting to the RSpec.configuration object. @@ -462,7 +463,7 @@ class RSpec::Core::Configuration # @overload add_setting # @param opts [Hash] a customizable set of options # - # source://rspec-core//lib/rspec/core/configuration.rb#638 + # source://rspec-core//lib/rspec/core/configuration.rb#659 def add_setting(name, opts = T.unsafe(nil)); end # Defines a `after` hook. See {Hooks#after} for full docs. @@ -476,7 +477,7 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2004 + # source://rspec-core//lib/rspec/core/configuration.rb#2025 def after(scope = T.unsafe(nil), *meta, &block); end # Creates a method that defines an example group with the provided @@ -506,7 +507,7 @@ class RSpec::Core::Configuration # @see #alias_example_to # @see #expose_dsl_globally= # - # source://rspec-core//lib/rspec/core/configuration.rb#1188 + # source://rspec-core//lib/rspec/core/configuration.rb#1209 def alias_example_group_to(new_name, *args); end # Creates a method that delegates to `example` including the submitted @@ -541,7 +542,7 @@ class RSpec::Core::Configuration # @param name [String] example name alias # @param args [Array, Hash] metadata for the generated example # - # source://rspec-core//lib/rspec/core/configuration.rb#1156 + # source://rspec-core//lib/rspec/core/configuration.rb#1177 def alias_example_to(name, *args); end # Define an alias for it_should_behave_like that allows different @@ -570,7 +571,7 @@ class RSpec::Core::Configuration # in RSpec to define `it_should_behave_like` (for backward # compatibility), but we also add docs for that method. # - # source://rspec-core//lib/rspec/core/configuration.rb#1219 + # source://rspec-core//lib/rspec/core/configuration.rb#1240 def alias_it_behaves_like_to(new_name, report_label = T.unsafe(nil)); end # Define an alias for it_should_behave_like that allows different @@ -599,7 +600,7 @@ class RSpec::Core::Configuration # in RSpec to define `it_should_behave_like` (for backward # compatibility), but we also add docs for that method. # - # source://rspec-core//lib/rspec/core/configuration.rb#1219 + # source://rspec-core//lib/rspec/core/configuration.rb#1240 def alias_it_should_behave_like_to(new_name, report_label = T.unsafe(nil)); end # Adds `block` to the end of the list of `after` blocks in the same @@ -617,7 +618,7 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2034 + # source://rspec-core//lib/rspec/core/configuration.rb#2055 def append_after(scope = T.unsafe(nil), *meta, &block); end # Defines a `before` hook. See {Hooks#before} for full docs. @@ -631,20 +632,20 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#1949 + # source://rspec-core//lib/rspec/core/configuration.rb#1970 def append_before(scope = T.unsafe(nil), *meta, &block); end # @private # @raise [SystemStackError] # - # source://rspec-core//lib/rspec/core/configuration.rb#1914 + # source://rspec-core//lib/rspec/core/configuration.rb#1935 def apply_derived_metadata_to(metadata); end # Registers `block` as an `around` hook. # # See {Hooks#around} for full `around` hook docs. # - # source://rspec-core//lib/rspec/core/configuration.rb#2052 + # source://rspec-core//lib/rspec/core/configuration.rb#2073 def around(scope = T.unsafe(nil), *meta, &block); end # Regexps used to exclude lines from backtraces. @@ -661,19 +662,19 @@ class RSpec::Core::Configuration # # @return [Array] # - # source://rspec-core//lib/rspec/core/configuration.rb#676 + # source://rspec-core//lib/rspec/core/configuration.rb#697 def backtrace_exclusion_patterns; end # Set regular expressions used to exclude lines in backtrace. # # @param patterns [Array] set backtrace_formatter exclusion_patterns # - # source://rspec-core//lib/rspec/core/configuration.rb#682 + # source://rspec-core//lib/rspec/core/configuration.rb#703 def backtrace_exclusion_patterns=(patterns); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#503 + # source://rspec-core//lib/rspec/core/configuration.rb#522 def backtrace_formatter; end # Regexps used to include lines in backtraces. @@ -687,14 +688,14 @@ class RSpec::Core::Configuration # # @return [Array] # - # source://rspec-core//lib/rspec/core/configuration.rb#695 + # source://rspec-core//lib/rspec/core/configuration.rb#716 def backtrace_inclusion_patterns; end # Set regular expressions used to include lines in backtrace. # # @attr patterns [Array] set backtrace_formatter inclusion_patterns # - # source://rspec-core//lib/rspec/core/configuration.rb#701 + # source://rspec-core//lib/rspec/core/configuration.rb#722 def backtrace_inclusion_patterns=(patterns); end # Defines a `before` hook. See {Hooks#before} for full docs. @@ -708,7 +709,7 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#1949 + # source://rspec-core//lib/rspec/core/configuration.rb#1970 def before(scope = T.unsafe(nil), *meta, &block); end # Determines which bisect runner implementation gets used to run subsets @@ -730,15 +731,15 @@ class RSpec::Core::Configuration # loaded via `--require`. # @return [Symbol] # - # source://rspec-core//lib/rspec/core/configuration.rb#480 + # source://rspec-core//lib/rspec/core/configuration.rb#499 def bisect_runner; end - # source://rspec-core//lib/rspec/core/configuration.rb#481 + # source://rspec-core//lib/rspec/core/configuration.rb#500 def bisect_runner=(value); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2098 + # source://rspec-core//lib/rspec/core/configuration.rb#2119 def bisect_runner_class; end # Enables color output if the output is a TTY. As of RSpec 3.6, this is @@ -752,7 +753,7 @@ class RSpec::Core::Configuration # @see color_mode # @see color_enabled? # - # source://rspec-core//lib/rspec/core/configuration.rb#901 + # source://rspec-core//lib/rspec/core/configuration.rb#922 def color; end # Toggle output color. @@ -761,7 +762,7 @@ class RSpec::Core::Configuration # rely on the fact that TTYs will display color by default, or set # {:color_mode} to :on to display color on a non-TTY output. # - # source://rspec-core//lib/rspec/core/configuration.rb#939 + # source://rspec-core//lib/rspec/core/configuration.rb#960 def color=(_arg0); end # Check if color is enabled for a particular output. @@ -770,7 +771,7 @@ class RSpec::Core::Configuration # `output_stream` # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#922 + # source://rspec-core//lib/rspec/core/configuration.rb#943 def color_enabled?(output = T.unsafe(nil)); end # The mode for determining whether to display output in color. One of: @@ -783,12 +784,12 @@ class RSpec::Core::Configuration # @return [Boolean] # @see color_enabled? # - # source://rspec-core//lib/rspec/core/configuration.rb#914 + # source://rspec-core//lib/rspec/core/configuration.rb#935 def color_mode; end # Set the color mode. # - # source://rspec-core//lib/rspec/core/configuration.rb#932 + # source://rspec-core//lib/rspec/core/configuration.rb#953 def color_mode=(_arg0); end # Used internally to extend the singleton class of a single example's @@ -796,12 +797,12 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1556 + # source://rspec-core//lib/rspec/core/configuration.rb#1577 def configure_example(example, example_hooks); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1596 + # source://rspec-core//lib/rspec/core/configuration.rb#1617 def configure_expectation_framework; end # Used internally to extend a group with modules using `include`, `prepend` and/or @@ -809,12 +810,12 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1544 + # source://rspec-core//lib/rspec/core/configuration.rb#1565 def configure_group(group); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1590 + # source://rspec-core//lib/rspec/core/configuration.rb#1611 def configure_mock_framework; end # The default output color. Defaults to `:white` but can be set to one of @@ -841,7 +842,7 @@ class RSpec::Core::Configuration # The formatter that will be used if no formatter has been set. # Defaults to 'progress'. # - # source://rspec-core//lib/rspec/core/configuration.rb#982 + # source://rspec-core//lib/rspec/core/configuration.rb#1003 def default_formatter; end # Sets a fallback formatter to use if none other has been set. @@ -852,7 +853,7 @@ class RSpec::Core::Configuration # rspec.default_formatter = 'doc' # end # - # source://rspec-core//lib/rspec/core/configuration.rb#993 + # source://rspec-core//lib/rspec/core/configuration.rb#1014 def default_formatter=(value); end # Path to use if no path is provided to the `rspec` command (default: @@ -897,7 +898,7 @@ class RSpec::Core::Configuration # @yieldparam metadata [Hash] original metadata hash from an example or # group. Mutate this in your block as needed. # - # source://rspec-core//lib/rspec/core/configuration.rb#1873 + # source://rspec-core//lib/rspec/core/configuration.rb#1894 def define_derived_metadata(*filters, &block); end # Determines where deprecation warnings are printed. @@ -938,7 +939,7 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1854 + # source://rspec-core//lib/rspec/core/configuration.rb#1875 def disable_monkey_patching; end # Enables zero monkey patching mode for RSpec. It removes monkey @@ -976,12 +977,12 @@ class RSpec::Core::Configuration # (or similar) they will still have monkey patching active # in their test environment from mocha. # - # source://rspec-core//lib/rspec/core/configuration.rb#1846 + # source://rspec-core//lib/rspec/core/configuration.rb#1867 def disable_monkey_patching!; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1854 + # source://rspec-core//lib/rspec/core/configuration.rb#1875 def disable_monkey_patching=(_arg0); end # Run examples over DRb (default: `false`). RSpec doesn't supply the DRb @@ -1093,7 +1094,7 @@ class RSpec::Core::Configuration # Returns the `exclusion_filter`. If none has been set, returns an empty # hash. # - # source://rspec-core//lib/rspec/core/configuration.rb#1348 + # source://rspec-core//lib/rspec/core/configuration.rb#1369 def exclusion_filter; end # Clears and reassigns the `exclusion_filter`. Set to `nil` if you don't @@ -1104,7 +1105,7 @@ class RSpec::Core::Configuration # This overrides any exclusion filters/tags set on the command line or in # configuration files. # - # source://rspec-core//lib/rspec/core/configuration.rb#1341 + # source://rspec-core//lib/rspec/core/configuration.rb#1362 def exclusion_filter=(filter); end # Sets the expectation framework module(s) to be included in each example @@ -1131,17 +1132,17 @@ class RSpec::Core::Configuration # custom_config.custom_setting = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#837 + # source://rspec-core//lib/rspec/core/configuration.rb#858 def expect_with(*frameworks); end # Delegates to expect_with(framework). # - # source://rspec-core//lib/rspec/core/configuration.rb#810 + # source://rspec-core//lib/rspec/core/configuration.rb#831 def expectation_framework=(framework); end # Returns the configured expectation framework adapter module(s) # - # source://rspec-core//lib/rspec/core/configuration.rb#798 + # source://rspec-core//lib/rspec/core/configuration.rb#819 def expectation_frameworks; end # Exposes the current running example via the named @@ -1166,7 +1167,7 @@ class RSpec::Core::Configuration # end # @param method_name [Symbol] the name of the helper method # - # source://rspec-core//lib/rspec/core/configuration.rb#1784 + # source://rspec-core//lib/rspec/core/configuration.rb#1805 def expose_current_running_example_as(method_name); end # Use this to expose the core RSpec DSL via `Module` and the `main` @@ -1223,7 +1224,7 @@ class RSpec::Core::Configuration # @see #include # @see #prepend # - # source://rspec-core//lib/rspec/core/configuration.rb#1494 + # source://rspec-core//lib/rspec/core/configuration.rb#1515 def extend(mod, *filters); end # If specified, indicates the number of failures required before cleaning @@ -1295,25 +1296,25 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1062 + # source://rspec-core//lib/rspec/core/configuration.rb#1083 def files_or_directories_to_run=(*files); end # The spec files RSpec will run. # # @return [Array] specified files about to run # - # source://rspec-core//lib/rspec/core/configuration.rb#1075 + # source://rspec-core//lib/rspec/core/configuration.rb#1096 def files_to_run; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#497 + # source://rspec-core//lib/rspec/core/configuration.rb#516 def files_to_run=(_arg0); end # Returns the `inclusion_filter`. If none has been set, returns an empty # hash. # - # source://rspec-core//lib/rspec/core/configuration.rb#1292 + # source://rspec-core//lib/rspec/core/configuration.rb#1313 def filter; end # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't @@ -1324,7 +1325,7 @@ class RSpec::Core::Configuration # This overrides any inclusion filters/tags set on the command line or in # configuration files. # - # source://rspec-core//lib/rspec/core/configuration.rb#1283 + # source://rspec-core//lib/rspec/core/configuration.rb#1304 def filter=(filter); end # Adds {#backtrace_exclusion_patterns} that will filter lines from @@ -1342,17 +1343,17 @@ class RSpec::Core::Configuration # :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#721 + # source://rspec-core//lib/rspec/core/configuration.rb#742 def filter_gems_from_backtrace(*gem_names); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def filter_manager; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def filter_manager=(_arg0); end # Adds key/value pairs to the `inclusion_filter`. If `args` @@ -1386,7 +1387,7 @@ class RSpec::Core::Configuration # # filter_run_including :foo # same as filter_run_including :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1254 + # source://rspec-core//lib/rspec/core/configuration.rb#1275 def filter_run(*args); end # Adds key/value pairs to the `exclusion_filter`. If `args` @@ -1420,7 +1421,7 @@ class RSpec::Core::Configuration # # filter_run_excluding :foo # same as filter_run_excluding :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1328 + # source://rspec-core//lib/rspec/core/configuration.rb#1349 def filter_run_excluding(*args); end # Adds key/value pairs to the `inclusion_filter`. If `args` @@ -1454,7 +1455,7 @@ class RSpec::Core::Configuration # # filter_run_including :foo # same as filter_run_including :foo => true # - # source://rspec-core//lib/rspec/core/configuration.rb#1254 + # source://rspec-core//lib/rspec/core/configuration.rb#1275 def filter_run_including(*args); end # Applies the provided filter only if any of examples match, in constrast @@ -1467,7 +1468,7 @@ class RSpec::Core::Configuration # (as in `fdescribe`, `fcontext` and `fit`) since those are aliases for # `describe`/`context`/`it` with `:focus` metadata. # - # source://rspec-core//lib/rspec/core/configuration.rb#1270 + # source://rspec-core//lib/rspec/core/configuration.rb#1291 def filter_run_when_matching(*args); end # Color used when a pending example is fixed. Defaults to `:blue` but can @@ -1495,7 +1496,7 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#571 + # source://rspec-core//lib/rspec/core/configuration.rb#592 def force(hash); end # Formats the docstring output using the block provided. @@ -1507,12 +1508,12 @@ class RSpec::Core::Configuration # config.format_docstrings { |s| s.strip } # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1635 + # source://rspec-core//lib/rspec/core/configuration.rb#1656 def format_docstrings(&block); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1640 + # source://rspec-core//lib/rspec/core/configuration.rb#1661 def format_docstrings_block; end # Adds a formatter to the set RSpec will use for this run. @@ -1529,12 +1530,12 @@ class RSpec::Core::Configuration # the configured `output_stream` (`$stdout`, by default) will be used. # @see RSpec::Core::Formatters::Protocol # - # source://rspec-core//lib/rspec/core/configuration.rb#975 + # source://rspec-core//lib/rspec/core/configuration.rb#996 def formatter=(formatter, output = T.unsafe(nil)); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1008 + # source://rspec-core//lib/rspec/core/configuration.rb#1029 def formatter_loader; end # Returns a duplicate of the formatters currently loaded in @@ -1544,33 +1545,42 @@ class RSpec::Core::Configuration # # @return [Array] the formatters currently loaded # - # source://rspec-core//lib/rspec/core/configuration.rb#1003 + # source://rspec-core//lib/rspec/core/configuration.rb#1024 def formatters; end # Toggle full backtrace. # # @attr true_or_false [Boolean] toggle full backtrace display # - # source://rspec-core//lib/rspec/core/configuration.rb#887 + # source://rspec-core//lib/rspec/core/configuration.rb#908 def full_backtrace=(true_or_false); end # Check if full backtrace is enabled. # # @return [Boolean] is full backtrace enabled # - # source://rspec-core//lib/rspec/core/configuration.rb#881 + # source://rspec-core//lib/rspec/core/configuration.rb#902 def full_backtrace?; end + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def full_cause_backtrace; end + + # source://rspec-core//lib/rspec/core/configuration.rb#89 + def full_cause_backtrace=(_arg0); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def full_cause_backtrace?; end + # @return [Array] full description filter # - # source://rspec-core//lib/rspec/core/configuration.rb#956 + # source://rspec-core//lib/rspec/core/configuration.rb#977 def full_description; end # Run examples matching on `description` in all files to run. # # @param description [String, Regexp] the pattern to filter on # - # source://rspec-core//lib/rspec/core/configuration.rb#951 + # source://rspec-core//lib/rspec/core/configuration.rb#972 def full_description=(description); end # Holds the various registered hooks. Here we use a FilterableItemRepository @@ -1579,12 +1589,12 @@ class RSpec::Core::Configuration # # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2082 + # source://rspec-core//lib/rspec/core/configuration.rb#2103 def hooks; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1581 + # source://rspec-core//lib/rspec/core/configuration.rb#1602 def in_project_source_dir_regex; end # Tells RSpec to include `mod` in example groups. Methods defined in @@ -1638,7 +1648,7 @@ class RSpec::Core::Configuration # @see #extend # @see #prepend # - # source://rspec-core//lib/rspec/core/configuration.rb#1404 + # source://rspec-core//lib/rspec/core/configuration.rb#1425 def include(mod, *filters); end # Tells RSpec to include the named shared example group in example groups. @@ -1681,13 +1691,13 @@ class RSpec::Core::Configuration # example. # @see #include # - # source://rspec-core//lib/rspec/core/configuration.rb#1451 + # source://rspec-core//lib/rspec/core/configuration.rb#1472 def include_context(shared_group_name, *filters); end # Returns the `inclusion_filter`. If none has been set, returns an empty # hash. # - # source://rspec-core//lib/rspec/core/configuration.rb#1292 + # source://rspec-core//lib/rspec/core/configuration.rb#1313 def inclusion_filter; end # Clears and reassigns the `inclusion_filter`. Set to `nil` if you don't @@ -1698,12 +1708,12 @@ class RSpec::Core::Configuration # This overrides any inclusion filters/tags set on the command line or in # configuration files. # - # source://rspec-core//lib/rspec/core/configuration.rb#1283 + # source://rspec-core//lib/rspec/core/configuration.rb#1304 def inclusion_filter=(filter); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1080 + # source://rspec-core//lib/rspec/core/configuration.rb#1101 def last_run_statuses; end # Returns dirs that have been prepended to the load path by the `-I` @@ -1716,28 +1726,28 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#942 + # source://rspec-core//lib/rspec/core/configuration.rb#963 def libs=(libs); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1604 + # source://rspec-core//lib/rspec/core/configuration.rb#1625 def load_spec_files; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#503 + # source://rspec-core//lib/rspec/core/configuration.rb#522 def loaded_spec_files; end - # Maximum count of failed source lines to display in the failure reports. - # (default `10`). + # Maximum count of failed source lines to display in the failure reports + # (defaults to `10`). # return [Integer] # # source://rspec-core//lib/rspec/core/configuration.rb#66 def max_displayed_failure_line_count; end - # Maximum count of failed source lines to display in the failure reports. - # (default `10`). + # Maximum count of failed source lines to display in the failure reports + # (defaults to `10`). # return [Integer] # # source://rspec-core//lib/rspec/core/configuration.rb#89 @@ -1750,12 +1760,12 @@ class RSpec::Core::Configuration # # @return [Symbol] # - # source://rspec-core//lib/rspec/core/configuration.rb#648 + # source://rspec-core//lib/rspec/core/configuration.rb#669 def mock_framework; end # Delegates to mock_framework=(framework). # - # source://rspec-core//lib/rspec/core/configuration.rb#660 + # source://rspec-core//lib/rspec/core/configuration.rb#681 def mock_framework=(framework); end # Sets the mock framework adapter module. @@ -1788,19 +1798,19 @@ class RSpec::Core::Configuration # mod_config.custom_setting = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#765 + # source://rspec-core//lib/rspec/core/configuration.rb#786 def mock_with(framework); end # Invokes block before defining an example group # - # source://rspec-core//lib/rspec/core/configuration.rb#2087 + # source://rspec-core//lib/rspec/core/configuration.rb#2108 def on_example_group_definition(&block); end # Returns an array of blocks to call before defining an example group # # @api private # - # source://rspec-core//lib/rspec/core/configuration.rb#2093 + # source://rspec-core//lib/rspec/core/configuration.rb#2114 def on_example_group_definition_callbacks; end # Indicates if the `--only-failures` (or `--next-failure`) flag is being used. @@ -1826,15 +1836,15 @@ class RSpec::Core::Configuration # # @see #register_ordering # - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def order=(*args, &block); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#503 + # source://rspec-core//lib/rspec/core/configuration.rb#522 def ordering_manager; end - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def ordering_registry(*args, &block); end # Determines where RSpec will send its output. @@ -1887,6 +1897,31 @@ class RSpec::Core::Configuration # source://rspec-core//lib/rspec/core/configuration.rb#78 def pending_color?; end + # Format the output for pending examples. Can be set to: + # - :full (default) - pending examples appear similarly to failures + # - :no_backtrace - same as above, but with no backtrace + # - :skip - do not show the section at all + # return [Symbol] + # + # @raise [ArgumentError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#66 + def pending_failure_output; end + + # Format the output for pending examples. Can be set to: + # - :full (default) - pending examples appear similarly to failures + # - :no_backtrace - same as above, but with no backtrace + # - :skip - do not show the section at all + # return [Symbol] + # + # @raise [ArgumentError] + # + # source://rspec-core//lib/rspec/core/configuration.rb#473 + def pending_failure_output=(mode); end + + # source://rspec-core//lib/rspec/core/configuration.rb#78 + def pending_failure_output?; end + # Tells RSpec to prepend example groups with `mod`. Methods defined in # `mod` are exposed to examples (not example groups). Use `filters` to # constrain the groups in which to prepend the module. @@ -1919,7 +1954,7 @@ class RSpec::Core::Configuration # @see #include # @see #extend # - # source://rspec-core//lib/rspec/core/configuration.rb#1533 + # source://rspec-core//lib/rspec/core/configuration.rb#1554 def prepend(mod, *filters); end # Defines a `after` hook. See {Hooks#after} for full docs. @@ -1933,7 +1968,7 @@ class RSpec::Core::Configuration # @see #before # @see #prepend_before # - # source://rspec-core//lib/rspec/core/configuration.rb#2004 + # source://rspec-core//lib/rspec/core/configuration.rb#2025 def prepend_after(scope = T.unsafe(nil), *meta, &block); end # Adds `block` to the start of the list of `before` blocks in the same @@ -1951,7 +1986,7 @@ class RSpec::Core::Configuration # @see #after # @see #append_after # - # source://rspec-core//lib/rspec/core/configuration.rb#1979 + # source://rspec-core//lib/rspec/core/configuration.rb#2000 def prepend_before(scope = T.unsafe(nil), *meta, &block); end # Defaults `profile_examples` to 10 examples when `@profile_examples` is @@ -1959,7 +1994,7 @@ class RSpec::Core::Configuration # # @api private # - # source://rspec-core//lib/rspec/core/configuration.rb#1052 + # source://rspec-core//lib/rspec/core/configuration.rb#1073 def profile_examples; end # Report the times for the slowest examples (default: `false`). @@ -2011,7 +2046,7 @@ class RSpec::Core::Configuration # rspec.raise_errors_for_deprecations! # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1806 + # source://rspec-core//lib/rspec/core/configuration.rb#1827 def raise_errors_for_deprecations!; end # Turns warnings into errors. This can be useful when @@ -2023,7 +2058,7 @@ class RSpec::Core::Configuration # rspec.raise_on_warning = true # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1754 + # source://rspec-core//lib/rspec/core/configuration.rb#1775 def raise_on_warning=(value); end # Registers a named ordering strategy that can later be @@ -2065,12 +2100,12 @@ class RSpec::Core::Configuration # @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#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def register_ordering(*args, &block); end # @return [RSpec::Core::Reporter] the currently configured reporter # - # source://rspec-core//lib/rspec/core/configuration.rb#1035 + # source://rspec-core//lib/rspec/core/configuration.rb#1056 def reporter; end # Indicates files configured to be required. @@ -2082,22 +2117,22 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1573 + # source://rspec-core//lib/rspec/core/configuration.rb#1594 def requires=(paths); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#580 + # source://rspec-core//lib/rspec/core/configuration.rb#601 def reset; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#593 + # source://rspec-core//lib/rspec/core/configuration.rb#614 def reset_filters; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#586 + # source://rspec-core//lib/rspec/core/configuration.rb#607 def reset_reporter; end # Run all examples if none match the configured filters @@ -2133,15 +2168,15 @@ class RSpec::Core::Configuration # We recommend, actually, that you use the command line approach so you # don't accidentally leave the seed encoded. # - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def seed(*args, &block); end # Sets the seed value and sets the default global ordering to random. # - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def seed=(*args, &block); end - # source://rspec-core//lib/rspec/core/configuration.rb#1647 + # source://rspec-core//lib/rspec/core/configuration.rb#1668 def seed_used?(*args, &block); end # Configures how RSpec treats metadata passed as part of a shared example @@ -2209,7 +2244,7 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1117 + # source://rspec-core//lib/rspec/core/configuration.rb#1138 def spec_files_with_failures; end # source://rspec-core//lib/rspec/core/configuration.rb#66 @@ -2223,12 +2258,12 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#501 + # source://rspec-core//lib/rspec/core/configuration.rb#520 def static_config_filter_manager; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#501 + # source://rspec-core//lib/rspec/core/configuration.rb#520 def static_config_filter_manager=(_arg0); end # Color to use to indicate success. Defaults to `:green` but can be set @@ -2287,12 +2322,12 @@ class RSpec::Core::Configuration # Set Ruby warnings on or off. # - # source://rspec-core//lib/rspec/core/configuration.rb#1734 + # source://rspec-core//lib/rspec/core/configuration.rb#1755 def warnings=(value); end # @return [Boolean] Whether or not ruby warnings are enabled. # - # source://rspec-core//lib/rspec/core/configuration.rb#1739 + # source://rspec-core//lib/rspec/core/configuration.rb#1760 def warnings?; end # Defines a callback that runs after the first example with matching @@ -2314,22 +2349,22 @@ class RSpec::Core::Configuration # end # end # - # source://rspec-core//lib/rspec/core/configuration.rb#1896 + # source://rspec-core//lib/rspec/core/configuration.rb#1917 def when_first_matching_example_defined(*filters); end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#2064 + # source://rspec-core//lib/rspec/core/configuration.rb#2085 def with_suite_hooks; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def world; end # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#499 + # source://rspec-core//lib/rspec/core/configuration.rb#518 def world=(_arg0); end private @@ -2338,111 +2373,111 @@ class RSpec::Core::Configuration # # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2220 + # source://rspec-core//lib/rspec/core/configuration.rb#2248 def absolute_pattern?(pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2321 + # source://rspec-core//lib/rspec/core/configuration.rb#2349 def add_hook_to_existing_matching_groups(meta, scope, &block); end # @raise [MustBeConfiguredBeforeExampleGroupsError] # - # source://rspec-core//lib/rspec/core/configuration.rb#2260 + # source://rspec-core//lib/rspec/core/configuration.rb#2288 def assert_no_example_groups_defined(config_option); end - # source://rspec-core//lib/rspec/core/configuration.rb#2310 + # source://rspec-core//lib/rspec/core/configuration.rb#2338 def clear_values_derived_from_example_status_persistence_file_path; end - # source://rspec-core//lib/rspec/core/configuration.rb#2242 + # source://rspec-core//lib/rspec/core/configuration.rb#2270 def command; end - # source://rspec-core//lib/rspec/core/configuration.rb#2286 + # source://rspec-core//lib/rspec/core/configuration.rb#2314 def conditionally_disable_expectations_monkey_patching; end - # source://rspec-core//lib/rspec/core/configuration.rb#2277 + # source://rspec-core//lib/rspec/core/configuration.rb#2305 def conditionally_disable_mocks_monkey_patching; end - # source://rspec-core//lib/rspec/core/configuration.rb#2315 + # source://rspec-core//lib/rspec/core/configuration.rb#2343 def configure_group_with(group, module_list, application_method); end - # source://rspec-core//lib/rspec/core/configuration.rb#2250 + # source://rspec-core//lib/rspec/core/configuration.rb#2278 def define_built_in_hooks; end - # source://rspec-core//lib/rspec/core/configuration.rb#2373 + # source://rspec-core//lib/rspec/core/configuration.rb#2401 def define_mixed_in_module(mod, filters, mod_list, config_method, &block); end - # source://rspec-core//lib/rspec/core/configuration.rb#2225 + # source://rspec-core//lib/rspec/core/configuration.rb#2253 def extract_location(path); end - # source://rspec-core//lib/rspec/core/configuration.rb#2202 + # source://rspec-core//lib/rspec/core/configuration.rb#2230 def file_glob_from(path, pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2191 + # source://rspec-core//lib/rspec/core/configuration.rb#2219 def gather_directories(path); end - # source://rspec-core//lib/rspec/core/configuration.rb#2170 + # source://rspec-core//lib/rspec/core/configuration.rb#2198 def get_files_to_run(paths); end - # source://rspec-core//lib/rspec/core/configuration.rb#2197 + # source://rspec-core//lib/rspec/core/configuration.rb#2225 def get_matching_files(path, pattern); end - # source://rspec-core//lib/rspec/core/configuration.rb#2137 + # source://rspec-core//lib/rspec/core/configuration.rb#2165 def handle_suite_hook(scope, meta); end - # source://rspec-core//lib/rspec/core/configuration.rb#2116 + # source://rspec-core//lib/rspec/core/configuration.rb#2137 def load_file_handling_errors(method, file); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2343 + # source://rspec-core//lib/rspec/core/configuration.rb#2371 def metadata_applies_to_group?(meta, group); end - # source://rspec-core//lib/rspec/core/configuration.rb#2335 + # source://rspec-core//lib/rspec/core/configuration.rb#2363 def on_existing_matching_groups(meta); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2273 + # source://rspec-core//lib/rspec/core/configuration.rb#2301 def output_to_tty?(output = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/configuration.rb#2269 + # source://rspec-core//lib/rspec/core/configuration.rb#2297 def output_wrapper; end - # source://rspec-core//lib/rspec/core/configuration.rb#2182 + # source://rspec-core//lib/rspec/core/configuration.rb#2210 def paths_to_check(paths); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2187 + # source://rspec-core//lib/rspec/core/configuration.rb#2215 def pattern_might_load_specs_from_vendored_dirs?; end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2296 + # source://rspec-core//lib/rspec/core/configuration.rb#2324 def rspec_expectations_loaded?; end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/configuration.rb#2292 + # source://rspec-core//lib/rspec/core/configuration.rb#2320 def rspec_mocks_loaded?; end - # source://rspec-core//lib/rspec/core/configuration.rb#2152 + # source://rspec-core//lib/rspec/core/configuration.rb#2180 def run_suite_hooks(hook_description, hooks); end - # source://rspec-core//lib/rspec/core/configuration.rb#2358 + # source://rspec-core//lib/rspec/core/configuration.rb#2386 def safe_extend(mod, host); end # :nocov: # - # source://rspec-core//lib/rspec/core/configuration.rb#2354 + # source://rspec-core//lib/rspec/core/configuration.rb#2382 def safe_include(mod, host); end - # source://rspec-core//lib/rspec/core/configuration.rb#2348 + # source://rspec-core//lib/rspec/core/configuration.rb#2376 def safe_prepend(mod, host); end - # source://rspec-core//lib/rspec/core/configuration.rb#2300 + # source://rspec-core//lib/rspec/core/configuration.rb#2328 def update_pattern_attr(name, value); end - # source://rspec-core//lib/rspec/core/configuration.rb#2246 + # source://rspec-core//lib/rspec/core/configuration.rb#2274 def value_for(key); end class << self @@ -2478,14 +2513,14 @@ class RSpec::Core::Configuration # @private # - # source://rspec-core//lib/rspec/core/configuration.rb#1645 + # source://rspec-core//lib/rspec/core/configuration.rb#1666 def delegate_to_ordering_manager(*methods); end end end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1625 +# source://rspec-core//lib/rspec/core/configuration.rb#1646 RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) # This buffer is used to capture all messages sent to the reporter during @@ -2495,33 +2530,33 @@ RSpec::Core::Configuration::DEFAULT_FORMATTER = T.let(T.unsafe(nil), Proc) # # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1018 +# source://rspec-core//lib/rspec/core/configuration.rb#1039 class RSpec::Core::Configuration::DeprecationReporterBuffer # @return [DeprecationReporterBuffer] a new instance of DeprecationReporterBuffer # - # source://rspec-core//lib/rspec/core/configuration.rb#1019 + # source://rspec-core//lib/rspec/core/configuration.rb#1040 def initialize; end - # source://rspec-core//lib/rspec/core/configuration.rb#1023 + # source://rspec-core//lib/rspec/core/configuration.rb#1044 def deprecation(*args); end - # source://rspec-core//lib/rspec/core/configuration.rb#1027 + # source://rspec-core//lib/rspec/core/configuration.rb#1048 def play_onto(reporter); end end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1794 +# source://rspec-core//lib/rspec/core/configuration.rb#1815 module RSpec::Core::Configuration::ExposeCurrentExample; end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1105 +# source://rspec-core//lib/rspec/core/configuration.rb#1126 RSpec::Core::Configuration::FAILED_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#728 +# source://rspec-core//lib/rspec/core/configuration.rb#749 RSpec::Core::Configuration::MOCKING_ADAPTERS = T.let(T.unsafe(nil), Hash) # @private @@ -2531,17 +2566,17 @@ class RSpec::Core::Configuration::MustBeConfiguredBeforeExampleGroupsError < ::S # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1108 +# source://rspec-core//lib/rspec/core/configuration.rb#1129 RSpec::Core::Configuration::PASSED_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1111 +# source://rspec-core//lib/rspec/core/configuration.rb#1132 RSpec::Core::Configuration::PENDING_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1744 +# source://rspec-core//lib/rspec/core/configuration.rb#1765 RSpec::Core::Configuration::RAISE_ERROR_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) # Module that holds `attr_reader` declarations. It's in a separate @@ -2605,6 +2640,9 @@ module RSpec::Core::Configuration::Readers # source://rspec-core//lib/rspec/core/configuration.rb#63 def fixture_paths; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def full_cause_backtrace; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 def global_fixtures; end @@ -2629,6 +2667,9 @@ module RSpec::Core::Configuration::Readers # source://rspec-core//lib/rspec/core/configuration.rb#63 def pending_color; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 + def pending_failure_output; end + # source://rspec-core//lib/rspec/core/configuration.rb#63 def project_source_dirs; end @@ -2671,12 +2712,12 @@ end # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1102 +# source://rspec-core//lib/rspec/core/configuration.rb#1123 RSpec::Core::Configuration::UNKNOWN_STATUS = T.let(T.unsafe(nil), String) # @private # -# source://rspec-core//lib/rspec/core/configuration.rb#1114 +# source://rspec-core//lib/rspec/core/configuration.rb#1135 RSpec::Core::Configuration::VALID_STATUSES = T.let(T.unsafe(nil), Array) # Responsible for utilizing externally provided configuration options, @@ -2720,22 +2761,22 @@ class RSpec::Core::ConfigurationOptions private - # source://rspec-core//lib/rspec/core/configuration_options.rb#169 + # source://rspec-core//lib/rspec/core/configuration_options.rb#173 def args_from_options_file(path); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#138 + # source://rspec-core//lib/rspec/core/configuration_options.rb#142 def command_line_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#142 + # source://rspec-core//lib/rspec/core/configuration_options.rb#146 def custom_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#183 + # source://rspec-core//lib/rspec/core/configuration_options.rb#188 def custom_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#129 + # source://rspec-core//lib/rspec/core/configuration_options.rb#133 def env_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#121 + # source://rspec-core//lib/rspec/core/configuration_options.rb#125 def file_options; end # @return [Boolean] @@ -2743,28 +2784,28 @@ class RSpec::Core::ConfigurationOptions # source://rspec-core//lib/rspec/core/configuration_options.rb#66 def force?(key); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#154 + # source://rspec-core//lib/rspec/core/configuration_options.rb#158 def global_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#195 + # source://rspec-core//lib/rspec/core/configuration_options.rb#200 def global_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#206 + # source://rspec-core//lib/rspec/core/configuration_options.rb#211 def home_options_file_path; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#117 + # source://rspec-core//lib/rspec/core/configuration_options.rb#121 def load_formatters_into(config); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#146 + # source://rspec-core//lib/rspec/core/configuration_options.rb#150 def local_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#191 + # source://rspec-core//lib/rspec/core/configuration_options.rb#196 def local_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#175 + # source://rspec-core//lib/rspec/core/configuration_options.rb#180 def options_file_as_erb_string(path); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#158 + # source://rspec-core//lib/rspec/core/configuration_options.rb#162 def options_from(path); end # source://rspec-core//lib/rspec/core/configuration_options.rb#70 @@ -2773,25 +2814,25 @@ class RSpec::Core::ConfigurationOptions # source://rspec-core//lib/rspec/core/configuration_options.rb#44 def organize_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#163 + # source://rspec-core//lib/rspec/core/configuration_options.rb#167 def parse_args_ignoring_files_or_dirs_to_run(args, source); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#109 + # source://rspec-core//lib/rspec/core/configuration_options.rb#113 def process_options_into(config); end - # source://rspec-core//lib/rspec/core/configuration_options.rb#150 + # source://rspec-core//lib/rspec/core/configuration_options.rb#154 def project_options; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#187 + # source://rspec-core//lib/rspec/core/configuration_options.rb#192 def project_options_file; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#222 + # source://rspec-core//lib/rspec/core/configuration_options.rb#227 def resolve_xdg_config_home; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#199 + # source://rspec-core//lib/rspec/core/configuration_options.rb#204 def xdg_options_file_if_exists; end - # source://rspec-core//lib/rspec/core/configuration_options.rb#215 + # source://rspec-core//lib/rspec/core/configuration_options.rb#220 def xdg_options_file_path; end end @@ -5370,7 +5411,7 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#16 def initialize(exception, example, options = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#73 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#78 def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#33 @@ -5399,10 +5440,10 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#45 def formatted_cause(exception); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#79 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#84 def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#84 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#89 def fully_formatted_lines(failure_number, colorizer); end # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#29 @@ -5410,7 +5451,7 @@ class RSpec::Core::Formatters::ExceptionPresenter private - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#207 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#224 def add_shared_group_lines(lines, colorizer); end # Returns the value of attribute backtrace_formatter. @@ -5425,27 +5466,27 @@ class RSpec::Core::Formatters::ExceptionPresenter # for 1.8.7 # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#265 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#282 def encoded_description(description); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#115 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#120 def encoded_string(string); end # :nocov: # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#111 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#116 def encoding_of(string); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#275 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#292 def exception_backtrace; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#145 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#150 def exception_class_name(exception = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#185 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#202 def exception_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#178 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#184 def exception_message_string(exception); end # Returns the value of attribute extra_detail_formatter. @@ -5453,25 +5494,25 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 def extra_detail_formatter; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#196 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#213 def extra_failure_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#151 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#156 def failure_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#165 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#170 def failure_slash_error_lines; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#99 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#104 def final_exception(exception, previous = T.unsafe(nil)); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#241 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#258 def find_failed_line; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#256 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#273 def formatted_message_and_backtrace(colorizer); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#129 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#134 def indent_lines(lines, failure_number); end # Returns the value of attribute message_color. @@ -5479,7 +5520,7 @@ class RSpec::Core::Formatters::ExceptionPresenter # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#12 def message_color; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#217 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#234 def read_failed_lines; end end @@ -5490,49 +5531,49 @@ end # # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#284 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#301 class RSpec::Core::Formatters::ExceptionPresenter::Factory # @return [Factory] a new instance of Factory # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#291 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#308 def initialize(example); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#285 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#302 def build; end private - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#342 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#363 def multiple_exception_summarizer(exception, prior_detail_formatter, color); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#338 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#359 def multiple_exceptions_error?(exception); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#301 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#318 def options; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#305 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#322 def pending_options; end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#363 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#384 def sub_failure_list_formatter(exception, message_color); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#322 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#343 def with_multiple_error_options_as_needed(exception, options); end end # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#396 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#417 class RSpec::Core::Formatters::ExceptionPresenter::Factory::CommonBacktraceTruncater # @return [CommonBacktraceTruncater] a new instance of CommonBacktraceTruncater # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#397 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#418 def initialize(parent); end - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#401 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#422 def with_truncated_backtrace(child); end end @@ -5541,17 +5582,17 @@ end # # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#389 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#410 module RSpec::Core::Formatters::ExceptionPresenter::Factory::EmptyBacktraceFormatter class << self - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#390 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#411 def format_backtrace(*_arg0); end end end # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#421 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#442 RSpec::Core::Formatters::ExceptionPresenter::PENDING_DETAIL_FORMATTER = T.let(T.unsafe(nil), Proc) # @private @@ -5816,20 +5857,20 @@ class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFo # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#13 def initialize(output); end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#55 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#56 def close(_notification); end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#59 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#60 def dump_profile(profile); end # @api private # - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#78 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#79 def dump_profile_slowest_example_groups(profile); end # @api private # - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#66 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#67 def dump_profile_slowest_examples(profile); end # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#24 @@ -5843,15 +5884,15 @@ class RSpec::Core::Formatters::JsonFormatter < ::RSpec::Core::Formatters::BaseFo # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#11 def output_hash; end - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#50 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#51 def seed(notification); end # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#35 - def stop(notification); end + def stop(group_notification); end private - # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#87 + # source://rspec-core//lib/rspec/core/formatters/json_formatter.rb#88 def format_example(example); end end @@ -6794,11 +6835,11 @@ module RSpec::Core::Hooks # invoked but before any `after` context hooks. # # @api public + # @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. - # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. # @overload after # @overload after # @overload after @@ -7023,7 +7064,6 @@ 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, @@ -7031,6 +7071,7 @@ module RSpec::Core::Hooks # 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. + # @note `:example`/`:each` is the only supported scope. # @overload around # @overload around # @overload around @@ -7256,11 +7297,11 @@ module RSpec::Core::Hooks # invoked but before any `after` context hooks. # # @api public + # @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. - # @note The `:example` and `:context` scopes are also available as - # `:each` and `:all`, respectively. Use whichever you prefer. # @overload after # @overload after # @overload after @@ -8320,57 +8361,57 @@ end # individual spec has multiple exceptions, such as one in the `it` block # and one in an `after` block. # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#431 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#452 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#492 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#513 def initialize(*exceptions); end # @return [nil] Provided only for interface compatibility with # `RSpec::Expectations::MultipleExpectationsNotMetError`. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#489 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#510 def aggregation_block_label; end # @return [Hash] Metadata used by RSpec for formatting purposes. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#485 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#506 def aggregation_metadata; end # @return [Array] The list of failures and other exceptions, combined. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#482 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#503 def all_exceptions; end # return [String] A description of the failure/error counts. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#517 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#538 def exception_count_description; end # @return [Array] The list of failures. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#476 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#497 def failures; end # @note RSpec does not actually use this -- instead it formats each exception # individually. # @return [String] Combines all the exception messages into a single string. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#507 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#528 def message; end # @return [Array] The list of other errors. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#479 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#500 def other_errors; end # @return [String] A summary of the failure, including the block label and a count of failures. # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#512 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#533 def summary; end end @@ -8381,14 +8422,14 @@ end # # @private # -# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#437 +# source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#458 module RSpec::Core::MultipleExceptionError::InterfaceTag # Appends the provided exception to the list. # # @param exception [Exception] Exception to append to the list. # @private # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#441 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#462 def add(exception); end class << self @@ -8398,7 +8439,7 @@ module RSpec::Core::MultipleExceptionError::InterfaceTag # # @private # - # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#467 + # source://rspec-core//lib/rspec/core/formatters/exception_presenter.rb#488 def for(ex); end end end @@ -8413,7 +8454,7 @@ module RSpec::Core::Notifications; end # other registered listeners, it creates attributes based on supplied hash # of options. # -# source://rspec-core//lib/rspec/core/notifications.rb#510 +# source://rspec-core//lib/rspec/core/notifications.rb#512 class RSpec::Core::Notifications::CustomNotification < ::Struct class << self # Build a custom notification based on the supplied option key / values. @@ -8421,7 +8462,7 @@ class RSpec::Core::Notifications::CustomNotification < ::Struct # @param options [Hash] A hash of method / value pairs to create on this notification # @return [CustomNotification] # - # source://rspec-core//lib/rspec/core/notifications.rb#515 + # source://rspec-core//lib/rspec/core/notifications.rb#517 def for(options = T.unsafe(nil)); end end end @@ -8437,7 +8478,7 @@ end # @attr call_site [String] An optional call site from which the deprecation # was issued # -# source://rspec-core//lib/rspec/core/notifications.rb#491 +# source://rspec-core//lib/rspec/core/notifications.rb#493 class RSpec::Core::Notifications::DeprecationNotification < ::Struct # An optional call site from which the deprecation # was issued @@ -8494,7 +8535,7 @@ class RSpec::Core::Notifications::DeprecationNotification < ::Struct # # @api # - # source://rspec-core//lib/rspec/core/notifications.rb#497 + # source://rspec-core//lib/rspec/core/notifications.rb#499 def from_hash(data); end def inspect; end @@ -8610,7 +8651,7 @@ class RSpec::Core::Notifications::ExamplesNotification private - # source://rspec-core//lib/rspec/core/notifications.rb#134 + # source://rspec-core//lib/rspec/core/notifications.rb#136 def format_examples(examples); end end @@ -8627,11 +8668,11 @@ end # end # @see ExampleNotification # -# source://rspec-core//lib/rspec/core/notifications.rb#154 +# source://rspec-core//lib/rspec/core/notifications.rb#156 class RSpec::Core::Notifications::FailedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification # @return [FailedExampleNotification] a new instance of FailedExampleNotification # - # source://rspec-core//lib/rspec/core/notifications.rb#211 + # source://rspec-core//lib/rspec/core/notifications.rb#213 def initialize(example, exception_presenter = T.unsafe(nil)); end # Returns the failures colorized formatted backtrace. @@ -8639,7 +8680,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#193 + # source://rspec-core//lib/rspec/core/notifications.rb#195 def colorized_formatted_backtrace(colorizer = T.unsafe(nil)); end # Returns the message generated for this failure colorized line by line. @@ -8647,43 +8688,43 @@ 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#178 + # source://rspec-core//lib/rspec/core/notifications.rb#180 def colorized_message_lines(colorizer = T.unsafe(nil)); end # @return [String] The example description # - # source://rspec-core//lib/rspec/core/notifications.rb#163 + # source://rspec-core//lib/rspec/core/notifications.rb#165 def description; end # @return [Exception] The example failure # - # source://rspec-core//lib/rspec/core/notifications.rb#158 + # source://rspec-core//lib/rspec/core/notifications.rb#160 def exception; end # Returns the failures formatted backtrace. # # @return [Array] the examples backtrace lines # - # source://rspec-core//lib/rspec/core/notifications.rb#185 + # source://rspec-core//lib/rspec/core/notifications.rb#187 def formatted_backtrace; end # @return [String] The failure information fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#199 + # source://rspec-core//lib/rspec/core/notifications.rb#201 def fully_formatted(failure_number, colorizer = T.unsafe(nil)); end # @return [Array] The failure information fully formatted in the way that # RSpec's built-in formatters emit, split by line. # - # source://rspec-core//lib/rspec/core/notifications.rb#205 + # source://rspec-core//lib/rspec/core/notifications.rb#207 def fully_formatted_lines(failure_number, colorizer = T.unsafe(nil)); end # Returns the message generated for this failure line by line. # # @return [Array] The example failure message # - # source://rspec-core//lib/rspec/core/notifications.rb#170 + # source://rspec-core//lib/rspec/core/notifications.rb#172 def message_lines; end class << self @@ -8702,7 +8743,7 @@ end # puts "Hey I started #{notification.group.description}" # end # -# source://rspec-core//lib/rspec/core/notifications.rb#256 +# source://rspec-core//lib/rspec/core/notifications.rb#258 class RSpec::Core::Notifications::GroupNotification < ::Struct # the current group # @@ -8729,7 +8770,7 @@ end # # @attr message [String] the message # -# source://rspec-core//lib/rspec/core/notifications.rb#262 +# source://rspec-core//lib/rspec/core/notifications.rb#264 class RSpec::Core::Notifications::MessageNotification < ::Struct # the message # @@ -8769,17 +8810,17 @@ end # `NullNotification` represents a placeholder value for notifications that # currently require no information, but we may wish to extend in future. # -# source://rspec-core//lib/rspec/core/notifications.rb#504 +# source://rspec-core//lib/rspec/core/notifications.rb#506 class RSpec::Core::Notifications::NullNotification; end # @deprecated Use {FailedExampleNotification} instead. # -# source://rspec-core//lib/rspec/core/notifications.rb#221 +# source://rspec-core//lib/rspec/core/notifications.rb#223 class RSpec::Core::Notifications::PendingExampleFailedAsExpectedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end # @deprecated Use {FailedExampleNotification} instead. # -# source://rspec-core//lib/rspec/core/notifications.rb#218 +# source://rspec-core//lib/rspec/core/notifications.rb#220 class RSpec::Core::Notifications::PendingExampleFixedNotification < ::RSpec::Core::Notifications::FailedExampleNotification; end # The `ProfileNotification` holds information about the results of running a @@ -8791,57 +8832,57 @@ 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#427 +# source://rspec-core//lib/rspec/core/notifications.rb#429 class RSpec::Core::Notifications::ProfileNotification # @return [ProfileNotification] a new instance of ProfileNotification # - # source://rspec-core//lib/rspec/core/notifications.rb#428 + # source://rspec-core//lib/rspec/core/notifications.rb#430 def initialize(duration, examples, number_of_examples, example_groups); end # the time taken (in seconds) to run the suite # # @return [Float] the current value of duration # - # source://rspec-core//lib/rspec/core/notifications.rb#434 + # source://rspec-core//lib/rspec/core/notifications.rb#436 def duration; end # the examples run # # @return [Array] the current value of examples # - # source://rspec-core//lib/rspec/core/notifications.rb#434 + # source://rspec-core//lib/rspec/core/notifications.rb#436 def examples; end # the number of examples to profile # # @return [Fixnum] the current value of number_of_examples # - # source://rspec-core//lib/rspec/core/notifications.rb#434 + # source://rspec-core//lib/rspec/core/notifications.rb#436 def number_of_examples; end # @return [String] the percentage of total time taken # - # source://rspec-core//lib/rspec/core/notifications.rb#453 + # source://rspec-core//lib/rspec/core/notifications.rb#455 def percentage; end # @return [Float] the time taken (in seconds) to run the slowest examples # - # source://rspec-core//lib/rspec/core/notifications.rb#445 + # source://rspec-core//lib/rspec/core/notifications.rb#447 def slow_duration; end # @return [Array] the slowest examples # - # source://rspec-core//lib/rspec/core/notifications.rb#437 + # source://rspec-core//lib/rspec/core/notifications.rb#439 def slowest_examples; end # @return [Array] the slowest example groups # - # source://rspec-core//lib/rspec/core/notifications.rb#462 + # source://rspec-core//lib/rspec/core/notifications.rb#464 def slowest_groups; end private - # source://rspec-core//lib/rspec/core/notifications.rb#468 + # source://rspec-core//lib/rspec/core/notifications.rb#470 def calculate_slowest_groups; end end @@ -8851,12 +8892,12 @@ end # @attr seed [Fixnum] the seed used to randomize ordering # @attr used [Boolean] whether the seed has been used or not # -# source://rspec-core//lib/rspec/core/notifications.rb#269 +# source://rspec-core//lib/rspec/core/notifications.rb#271 class RSpec::Core::Notifications::SeedNotification < ::Struct # @return [String] The seed information fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#280 + # source://rspec-core//lib/rspec/core/notifications.rb#282 def fully_formatted; end # the seed used to randomize ordering @@ -8873,7 +8914,7 @@ class RSpec::Core::Notifications::SeedNotification < ::Struct # @api # @return [Boolean] has the seed been used? # - # source://rspec-core//lib/rspec/core/notifications.rb#273 + # source://rspec-core//lib/rspec/core/notifications.rb#275 def seed_used?; end # whether the seed has been used or not @@ -8904,12 +8945,12 @@ end # @attr example [RSpec::Core::Example] the current example # @see ExampleNotification # -# source://rspec-core//lib/rspec/core/notifications.rb#228 +# source://rspec-core//lib/rspec/core/notifications.rb#230 class RSpec::Core::Notifications::SkippedExampleNotification < ::RSpec::Core::Notifications::ExampleNotification # @return [String] The pending detail fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#233 + # source://rspec-core//lib/rspec/core/notifications.rb#235 def fully_formatted(pending_number, colorizer = T.unsafe(nil)); end class << self @@ -8974,7 +9015,7 @@ end # have occurred processing # the spec suite # -# source://rspec-core//lib/rspec/core/notifications.rb#298 +# source://rspec-core//lib/rspec/core/notifications.rb#300 class RSpec::Core::Notifications::SummaryNotification < ::Struct include ::RSpec::Core::ShellEscape @@ -8985,7 +9026,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # specific colors. # @return [String] A colorized summary line. # - # source://rspec-core//lib/rspec/core/notifications.rb#362 + # source://rspec-core//lib/rspec/core/notifications.rb#364 def colorized_rerun_commands(colorizer = T.unsafe(nil)); end # Wraps the results line with colors based on the configured @@ -8997,7 +9038,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # specific colors. # @return [String] A colorized results line. # - # source://rspec-core//lib/rspec/core/notifications.rb#345 + # source://rspec-core//lib/rspec/core/notifications.rb#347 def colorized_totals_line(colorizer = T.unsafe(nil)); end # the time taken (in seconds) to run the suite @@ -9029,7 +9070,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [Fixnum] the number of examples run # - # source://rspec-core//lib/rspec/core/notifications.rb#304 + # source://rspec-core//lib/rspec/core/notifications.rb#306 def example_count; end # the examples run @@ -9057,25 +9098,25 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [Fixnum] the number of failed examples # - # source://rspec-core//lib/rspec/core/notifications.rb#310 + # source://rspec-core//lib/rspec/core/notifications.rb#312 def failure_count; end # @return [String] a formatted version of the time it took to run the # suite # - # source://rspec-core//lib/rspec/core/notifications.rb#372 + # source://rspec-core//lib/rspec/core/notifications.rb#374 def formatted_duration; end # @return [String] a formatted version of the time it took to boot RSpec # and load the spec files # - # source://rspec-core//lib/rspec/core/notifications.rb#378 + # source://rspec-core//lib/rspec/core/notifications.rb#380 def formatted_load_time; end # @return [String] The summary information fully formatted in the way that # RSpec's built-in formatters emit. # - # source://rspec-core//lib/rspec/core/notifications.rb#384 + # source://rspec-core//lib/rspec/core/notifications.rb#386 def fully_formatted(colorizer = T.unsafe(nil)); end # the number of seconds taken to boot RSpec @@ -9094,7 +9135,7 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [Fixnum] the number of pending examples # - # source://rspec-core//lib/rspec/core/notifications.rb#316 + # source://rspec-core//lib/rspec/core/notifications.rb#318 def pending_count; end # the pending examples @@ -9111,15 +9152,15 @@ class RSpec::Core::Notifications::SummaryNotification < ::Struct # @api # @return [String] A line summarising the result totals of the spec run. # - # source://rspec-core//lib/rspec/core/notifications.rb#322 + # source://rspec-core//lib/rspec/core/notifications.rb#324 def totals_line; end private - # source://rspec-core//lib/rspec/core/notifications.rb#406 + # source://rspec-core//lib/rspec/core/notifications.rb#408 def duplicate_rerun_locations; end - # source://rspec-core//lib/rspec/core/notifications.rb#400 + # source://rspec-core//lib/rspec/core/notifications.rb#402 def rerun_argument_for(example); end class << self @@ -9156,38 +9197,38 @@ module RSpec::Core::Ordering; end # the APIs provided by `RSpec::Core::Configuration` instead. # @private # -# source://rspec-core//lib/rspec/core/ordering.rb#116 +# source://rspec-core//lib/rspec/core/ordering.rb#144 class RSpec::Core::Ordering::ConfigurationManager # @return [ConfigurationManager] a new instance of ConfigurationManager # - # source://rspec-core//lib/rspec/core/ordering.rb#119 + # source://rspec-core//lib/rspec/core/ordering.rb#147 def initialize; end - # source://rspec-core//lib/rspec/core/ordering.rb#151 + # source://rspec-core//lib/rspec/core/ordering.rb#190 def force(hash); end - # source://rspec-core//lib/rspec/core/ordering.rb#136 + # source://rspec-core//lib/rspec/core/ordering.rb#164 def order=(type); end # Returns the value of attribute ordering_registry. # - # source://rspec-core//lib/rspec/core/ordering.rb#117 + # source://rspec-core//lib/rspec/core/ordering.rb#145 def ordering_registry; end - # source://rspec-core//lib/rspec/core/ordering.rb#162 + # source://rspec-core//lib/rspec/core/ordering.rb#201 def register_ordering(name, strategy = T.unsafe(nil)); end # Returns the value of attribute seed. # - # source://rspec-core//lib/rspec/core/ordering.rb#117 + # source://rspec-core//lib/rspec/core/ordering.rb#145 def seed; end - # source://rspec-core//lib/rspec/core/ordering.rb#130 + # source://rspec-core//lib/rspec/core/ordering.rb#158 def seed=(seed); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/ordering.rb#126 + # source://rspec-core//lib/rspec/core/ordering.rb#154 def seed_used?; end end @@ -9206,6 +9247,29 @@ class RSpec::Core::Ordering::Custom def order(list); end end +# A strategy which delays looking up the ordering until needed +# +# @private +# +# source://rspec-core//lib/rspec/core/ordering.rb#83 +class RSpec::Core::Ordering::Delayed + # @return [Delayed] a new instance of Delayed + # + # source://rspec-core//lib/rspec/core/ordering.rb#84 + def initialize(registry, name); end + + # source://rspec-core//lib/rspec/core/ordering.rb#89 + def order(list); end + + private + + # source://rspec-core//lib/rspec/core/ordering.rb#99 + def lookup_strategy; end + + # source://rspec-core//lib/rspec/core/ordering.rb#95 + def strategy; end +end + # The default global ordering (defined order). # # @private @@ -9264,22 +9328,27 @@ end # # @private # -# source://rspec-core//lib/rspec/core/ordering.rb#83 +# source://rspec-core//lib/rspec/core/ordering.rb#107 class RSpec::Core::Ordering::Registry # @return [Registry] a new instance of Registry # - # source://rspec-core//lib/rspec/core/ordering.rb#84 + # source://rspec-core//lib/rspec/core/ordering.rb#108 def initialize(configuration); end - # source://rspec-core//lib/rspec/core/ordering.rb#98 + # source://rspec-core//lib/rspec/core/ordering.rb#122 def fetch(name, &fallback); end - # source://rspec-core//lib/rspec/core/ordering.rb#102 + # @return [Boolean] + # + # source://rspec-core//lib/rspec/core/ordering.rb#126 + def has_strategy?(name); end + + # source://rspec-core//lib/rspec/core/ordering.rb#130 def register(sym, strategy); end # @return [Boolean] # - # source://rspec-core//lib/rspec/core/ordering.rb#106 + # source://rspec-core//lib/rspec/core/ordering.rb#134 def used_random_seed?; end end @@ -9317,6 +9386,12 @@ class RSpec::Core::OutputWrapper # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def binmode?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def buffered=(*args, &block); end + + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 + def buffered?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def check_winsize_changed(*args, &block); end @@ -9546,6 +9621,9 @@ class RSpec::Core::OutputWrapper # source://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 + def readable?(*args, &block); end + # source://rspec-core//lib/rspec/core/output_wrapper.rb#23 def readbyte(*args, &block); end @@ -10103,7 +10181,7 @@ class RSpec::Core::Runner # @private # - # source://rspec-core//lib/rspec/core/runner.rb#190 + # source://rspec-core//lib/rspec/core/runner.rb#194 def exit_code(examples_passed = T.unsafe(nil)); end # @attr_reader @@ -10146,7 +10224,7 @@ class RSpec::Core::Runner private - # source://rspec-core//lib/rspec/core/runner.rb#199 + # source://rspec-core//lib/rspec/core/runner.rb#203 def persist_example_statuses; end class << self @@ -10729,7 +10807,8 @@ end # source://rspec-core//lib/rspec/core.rb#174 class RSpec::Core::Time class << self - def now(in: T.unsafe(nil)); end + # source://timecop/0.9.10/lib/timecop/time_extensions.rb#13 + def now; end end end diff --git a/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi b/sorbet/rbi/gems/rspec-expectations@3.13.1.rbi similarity index 97% rename from sorbet/rbi/gems/rspec-expectations@3.12.3.rbi rename to sorbet/rbi/gems/rspec-expectations@3.13.1.rbi index ee858ca72..d835e6a59 100644 --- a/sorbet/rbi/gems/rspec-expectations@3.12.3.rbi +++ b/sorbet/rbi/gems/rspec-expectations@3.13.1.rbi @@ -4,85 +4,86 @@ # 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.12.2/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def feature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def ffeature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xfeature(*args, &example_group_block); end end end @@ -3372,6 +3373,18 @@ RSpec::Matchers::AliasedNegatedMatcher::DefaultFailureMessages = RSpec::Matchers # source://rspec-expectations//lib/rspec/matchers.rb#957 RSpec::Matchers::BE_PREDICATE_REGEX = T.let(T.unsafe(nil), Regexp) +# Provides a base class with as little methods as possible, so that +# most methods can be delegated via `method_missing`. +# +# On Ruby 2.0+ BasicObject could be used for this purpose, but it +# introduce some extra complexity with constant resolution, so the +# BlankSlate pattern was prefered. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#10 +class RSpec::Matchers::BaseDelegator; end + # Container module for all built-in matchers. The matcher classes are here # (rather than directly under `RSpec::Matchers`) in order to prevent name # collisions, since `RSpec::Matchers` gets included into the user's namespace. @@ -3482,6 +3495,7 @@ end class RSpec::Matchers::BuiltIn::BaseMatcher include ::RSpec::Matchers::Composable include ::RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting + include ::RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting include ::RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @api private @@ -3628,7 +3642,7 @@ end # # @api private # -# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#166 +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#207 module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # Provides a good generic failure message. Based on `description`. # When subclassing, if you are not satisfied with this failure message @@ -3637,7 +3651,7 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#172 + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#213 def failure_message; end # Provides a good generic negative failure message. Based on `description`. @@ -3647,7 +3661,7 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#181 + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#222 def failure_message_when_negated; end class << self @@ -3655,7 +3669,7 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::DefaultFailureMessages # @private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#186 + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#227 def has_default_failure_messages?(matcher); end end end @@ -3700,6 +3714,46 @@ module RSpec::Matchers::BuiltIn::BaseMatcher::HashFormatting end end +# @api private +# @private +# +# source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#165 +module RSpec::Matchers::BuiltIn::BaseMatcher::StringEncodingFormatting + private + + # Formats a String's encoding as a human readable string + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#188 + def format_encoding(value); end + + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#171 + def string_encoding_differs?; end + + class << self + # Formats a String's encoding as a human readable string + # + # @api private + # @param _value [String] + # @return [nil] nil as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#188 + def format_encoding(value); end + + # @api private + # @return [Boolean] False always as the curent Ruby version does not support String encoding + # + # source://rspec-expectations//lib/rspec/matchers/built_in/base_matcher.rb#171 + def string_encoding_differs?; end + end +end + # Used to detect when no arg is passed to `initialize`. # `nil` cannot be used because it's a valid value to pass. # @@ -4531,7 +4585,7 @@ class RSpec::Matchers::BuiltIn::Compound < ::RSpec::Matchers::BuiltIn::BaseMatch def evaluator; end # @api private - # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # @return [RSpec::Matchers::MultiMatcherDiff] # # source://rspec-expectations//lib/rspec/matchers/built_in/compound.rb#55 def expected; end @@ -5392,13 +5446,13 @@ class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#22 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#26 def description; end # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#28 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#32 def diffable?; end # @api private @@ -5410,14 +5464,14 @@ class RSpec::Matchers::BuiltIn::Eq < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#16 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#20 def failure_message_when_negated; end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#34 + # source://rspec-expectations//lib/rspec/matchers/built_in/eq.rb#38 def match(expected, actual); end end @@ -5431,7 +5485,7 @@ class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [Boolean] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#22 + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#26 def diffable?; end # @api private @@ -5443,14 +5497,14 @@ class RSpec::Matchers::BuiltIn::Eql < ::RSpec::Matchers::BuiltIn::BaseMatcher # @api private # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#16 + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#20 def failure_message_when_negated; end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#28 + # source://rspec-expectations//lib/rspec/matchers/built_in/eql.rb#32 def match(expected, actual); end end @@ -6194,176 +6248,176 @@ class RSpec::Matchers::BuiltIn::RaiseError # @api private # @return [RaiseError] a new instance of RaiseError # - # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#18 + # 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#113 + # 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#79 + # 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#95 + # 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#101 + # 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#107 + # 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#48 + # 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#85 + # 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#90 + # 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#39 + # 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#119 + # 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#133 + # 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#129 + # 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#141 + # 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#125 + # 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#222 + # 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#253 + # 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#237 + # 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#242 + # 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#172 + # 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#257 + # 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#137 + # 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#151 + # 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#184 + # 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#176 + # 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#210 + # 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#197 + # 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#180 + # 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#156 + # 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#262 + # source://rspec-expectations//lib/rspec/matchers/built_in/raise_error.rb#266 def warning; end end @@ -6372,9 +6426,13 @@ end # 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#16 +# 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 @@ -7519,19 +7577,19 @@ module RSpec::Matchers::DSL # 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" - # @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 old_name [Symbol] the original 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 @@ -7990,17 +8048,52 @@ module RSpec::Matchers::EnglishPhrasing end end -# Handles list of expected values when there is a need to render -# multiple diffs. Also can handle one value. +# source://rspec-expectations//lib/rspec/matchers.rb#958 +RSpec::Matchers::HAS_REGEX = T.let(T.unsafe(nil), Regexp) + +# Provides the necessary plumbing to wrap a matcher with a decorator. +# +# @private +# +# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#31 +class RSpec::Matchers::MatcherDelegator < ::RSpec::Matchers::BaseDelegator + include ::RSpec::Matchers::Composable + + # @return [MatcherDelegator] a new instance of MatcherDelegator + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#35 + def initialize(base_matcher); end + + # Returns the value of attribute base_matcher. + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#33 + def base_matcher; end + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#39 + def method_missing(*args, &block); end + + private + + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#55 + def initialize_copy(other); end + + # @return [Boolean] + # + # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#44 + def respond_to_missing?(name, include_all = T.unsafe(nil)); end +end + +# Handles list of expected and actual value pairs when there is a need +# to render multiple diffs. Also can handle one pair. # # @api private # -# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#6 -class RSpec::Matchers::ExpectedsForMultipleDiffs +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#6 +class RSpec::Matchers::MultiMatcherDiff # @api private - # @return [ExpectedsForMultipleDiffs] a new instance of ExpectedsForMultipleDiffs + # @return [MultiMatcherDiff] a new instance of MultiMatcherDiff # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#16 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#16 def initialize(expected_list); end # Returns message with diff(s) appended for provided differ @@ -8009,51 +8102,51 @@ class RSpec::Matchers::ExpectedsForMultipleDiffs # @api private # @param message [String] original failure message # @param differ [Proc] - # @param actual [Any] value # @return [String] # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#47 - def message_with_diff(message, differ, actual); end + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#47 + def message_with_diff(message, differ); end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#68 - def diffs(differ, actual); end + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#68 + def diffs(differ); end class << self # Wraps provided matcher list in instance of - # ExpectedForMultipleDiffs. + # MultiMatcherDiff. # # @api private # @param matchers [Array] list of matchers to wrap - # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # @return [RSpec::Matchers::MultiMatcherDiff] # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#36 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#37 def for_many_matchers(matchers); end # Wraps provided expected value in instance of - # ExpectedForMultipleDiffs. If provided value is already an - # ExpectedForMultipleDiffs then it just returns it. + # MultiMatcherDiff. If provided value is already an + # MultiMatcherDiff then it just returns it. # # @api private # @param expected [Any] value to be wrapped - # @return [RSpec::Matchers::ExpectedsForMultipleDiffs] + # @param actual [Any] value + # @return [RSpec::Matchers::MultiMatcherDiff] # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#26 - def from(expected); end + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#27 + def from(expected, actual); end private # @api private # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#58 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#58 def diff_label_for(matcher); end # @api private # - # source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#62 + # source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#62 def truncated(description); end end end @@ -8064,48 +8157,13 @@ end # @api private # @private # -# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#10 -RSpec::Matchers::ExpectedsForMultipleDiffs::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#10 +RSpec::Matchers::MultiMatcherDiff::DEFAULT_DIFF_LABEL = T.let(T.unsafe(nil), String) # Maximum readable matcher description length # # @api private # @private # -# source://rspec-expectations//lib/rspec/matchers/expecteds_for_multiple_diffs.rb#14 -RSpec::Matchers::ExpectedsForMultipleDiffs::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) - -# source://rspec-expectations//lib/rspec/matchers.rb#958 -RSpec::Matchers::HAS_REGEX = T.let(T.unsafe(nil), Regexp) - -# Provides the necessary plumbing to wrap a matcher with a decorator. -# -# @private -# -# source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#5 -class RSpec::Matchers::MatcherDelegator - include ::RSpec::Matchers::Composable - - # @return [MatcherDelegator] a new instance of MatcherDelegator - # - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#9 - def initialize(base_matcher); end - - # Returns the value of attribute base_matcher. - # - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#7 - def base_matcher; end - - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#13 - def method_missing(*args, &block); end - - private - - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#29 - def initialize_copy(other); end - - # @return [Boolean] - # - # source://rspec-expectations//lib/rspec/matchers/matcher_delegator.rb#18 - def respond_to_missing?(name, include_all = T.unsafe(nil)); end -end +# source://rspec-expectations//lib/rspec/matchers/multi_matcher_diff.rb#14 +RSpec::Matchers::MultiMatcherDiff::DESCRIPTION_MAX_LENGTH = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi b/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi similarity index 74% rename from sorbet/rbi/gems/rspec-mocks@3.12.6.rbi rename to sorbet/rbi/gems/rspec-mocks@3.13.1.rbi index aa7a21c1b..5dfccabff 100644 --- a/sorbet/rbi/gems/rspec-mocks@3.12.6.rbi +++ b/sorbet/rbi/gems/rspec-mocks@3.13.1.rbi @@ -4,85 +4,86 @@ # This is an autogenerated file for types exported from the `rspec-mocks` gem. # Please instead update this file by running `bin/tapioca gem rspec-mocks`. + # Share the top-level RSpec namespace, because we are a core supported # extension. # # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#6 module RSpec class << self - # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def feature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def ffeature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xfeature(*args, &example_group_block); end end end @@ -111,7 +112,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(kind_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#121 def a_kind_of(klass); end # Matches if `arg.instance_of?(klass)` @@ -119,7 +120,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(instance_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#101 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 def an_instance_of(klass); end # Acts like an arg splat, matching any number of args at any point in an arg list. @@ -143,6 +144,15 @@ module RSpec::Mocks::ArgumentMatchers # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#34 def anything; end + # Matches an array that excludes the specified items. + # + # @example + # expect(object).to receive(:message).with(array_excluding(1,2,3)) + # expect(object).to receive(:message).with(array_excluding([1,2,3])) + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#100 + def array_excluding(*args); end + # Matches an array that includes the specified items at least once. # Ignores duplicates and additional values # @@ -150,7 +160,7 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(array_including(1,2,3)) # expect(object).to receive(:message).with(array_including([1,2,3])) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#90 def array_including(*args); end # Matches a boolean value. @@ -177,7 +187,7 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(hash_excluding(:key)) # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#91 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 def hash_excluding(*args); end # Matches a hash that includes the specified key(s) or key/value pairs. @@ -198,7 +208,7 @@ module RSpec::Mocks::ArgumentMatchers # expect(object).to receive(:message).with(hash_excluding(:key)) # expect(object).to receive(:message).with(hash_excluding(:key, :key2 => :val2)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#91 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#80 def hash_not_including(*args); end # Matches if `arg.instance_of?(klass)` @@ -206,7 +216,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(instance_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#101 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 def instance_of(klass); end # Matches if `arg.kind_of?(klass)` @@ -214,7 +224,7 @@ module RSpec::Mocks::ArgumentMatchers # @example # expect(object).to receive(:message).with(kind_of(Thing)) # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#111 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#121 def kind_of(klass); end # Matches no arguments. @@ -228,171 +238,192 @@ module RSpec::Mocks::ArgumentMatchers class << self # @private # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#118 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#128 def anythingize_lonely_keys(*args); end end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#149 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#159 class RSpec::Mocks::ArgumentMatchers::AnyArgMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#150 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#160 def ===(_other); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#154 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#164 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::AnyArgMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgMatcher) # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#142 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#152 class RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#153 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::AnyArgsMatcher) # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#232 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#274 +class RSpec::Mocks::ArgumentMatchers::ArrayExcludingMatcher + # @return [ArrayExcludingMatcher] a new instance of ArrayExcludingMatcher + # + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#275 + def initialize(unexpected); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#279 + def ===(actual); end + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 + def description; end + + private + + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#298 + def formatted_unexpected_values; end +end + +# @private +# +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#242 class RSpec::Mocks::ArgumentMatchers::ArrayIncludingMatcher # @return [ArrayIncludingMatcher] a new instance of ArrayIncludingMatcher # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#233 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#243 def initialize(expected); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#237 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#247 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#248 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#260 def description; end private - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#254 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#266 def formatted_expected_values; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#178 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#188 class RSpec::Mocks::ArgumentMatchers::BaseHashMatcher # @return [BaseHashMatcher] a new instance of BaseHashMatcher # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#179 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#189 def initialize(expected); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#183 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#193 def ===(predicate, actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#191 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#201 def description(name); end private - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#197 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#207 def formatted_expected_hash; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#167 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#177 class RSpec::Mocks::ArgumentMatchers::BooleanMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#168 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#178 def ===(value); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#172 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#182 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::BooleanMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::BooleanMatcher) # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#262 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#306 class RSpec::Mocks::ArgumentMatchers::DuckTypeMatcher # @return [DuckTypeMatcher] a new instance of DuckTypeMatcher # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#263 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#307 def initialize(*methods_to_respond_to); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#267 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#311 def ===(value); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#271 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#315 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#221 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#231 class RSpec::Mocks::ArgumentMatchers::HashExcludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#222 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#232 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#226 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#236 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#210 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#220 class RSpec::Mocks::ArgumentMatchers::HashIncludingMatcher < ::RSpec::Mocks::ArgumentMatchers::BaseHashMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#211 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#221 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#215 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#225 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#277 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#321 class RSpec::Mocks::ArgumentMatchers::InstanceOf # @return [InstanceOf] a new instance of InstanceOf # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#278 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#322 def initialize(klass); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#282 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#326 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#286 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#330 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#292 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#336 class RSpec::Mocks::ArgumentMatchers::KindOf # @return [KindOf] a new instance of KindOf # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#293 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#337 def initialize(klass); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#297 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#341 def ===(actual); end - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#301 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#345 def description; end end # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#160 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#170 class RSpec::Mocks::ArgumentMatchers::NoArgsMatcher < ::RSpec::Mocks::ArgumentMatchers::SingletonMatcher - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#161 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#171 def description; end end -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#137 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#147 RSpec::Mocks::ArgumentMatchers::NoArgsMatcher::INSTANCE = T.let(T.unsafe(nil), RSpec::Mocks::ArgumentMatchers::NoArgsMatcher) # Intended to be subclassed by stateless, immutable argument matchers. @@ -405,12 +436,12 @@ RSpec::Mocks::ArgumentMatchers::NoArgsMatcher::INSTANCE = T.let(T.unsafe(nil), R # # @private # -# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#133 +# source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#143 class RSpec::Mocks::ArgumentMatchers::SingletonMatcher class << self # @private # - # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#136 + # source://rspec-mocks//lib/rspec/mocks/argument_matchers.rb#146 def inherited(subklass); end private diff --git a/sorbet/rbi/gems/rspec-rails@6.1.0.rbi b/sorbet/rbi/gems/rspec-rails@6.1.3.rbi similarity index 98% rename from sorbet/rbi/gems/rspec-rails@6.1.0.rbi rename to sorbet/rbi/gems/rspec-rails@6.1.3.rbi index be4a6764e..52b6bdfa3 100644 --- a/sorbet/rbi/gems/rspec-rails@6.1.0.rbi +++ b/sorbet/rbi/gems/rspec-rails@6.1.3.rbi @@ -4,84 +4,85 @@ # This is an autogenerated file for types exported from the `rspec-rails` gem. # Please instead update this file by running `bin/tapioca gem rspec-rails`. + # Namespace for all core RSpec projects. # # source://rspec-rails//lib/rspec/rails/feature_check.rb#1 module RSpec class << self - # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def feature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def ffeature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xfeature(*args, &example_group_block); end end end @@ -809,20 +810,20 @@ class RSpec::Rails::FixtureFileUploadSupport::RailsFixtureFileWrapper include ::ActionDispatch::TestProcess include ::ActiveSupport::Testing::FileFixtures - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end class << self - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path; end - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path=(value); end - # source://activesupport/7.1.3/lib/active_support/testing/file_fixtures.rb#20 + # source://activesupport/7.1.3.4/lib/active_support/testing/file_fixtures.rb#20 def file_fixture_path?; end # source://rspec-rails//lib/rspec/rails/fixture_file_upload_support.rb#34 @@ -932,7 +933,7 @@ module RSpec::Rails::FixtureSupport::Fixtures::ClassMethods def fixtures(*args); end # source://rspec-rails//lib/rspec/rails/fixture_support.rb#52 - def proxy_method_warning_if_called_in_before_context_scope(fixture_name); end + def proxy_method_warning_if_called_in_before_context_scope(method_name, fixture_name); end end # Container module for helper specs. @@ -1186,7 +1187,7 @@ module RSpec::Rails::MailboxExampleGroup # @api public # @param message [Hash, Mail::Message] a mail message or hash of # attributes used to build one - # @return [ActionMaibox::InboundMessage] + # @return [ActionMailbox::InboundMessage] # # source://rspec-rails//lib/rspec/rails/example/mailbox_example_group.rb#73 def process(message); end @@ -1816,7 +1817,7 @@ module RSpec::Rails::Matchers # @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` # @see https://github.com/rack/rack/blob/master/lib/rack/utils.rb `Rack::Utils::SYMBOL_TO_STATUS_CODE` # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#378 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#374 def have_http_status(target); end # Passes if a job has been performed inside block. May chain at_least, at_most or exactly to specify a number of times. @@ -2888,46 +2889,46 @@ end # @see RSpec::Rails::Matchers#have_http_status # @see https://github.com/rails/rails/blob/6-0-stable/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` # -# source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#241 +# source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#237 class RSpec::Rails::Matchers::HaveHttpStatus::GenericStatus < ::RSpec::Rails::Matchers::BaseMatcher include ::RSpec::Rails::Matchers::HaveHttpStatus # @api private # @return [GenericStatus] a new instance of GenericStatus # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#255 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#251 def initialize(type); end # @api private # @return [String] # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#277 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#273 def description; end # @api private # @return [String] explaining why the match failed # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#282 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#278 def failure_message; end # @api private # @return [String] explaining why the match failed # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#288 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#284 def failure_message_when_negated; end # @api private # @return [Boolean] `true` if Rack's associated numeric HTTP code matched # the `response` code or the named response status # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#267 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#263 def matches?(response); end protected # @api private # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#301 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#297 def check_expected_status(test_response, expected); end private @@ -2938,13 +2939,13 @@ class RSpec::Rails::Matchers::HaveHttpStatus::GenericStatus < ::RSpec::Rails::Ma # @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` # @see https://github.com/rack/rack/blob/master/lib/rack/response.rb `Rack::Response` # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#318 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#314 def type_codes; end # @api private # @return [String] formatting the expected status and associated code(s) # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#309 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#305 def type_message; end class << self @@ -2953,14 +2954,14 @@ class RSpec::Rails::Matchers::HaveHttpStatus::GenericStatus < ::RSpec::Rails::Ma # code "group" # @see https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/testing/test_response.rb `ActionDispatch::TestResponse` # - # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#247 + # source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#243 def valid_statuses; end end end # @api private # -# source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#295 +# source://rspec-rails//lib/rspec/rails/matchers/have_http_status.rb#291 RSpec::Rails::Matchers::HaveHttpStatus::GenericStatus::RESPONSE_METHODS = T.let(T.unsafe(nil), Hash) # Provides an implementation for `have_http_status` matching against @@ -3560,9 +3561,10 @@ end # # @api public # -# source://rspec-rails//lib/rspec/rails/example/rails_example_group.rb#13 +# source://rspec-rails//lib/rspec/rails/example/rails_example_group.rb#14 module RSpec::Rails::RailsExampleGroup include ::RSpec::Rails::TaggedLoggingAdapter + include ::ActiveSupport::CurrentAttributes::TestHelper include ::ActiveSupport::ExecutionContext::TestHelper extend ::ActiveSupport::Concern include GeneratedInstanceMethods @@ -3758,7 +3760,7 @@ end # @private # -# source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#6 +# source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#4 module RSpec::Rails::RoutingAssertionDelegator # source://rspec-rails//lib/rspec/rails/adapters.rb#54 def assert_generates(*args, &block); end @@ -3786,7 +3788,7 @@ end # # @api public # -# source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#12 +# source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#10 module RSpec::Rails::RoutingExampleGroup include ::RSpec::Rails::Matchers::RoutingMatchers include ::RSpec::Rails::Matchers::RoutingMatchers::RouteHelpers @@ -3811,20 +3813,20 @@ module RSpec::Rails::RoutingExampleGroup # @api public # @private # - # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#48 + # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#46 def routes; end # @api public # @private # - # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#51 + # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#49 def routes=(routes); end private # @api public # - # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#58 + # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#56 def method_missing(m, *args, &block); end module GeneratedClassMethods @@ -3885,7 +3887,7 @@ end # # @api public # -# source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#20 +# source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#18 module RSpec::Rails::RoutingExampleGroup::ClassMethods # Specifies the routeset that will be used for the example group. This # is most useful when testing Rails engines. @@ -3901,7 +3903,7 @@ module RSpec::Rails::RoutingExampleGroup::ClassMethods # end # end # - # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#33 + # source://rspec-rails//lib/rspec/rails/example/routing_example_group.rb#31 def routes; end end diff --git a/sorbet/rbi/gems/rspec-support@3.12.1.rbi b/sorbet/rbi/gems/rspec-support@3.13.1.rbi similarity index 84% rename from sorbet/rbi/gems/rspec-support@3.12.1.rbi rename to sorbet/rbi/gems/rspec-support@3.13.1.rbi index d83abc172..3b3ae6685 100644 --- a/sorbet/rbi/gems/rspec-support@3.12.1.rbi +++ b/sorbet/rbi/gems/rspec-support@3.13.1.rbi @@ -4,84 +4,85 @@ # This is an autogenerated file for types exported from the `rspec-support` gem. # Please instead update this file by running `bin/tapioca gem rspec-support`. -# source://rspec-support//lib/rspec/support.rb#1 + +# source://rspec-support//lib/rspec/support.rb#3 module RSpec extend ::RSpec::Support::Warnings class << self - # source://rspec-core/3.12.2/lib/rspec/core.rb#70 + # source://rspec-core/3.13.0/lib/rspec/core.rb#70 def clear_examples; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#85 + # source://rspec-core/3.13.0/lib/rspec/core.rb#85 def configuration; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def configuration=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#97 + # source://rspec-core/3.13.0/lib/rspec/core.rb#97 def configure; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#194 + # source://rspec-core/3.13.0/lib/rspec/core.rb#194 def const_missing(name); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def context(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#122 + # source://rspec-core/3.13.0/lib/rspec/core.rb#122 def current_example; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#128 + # source://rspec-core/3.13.0/lib/rspec/core.rb#128 def current_example=(example); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#154 + # source://rspec-core/3.13.0/lib/rspec/core.rb#154 def current_scope; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#134 + # source://rspec-core/3.13.0/lib/rspec/core.rb#134 def current_scope=(scope); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def describe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def example_group(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def fdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def feature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def ffeature(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#58 + # source://rspec-core/3.13.0/lib/rspec/core.rb#58 def reset; end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_context(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core/shared_example_group.rb#110 + # source://rspec-core/3.13.0/lib/rspec/core/shared_example_group.rb#110 def shared_examples_for(name, *args, &block); end - # source://rspec-core/3.12.2/lib/rspec/core.rb#160 + # source://rspec-core/3.13.0/lib/rspec/core.rb#160 def world; end - # source://rspec-core/3.12.2/lib/rspec/core.rb#49 + # source://rspec-core/3.13.0/lib/rspec/core.rb#49 def world=(_arg0); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xcontext(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xdescribe(*args, &example_group_block); end - # source://rspec-core/3.12.2/lib/rspec/core/dsl.rb#42 + # source://rspec-core/3.13.0/lib/rspec/core/dsl.rb#42 def xfeature(*args, &example_group_block); end end end @@ -91,18 +92,18 @@ end # the code using the library, which is far more useful than the particular # internal method that raised an error. # -# source://rspec-support//lib/rspec/support/caller_filter.rb#8 +# source://rspec-support//lib/rspec/support/caller_filter.rb#10 class RSpec::CallerFilter class << self # Earlier rubies do not support the two argument form of `caller`. This # fallback is logically the same, but slower. # - # source://rspec-support//lib/rspec/support/caller_filter.rb#47 + # source://rspec-support//lib/rspec/support/caller_filter.rb#49 def first_non_rspec_line(skip_frames = T.unsafe(nil), increment = T.unsafe(nil)); end end end -# source://rspec-support//lib/rspec/support/caller_filter.rb#18 +# source://rspec-support//lib/rspec/support/caller_filter.rb#20 RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array) # rubygems/core_ext/kernel_require.rb isn't actually part of rspec (obviously) but we want @@ -112,23 +113,23 @@ RSpec::CallerFilter::ADDITIONAL_TOP_LEVEL_FILES = T.let(T.unsafe(nil), Array) # file, but it depends on if rubygems is loaded or not. We don't want to have to deal # with this complexity in our `RSpec.deprecate` calls, so we ignore it here. # -# source://rspec-support//lib/rspec/support/caller_filter.rb#28 +# source://rspec-support//lib/rspec/support/caller_filter.rb#30 RSpec::CallerFilter::IGNORE_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rspec-support//lib/rspec/support/caller_filter.rb#20 +# source://rspec-support//lib/rspec/support/caller_filter.rb#22 RSpec::CallerFilter::LIB_REGEX = T.let(T.unsafe(nil), Regexp) -# source://rspec-support//lib/rspec/support/caller_filter.rb#9 +# source://rspec-support//lib/rspec/support/caller_filter.rb#11 RSpec::CallerFilter::RSPEC_LIBS = T.let(T.unsafe(nil), Array) -# source://rspec-support//lib/rspec/support.rb#2 +# source://rspec-support//lib/rspec/support.rb#4 module RSpec::Support class << self # Used internally to get a class of a given object, even if it does not respond to #class. # # @api private # - # source://rspec-support//lib/rspec/support.rb#84 + # source://rspec-support//lib/rspec/support.rb#86 def class_of(object); end # Defines a helper method that is optimized to require files from the @@ -143,7 +144,7 @@ module RSpec::Support # # @api private # - # source://rspec-support//lib/rspec/support.rb#14 + # source://rspec-support//lib/rspec/support.rb#16 def define_optimized_require_for_rspec(lib, &require_relative); end # Remove a previously registered matcher. Useful for cleaning up after @@ -151,36 +152,36 @@ module RSpec::Support # # @private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#22 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#24 def deregister_matcher_definition(&block); end # @api private # - # source://rspec-support//lib/rspec/support.rb#111 + # source://rspec-support//lib/rspec/support.rb#113 def failure_notifier; end # @api private # - # source://rspec-support//lib/rspec/support.rb#103 + # source://rspec-support//lib/rspec/support.rb#105 def failure_notifier=(callable); end # @private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#27 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#29 def is_a_matcher?(object); end # @private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#4 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#6 def matcher_definitions; end - # source://rspec-support//lib/rspec/support.rb#52 + # source://rspec-support//lib/rspec/support.rb#54 def method_handle_for(object, method_name); end # @api private # - # source://rspec-support//lib/rspec/support.rb#116 + # 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, @@ -190,54 +191,54 @@ module RSpec::Support # # @private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#14 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#16 def register_matcher_definition(&block); end - # source://rspec-support//lib/rspec/support.rb#23 + # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_core(f); end - # source://rspec-support//lib/rspec/support.rb#23 + # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_expectations(f); end - # source://rspec-support//lib/rspec/support.rb#23 + # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_matchers(f); end - # source://rspec-support//lib/rspec/support.rb#23 + # source://rspec-support//lib/rspec/support.rb#25 def require_rspec_support(f); end # gives a string representation of an object for use in RSpec descriptions # # @api private # - # source://rspec-support//lib/rspec/support/matcher_definition.rb#34 + # source://rspec-support//lib/rspec/support/matcher_definition.rb#36 def rspec_description_for_object(object); end - # source://rspec-support//lib/rspec/support.rb#93 + # source://rspec-support//lib/rspec/support.rb#95 def thread_local_data; end # @api private # - # source://rspec-support//lib/rspec/support.rb#138 + # source://rspec-support//lib/rspec/support.rb#140 def warning_notifier; end # @api private # - # source://rspec-support//lib/rspec/support.rb#131 + # source://rspec-support//lib/rspec/support.rb#133 def warning_notifier=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support.rb#121 + # source://rspec-support//lib/rspec/support.rb#123 def with_failure_notifier(callable); end end end # @private # -# source://rspec-support//lib/rspec/support.rb#143 +# source://rspec-support//lib/rspec/support.rb#145 module RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue class << self - # source://rspec-support//lib/rspec/support.rb#148 + # source://rspec-support//lib/rspec/support.rb#150 def ===(exception); end end end @@ -245,7 +246,7 @@ end # These exceptions are dangerous to rescue as rescuing them # would interfere with things we should not interfere with. # -# source://rspec-support//lib/rspec/support.rb#146 +# 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. @@ -258,144 +259,144 @@ RSpec::Support::AllExceptionsExceptOnesWeMustNotRescue::AVOID_RESCUING = T.let(T # # @api private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#266 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268 class RSpec::Support::BlockSignature < ::RSpec::Support::MethodSignature # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#268 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#270 def classify_parameters; end end # @private # -# source://rspec-support//lib/rspec/support/comparable_version.rb#4 +# source://rspec-support//lib/rspec/support/comparable_version.rb#6 class RSpec::Support::ComparableVersion include ::Comparable # @return [ComparableVersion] a new instance of ComparableVersion # - # source://rspec-support//lib/rspec/support/comparable_version.rb#9 + # source://rspec-support//lib/rspec/support/comparable_version.rb#11 def initialize(string); end - # source://rspec-support//lib/rspec/support/comparable_version.rb#13 + # source://rspec-support//lib/rspec/support/comparable_version.rb#15 def <=>(other); end - # source://rspec-support//lib/rspec/support/comparable_version.rb#35 + # source://rspec-support//lib/rspec/support/comparable_version.rb#37 def segments; end # Returns the value of attribute string. # - # source://rspec-support//lib/rspec/support/comparable_version.rb#7 + # source://rspec-support//lib/rspec/support/comparable_version.rb#9 def string; end end # @private # -# source://rspec-support//lib/rspec/support.rb#108 +# 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#135 +# source://rspec-support//lib/rspec/support.rb#137 RSpec::Support::DEFAULT_WARNING_NOTIFIER = T.let(T.unsafe(nil), Proc) -# source://rspec-support//lib/rspec/support/differ.rb#10 +# source://rspec-support//lib/rspec/support/differ.rb#12 class RSpec::Support::Differ # @return [Differ] a new instance of Differ # - # source://rspec-support//lib/rspec/support/differ.rb#67 + # source://rspec-support//lib/rspec/support/differ.rb#69 def initialize(opts = T.unsafe(nil)); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#63 + # source://rspec-support//lib/rspec/support/differ.rb#65 def color?; end - # source://rspec-support//lib/rspec/support/differ.rb#11 + # source://rspec-support//lib/rspec/support/differ.rb#13 def diff(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#57 + # source://rspec-support//lib/rspec/support/differ.rb#59 def diff_as_object(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#28 + # source://rspec-support//lib/rspec/support/differ.rb#30 def diff_as_string(actual, expected); end private - # source://rspec-support//lib/rspec/support/differ.rb#128 + # source://rspec-support//lib/rspec/support/differ.rb#130 def add_old_hunk_to_hunk(hunk, oldhunk); end - # source://rspec-support//lib/rspec/support/differ.rb#124 + # source://rspec-support//lib/rspec/support/differ.rb#126 def add_to_output(output, string); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#78 + # source://rspec-support//lib/rspec/support/differ.rb#80 def all_strings?(*args); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#82 + # source://rspec-support//lib/rspec/support/differ.rb#84 def any_multiline_strings?(*args); end - # source://rspec-support//lib/rspec/support/differ.rb#153 + # source://rspec-support//lib/rspec/support/differ.rb#155 def blue(text); end - # source://rspec-support//lib/rspec/support/differ.rb#115 + # source://rspec-support//lib/rspec/support/differ.rb#117 def build_hunks(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#90 + # source://rspec-support//lib/rspec/support/differ.rb#92 def coerce_to_string(string_or_array); end - # source://rspec-support//lib/rspec/support/differ.rb#141 + # source://rspec-support//lib/rspec/support/differ.rb#143 def color(text, color_code); end - # source://rspec-support//lib/rspec/support/differ.rb#161 + # source://rspec-support//lib/rspec/support/differ.rb#163 def color_diff(diff); end - # source://rspec-support//lib/rspec/support/differ.rb#95 + # source://rspec-support//lib/rspec/support/differ.rb#97 def diffably_stringify(array); end - # source://rspec-support//lib/rspec/support/differ.rb#119 + # source://rspec-support//lib/rspec/support/differ.rb#121 def finalize_output(output, final_line); end - # source://rspec-support//lib/rspec/support/differ.rb#137 + # source://rspec-support//lib/rspec/support/differ.rb#139 def format_type; end - # source://rspec-support//lib/rspec/support/differ.rb#149 + # source://rspec-support//lib/rspec/support/differ.rb#151 def green(text); end - # source://rspec-support//lib/rspec/support/differ.rb#202 + # source://rspec-support//lib/rspec/support/differ.rb#204 def handle_encoding_errors(actual, expected); end - # source://rspec-support//lib/rspec/support/differ.rb#192 + # source://rspec-support//lib/rspec/support/differ.rb#194 def hash_to_string(hash); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#106 + # source://rspec-support//lib/rspec/support/differ.rb#108 def multiline?(string); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#86 + # source://rspec-support//lib/rspec/support/differ.rb#88 def no_numbers?(*args); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/differ.rb#74 + # source://rspec-support//lib/rspec/support/differ.rb#76 def no_procs?(*args); end - # source://rspec-support//lib/rspec/support/differ.rb#157 + # source://rspec-support//lib/rspec/support/differ.rb#159 def normal(text); end - # source://rspec-support//lib/rspec/support/differ.rb#178 + # source://rspec-support//lib/rspec/support/differ.rb#180 def object_to_string(object); end - # source://rspec-support//lib/rspec/support/differ.rb#145 + # source://rspec-support//lib/rspec/support/differ.rb#147 def red(text); end - # source://rspec-support//lib/rspec/support/differ.rb#132 + # source://rspec-support//lib/rspec/support/differ.rb#134 def safely_flatten(array); end end @@ -404,14 +405,14 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/directory_maker.rb#9 +# source://rspec-support//lib/rspec/support/directory_maker.rb#11 class RSpec::Support::DirectoryMaker class << self # Implements nested directory construction # # @api private # - # source://rspec-support//lib/rspec/support/directory_maker.rb#13 + # source://rspec-support//lib/rspec/support/directory_maker.rb#15 def mkdir_p(path); end private @@ -419,65 +420,65 @@ class RSpec::Support::DirectoryMaker # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/directory_maker.rb#55 + # source://rspec-support//lib/rspec/support/directory_maker.rb#57 def directory_exists?(dirname); end # @api private # - # source://rspec-support//lib/rspec/support/directory_maker.rb#50 + # source://rspec-support//lib/rspec/support/directory_maker.rb#52 def generate_path(stack, part); end # @api private # - # source://rspec-support//lib/rspec/support/directory_maker.rb#47 + # source://rspec-support//lib/rspec/support/directory_maker.rb#49 def generate_stack(path); end end end # @private # -# source://rspec-support//lib/rspec/support/encoded_string.rb#4 +# source://rspec-support//lib/rspec/support/encoded_string.rb#6 class RSpec::Support::EncodedString # @return [EncodedString] a new instance of EncodedString # - # source://rspec-support//lib/rspec/support/encoded_string.rb#14 + # source://rspec-support//lib/rspec/support/encoded_string.rb#16 def initialize(string, encoding = T.unsafe(nil)); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#26 + # source://rspec-support//lib/rspec/support/encoded_string.rb#28 def <<(string); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def ==(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def empty?(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def encoding(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def eql?(*args, &block); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#23 + # source://rspec-support//lib/rspec/support/encoded_string.rb#25 def lines(*args, &block); end # Returns the value of attribute source_encoding. # - # source://rspec-support//lib/rspec/support/encoded_string.rb#19 + # source://rspec-support//lib/rspec/support/encoded_string.rb#21 def source_encoding; end - # source://rspec-support//lib/rspec/support/encoded_string.rb#39 + # source://rspec-support//lib/rspec/support/encoded_string.rb#41 def split(regex_or_string); end - # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + # source://rspec-support//lib/rspec/support/encoded_string.rb#46 def to_s; end - # source://rspec-support//lib/rspec/support/encoded_string.rb#44 + # source://rspec-support//lib/rspec/support/encoded_string.rb#46 def to_str; end private - # source://rspec-support//lib/rspec/support/encoded_string.rb#137 + # source://rspec-support//lib/rspec/support/encoded_string.rb#139 def detect_source_encoding(string); end # Encoding Exceptions: @@ -519,7 +520,7 @@ class RSpec::Support::EncodedString # RangeError: out of char range # e.g. the UTF-16LE emoji: 128169.chr # - # source://rspec-support//lib/rspec/support/encoded_string.rb#91 + # source://rspec-support//lib/rspec/support/encoded_string.rb#93 def matching_encoding(string); end # http://stackoverflow.com/a/8711118/879854 @@ -527,11 +528,11 @@ class RSpec::Support::EncodedString # with invalid encoding, which is a pretty good proxy # for the invalid byte sequence that causes an ArgumentError # - # source://rspec-support//lib/rspec/support/encoded_string.rb#122 + # source://rspec-support//lib/rspec/support/encoded_string.rb#124 def remove_invalid_bytes(string); end class << self - # source://rspec-support//lib/rspec/support/encoded_string.rb#141 + # source://rspec-support//lib/rspec/support/encoded_string.rb#143 def pick_encoding(source_a, source_b); end end end @@ -540,28 +541,28 @@ end # U+FFFD ("\xEF\xBF\xBD"), for Unicode encoding forms, else # ? ("\x3F") # -# source://rspec-support//lib/rspec/support/encoded_string.rb#12 +# source://rspec-support//lib/rspec/support/encoded_string.rb#14 RSpec::Support::EncodedString::REPLACE = T.let(T.unsafe(nil), String) -# source://rspec-support//lib/rspec/support/encoded_string.rb#7 +# source://rspec-support//lib/rspec/support/encoded_string.rb#9 RSpec::Support::EncodedString::US_ASCII = T.let(T.unsafe(nil), String) # Reduce allocations by storing constants. # -# source://rspec-support//lib/rspec/support/encoded_string.rb#6 +# source://rspec-support//lib/rspec/support/encoded_string.rb#8 RSpec::Support::EncodedString::UTF_8 = T.let(T.unsafe(nil), String) # Provides a means to fuzzy-match between two arbitrary objects. # Understands array/hash nesting. Uses `===` or `==` to # perform the matching. # -# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#6 +# source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#8 module RSpec::Support::FuzzyMatcher class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#8 + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#10 def values_match?(expected, actual); end private @@ -569,50 +570,50 @@ module RSpec::Support::FuzzyMatcher # @private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#27 + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#29 def arrays_match?(expected_list, actual_list); end # @private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#36 + # source://rspec-support//lib/rspec/support/fuzzy_matcher.rb#38 def hashes_match?(expected_hash, actual_hash); end end end # @private # -# source://rspec-support//lib/rspec/support/hunk_generator.rb#7 +# source://rspec-support//lib/rspec/support/hunk_generator.rb#9 class RSpec::Support::HunkGenerator # @return [HunkGenerator] a new instance of HunkGenerator # - # source://rspec-support//lib/rspec/support/hunk_generator.rb#8 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#10 def initialize(actual, expected); end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#13 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#15 def hunks; end private - # source://rspec-support//lib/rspec/support/hunk_generator.rb#30 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#32 def actual_lines; end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#34 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#36 def build_hunk(piece); end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#42 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#44 def context_lines; end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#22 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#24 def diffs; end - # source://rspec-support//lib/rspec/support/hunk_generator.rb#26 + # source://rspec-support//lib/rspec/support/hunk_generator.rb#28 def expected_lines; end end # @api private # -# source://rspec-support//lib/rspec/support.rb#38 +# source://rspec-support//lib/rspec/support.rb#40 RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) # Allows matchers to be used instead of providing keyword arguments. In @@ -620,11 +621,11 @@ RSpec::Support::KERNEL_METHOD_METHOD = T.let(T.unsafe(nil), UnboundMethod) # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#391 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#395 class RSpec::Support::LooseSignatureVerifier < ::RSpec::Support::MethodSignatureVerifier private - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#394 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#398 def split_args(*args); end end @@ -637,30 +638,30 @@ end # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#411 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#415 class RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher # @return [SignatureWithKeywordArgumentsMatcher] a new instance of SignatureWithKeywordArgumentsMatcher # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#412 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416 def initialize(signature); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#436 def has_kw_args_in?(args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424 def invalid_kw_args_from(_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#416 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#420 def missing_kw_args_from(_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#424 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428 def non_kw_args_arity_description; end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#428 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#432 def valid_non_kw_args?(*args); end end @@ -669,22 +670,22 @@ end # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#11 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#13 class RSpec::Support::MethodSignature # @return [MethodSignature] a new instance of MethodSignature # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#16 def initialize(method); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#96 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#98 def arbitrary_kw_args?; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#36 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#38 def classify_arity(arity = T.unsafe(nil)); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#104 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#106 def classify_parameters; end # Without considering what the last arg is, could it @@ -692,10 +693,10 @@ class RSpec::Support::MethodSignature # # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#90 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#92 def could_contain_kw_args?(args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#49 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#51 def description; end # If the last argument is Hash, Ruby will treat only symbol keys as keyword arguments @@ -703,42 +704,42 @@ class RSpec::Support::MethodSignature # # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#82 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#84 def has_kw_args_in?(args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#75 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#77 def invalid_kw_args_from(given_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def max_non_kw_args; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def min_non_kw_args; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#71 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#73 def missing_kw_args_from(given_kw_args); end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#21 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#23 def non_kw_args_arity_description; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def optional_kw_args; end - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#12 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#14 def required_kw_args; end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#100 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#102 def unlimited_args?; end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#29 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#31 def valid_non_kw_args?(positional_arg_count, optional_max_arg_count = T.unsafe(nil)); end end -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#160 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#162 RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) # Encapsulates expectations about the number of arguments and @@ -746,70 +747,70 @@ RSpec::Support::MethodSignature::INFINITY = T.let(T.unsafe(nil), Float) # # @api private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#217 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#219 class RSpec::Support::MethodSignatureExpectation # @api private # @return [MethodSignatureExpectation] a new instance of MethodSignatureExpectation # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#218 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#220 def initialize; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#245 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#247 def empty?; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_arbitrary_keywords; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_arbitrary_keywords=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_unlimited_arguments; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 def expect_unlimited_arguments=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 def keywords; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#252 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#254 def keywords=(values); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 def max_count; end # @api private # @raise [ArgumentError] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#231 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#233 def max_count=(number); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#227 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#229 def min_count; end # @api private # @raise [ArgumentError] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#238 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#240 def min_count=(number); end end @@ -817,48 +818,48 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#278 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#280 class RSpec::Support::MethodSignatureVerifier # @api private # @return [MethodSignatureVerifier] a new instance of MethodSignatureVerifier # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#283 def initialize(signature, args = T.unsafe(nil)); end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#324 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#326 def error_message; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def max_non_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def min_non_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#279 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#281 def non_kw_args; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#316 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#318 def valid?; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#288 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#290 def with_expectation(expectation); end private @@ -866,82 +867,82 @@ class RSpec::Support::MethodSignatureVerifier # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#355 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#357 def arbitrary_kw_args?; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#351 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#353 def invalid_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#347 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#349 def missing_kw_args; end # @api private # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#363 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#365 def split_args(*args); end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#359 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#361 def unlimited_args?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#343 + # source://rspec-support//lib/rspec/support/method_signature_verifier.rb#345 def valid_non_kw_args?; end end # On 1.9 and up, this is in core, so we just use the real one # -# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#63 +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#65 class RSpec::Support::Mutex < ::Thread::Mutex class << self - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#70 def new; end end end # If you mock Mutex.new you break our usage of Mutex, so -# instead we capture the original method to return Mutexs. +# instead we capture the original method to return Mutexes. # -# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#66 +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#68 RSpec::Support::Mutex::NEW_MUTEX_METHOD = T.let(T.unsafe(nil), Method) # Provides query methods for different OS or OS features. # # @api private # -# source://rspec-support//lib/rspec/support/ruby_features.rb#9 +# source://rspec-support//lib/rspec/support/ruby_features.rb#11 module RSpec::Support::OS private # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + # source://rspec-support//lib/rspec/support/ruby_features.rb#14 def windows?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + # source://rspec-support//lib/rspec/support/ruby_features.rb#18 def windows_file_path?; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#12 + # source://rspec-support//lib/rspec/support/ruby_features.rb#14 def windows?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#16 + # source://rspec-support//lib/rspec/support/ruby_features.rb#18 def windows_file_path?; end end end @@ -951,37 +952,37 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#8 +# source://rspec-support//lib/rspec/support/object_formatter.rb#10 class RSpec::Support::ObjectFormatter # @api private # @return [ObjectFormatter] a new instance of ObjectFormatter # - # source://rspec-support//lib/rspec/support/object_formatter.rb#27 + # source://rspec-support//lib/rspec/support/object_formatter.rb#29 def initialize(max_formatted_output_length = T.unsafe(nil)); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#32 + # source://rspec-support//lib/rspec/support/object_formatter.rb#34 def format(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + # source://rspec-support//lib/rspec/support/object_formatter.rb#13 def max_formatted_output_length; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#11 + # source://rspec-support//lib/rspec/support/object_formatter.rb#13 def max_formatted_output_length=(_arg0); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#68 + # source://rspec-support//lib/rspec/support/object_formatter.rb#70 def prepare_array(array); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#92 + # source://rspec-support//lib/rspec/support/object_formatter.rb#94 def prepare_element(element); end # Prepares the provided object to be formatted by wrapping it as needed @@ -996,28 +997,28 @@ class RSpec::Support::ObjectFormatter # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#56 + # source://rspec-support//lib/rspec/support/object_formatter.rb#58 def prepare_for_inspection(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#74 + # source://rspec-support//lib/rspec/support/object_formatter.rb#76 def prepare_hash(input_hash); end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#111 + # source://rspec-support//lib/rspec/support/object_formatter.rb#113 def recursive_structure?(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#84 + # source://rspec-support//lib/rspec/support/object_formatter.rb#86 def sort_hash_keys(input_hash); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#104 + # source://rspec-support//lib/rspec/support/object_formatter.rb#106 def with_entering_structure(structure); end private @@ -1029,7 +1030,7 @@ class RSpec::Support::ObjectFormatter # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#266 + # source://rspec-support//lib/rspec/support/object_formatter.rb#268 def truncate_string(str, start_index, end_index); end class << self @@ -1038,24 +1039,24 @@ class RSpec::Support::ObjectFormatter # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#15 + # source://rspec-support//lib/rspec/support/object_formatter.rb#17 def default_instance; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#19 + # source://rspec-support//lib/rspec/support/object_formatter.rb#21 def format(object); end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#23 + # source://rspec-support//lib/rspec/support/object_formatter.rb#25 def prepare_for_inspection(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#125 +# source://rspec-support//lib/rspec/support/object_formatter.rb#127 class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # Returns the value of attribute formatter # @@ -1071,7 +1072,7 @@ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # @api private # @raise [NotImplementedError] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#130 + # source://rspec-support//lib/rspec/support/object_formatter.rb#132 def inspect; end # Returns the value of attribute object @@ -1087,7 +1088,7 @@ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#134 + # source://rspec-support//lib/rspec/support/object_formatter.rb#136 def pretty_print(pp); end class << self @@ -1097,7 +1098,7 @@ class RSpec::Support::ObjectFormatter::BaseInspector < ::Struct # @raise [NotImplementedError] # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#126 + # source://rspec-support//lib/rspec/support/object_formatter.rb#128 def can_inspect?(_object); end def inspect; end @@ -1109,106 +1110,106 @@ end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#175 +# source://rspec-support//lib/rspec/support/object_formatter.rb#177 class RSpec::Support::ObjectFormatter::BigDecimalInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#180 + # source://rspec-support//lib/rspec/support/object_formatter.rb#182 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#176 + # source://rspec-support//lib/rspec/support/object_formatter.rb#178 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#157 +# source://rspec-support//lib/rspec/support/object_formatter.rb#159 class RSpec::Support::ObjectFormatter::DateTimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # ActiveSupport sometimes overrides inspect. If `ActiveSupport` is # defined use a custom format string that includes more time precision. # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#166 + # source://rspec-support//lib/rspec/support/object_formatter.rb#168 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#160 + # source://rspec-support//lib/rspec/support/object_formatter.rb#162 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#158 +# source://rspec-support//lib/rspec/support/object_formatter.rb#160 RSpec::Support::ObjectFormatter::DateTimeInspector::FORMAT = T.let(T.unsafe(nil), String) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#222 +# source://rspec-support//lib/rspec/support/object_formatter.rb#224 class RSpec::Support::ObjectFormatter::DelegatorInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#227 + # source://rspec-support//lib/rspec/support/object_formatter.rb#229 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#223 + # source://rspec-support//lib/rspec/support/object_formatter.rb#225 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#185 +# source://rspec-support//lib/rspec/support/object_formatter.rb#187 class RSpec::Support::ObjectFormatter::DescribableMatcherInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#190 + # source://rspec-support//lib/rspec/support/object_formatter.rb#192 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#186 + # source://rspec-support//lib/rspec/support/object_formatter.rb#188 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#9 +# source://rspec-support//lib/rspec/support/object_formatter.rb#11 RSpec::Support::ObjectFormatter::ELLIPSIS = T.let(T.unsafe(nil), String) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#245 +# source://rspec-support//lib/rspec/support/object_formatter.rb#247 RSpec::Support::ObjectFormatter::INSPECTOR_CLASSES = T.let(T.unsafe(nil), Array) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#115 +# source://rspec-support//lib/rspec/support/object_formatter.rb#117 class RSpec::Support::ObjectFormatter::InspectableItem < ::Struct # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#116 + # source://rspec-support//lib/rspec/support/object_formatter.rb#118 def inspect; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#120 + # source://rspec-support//lib/rspec/support/object_formatter.rb#122 def pretty_print(pp); end # Returns the value of attribute text @@ -1233,109 +1234,109 @@ end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#232 +# source://rspec-support//lib/rspec/support/object_formatter.rb#234 class RSpec::Support::ObjectFormatter::InspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#240 + # source://rspec-support//lib/rspec/support/object_formatter.rb#242 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#233 + # source://rspec-support//lib/rspec/support/object_formatter.rb#235 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#139 +# source://rspec-support//lib/rspec/support/object_formatter.rb#141 class RSpec::Support::ObjectFormatter::TimeInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # for 1.8.7 # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#147 + # source://rspec-support//lib/rspec/support/object_formatter.rb#149 def inspect; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#142 + # source://rspec-support//lib/rspec/support/object_formatter.rb#144 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#140 +# source://rspec-support//lib/rspec/support/object_formatter.rb#142 RSpec::Support::ObjectFormatter::TimeInspector::FORMAT = T.let(T.unsafe(nil), String) # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#195 +# source://rspec-support//lib/rspec/support/object_formatter.rb#197 class RSpec::Support::ObjectFormatter::UninspectableObjectInspector < ::RSpec::Support::ObjectFormatter::BaseInspector # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#205 + # source://rspec-support//lib/rspec/support/object_formatter.rb#207 def inspect; end # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#209 + # source://rspec-support//lib/rspec/support/object_formatter.rb#211 def klass; end # http://stackoverflow.com/a/2818916 # # @api private # - # source://rspec-support//lib/rspec/support/object_formatter.rb#214 + # source://rspec-support//lib/rspec/support/object_formatter.rb#216 def native_object_id; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/object_formatter.rb#198 + # source://rspec-support//lib/rspec/support/object_formatter.rb#200 def can_inspect?(object); end end end # @api private # -# source://rspec-support//lib/rspec/support/object_formatter.rb#196 +# source://rspec-support//lib/rspec/support/object_formatter.rb#198 RSpec::Support::ObjectFormatter::UninspectableObjectInspector::OBJECT_ID_FORMAT = T.let(T.unsafe(nil), String) # Provides recursive constant lookup methods useful for # constant stubbing. # -# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#5 +# source://rspec-support//lib/rspec/support/recursive_const_methods.rb#7 module RSpec::Support::RecursiveConstMethods # @return [Boolean] # - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#43 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#45 def const_defined_on?(mod, const_name); end - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#51 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#53 def constants_defined_on(mod); end # @raise [NameError] # - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#47 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#49 def get_const_defined_on(mod, const_name); end - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#71 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#73 def normalize_const_name(const_name); end # @return [Boolean] # - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#62 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#64 def recursive_const_defined?(const_name); end - # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#56 + # source://rspec-support//lib/rspec/support/recursive_const_methods.rb#58 def recursive_const_get(const_name); end end @@ -1351,22 +1352,22 @@ end # # @private # -# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#14 +# source://rspec-support//lib/rspec/support/reentrant_mutex.rb#16 class RSpec::Support::ReentrantMutex # @return [ReentrantMutex] a new instance of ReentrantMutex # - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#15 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#17 def initialize; end - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#21 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#23 def synchronize; end private - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#33 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#35 def enter; end - # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#38 + # source://rspec-support//lib/rspec/support/reentrant_mutex.rb#40 def exit; end end @@ -1374,85 +1375,85 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/ruby_features.rb#24 +# source://rspec-support//lib/rspec/support/ruby_features.rb#26 module RSpec::Support::Ruby private # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + # source://rspec-support//lib/rspec/support/ruby_features.rb#29 def jruby?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + # source://rspec-support//lib/rspec/support/ruby_features.rb#37 def jruby_9000?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + # source://rspec-support//lib/rspec/support/ruby_features.rb#33 def jruby_version; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + # source://rspec-support//lib/rspec/support/ruby_features.rb#49 def mri?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + # source://rspec-support//lib/rspec/support/ruby_features.rb#45 def non_mri?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + # source://rspec-support//lib/rspec/support/ruby_features.rb#41 def rbx?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + # source://rspec-support//lib/rspec/support/ruby_features.rb#53 def truffleruby?; end class << self # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#27 + # source://rspec-support//lib/rspec/support/ruby_features.rb#29 def jruby?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#35 + # source://rspec-support//lib/rspec/support/ruby_features.rb#37 def jruby_9000?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#31 + # source://rspec-support//lib/rspec/support/ruby_features.rb#33 def jruby_version; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#47 + # source://rspec-support//lib/rspec/support/ruby_features.rb#49 def mri?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#43 + # source://rspec-support//lib/rspec/support/ruby_features.rb#45 def non_mri?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#39 + # source://rspec-support//lib/rspec/support/ruby_features.rb#41 def rbx?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#51 + # source://rspec-support//lib/rspec/support/ruby_features.rb#53 def truffleruby?; end end end @@ -1462,18 +1463,18 @@ end # # @api private # -# source://rspec-support//lib/rspec/support/ruby_features.rb#60 +# source://rspec-support//lib/rspec/support/ruby_features.rb#62 module RSpec::Support::RubyFeatures private # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#83 + # source://rspec-support//lib/rspec/support/ruby_features.rb#85 def caller_locations_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + # source://rspec-support//lib/rspec/support/ruby_features.rb#155 def distincts_kw_args_from_positional_hash?; end # On JRuby 1.7 `--1.8` mode, `Process.respond_to?(:fork)` returns true, @@ -1486,131 +1487,151 @@ module RSpec::Support::RubyFeatures # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#74 + # source://rspec-support//lib/rspec/support/ruby_features.rb#76 def fork_supported?; end + # https://rubyreferences.github.io/rubychanges/3.0.html#keyword-arguments-are-now-fully-separated-from-positional-arguments + # + # @api private + # @return [Boolean] + # + # source://rspec-support//lib/rspec/support/ruby_features.rb#111 + def kw_arg_separation?; end + # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + # source://rspec-support//lib/rspec/support/ruby_features.rb#160 def kw_args_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + # source://rspec-support//lib/rspec/support/ruby_features.rb#216 def module_prepends_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + # source://rspec-support//lib/rspec/support/ruby_features.rb#212 def module_refinement_supported?; end # @api private # - # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + # source://rspec-support//lib/rspec/support/ruby_features.rb#81 def optional_and_splat_args_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + # source://rspec-support//lib/rspec/support/ruby_features.rb#164 def required_kw_args_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + # source://rspec-support//lib/rspec/support/ruby_features.rb#146 def ripper_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + # source://rspec-support//lib/rspec/support/ruby_features.rb#90 def supports_exception_cause?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + # source://rspec-support//lib/rspec/support/ruby_features.rb#168 def supports_rebinding_module_methods?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + # source://rspec-support//lib/rspec/support/ruby_features.rb#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#83 + # source://rspec-support//lib/rspec/support/ruby_features.rb#85 def caller_locations_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#132 + # source://rspec-support//lib/rspec/support/ruby_features.rb#155 def distincts_kw_args_from_positional_hash?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#74 + # source://rspec-support//lib/rspec/support/ruby_features.rb#76 def fork_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#137 + # source://rspec-support//lib/rspec/support/ruby_features.rb#111 + def kw_arg_separation?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#160 def kw_args_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#193 + # source://rspec-support//lib/rspec/support/ruby_features.rb#216 def module_prepends_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#189 + # source://rspec-support//lib/rspec/support/ruby_features.rb#212 def module_refinement_supported?; end # @api private # @return [Boolean] # - # source://rspec-support//lib/rspec/support/ruby_features.rb#79 + # source://rspec-support//lib/rspec/support/ruby_features.rb#81 def optional_and_splat_args_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#141 + # source://rspec-support//lib/rspec/support/ruby_features.rb#164 def required_kw_args_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#123 + # source://rspec-support//lib/rspec/support/ruby_features.rb#146 def ripper_supported?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#88 + # source://rspec-support//lib/rspec/support/ruby_features.rb#90 def supports_exception_cause?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#145 + # source://rspec-support//lib/rspec/support/ruby_features.rb#168 def supports_rebinding_module_methods?; end - # source://rspec-support//lib/rspec/support/ruby_features.rb#98 + # source://rspec-support//lib/rspec/support/ruby_features.rb#100 + def supports_syntax_suggest?; end + + # source://rspec-support//lib/rspec/support/ruby_features.rb#121 def supports_taint?; end end end -# Figures out wether a given method can accept various arguments. +# Figures out whether a given method can accept various arguments. # Surprisingly non-trivial. # # @private # -# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#385 +# source://rspec-support//lib/rspec/support/method_signature_verifier.rb#389 RSpec::Support::StrictSignatureVerifier = RSpec::Support::MethodSignatureVerifier -# source://rspec-support//lib/rspec/support/version.rb#3 +# source://rspec-support//lib/rspec/support/version.rb#5 module RSpec::Support::Version; end -# source://rspec-support//lib/rspec/support/version.rb#4 +# source://rspec-support//lib/rspec/support/version.rb#6 RSpec::Support::Version::STRING = T.let(T.unsafe(nil), String) -# source://rspec-support//lib/rspec/support/warnings.rb#6 +# source://rspec-support//lib/rspec/support/warnings.rb#8 module RSpec::Support::Warnings - # source://rspec-support//lib/rspec/support/warnings.rb#7 + # source://rspec-support//lib/rspec/support/warnings.rb#9 def deprecate(deprecated, options = T.unsafe(nil)); end # Used internally to print deprecation warnings @@ -1618,36 +1639,36 @@ module RSpec::Support::Warnings # # @private # - # source://rspec-support//lib/rspec/support/warnings.rb#15 + # source://rspec-support//lib/rspec/support/warnings.rb#17 def warn_deprecation(message, options = T.unsafe(nil)); end # Used internally to print longer warnings # # @private # - # source://rspec-support//lib/rspec/support/warnings.rb#29 + # source://rspec-support//lib/rspec/support/warnings.rb#31 def warn_with(message, options = T.unsafe(nil)); end # Used internally to print warnings # # @private # - # source://rspec-support//lib/rspec/support/warnings.rb#22 + # source://rspec-support//lib/rspec/support/warnings.rb#24 def warning(text, options = T.unsafe(nil)); end end -# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#5 +# source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#7 module RSpec::Support::WithKeywordsWhenNeeded private # Remove this in RSpec 4 in favour of explicitly passed in kwargs where # this is used. Works around a warning in Ruby 2.7 # - # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15 + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17 def class_exec(klass, *args, **_arg2, &block); end class << self - # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#15 + # source://rspec-support//lib/rspec/support/with_keywords_when_needed.rb#17 def class_exec(klass, *args, **_arg2, &block); end end end diff --git a/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi b/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi similarity index 83% rename from sorbet/rbi/gems/rubocop-ast@1.30.0.rbi rename to sorbet/rbi/gems/rubocop-ast@1.32.3.rbi index 875481e01..2783cc8c2 100644 --- a/sorbet/rbi/gems/rubocop-ast@1.30.0.rbi +++ b/sorbet/rbi/gems/rubocop-ast@1.32.3.rbi @@ -4,6 +4,7 @@ # 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 @@ -159,12 +160,16 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node # # @return [Boolean] whether the array is enclosed in percent or square # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#60 + # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#64 def bracketed?; end - # @deprecated Use `values.each` (a.k.a. `children.each`) + # Calls the given block for each `value` node in the `array` literal. + # If no block is given, an `Enumerator` is returned. # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#21 + # @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. @@ -173,14 +178,14 @@ class RuboCop::AST::ArrayNode < ::RuboCop::AST::Node # @overload percent_literal? # @return [Boolean] whether the array is enclosed in percent brackets # - # source://rubocop-ast//lib/rubocop/ast/node/array_node.rb#47 + # 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#32 + # 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. @@ -216,7 +221,7 @@ class RuboCop::AST::AsgnNode < ::RuboCop::AST::Node end # Common functionality for primitive literal nodes: `sym`, `str`, -# `int`, `float`, ... +# `int`, `float`, `rational`... # # source://rubocop-ast//lib/rubocop/ast/node/mixin/basic_literal_node.rb#7 module RuboCop::AST::BasicLiteralNode @@ -438,18 +443,18 @@ class RuboCop::AST::Builder < ::Parser::Builders::Default # # @return [Node] the generated node # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#98 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#99 def n(type, children, source_map); end # TODO: Figure out what to do about literal encoding handling... # More details here https://github.com/whitequark/parser/issues/283 # - # source://rubocop-ast//lib/rubocop/ast/builder.rb#104 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#105 def string_value(token); end private - # source://rubocop-ast//lib/rubocop/ast/builder.rb#110 + # source://rubocop-ast//lib/rubocop/ast/builder.rb#111 def node_klass(type); end end @@ -623,508 +628,508 @@ end # # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#6 module RuboCop::AST::CollectionNode - extend ::Forwardable + extend ::RuboCop::SimpleForwardable - # source://forwardable/1.3.3/forwardable.rb#231 - def &(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def &(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def *(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def *(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def +(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def +(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def -(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def -(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def <<(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def <<(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def [](*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def [](*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def []=(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def []=(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def all?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def all?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def any?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def any?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def append(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def append(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def assoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def assoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def bsearch_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bsearch_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chain(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chain(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def chunk_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def chunk_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def clear(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def clear(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def collect_concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def collect_concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact_blank(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact_blank(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def compact_blank!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def compact_blank!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def concat(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def concat(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def count(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def count(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def cycle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def cycle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def deconstruct(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def deconstruct(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def delete_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def delete_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def detect(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def detect(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def difference(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def difference(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def dig(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def dig(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def drop_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def drop_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_cons(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_cons(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_entry(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_entry(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def each_with_object(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def each_with_object(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def empty?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def empty?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def entries(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def entries(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def exclude?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def exclude?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def excluding(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def excluding(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def extract!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def extract!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def extract_options!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def extract_options!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fetch(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fetch(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fifth(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fifth(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fill(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fill(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def filter_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def filter_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_all(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_all(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def find_index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def find_index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def first(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def first(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flat_map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flat_map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def flatten!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def flatten!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def forty_two(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def forty_two(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def fourth(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def fourth(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def from(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def from(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def grep_v(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def grep_v(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def group_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def group_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def in_order_of(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def in_order_of(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def include?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def include?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def including(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def including(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def index_with(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def index_with(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def inject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def inject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def insert(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def insert(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersect?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersect?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def intersection(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def intersection(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def join(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def join(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def keep_if(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def keep_if(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def lazy(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def lazy(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def length(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def length(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def many?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def many?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def map!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def map!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def max_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def max_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def maximum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def maximum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def member?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def member?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def min_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def min_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minimum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minimum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def minmax_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def minmax_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def none?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def none?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def one?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def one?(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pack(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pack(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def partition(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def partition(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pick(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pick(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def place(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def place(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pluck(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pluck(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def pop(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def pop(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def prepend(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def prepend(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def product(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def product(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def push(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def push(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rassoc(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rassoc(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reduce(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reduce(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reject!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reject!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_combination(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_combination(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def repeated_permutation(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def repeated_permutation(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def replace(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def replace(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def reverse_each(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def reverse_each(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rindex(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rindex(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def rotate!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rotate!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sample(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sample(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def second(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def second(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def second_to_last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def second_to_last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def select!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def select!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shelljoin(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shelljoin(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def shuffle!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def shuffle!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def size(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def size(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_after(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_after(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_before(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_before(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def slice_when(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def slice_when(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sole(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sole(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sort_by!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sort_by!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def sum(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def sum(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def take_while(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def take_while(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def tally(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tally(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def third(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def third(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def third_to_last(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def third_to_last(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_ary(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_ary(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_default_s(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_default_s(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_formatted_s(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_formatted_s(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_fs(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_fs(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_h(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_h(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_msgpack(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_msgpack(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_sentence(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_sentence(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_set(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_set(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def to_xml(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def to_xml(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def transpose(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def transpose(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def union(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def uniq!(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def uniq!(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def unshift(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def unshift(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def values_at(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def values_at(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def without(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def without(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def zip(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def zip(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def |(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def |(*_arg0, **_arg1, &_arg2); end end # source://rubocop-ast//lib/rubocop/ast/node/mixin/collection_node.rb#9 @@ -1406,6 +1411,14 @@ class RuboCop::AST::EnsureNode < ::RuboCop::AST::Node # # source://rubocop-ast//lib/rubocop/ast/node/ensure_node.rb#12 def body; 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#20 + def void_context?; end end # source://rubocop-ast//lib/rubocop/ast/ext/range.rb#5 @@ -1433,11 +1446,6 @@ module RuboCop::AST::Ext::Range def line_span(exclude_end: T.unsafe(nil)); end end -# Refinement to circumvent broken `Range#minmax` for infinity ranges in 2.6- -# -# source://rubocop-ast//lib/rubocop/ast/ext/range_min_max.rb#7 -module RuboCop::AST::Ext::RangeMinMax; 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. @@ -2636,19 +2644,19 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @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#92 + # source://rubocop-ast//lib/rubocop/ast/node.rb#113 def initialize(type, children = T.unsafe(nil), properties = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __ENCODING___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __FILE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def __LINE___type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def alias_type?; end # Returns an array of ancestor nodes. @@ -2656,173 +2664,173 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] an array of ancestor nodes # - # source://rubocop-ast//lib/rubocop/ast/node.rb#247 + # source://rubocop-ast//lib/rubocop/ast/node.rb#268 def ancestors; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def and_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def and_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def arg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def args_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#464 + # source://rubocop-ast//lib/rubocop/ast/node.rb#474 def argument?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#468 + # source://rubocop-ast//lib/rubocop/ast/node.rb#478 def argument_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_pattern_with_tail_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def array_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#416 + # source://rubocop-ast//lib/rubocop/ast/node.rb#426 def assignment?; end # Some cops treat the shovel operator as a kind of assignment. # - # source://rubocop-ast//lib/rubocop/ast/node.rb#355 + # source://rubocop-ast//lib/rubocop/ast/node.rb#376 def assignment_or_similar?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def back_ref_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#420 + # source://rubocop-ast//lib/rubocop/ast/node.rb#430 def basic_conditional?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#363 + # source://rubocop-ast//lib/rubocop/ast/node.rb#384 def basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def begin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def block_pass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def block_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def blockarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def blockarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#472 + # source://rubocop-ast//lib/rubocop/ast/node.rb#482 def boolean_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def break_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#456 + # source://rubocop-ast//lib/rubocop/ast/node.rb#466 def call_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def case_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def case_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def casgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cbase_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#460 + # source://rubocop-ast//lib/rubocop/ast/node.rb#470 def chained?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#512 + # source://rubocop-ast//lib/rubocop/ast/node.rb#522 def class_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#530 + # source://rubocop-ast//lib/rubocop/ast/node.rb#540 def class_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def class_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#144 + # source://rubocop-ast//lib/rubocop/ast/node.rb#165 def complete!; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#149 + # source://rubocop-ast//lib/rubocop/ast/node.rb#170 def complete?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def complex_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#424 + # source://rubocop-ast//lib/rubocop/ast/node.rb#434 def conditional?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#293 + # source://rubocop-ast//lib/rubocop/ast/node.rb#314 def const_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def const_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def const_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def csend_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def cvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def def_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#314 + # source://rubocop-ast//lib/rubocop/ast/node.rb#335 def defined_module; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#319 + # source://rubocop-ast//lib/rubocop/ast/node.rb#340 def defined_module_name; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def defined_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def defs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def dstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def dsym_type?; end # Calls the given block for each ancestor node from parent to root. @@ -2835,163 +2843,163 @@ class RuboCop::AST::Node < ::Parser::AST::Node # @return [Enumerator] if no block is given # @yieldparam node [Node] each ancestor node # - # source://rubocop-ast//lib/rubocop/ast/node.rb#235 + # source://rubocop-ast//lib/rubocop/ast/node.rb#256 def each_ancestor(*types, &block); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def eflipflop_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def empty_else_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#349 + # source://rubocop-ast//lib/rubocop/ast/node.rb#370 def empty_source?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ensure_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#408 + # source://rubocop-ast//lib/rubocop/ast/node.rb#418 def equals_asgn?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def erange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def false_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#371 + # source://rubocop-ast//lib/rubocop/ast/node.rb#392 def falsey_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def find_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#261 + # source://rubocop-ast//lib/rubocop/ast/node.rb#282 def first_line; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def float_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def for_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forward_arg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forward_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_args_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def forwarded_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#509 + # source://rubocop-ast//lib/rubocop/ast/node.rb#519 def global_const?(param0 = T.unsafe(nil), param1); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#484 + # source://rubocop-ast//lib/rubocop/ast/node.rb#494 def guard_clause?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def gvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def gvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def hash_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def hash_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ident_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def if_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def if_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def iflipflop_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#379 + # source://rubocop-ast//lib/rubocop/ast/node.rb#400 def immutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def in_match_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def in_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def index_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def indexasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def int_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def irange_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ivar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def ivasgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#437 + # source://rubocop-ast//lib/rubocop/ast/node.rb#447 def keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwbegin_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwnilarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwoptarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwrestarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def kwsplat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#503 + # source://rubocop-ast//lib/rubocop/ast/node.rb#513 def lambda?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#506 + # source://rubocop-ast//lib/rubocop/ast/node.rb#516 def lambda_or_proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lambda_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#265 + # source://rubocop-ast//lib/rubocop/ast/node.rb#286 def last_line; end # Use is discouraged, this is a potentially slow method and can lead @@ -2999,7 +3007,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the left (aka previous) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#187 + # source://rubocop-ast//lib/rubocop/ast/node.rb#208 def left_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -3007,94 +3015,94 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] the left (aka previous) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#197 + # source://rubocop-ast//lib/rubocop/ast/node.rb#218 def left_siblings; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#269 + # source://rubocop-ast//lib/rubocop/ast/node.rb#290 def line_count; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#359 + # source://rubocop-ast//lib/rubocop/ast/node.rb#380 def literal?; end # NOTE: `loop { }` is a normal method call and thus not a loop keyword. # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#433 + # source://rubocop-ast//lib/rubocop/ast/node.rb#443 def loop_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lvar_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def masgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_alt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_as_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_current_line_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#491 + # source://rubocop-ast//lib/rubocop/ast/node.rb#501 def match_guard_clause?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_nil_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_pattern_p_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_pattern_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_rest_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_var_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_with_lvasgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def match_with_trailing_comma_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def mlhs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#537 + # source://rubocop-ast//lib/rubocop/ast/node.rb#547 def module_definition?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def module_type?; end # Predicates # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#341 + # source://rubocop-ast//lib/rubocop/ast/node.rb#362 def multiline?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#375 + # source://rubocop-ast//lib/rubocop/ast/node.rb#396 def mutable_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#671 + # source://rubocop-ast//lib/rubocop/ast/node.rb#679 def new_class_or_module_block?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def next_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def nil_type?; end # Common destructuring method. This can be used to normalize @@ -3107,95 +3115,95 @@ class RuboCop::AST::Node < ::Parser::AST::Node # source://ast/2.4.2/lib/ast/node.rb#56 def node_parts; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#275 + # source://rubocop-ast//lib/rubocop/ast/node.rb#296 def nonempty_line_count; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def not_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def nth_ref_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def numargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def numblock_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#476 + # source://rubocop-ast//lib/rubocop/ast/node.rb#486 def numeric_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_kwarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def objc_varargs_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def op_asgn_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#448 + # source://rubocop-ast//lib/rubocop/ast/node.rb#458 def operator_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def optarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def or_asgn_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def or_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 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#126 + # source://rubocop-ast//lib/rubocop/ast/node.rb#147 def parent; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#135 + # source://rubocop-ast//lib/rubocop/ast/node.rb#156 def parent?; end # Searching the AST # - # source://rubocop-ast//lib/rubocop/ast/node.rb#325 + # source://rubocop-ast//lib/rubocop/ast/node.rb#346 def parent_module_name; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#452 + # source://rubocop-ast//lib/rubocop/ast/node.rb#462 def parenthesized_call?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def pin_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#428 + # source://rubocop-ast//lib/rubocop/ast/node.rb#438 def post_condition_loop?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def postexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def preexe_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#496 + # source://rubocop-ast//lib/rubocop/ast/node.rb#506 def proc?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def procarg0_type?; end # Some expressions are evaluated for their value, some for their side @@ -3208,56 +3216,60 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#582 + # source://rubocop-ast//lib/rubocop/ast/node.rb#590 def pure?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#480 + # source://rubocop-ast//lib/rubocop/ast/node.rb#490 def range_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def rational_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#286 + # source://rubocop-ast//lib/rubocop/ast/node.rb#307 def receiver(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 def recursive_basic_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#386 + # @return [Boolean] + # + # source://rubocop-ast//lib/rubocop/ast/node.rb#97 def recursive_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def redo_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#404 + # source://rubocop-ast//lib/rubocop/ast/node.rb#414 def reference?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def regexp_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def regopt_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def resbody_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def rescue_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def restarg_expr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def restarg_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def retry_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def return_type?; end # Use is discouraged, this is a potentially slow method and can lead @@ -3265,7 +3277,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Node, nil] the right (aka next) sibling # - # source://rubocop-ast//lib/rubocop/ast/node.rb#178 + # source://rubocop-ast//lib/rubocop/ast/node.rb#199 def right_sibling; end # Use is discouraged, this is a potentially slow method and can lead @@ -3273,18 +3285,18 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Array] the right (aka next) siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#206 + # source://rubocop-ast//lib/rubocop/ast/node.rb#227 def right_siblings; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#140 + # source://rubocop-ast//lib/rubocop/ast/node.rb#161 def root?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def sclass_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def self_type?; end # Most nodes are of 'send' type, so this method is defined @@ -3292,15 +3304,15 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#119 + # source://rubocop-ast//lib/rubocop/ast/node.rb#140 def send_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def shadowarg_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#412 + # source://rubocop-ast//lib/rubocop/ast/node.rb#422 def shorthand_asgn?; end # Returns the index of the receiver node in its siblings. (Sibling index @@ -3309,70 +3321,70 @@ class RuboCop::AST::Node < ::Parser::AST::Node # # @return [Integer, nil] the index of the receiver node in its siblings # - # source://rubocop-ast//lib/rubocop/ast/node.rb#171 + # source://rubocop-ast//lib/rubocop/ast/node.rb#192 def sibling_index; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#345 + # source://rubocop-ast//lib/rubocop/ast/node.rb#366 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#253 + # source://rubocop-ast//lib/rubocop/ast/node.rb#274 def source; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#279 + # source://rubocop-ast//lib/rubocop/ast/node.rb#300 def source_length; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#257 + # source://rubocop-ast//lib/rubocop/ast/node.rb#278 def source_range; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#444 + # source://rubocop-ast//lib/rubocop/ast/node.rb#454 def special_keyword?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def splat_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#291 + # source://rubocop-ast//lib/rubocop/ast/node.rb#312 def str_content(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def str_type?; end # @deprecated Use `:class_constructor?` # - # source://rubocop-ast//lib/rubocop/ast/node.rb#525 + # source://rubocop-ast//lib/rubocop/ast/node.rb#535 def struct_constructor?(param0 = T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def super_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def sym_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def true_type?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#367 + # source://rubocop-ast//lib/rubocop/ast/node.rb#388 def truthy_literal?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def undef_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def unless_guard_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def until_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def until_type?; end # Override `AST::Node#updated` so that `AST::Processor` does not try to @@ -3381,7 +3393,7 @@ class RuboCop::AST::Node < ::Parser::AST::Node # 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#160 + # source://rubocop-ast//lib/rubocop/ast/node.rb#181 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 @@ -3392,76 +3404,82 @@ class RuboCop::AST::Node < ::Parser::AST::Node # 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#551 + # source://rubocop-ast//lib/rubocop/ast/node.rb#560 def value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#400 + # source://rubocop-ast//lib/rubocop/ast/node.rb#410 def variable?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def when_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def while_post_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def while_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def xstr_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def yield_type?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#111 + # source://rubocop-ast//lib/rubocop/ast/node.rb#132 def zsuper_type?; end protected - # source://rubocop-ast//lib/rubocop/ast/node.rb#130 + # source://rubocop-ast//lib/rubocop/ast/node.rb#151 def parent=(node); end private # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#610 + # source://rubocop-ast//lib/rubocop/ast/node.rb#618 def begin_value_used?; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#621 + # source://rubocop-ast//lib/rubocop/ast/node.rb#629 def case_if_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#305 + # source://rubocop-ast//lib/rubocop/ast/node.rb#326 def defined_module0(param0 = T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#615 + # source://rubocop-ast//lib/rubocop/ast/node.rb#623 def for_value_used?; end - # source://rubocop-ast//lib/rubocop/ast/node.rb#657 + # source://rubocop-ast//lib/rubocop/ast/node.rb#665 def parent_module_name_for_block(ancestor); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#645 + # source://rubocop-ast//lib/rubocop/ast/node.rb#653 def parent_module_name_for_sclass(sclass_node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#632 + # source://rubocop-ast//lib/rubocop/ast/node.rb#640 def parent_module_name_part(node); end - # source://rubocop-ast//lib/rubocop/ast/node.rb#600 + # source://rubocop-ast//lib/rubocop/ast/node.rb#608 def visit_ancestors(types); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node.rb#627 + # source://rubocop-ast//lib/rubocop/ast/node.rb#635 def while_until_value_used?; end + + class << self + private + + # source://rubocop-ast//lib/rubocop/ast/node.rb#92 + def def_recursive_literal_predicate(kind); end + end end # @api private @@ -3605,7 +3623,7 @@ RuboCop::AST::Node::VARIABLES = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/method_definer.rb#5 class RuboCop::AST::NodePattern include ::RuboCop::AST::NodePattern::MethodDefiner - extend ::Forwardable + extend ::RuboCop::SimpleForwardable # @return [NodePattern] a new instance of NodePattern # @@ -3623,8 +3641,8 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def ast; end - # source://forwardable/1.3.3/forwardable.rb#231 - def captures(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def captures(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#111 def encode_with(coder); end @@ -3652,16 +3670,16 @@ class RuboCop::AST::NodePattern # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#73 def match_code; end - # source://forwardable/1.3.3/forwardable.rb#231 - def named_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + 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://forwardable/1.3.3/forwardable.rb#231 - def positional_parameters(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def positional_parameters(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern.rb#95 def to_s; end @@ -3766,15 +3784,15 @@ end # # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler.rb#11 class RuboCop::AST::NodePattern::Compiler - extend ::Forwardable + 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://forwardable/1.3.3/forwardable.rb#231 - def bind(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def bind(*_arg0, **_arg1, &_arg2); end # Returns the value of attribute binding. # @@ -3899,7 +3917,10 @@ class RuboCop::AST::NodePattern::Compiler::Binding # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#16 def bind(name); end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/binding.rb#30 + # 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 @@ -3917,8 +3938,8 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#123 def initialize; end - # source://forwardable/1.3.3/forwardable.rb#231 - def comments(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def comments(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#128 def named_parameters; end @@ -3931,8 +3952,8 @@ class RuboCop::AST::NodePattern::Compiler::Debug < ::RuboCop::AST::NodePattern:: # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/debug.rb#132 def parser; end - # source://forwardable/1.3.3/forwardable.rb#231 - def tokens(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def tokens(*_arg0, **_arg1, &_arg2); end end # @api private @@ -4247,7 +4268,6 @@ end # Doc on how this fits in the compiling process: # /docs/modules/ROOT/pages/node_pattern.adoc # -# # source://rubocop-ast//lib/rubocop/ast/node_pattern/compiler/sequence_subcompiler.rb#17 class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST::NodePattern::Compiler::Subcompiler # Calls `compile_sequence`; the actual `compile` method @@ -4401,6 +4421,8 @@ class RuboCop::AST::NodePattern::Compiler::SequenceSubcompiler < ::RuboCop::AST: 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) @@ -4707,218 +4729,218 @@ end # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#7 class RuboCop::AST::NodePattern::Node < ::Parser::AST::Node include ::RuboCop::AST::Descendence - extend ::Forwardable + 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#29 + # 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#69 + # 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#23 + # 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#48 + # 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#43 + # 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#34 + # 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#64 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#63 def matches_within_set?; end # @return [Integer] nb of captures of that node and its descendants # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#53 + # 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#19 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#18 def rest?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#78 + # 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#58 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#57 def variadic?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#74 + # 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#180 +# 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#198 + # 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#190 + # 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#194 + # 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#186 + # 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#183 +# 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#97 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#96 class RuboCop::AST::NodePattern::Node::Capture < ::RuboCop::AST::NodePattern::Node - # source://forwardable/1.3.3/forwardable.rb#231 - def arity(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def arity(*_arg0, **_arg1, &_arg2); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#101 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#100 def capture?; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#109 + # 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#105 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#104 def nb_captures; end - # source://forwardable/1.3.3/forwardable.rb#231 - def rest?(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def rest?(*_arg0, **_arg1, &_arg2); end end -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#86 +# 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#87 + # 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#140 +# 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#82 +# 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#250 +# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#249 RuboCop::AST::NodePattern::Node::MAP = T.let(T.unsafe(nil), Hash) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#12 +# 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#131 +# 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#136 + # 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#132 + # 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#143 +# 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#156 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#155 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#146 + # 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#150 +# 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#162 +# 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#170 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#169 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#174 + # 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#166 + # 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#163 +# 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#118 +# 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#121 + # 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#206 +# 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#209 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#208 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#214 + # 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#224 +# 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#225 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#224 def arity; end - # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#232 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/node.rb#231 def in_sequence_head; end end @@ -4930,148 +4952,148 @@ end # # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#12 class RuboCop::AST::NodePattern::Parser < ::Racc::Parser - extend ::Forwardable + 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#335 + # 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#339 + # 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#345 + # 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#349 + # 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#353 + # 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#357 + # 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#361 + # 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#365 + # 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#369 + # 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#303 + # 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#373 + # 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#377 + # 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#381 + # 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#389 + # 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#395 + # 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#307 + # 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#415 + # 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#425 + # 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#429 + # 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#433 + # 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#311 + # 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#437 + # 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#441 + # 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#445 + # 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#449 + # 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#453 + # 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#457 + # 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#461 + # 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#315 + # 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#319 + # 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#323 + # 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#327 + # 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#331 + # 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#465 + # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.racc.rb#463 def _reduce_none(val, _values); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_atom(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_atom(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_call(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_call(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_capture(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_capture(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_list(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_list(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_unary_op(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_unary_op(*_arg0, **_arg1, &_arg2); end - # source://forwardable/1.3.3/forwardable.rb#231 - def emit_union(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def emit_union(*_arg0, **_arg1, &_arg2); end # source://rubocop-ast//lib/rubocop/ast/node_pattern/parser.rb#40 def inspect; end - # source://forwardable/1.3.3/forwardable.rb#231 - def next_token(*args, **_arg1, &block); end + # source://rubocop-ast//lib/rubocop/ast/utilities/simple_forwardable.rb#9 + def next_token(*_arg0, **_arg1, &_arg2); end # (Similar API to `parser` gem) # Parses a source and returns the AST. @@ -5106,10 +5128,10 @@ 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#295 +# 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#244 +# 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 @@ -5246,16 +5268,40 @@ RuboCop::AST::NodePattern::Sets::SET_ANY_EMPTY_NONE_ETC = T.let(T.unsafe(nil), S RuboCop::AST::NodePattern::Sets::SET_AP_P_PP_ETC = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_ASSERT_EQUAL_REFUTE_EQUAL = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ASSERT_EMPTY_ASSERT_NOT_EMPTY_REFUTE_EMPTY = 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) +RuboCop::AST::NodePattern::Sets::SET_ASSERT_EQUAL_ASSERT_NOT_EQUAL_REFUTE_EQUAL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ASSERT_FALSE = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_BACKGROUND_SCENARIO_XSCENARIO_ETC = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ASSERT_INCLUDES_ASSERT_NOT_INCLUDES_REFUTE_INCLUDES = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_BEFORE_AFTER = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_ASSERT_INSTANCE_OF_ASSERT_NOT_INSTANCE_OF_REFUTE_INSTANCE_OF = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ASSERT_IN_DELTA_ASSERT_NOT_IN_DELTA_REFUTE_IN_DELTA = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ASSERT_KIND_OF_ASSERT_NOT_KIND_OF_REFUTE_KIND_OF = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ASSERT_MATCH_REFUTE_MATCH = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ASSERT_NIL_ASSERT_NOT_NIL_REFUTE_NIL = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ASSERT_PREDICATE_ASSERT_NOT_PREDICATE_REFUTE_PREDICATE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_ASSERT_TRUE = 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_BELONGS_TO_HAS_ONE_HAS_MANY_HAS_AND_BELONGS_TO_MANY = T.let(T.unsafe(nil), Set) @@ -5315,14 +5361,11 @@ RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT = T.let(T.unsafe(nil) RuboCop::AST::NodePattern::Sets::SET_CREATED_AT_UPDATED_AT_2 = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD = T.let(T.unsafe(nil), Set) +RuboCop::AST::NodePattern::Sets::SET_CSS_ID = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_DEFINE_METHOD_DEFINE_SINGLETON_METHOD = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_DESCRIBE_CONTEXT_FEATURE_ETC = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_DOUBLE_SPY = T.let(T.unsafe(nil), Set) @@ -5338,9 +5381,6 @@ RuboCop::AST::NodePattern::Sets::SET_EACH_WITH_INDEX_WITH_INDEX = T.let(T.unsafe # 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_ENV = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_EQL_EQ_BE = T.let(T.unsafe(nil), Set) @@ -5356,12 +5396,6 @@ 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_EXPECT_ALLOW = T.let(T.unsafe(nil), Set) -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_FACTORYGIRL_FACTORYBOT = T.let(T.unsafe(nil), Set) - -# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 -RuboCop::AST::NodePattern::Sets::SET_FACTORY_TRAIT = T.let(T.unsafe(nil), Set) - # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FILETEST_FILE_DIR_SHELL = T.let(T.unsafe(nil), Set) @@ -5371,6 +5405,9 @@ RuboCop::AST::NodePattern::Sets::SET_FILE_DIR = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FILE_FILETEST = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_FILE_TEMPFILE_STRINGIO = T.let(T.unsafe(nil), Set) @@ -5404,6 +5441,12 @@ RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE = T.let(T.unsafe(nil), Set # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_HAS_MANY_HAS_ONE_BELONGS_TO = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_HEAD_ASSERT_RESPONSE = T.let(T.unsafe(nil), Set) + +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_HTML_HTML5 = 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) @@ -5449,9 +5492,15 @@ 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) @@ -5479,6 +5528,9 @@ 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_NOTICE_ALERT = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_NOT_TO_TO_NOT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_ONLY_EXCEPT = T.let(T.unsafe(nil), Set) @@ -5503,9 +5555,6 @@ RuboCop::AST::NodePattern::Sets::SET_PUBLIC_CONSTANT_PRIVATE_CONSTANT = T.let(T. # 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_ERROR_RAISE_EXCEPTION = 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) @@ -5533,6 +5582,9 @@ 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_REFERER_REFERRER = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_REJECT_DELETE_IF_REJECT = T.let(T.unsafe(nil), Set) @@ -5554,12 +5606,18 @@ RuboCop::AST::NodePattern::Sets::SET_SELECT_FILTER_FIND_ALL = T.let(T.unsafe(nil # 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_FILTER_KEEP_IF = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SELECT_SELECT = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SEND_PUBLIC_SEND___SEND__ = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_SEND___SEND__ = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_SHOULD_SHOULD_NOT = T.let(T.unsafe(nil), Set) @@ -5599,6 +5657,9 @@ 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_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_TEXT_EXACT_TEXT = T.let(T.unsafe(nil), Set) + # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_TIME_DATETIME = T.let(T.unsafe(nil), Set) @@ -5629,6 +5690,9 @@ RuboCop::AST::NodePattern::Sets::SET_TRY_TRY = T.let(T.unsafe(nil), Set) # source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 RuboCop::AST::NodePattern::Sets::SET_T_TRANSLATE_L_LOCALIZE = T.let(T.unsafe(nil), Set) +# source://rubocop-ast//lib/rubocop/ast/node_pattern/sets.rb#10 +RuboCop::AST::NodePattern::Sets::SET_WHERE_NOT = 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) @@ -5650,6 +5714,9 @@ 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) @@ -5710,7 +5777,7 @@ 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`, ... +# 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 @@ -6047,42 +6114,42 @@ end # 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#11 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#10 class RuboCop::AST::ProcessedSource # @return [ProcessedSource] a new instance of ProcessedSource # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#26 - def initialize(source, ruby_version, path = T.unsafe(nil)); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#28 + def initialize(source, ruby_version, path = T.unsafe(nil), parser_engine: T.unsafe(nil)); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#63 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#72 def [](*args); end # Returns the value of attribute ast. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def ast; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#41 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#50 def ast_with_comments; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#102 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#111 def blank?; end # Returns the value of attribute buffer. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def buffer; end # Raw source checksum for tracking infinite loops. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#74 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#83 def checksum; end # @return [Comment, nil] the comment at that line, if any. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#116 def comment_at_line(line); end # Consider using `each_comment_in_lines` instead @@ -6090,173 +6157,181 @@ class RuboCop::AST::ProcessedSource # @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#129 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 def commented?(source_range); end # Returns the value of attribute comments. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 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#137 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#146 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#129 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#138 def contains_comment?(source_range); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#151 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#160 def current_line(token); end # Returns the value of attribute diagnostics. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def diagnostics; end # @deprecated Use `comments.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#79 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#88 def each_comment(&block); end # Enumerates on the comments contained with the given `line_range` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#117 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#126 def each_comment_in_lines(line_range); end # @deprecated Use `tokens.each` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#89 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 def each_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#98 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#107 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#84 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#93 def find_comment(&block); end # @deprecated Use `tokens.find` # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#94 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#103 def find_token(&block); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#172 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#181 def first_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#155 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#164 def following_line(token); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#176 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#185 def last_token_of(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#159 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#168 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#112 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#121 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#49 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#58 def lines; end + # Returns the value of attribute parser_engine. + # + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 + def parser_engine; end + # Returns the value of attribute parser_error. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def parser_error; end # Returns the value of attribute path. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def path; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#147 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#156 def preceding_line(token); end # Returns the value of attribute raw_source. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def raw_source; end # Returns the value of attribute ruby_version. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 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#183 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#192 def sorted_tokens; end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#141 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#150 def start_with?(string); end # Returns the value of attribute tokens. # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#18 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#20 def tokens; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#166 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#175 def tokens_within(range_or_node); end # @return [Boolean] # - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#67 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#76 def valid_syntax?; end private - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#190 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#199 def comment_index; end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#278 - def create_parser(ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#309 + def create_parser(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#294 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#325 def first_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#299 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#330 def last_token_index(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#196 - def parse(source, ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#205 + def parse(source, ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#230 - def parser_class(ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#238 + def parser_class(ruby_version, parser_engine); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#304 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#335 def source_range(range_or_node); end - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#213 + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#222 def tokenize(parser); end class << self - # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#21 - def from_file(path, ruby_version); end + # source://rubocop-ast//lib/rubocop/ast/processed_source.rb#23 + def from_file(path, ruby_version, parser_engine: T.unsafe(nil)); end end end -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#15 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#14 RuboCop::AST::ProcessedSource::INVALID_LEVELS = T.let(T.unsafe(nil), Array) +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#17 +RuboCop::AST::ProcessedSource::PARSER_ENGINES = T.let(T.unsafe(nil), Array) + # @api private # -# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#13 +# source://rubocop-ast//lib/rubocop/ast/processed_source.rb#12 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 @@ -6272,6 +6347,16 @@ class RuboCop::AST::RangeNode < ::RuboCop::AST::Node 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. @@ -7313,3 +7398,11 @@ class RuboCop::AST::YieldNode < ::RuboCop::AST::Node # source://rubocop-ast//lib/rubocop/ast/node/yield_node.rb#16 def node_parts; 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-capybara@2.19.0.rbi b/sorbet/rbi/gems/rubocop-capybara@2.21.0.rbi similarity index 88% rename from sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi rename to sorbet/rbi/gems/rubocop-capybara@2.21.0.rbi index a67022133..f4c4015ad 100644 --- a/sorbet/rbi/gems/rubocop-capybara@2.19.0.rbi +++ b/sorbet/rbi/gems/rubocop-capybara@2.21.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop-capybara` gem. # Please instead update this file by running `bin/tapioca gem rubocop-capybara`. + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#3 module RuboCop; end @@ -195,17 +196,16 @@ RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_OPTIONS = T.let(T.unsafe(nil), Ha # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/capybara_help.rb#35 RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_PSEUDO_CLASSES = T.let(T.unsafe(nil), Array) -# Checks for click button or link style. +# Checks for methods of button or link clicks. # -# @example EnforcedStyle: strict (default) -# # bad -# click_link_or_button('foo') -# click_on('foo') +# By default, prefer to use `click_link_or_button` or `click_on`. +# These methods offer a weaker coupling between the test and HTML, +# allowing for a more faithful reflection of how the user behaves. # -# # good -# click_link('foo') -# click_button('foo') -# @example EnforcedStyle: link_or_button +# You can set `EnforcedStyle: strict` to prefer the use of +# `click_link` and `click_button`, but this is a deprecated setting. +# +# @example EnforcedStyle: link_or_button (default) # # bad # click_link('foo') # click_button('foo') @@ -213,50 +213,101 @@ RuboCop::Cop::Capybara::CapybaraHelp::SPECIFIC_PSEUDO_CLASSES = T.let(T.unsafe(n # # good # click_link_or_button('foo') # click_on('foo') +# @example EnforcedStyle: strict +# # bad +# click_link_or_button('foo') +# click_on('foo') +# +# # good +# click_link('foo') +# click_button('foo') # -# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#26 +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#33 class RuboCop::Cop::Capybara::ClickLinkOrButtonStyle < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle - # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#37 + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#44 def on_send(node); end private # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#62 + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#69 def link_or_button_method?(node); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#45 + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#52 def offense?(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#50 + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#57 def offense_message(node); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#58 + # source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#65 def strict_method?(node); end end -# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#34 +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#41 RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::CLICK_LINK_OR_BUTTON = T.let(T.unsafe(nil), Array) -# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#31 +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#38 RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::MSG_CLICK_LINK_OR_BUTTON = T.let(T.unsafe(nil), String) -# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#29 +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#36 RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::MSG_STRICT = T.let(T.unsafe(nil), String) -# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#35 +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#42 RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#33 +# source://rubocop-capybara//lib/rubocop/cop/capybara/click_link_or_button_style.rb#40 RuboCop::Cop::Capybara::ClickLinkOrButtonStyle::STRICT_METHODS = T.let(T.unsafe(nil), Array) +# Css selector parser. +# +# @api private +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_attributes_parser.rb#8 +class RuboCop::Cop::Capybara::CssAttributesParser + # @api private + # @return [CssAttributesParser] a new instance of CssAttributesParser + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_attributes_parser.rb#9 + def initialize(selector); end + + # @api private + # @return [Array] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_attributes_parser.rb#18 + def parse; end + + private + + # @api private + # @example + # normalize_value('true') # => true + # normalize_value('false') # => false + # normalize_value(nil) # => nil + # normalize_value("foo") # => "'foo'" + # @param value [String] + # @return [Boolean, String] + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_attributes_parser.rb#61 + def normalize_value(value); end + + # @api private + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_attributes_parser.rb#42 + def on_bracket_end; end + + # @api private + # + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_attributes_parser.rb#33 + def on_bracket_start; end +end + # Helps parsing css selector. # # @api private @@ -280,10 +331,11 @@ module RuboCop::Cop::Capybara::CssSelector # attributes('a[foo-bar_baz]') # => {"foo-bar_baz=>nil} # attributes('button[foo][bar=baz]') # => {"foo"=>nil, "bar"=>"'baz'"} # attributes('table[foo=bar]') # => {"foo"=>"'bar'"} + # attributes('[foo="bar[baz][qux]"]') # => {"foo"=>"'bar[baz][qux]'"} # @param selector [String] # @return [Array] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#58 + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#59 def attributes(selector); end # @api private @@ -326,21 +378,9 @@ module RuboCop::Cop::Capybara::CssSelector # @param selector [String] # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#88 + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#82 def multiple_selectors?(selector); end - # @api private - # @example - # normalize_value('true') # => true - # normalize_value('false') # => false - # normalize_value(nil) # => nil - # normalize_value("foo") # => "'foo'" - # @param value [String] - # @return [Boolean, String] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#100 - def normalize_value(value); end - # @api private # @example # pseudo_classes('button:not([disabled])') # => ['not()'] @@ -348,7 +388,7 @@ module RuboCop::Cop::Capybara::CssSelector # @param selector [String] # @return [Array] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#74 + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#68 def pseudo_classes(selector); end class << self @@ -367,10 +407,11 @@ module RuboCop::Cop::Capybara::CssSelector # attributes('a[foo-bar_baz]') # => {"foo-bar_baz=>nil} # attributes('button[foo][bar=baz]') # => {"foo"=>nil, "bar"=>"'baz'"} # attributes('table[foo=bar]') # => {"foo"=>"'bar'"} + # attributes('[foo="bar[baz][qux]"]') # => {"foo"=>"'bar[baz][qux]'"} # @param selector [String] # @return [Array] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#58 + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#59 def attributes(selector); end # @api private @@ -413,21 +454,9 @@ module RuboCop::Cop::Capybara::CssSelector # @param selector [String] # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#88 + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#82 def multiple_selectors?(selector); end - # @api private - # @example - # normalize_value('true') # => true - # normalize_value('false') # => false - # normalize_value(nil) # => nil - # normalize_value("foo") # => "'foo'" - # @param value [String] - # @return [Boolean, String] - # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#100 - def normalize_value(value); end - # @api private # @example # pseudo_classes('button:not([disabled])') # => ['not()'] @@ -435,7 +464,7 @@ module RuboCop::Cop::Capybara::CssSelector # @param selector [String] # @return [Array] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#74 + # source://rubocop-capybara//lib/rubocop/cop/capybara/mixin/css_selector.rb#68 def pseudo_classes(selector); end end end @@ -571,22 +600,22 @@ RuboCop::Cop::Capybara::MatchStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # Enforces use of `have_no_*` or `not_to` for negated expectations. # -# @example EnforcedStyle: not_to (default) +# @example EnforcedStyle: have_no (default) # # bad -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') +# expect(page).not_to have_selector 'a' +# expect(page).not_to have_css('a') # # # good -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') -# @example EnforcedStyle: have_no +# expect(page).to have_no_selector 'a' +# expect(page).to have_no_css('a') +# @example EnforcedStyle: not_to # # bad -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') +# expect(page).to have_no_selector 'a' +# expect(page).to have_no_css('a') # # # good -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') +# expect(page).not_to have_selector 'a' +# expect(page).not_to have_css('a') # # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#26 class RuboCop::Cop::Capybara::NegationMatcher < ::RuboCop::Cop::Base @@ -604,7 +633,7 @@ class RuboCop::Cop::Capybara::NegationMatcher < ::RuboCop::Cop::Base private - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#78 + # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#79 def message(matcher); end # @return [Boolean] @@ -612,13 +641,13 @@ class RuboCop::Cop::Capybara::NegationMatcher < ::RuboCop::Cop::Base # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#69 def offense?(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#74 + # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#75 def offense_range(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#93 + # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#94 def replaced_matcher(matcher); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#84 + # source://rubocop-capybara//lib/rubocop/cop/capybara/negation_matcher.rb#85 def replaced_runner; end end @@ -872,6 +901,57 @@ end # source://rubocop-capybara//lib/rubocop/cop/capybara/rspec/predicate_matcher.rb#244 RuboCop::Cop::Capybara::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for redundant `within find(...)` calls. +# +# @example +# # bad +# within find('foo.bar') do +# # ... +# end +# +# # good +# within 'foo.bar' do +# # ... +# end +# +# # bad +# within find_by_id('foo') do +# # ... +# end +# +# # good +# within '#foo' do +# # ... +# end +# +# source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#29 +class RuboCop::Cop::Capybara::RedundantWithinFind < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#41 + def on_send(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#36 + def within_find(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#51 + def msg(node); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#55 + def replaced(node); end +end + +# source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#33 +RuboCop::Cop::Capybara::RedundantWithinFind::FIND_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#31 +RuboCop::Cop::Capybara::RedundantWithinFind::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-capybara//lib/rubocop/cop/capybara/redundant_within_find.rb#32 +RuboCop::Cop::Capybara::RedundantWithinFind::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for there is a more specific actions offered by Capybara. # # @example @@ -945,69 +1025,73 @@ RuboCop::Cop::Capybara::SpecificActions::SPECIFIC_ACTION = T.let(T.unsafe(nil), # find('#some-id') # find('[id=some-id]') # find(:css, '#some-id') +# find(:id, 'some-id') # # # good # find_by_id('some-id') # -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#17 +# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#18 class RuboCop::Cop::Capybara::SpecificFinders < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#30 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#31 def class_options(param0); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#25 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#26 def find_argument(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#34 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#35 def on_send(node); end private - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#93 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#99 def append_options(classes, options); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#62 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#68 def attribute?(arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#83 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#89 def autocorrect_classes(corrector, node, classes); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#78 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#84 def deletion_range(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#120 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#126 def end_pos(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#98 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#104 def keyword_argument_class(classes); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#116 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#122 def offense_range(node); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#46 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#48 def on_attr(node, sym, arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#54 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#56 def on_id(node, sym, arg); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#67 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#64 + def on_sym_id(node, sym, id); end + + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#73 def register_offense(node, sym, id, classes = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#103 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#109 def replaced_arguments(arg, id); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#108 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#114 def to_options(attrs); end end -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#21 +# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#22 RuboCop::Cop::Capybara::SpecificFinders::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#22 +# source://rubocop-capybara//lib/rubocop/cop/capybara/specific_finders.rb#23 RuboCop::Cop::Capybara::SpecificFinders::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for there is a more specific matcher offered by Capybara. @@ -1030,35 +1114,38 @@ RuboCop::Cop::Capybara::SpecificFinders::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # expect(page).to have_no_link('foo', class: 'cls', href: 'http://example.com') # expect(page).to have_table(class: 'cls') # expect(page).to have_select -# expect(page).to have_field('foo') +# expect(page).to have_field(with: 'foo') # # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#28 class RuboCop::Cop::Capybara::SpecificMatcher < ::RuboCop::Cop::Base # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#41 def first_argument(param0 = T.unsafe(nil)); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#45 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#50 def on_send(node); end + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#46 + def text_with_regexp?(param0); end + private - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#80 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#86 def good_matcher(node, matcher); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#74 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#80 def message(node, matcher); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#62 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#67 def replaceable?(node, arg, matcher); end # @return [Boolean] # - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#68 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#74 def replaceable_attributes?(selector); end - # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#57 + # source://rubocop-capybara//lib/rubocop/cop/capybara/specific_matcher.rb#62 def specific_matcher(arg); end end @@ -1123,3 +1210,21 @@ RuboCop::Cop::Capybara::VisibilityMatcher::MSG_TRUE = T.let(T.unsafe(nil), Strin # source://rubocop-capybara//lib/rubocop/cop/capybara/visibility_matcher.rb#46 RuboCop::Cop::Capybara::VisibilityMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +module RuboCop::Cop::Style; end + +class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RangeHelp + + # source://rubocop/1.65.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + def on_csend(node); end + + # source://rubocop/1.65.0/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 + def on_send(node); end + + class << self + # source://rubocop-capybara//lib/rubocop-capybara.rb#21 + def autocorrect_incompatible_with; end + end +end diff --git a/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi b/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi deleted file mode 100644 index da0a7a7f3..000000000 --- a/sorbet/rbi/gems/rubocop-factory_bot@2.24.0.rbi +++ /dev/null @@ -1,878 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `rubocop-factory_bot` gem. -# Please instead update this file by running `bin/tapioca gem rubocop-factory_bot`. - -# source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#3 -module RuboCop; end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#4 -module RuboCop::Cop; end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#5 -module RuboCop::Cop::FactoryBot; end - -# Use a consistent style to define associations. -# -# @example EnforcedStyle: implicit (default) -# # bad -# factory :post do -# association :user -# end -# -# # good -# factory :post do -# user -# end -# -# # bad -# factory :post do -# association :user, :author -# end -# -# # good -# factory :post do -# user factory: %i[user author] -# end -# @example EnforcedStyle: explicit -# # bad -# factory :post do -# user -# end -# -# # good -# factory :post do -# association :user -# end -# -# # bad -# factory :post do -# user factory: %i[user author] -# end -# -# # good -# factory :post do -# association :user, :author -# end -# -# # good (NonImplicitAssociationMethodNames: ['email']) -# sequence :email do |n| -# "person#{n}@example.com" -# end -# -# factory :user do -# email -# end -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#63 -class RuboCop::Cop::FactoryBot::AssociationStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#139 - def association_names(param0); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#96 - def explicit_association?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#113 - def factory_option_matcher(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#108 - def implicit_association?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#82 - def on_send(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#144 - def trait_name(param0); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#134 - def trait_names_from_explicit(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#101 - def with_strategy_build_option?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#148 - def autocorrect(corrector, node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#156 - def autocorrect_to_explicit_style(corrector, node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#164 - def autocorrect_to_implicit_style(corrector, node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#174 - def bad?(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#195 - def bad_associations_in(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#201 - def children_of_factory_block(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#213 - def factory_names_from_explicit(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#185 - def keyword?(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#223 - def non_implicit_association_method_name?(method_name); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#227 - def non_implicit_association_method_names; end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#240 - def options_for_autocorrect_to_implicit_style(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#232 - def options_from_explicit(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#249 - def trait_within_trait?(node); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#68 -RuboCop::Cop::FactoryBot::AssociationStyle::DEFAULT_NON_IMPLICIT_ASSOCIATION_METHOD_NAMES = T.let(T.unsafe(nil), Array) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#76 -RuboCop::Cop::FactoryBot::AssociationStyle::KEYWORDS = T.let(T.unsafe(nil), Array) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/association_style.rb#75 -RuboCop::Cop::FactoryBot::AssociationStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Always declare attribute values as blocks. -# -# @example -# # bad -# kind [:active, :rejected].sample -# -# # good -# kind { [:active, :rejected].sample } -# -# # bad -# closed_at 1.day.from_now -# -# # good -# closed_at { 1.day.from_now } -# -# # bad -# count 1 -# -# # good -# count { 1 } -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#27 -class RuboCop::Cop::FactoryBot::AttributeDefinedStatically < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#85 - def association?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#38 - def factory_attributes(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#42 - def on_block(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#33 - def value_matcher(param0 = T.unsafe(nil)); end - - private - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#119 - def attribute_defining_method?(method_name); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#58 - def autocorrect(corrector, node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#87 - def autocorrect_replacing_parens(corrector, node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#94 - def autocorrect_without_parens(corrector, node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#103 - def braces(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#66 - def offensive_receiver?(receiver, node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#80 - def proc?(attribute); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#72 - def receiver_matches_first_block_argument?(receiver, node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#115 - def reserved_method?(method_name); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#111 - def value_hash_without_braces?(node); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/attribute_defined_statically.rb#30 -RuboCop::Cop::FactoryBot::AttributeDefinedStatically::MSG = T.let(T.unsafe(nil), String) - -# Handles `ExplicitOnly` configuration parameters. -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#7 -module RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly - include ::RuboCop::FactoryBot::Language - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#16 - def explicit_only?; end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/mixin/configurable_explicit_only.rb#10 - def factory_call?(node); end -end - -# Use a consistent style for parentheses in factory_bot calls. -# -# @example `EnforcedStyle: require_parentheses` (default) -# -# # bad -# create :user -# build :login -# -# # good -# create(:user) -# build(:login) -# @example `EnforcedStyle: omit_parentheses` -# -# # bad -# create(:user) -# build(:login) -# -# # good -# create :user -# build :login -# -# # also good -# # when method name and first argument are not on same line -# create( -# :user -# ) -# build( -# :user, -# name: 'foo' -# ) -# @example `ExplicitOnly: false` (default) -# -# # bad - with `EnforcedStyle: require_parentheses` -# FactoryBot.create :user -# build :user -# -# # good - with `EnforcedStyle: require_parentheses` -# FactoryBot.create(:user) -# build(:user) -# @example `ExplicitOnly: true` -# -# # bad - with `EnforcedStyle: require_parentheses` -# FactoryBot.create :user -# FactoryBot.build :user -# -# # good - with `EnforcedStyle: require_parentheses` -# FactoryBot.create(:user) -# FactoryBot.build(:user) -# create :user -# build :user -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#60 -class RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::FactoryBot::Language - include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#71 - def factory_call(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#82 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#118 - def ambiguous_without_parentheses?(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#90 - def register_offense(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#97 - def register_offense_with_parentheses(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#107 - def register_offense_without_parentheses(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#122 - def remove_parentheses(corrector, node); end - - class << self - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#78 - def autocorrect_incompatible_with; end - end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#116 -RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::AMBIGUOUS_TYPES = T.let(T.unsafe(nil), Array) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#67 -RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::FACTORY_CALLS = T.let(T.unsafe(nil), Set) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#66 -RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::MSG_OMIT_PARENS = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#65 -RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::MSG_REQUIRE_PARENS = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/consistent_parentheses_style.rb#68 -RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Checks for create_list usage. -# -# This cop can be configured using the `EnforcedStyle` option -# -# @example `EnforcedStyle: create_list` (default) -# # bad -# 3.times { create :user } -# 3.times.map { create :user } -# [create(:user), create(:user), create(:user)] -# Array.new(3) { create :user } -# -# # good -# create_list :user, 3 -# -# # bad -# 3.times { create :user, age: 18 } -# -# # good - index is used to alter the created models attributes -# 3.times { |n| create :user, age: n } -# -# # good - contains a method call, may return different values -# 3.times { create :user, age: rand } -# @example `EnforcedStyle: n_times` -# # bad -# create_list :user, 3 -# [create(:user), create(:user), create(:user)] -# -# # good -# 3.times.map { create :user } -# @example `ExplicitOnly: false` (default) -# -# # bad - with `EnforcedStyle: create_list` -# 3.times { FactoryBot.create :user } -# 3.times { create :user } -# -# # good - with `EnforcedStyle: create_list` -# FactoryBot.create_list :user, 3 -# create_list :user, 3 -# @example `ExplicitOnly: true` -# -# # bad - with `EnforcedStyle: create_list` -# 3.times { FactoryBot.create :user } -# -# # good - with `EnforcedStyle: create_list` -# FactoryBot.create_list :user, 3 -# create_list :user, 3 -# 3.times { create :user } -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#61 -class RuboCop::Cop::FactoryBot::CreateList < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::FactoryBot::Language - include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#92 - def arguments_include_method_call?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#83 - def block_with_arg_and_used?(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#97 - def factory_call(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#107 - def factory_calls_in_array?(param0); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#102 - def factory_list_call(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#111 - def on_array(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#123 - def on_block(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#136 - def on_send(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#72 - def repeat_count(param0 = T.unsafe(nil)); end - - private - - # For ease of modification, it is replaced with the `n_times` style, - # but if it is not appropriate for the configured style, - # it will be replaced in the subsequent autocorrection. - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#160 - def autocorrect_same_factory_calls_in_array(corrector, node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#171 - def contains_only_factory?(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#179 - def preferred_message_for_array(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#151 - def repeat_multiple_time?(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#188 - def same_factory_calls_in_array?(node); end -end - -# :nodoc -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#194 -module RuboCop::Cop::FactoryBot::CreateList::Corrector - private - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#197 - def build_options_string(options); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#201 - def format_method_call(node, method, arguments); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#209 - def format_receiver(receiver); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#254 -class RuboCop::Cop::FactoryBot::CreateList::CreateListCorrector - include ::RuboCop::Cop::FactoryBot::CreateList::Corrector - - # @return [CreateListCorrector] a new instance of CreateListCorrector - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#257 - def initialize(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#261 - def call(corrector); end - - private - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#284 - def build_arguments(node, count); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#293 - def call_replacement(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#275 - def call_with_block_replacement(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#306 - def count_from(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#319 - def format_block(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#327 - def format_multiline_block(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#335 - def format_singleline_block(node); end - - # Returns the value of attribute node. - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#273 - def node; end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#67 -RuboCop::Cop::FactoryBot::CreateList::MSG_CREATE_LIST = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#68 -RuboCop::Cop::FactoryBot::CreateList::MSG_N_TIMES = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#69 -RuboCop::Cop::FactoryBot::CreateList::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# :nodoc -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#217 -class RuboCop::Cop::FactoryBot::CreateList::TimesCorrector - include ::RuboCop::Cop::FactoryBot::CreateList::Corrector - - # @return [TimesCorrector] a new instance of TimesCorrector - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#220 - def initialize(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#224 - def call(corrector); end - - private - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#246 - def factory_call_block_source; end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#233 - def generate_n_times_block(node); end - - # Returns the value of attribute node. - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/create_list.rb#231 - def node; end -end - -# Use definition in factory association instead of hard coding a strategy. -# -# @example -# # bad - only works for one strategy -# factory :foo do -# profile { create(:profile) } -# end -# -# # good - implicit -# factory :foo do -# profile -# end -# -# # good - explicit -# factory :foo do -# association :profile -# end -# -# # good - inline -# factory :foo do -# profile { association :profile } -# end -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#29 -class RuboCop::Cop::FactoryBot::FactoryAssociationWithStrategy < ::RuboCop::Cop::Base - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#36 - def factory_declaration(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#43 - def factory_strategy_association(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#51 - def on_block(node); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#33 -RuboCop::Cop::FactoryBot::FactoryAssociationWithStrategy::HARDCODED = T.let(T.unsafe(nil), Set) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_association_with_strategy.rb#30 -RuboCop::Cop::FactoryBot::FactoryAssociationWithStrategy::MSG = T.let(T.unsafe(nil), String) - -# Use string value when setting the class attribute explicitly. -# -# This cop would promote faster tests by lazy-loading of -# application files. Also, this could help you suppress potential bugs -# in combination with external libraries by avoiding a preload of -# application files from the factory files. -# -# @example -# # bad -# factory :foo, class: Foo do -# end -# -# # good -# factory :foo, class: 'Foo' do -# end -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#22 -class RuboCop::Cop::FactoryBot::FactoryClassName < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#31 - def class_name(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#35 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#48 - def allowed?(const_name); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#27 -RuboCop::Cop::FactoryBot::FactoryClassName::ALLOWED_CONSTANTS = T.let(T.unsafe(nil), Array) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#25 -RuboCop::Cop::FactoryBot::FactoryClassName::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_class_name.rb#28 -RuboCop::Cop::FactoryBot::FactoryClassName::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for name style for argument of FactoryBot::Syntax::Methods. -# -# @example EnforcedStyle: symbol (default) -# # bad -# create('user') -# build "user", username: "NAME" -# -# # good -# create(:user) -# build :user, username: "NAME" -# @example EnforcedStyle: string -# # bad -# create(:user) -# build :user, username: "NAME" -# -# # good -# create('user') -# build "user", username: "NAME" -# @example `ExplicitOnly: false` (default) -# -# # bad - with `EnforcedStyle: symbol` -# FactoryBot.create('user') -# create('user') -# -# # good - with `EnforcedStyle: symbol` -# FactoryBot.create(:user) -# create(:user) -# @example `ExplicitOnly: true` -# -# # bad - with `EnforcedStyle: symbol` -# FactoryBot.create(:user) -# FactoryBot.build "user", username: "NAME" -# -# # good - with `EnforcedStyle: symbol` -# FactoryBot.create('user') -# FactoryBot.build "user", username: "NAME" -# FactoryBot.create(:user) -# create(:user) -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#48 -class RuboCop::Cop::FactoryBot::FactoryNameStyle < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::FactoryBot::Language - include ::RuboCop::Cop::FactoryBot::ConfigurableExplicitOnly - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#59 - def factory_call(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#66 - def on_send(node); end - - private - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#82 - def offense_for_string_style?(name); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#78 - def offense_for_symbol_style?(name); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#86 - def register_offense(name, prefer); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#55 -RuboCop::Cop::FactoryBot::FactoryNameStyle::FACTORY_CALLS = T.let(T.unsafe(nil), Set) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#54 -RuboCop::Cop::FactoryBot::FactoryNameStyle::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/factory_name_style.rb#56 -RuboCop::Cop::FactoryBot::FactoryNameStyle::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# Do not create a FactoryBot sequence for an id column. -# -# @example -# # bad - can lead to conflicts between FactoryBot and DB sequences -# factory :foo do -# sequence :id -# end -# -# # good - a non-id column -# factory :foo do -# sequence :some_non_id_column -# end -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#19 -class RuboCop::Cop::FactoryBot::IdSequence < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#26 - def on_send(node); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#23 -RuboCop::Cop::FactoryBot::IdSequence::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/id_sequence.rb#24 -RuboCop::Cop::FactoryBot::IdSequence::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Checks for redundant `factory` option. -# -# @example -# # bad -# association :user, factory: :user -# -# # good -# association :user -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#14 -class RuboCop::Cop::FactoryBot::RedundantFactoryOption < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#24 - def association_with_a_factory_option(param0 = T.unsafe(nil)); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#42 - def on_send(node); end - - private - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#55 - def autocorrect(corrector, node); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#19 -RuboCop::Cop::FactoryBot::RedundantFactoryOption::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/redundant_factory_option.rb#21 -RuboCop::Cop::FactoryBot::RedundantFactoryOption::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Use shorthands from `FactoryBot::Syntax::Methods` in your specs. -# -# @example -# # bad -# FactoryBot.create(:bar) -# FactoryBot.build(:bar) -# FactoryBot.attributes_for(:bar) -# -# # good -# create(:bar) -# build(:bar) -# attributes_for(:bar) -# -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#48 -class RuboCop::Cop::FactoryBot::SyntaxMethods < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - include ::RuboCop::FactoryBot::Language - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#73 - def on_send(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#58 - def spec_group?(param0 = T.unsafe(nil)); end - - private - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#87 - def crime_scene(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#109 - def example_group_root?(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#113 - def example_group_root_with_siblings?(node); end - - # @return [Boolean] - # - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#101 - def inside_example_group?(node); end - - # source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#94 - def offense(node); end -end - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#53 -RuboCop::Cop::FactoryBot::SyntaxMethods::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-factory_bot//lib/rubocop/cop/factory_bot/syntax_methods.rb#55 -RuboCop::Cop::FactoryBot::SyntaxMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# RuboCop factory_bot project namespace -# -# source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#5 -module RuboCop::FactoryBot - class << self - # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#54 - def attribute_defining_methods; end - - # source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#58 - def reserved_methods; end - end -end - -# source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#6 -RuboCop::FactoryBot::ATTRIBUTE_DEFINING_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#29 -RuboCop::FactoryBot::DEFINITION_PROXY_METHODS = T.let(T.unsafe(nil), Array) - -# Contains node matchers for common factory_bot DSL. -# -# source://rubocop-factory_bot//lib/rubocop/factory_bot/language.rb#6 -module RuboCop::FactoryBot::Language - extend ::RuboCop::AST::NodePattern::Macros - - # source://rubocop-factory_bot//lib/rubocop/factory_bot/language.rb#30 - def factory_bot?(param0 = T.unsafe(nil)); end -end - -# source://rubocop-factory_bot//lib/rubocop/factory_bot/language.rb#9 -RuboCop::FactoryBot::Language::METHODS = T.let(T.unsafe(nil), Set) - -# source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#42 -RuboCop::FactoryBot::RESERVED_METHODS = T.let(T.unsafe(nil), Array) - -# source://rubocop-factory_bot//lib/rubocop/factory_bot/factory_bot.rb#14 -RuboCop::FactoryBot::UNPROXIED_METHODS = T.let(T.unsafe(nil), Array) diff --git a/sorbet/rbi/gems/rubocop-performance@1.19.1.rbi b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi similarity index 94% rename from sorbet/rbi/gems/rubocop-performance@1.19.1.rbi rename to sorbet/rbi/gems/rubocop-performance@1.22.1.rbi index 25f96a87b..f4ba36abd 100644 --- a/sorbet/rbi/gems/rubocop-performance@1.19.1.rbi +++ b/sorbet/rbi/gems/rubocop-performance@1.22.1.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop-performance` gem. # Please instead update this file by running `bin/tapioca gem rubocop-performance`. + # source://rubocop-performance//lib/rubocop/performance.rb#3 module RuboCop; end @@ -13,28 +14,28 @@ module RuboCop::Cop; end module RuboCop::Cop::Lint; end class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base - # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#66 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#66 def not_implemented?(param0 = T.unsafe(nil)); end private - # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#81 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#81 def autocorrect(corrector, node); end - # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#85 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#85 def check_argument(variable); end - # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#93 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#93 def ignored_method?(body); end - # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#98 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#98 def message(variable); end class << self # source://rubocop-performance//lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end - # source://rubocop/1.57.2/lib/rubocop/cop/lint/unused_method_argument.rb#75 + # source://rubocop/1.65.0/lib/rubocop/cop/lint/unused_method_argument.rb#75 def joining_forces; end end end @@ -127,41 +128,51 @@ RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::RESTRICT_ON_SEND = T.let # source://rubocop-performance//lib/rubocop/cop/performance/array_semi_infinite_range_slice.rb#38 RuboCop::Cop::Performance::ArraySemiInfiniteRangeSlice::SLICE_METHODS = T.let(T.unsafe(nil), Set) -# Identifies places where numeric argument to BigDecimal should be -# converted to string. Initializing from String is faster -# than from Numeric for BigDecimal. +# Identifies places where a float argument to BigDecimal should be converted to a string. +# Initializing from String is faster than from Float for BigDecimal. +# +# 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. # # @example # # bad -# BigDecimal(1, 2) -# 4.to_d(6) # BigDecimal(1.2, 3, exception: true) # 4.5.to_d(6, exception: true) # # # good -# BigDecimal('1', 2) -# BigDecimal('4', 6) # BigDecimal('1.2', 3, exception: true) # BigDecimal('4.5', 6, exception: true) # -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#23 +# # bad +# BigDecimal('1', 2) +# BigDecimal('4', 6) +# +# # good +# BigDecimal(1, 2) +# 4.to_d(6) +# +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#29 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#29 - def big_decimal_with_numeric_argument?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#39 + def big_decimal_with_numeric_argument(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#37 + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#48 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#33 - def to_d?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#43 + def to_d(param0 = T.unsafe(nil)); end end -# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#26 -RuboCop::Cop::Performance::BigDecimalWithNumericArgument::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#35 +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#27 +# source://rubocop-performance//lib/rubocop/cop/performance/big_decimal_with_numeric_argument.rb#36 +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 RuboCop::Cop::Performance::BigDecimalWithNumericArgument::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # In Ruby 2.7, `UnboundMethod#bind_call` has been added. @@ -213,6 +224,9 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # Identifies unnecessary use of a `block_given?` where explicit check # of block argument would suffice. # +# NOTE: This cop produces code with significantly worse performance when a +# block is being passed to the method and as such should not be enabled. +# # @example # # bad # def method(&block) @@ -231,26 +245,26 @@ RuboCop::Cop::Performance::BindCall::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # ... # end # -# source://rubocop-performance//lib/rubocop/cop/performance/block_given_with_explicit_block.rb#27 +# source://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#35 + # source://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#33 + # source://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#51 + # source://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#31 +# source://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#30 +# source://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`. @@ -402,6 +416,12 @@ RuboCop::Cop::Performance::CaseWhenSplat::MSG = T.let(T.unsafe(nil), String) # Identifies places where a case-insensitive string comparison # can better be implemented using `casecmp`. # +# This cop is disabled by default because `String#casecmp` only works with +# ASCII characters. See https://github.com/rubocop/rubocop/issues/9753. +# +# If you are working only with ASCII characters, then this cop can be +# safely enabled. +# # @example # # bad # str.downcase == 'abc' @@ -414,41 +434,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#24 +# source://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#45 + # source://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#31 + # source://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#38 + # source://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#52 + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#58 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#84 + # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#90 def autocorrect(corrector, node, replacement); end - # source://rubocop-performance//lib/rubocop/cop/performance/casecmp.rb#88 + # source://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#67 + # source://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#29 +# source://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#27 +# source://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#28 +# source://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 }`. @@ -469,36 +489,41 @@ RuboCop::Cop::Performance::Casecmp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arra # # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#21 class RuboCop::Cop::Performance::ChainArrayAllocation < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp - - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#54 + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#52 def chain_array_allocation?(param0 = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#62 + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#60 def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#73 + 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#37 +# source://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#45 +# source://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 +# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#48 RuboCop::Cop::Performance::ChainArrayAllocation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-performance//lib/rubocop/cop/performance/chain_array_allocation.rb#48 +# source://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#33 +# source://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 @@ -507,7 +532,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#30 +# source://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. @@ -785,15 +810,18 @@ 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#49 +# source://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#56 + # source://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#63 + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#62 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/count.rb#62 def on_send(node); end private @@ -825,10 +853,10 @@ class RuboCop::Cop::Performance::Count < ::RuboCop::Cop::Base def source_starting_at(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/count.rb#53 +# source://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#54 +# source://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. @@ -1095,7 +1123,7 @@ class RuboCop::Cop::Performance::DoubleStartEndWith < ::RuboCop::Cop::Base def combine_args(first_call_args, second_call_args); end # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#76 - def message(node, receiver, method, combined_args); end + def message(node, receiver, first_call_args, method, combined_args); end # source://rubocop-performance//lib/rubocop/cop/performance/double_start_end_with.rb#68 def process_source(node); end @@ -1145,13 +1173,13 @@ class RuboCop::Cop::Performance::EndWith < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 + # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#63 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/end_with.rb#62 + # source://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 @@ -1211,6 +1239,9 @@ class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#52 def counter(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#56 def on_send(node); end @@ -1218,32 +1249,32 @@ class RuboCop::Cop::Performance::FixedSize < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#72 + # source://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#76 + # source://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#68 + # source://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#86 + # source://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#80 + # source://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#92 + # source://rubocop-performance//lib/rubocop/cop/performance/fixed_size.rb#93 def non_string_argument?(node); end end @@ -1274,21 +1305,24 @@ class RuboCop::Cop::Performance::FlatMap < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#28 def flat_map_candidate?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#39 def on_send(node); end private - # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#72 + # source://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#52 + # source://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#58 + # source://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#62 + # source://rubocop-performance//lib/rubocop/cop/performance/flat_map.rb#63 def register_offense(node, map_node, first_method, flatten, message); end end @@ -1459,49 +1493,49 @@ 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#30 +# source://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#40 + # source://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#53 + # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#54 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/map_compact.rb#53 + # source://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#94 + # source://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#90 + # source://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#86 + # source://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#68 + # source://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#82 + # source://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#35 +# source://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#36 +# source://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. @@ -1547,7 +1581,7 @@ class RuboCop::Cop::Performance::MapMethodChain < ::RuboCop::Cop::Base private - # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#71 + # source://rubocop-performance//lib/rubocop/cop/performance/map_method_chain.rb#72 def find_begin_of_chained_map_method(node, map_args); end end @@ -1639,6 +1673,9 @@ RuboCop::Cop::Performance::OpenStruct::RESTRICT_ON_SEND = T.let(T.unsafe(nil), A class RuboCop::Cop::Performance::RangeInclude < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#44 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/range_include.rb#44 def on_send(node); end @@ -1695,20 +1732,20 @@ class RuboCop::Cop::Performance::RedundantBlockCall < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#97 + # source://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#63 + # source://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#81 + # source://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#91 + # source://rubocop-performance//lib/rubocop/cop/performance/redundant_block_call.rb#93 def shadowed_block_argument?(body, block_argument_of_method_signature); end end @@ -2297,9 +2334,6 @@ class RuboCop::Cop::Performance::RegexpMatch < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#250 def correct_operator(corrector, recv, arg, oper = T.unsafe(nil)); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#275 - def correction_range(recv, arg); end - # source://rubocop-performance//lib/rubocop/cop/performance/regexp_match.rb#221 def find_last_match(body, range, scope_root); end @@ -2434,14 +2468,11 @@ class RuboCop::Cop::Performance::ReverseFirst < ::RuboCop::Cop::Base private - # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#64 - def build_bad_method(node); end - # source://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 - def build_message(node); end + def build_message(node, range); end # source://rubocop-performance//lib/rubocop/cop/performance/reverse_first.rb#46 def correction_range(receiver, node); end @@ -2471,20 +2502,17 @@ class RuboCop::Cop::Performance::SelectMap < ::RuboCop::Cop::Base extend ::RuboCop::Cop::TargetRubyVersion # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#27 - def bad_method?(param0 = T.unsafe(nil)); end - - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#31 + # source://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#45 + # source://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#55 + # source://rubocop-performance//lib/rubocop/cop/performance/select_map.rb#51 def offense_range(node, map_method); end end @@ -2540,6 +2568,9 @@ class RuboCop::Cop::Performance::Size < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#52 def hash?(param0 = T.unsafe(nil)); end + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/size.rb#65 def on_send(node); end end @@ -2667,13 +2698,13 @@ class RuboCop::Cop::Performance::StartWith < ::RuboCop::Cop::Base include ::RuboCop::Cop::RegexpMetacharacter extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 + # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#63 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/start_with.rb#62 + # source://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 @@ -2699,33 +2730,65 @@ RuboCop::Cop::Performance::StartWith::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # 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}") # -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#25 +# # 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 class RuboCop::Cop::Performance::StringIdentifierArgument < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#48 + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#64 def on_send(node); end + + private + + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#105 + def argument_replacement(node, value); end + + # source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#95 + 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 + def string_arguments(node); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#30 +# source://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#28 +# 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 RuboCop::Cop::Performance::StringIdentifierArgument::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#46 +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#38 +# source://rubocop-performance//lib/rubocop/cop/performance/string_identifier_argument.rb#54 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 +RuboCop::Cop::Performance::StringIdentifierArgument::TWO_ARGUMENTS_METHOD = T.let(T.unsafe(nil), Symbol) + # Identifies unnecessary use of a regex where `String#include?` would suffice. # # @example @@ -2736,38 +2799,39 @@ RuboCop::Cop::Performance::StringIdentifierArgument::RESTRICT_ON_SEND = T.let(T. # /ab/ =~ str # str.match(/ab/) # /ab/.match(str) +# /ab/ === str # # # good # str.include?('ab') # -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#22 +# source://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#35 + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 def on_csend(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#37 def on_match_with_lvasgn(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#35 + # source://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#28 + # source://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#57 + # source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#59 def literal?(regex_str); end end -# source://rubocop-performance//lib/rubocop/cop/performance/string_include.rb#25 +# source://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#26 +# source://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`. @@ -2903,9 +2967,12 @@ class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#102 def elem_plus_acc?(param0 = T.unsafe(nil), param1, param2); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#114 + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#115 def on_block(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 + def on_csend(node); end + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#107 def on_send(node); end @@ -2922,54 +2989,54 @@ class RuboCop::Cop::Performance::Sum < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#159 + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#160 def array_literal?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#164 + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#165 def autocorrect(corrector, init, range); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#172 + # source://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#248 + # source://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#215 + # source://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#221 + # source://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#234 + # source://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#197 + # source://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#208 - def build_sum_map_message(method, init); end + # source://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#154 + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#155 def empty_array_literal?(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#129 + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#130 def handle_sum_candidate(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#142 + # source://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#259 + # source://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#193 + # source://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#189 + # source://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#185 + # source://rubocop-performance//lib/rubocop/cop/performance/sum.rb#186 def sum_method_range(node); end end @@ -3001,24 +3068,32 @@ RuboCop::Cop::Performance::Sum::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Performance::TimesMap < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#43 + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#44 def on_block(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#43 + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#39 + def on_csend(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#44 def on_numblock(node); end # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#39 def on_send(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#69 + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#79 def times_map_call(param0 = T.unsafe(nil)); end private - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#50 + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#51 def check(node); end - # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#60 + # @return [Boolean] + # + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#63 + def handleable_receiver?(node); end + + # source://rubocop-performance//lib/rubocop/cop/performance/times_map.rb#70 def message(map_or_collect, count); end end @@ -3037,8 +3112,8 @@ RuboCop::Cop::Performance::TimesMap::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # @example # # bad -# ''.dup -# "something".dup +# ''.dup # when Ruby 3.2 or lower +# "something".dup # when Ruby 3.2 or lower # String.new # String.new('') # String.new('something') diff --git a/sorbet/rbi/gems/rubocop-rails@2.22.1.rbi b/sorbet/rbi/gems/rubocop-rails@2.26.2.rbi similarity index 91% rename from sorbet/rbi/gems/rubocop-rails@2.22.1.rbi rename to sorbet/rbi/gems/rubocop-rails@2.26.2.rbi index 560a86e80..0758ce314 100644 --- a/sorbet/rbi/gems/rubocop-rails@2.22.1.rbi +++ b/sorbet/rbi/gems/rubocop-rails@2.26.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop-rails` gem. # Please instead update this file by running `bin/tapioca gem rubocop-rails`. + # source://rubocop-rails//lib/rubocop/rails.rb#3 module RuboCop; end @@ -28,12 +29,12 @@ module RuboCop::Cop::ActiveRecordHelper # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#18 def find_set_table_name(param0); end - # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#79 + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#84 def foreign_key_of(belongs_to); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#100 + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#105 def in_where?(node); end # @return [Boolean] @@ -43,7 +44,7 @@ module RuboCop::Cop::ActiveRecordHelper # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#91 + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#96 def polymorphic?(belongs_to); end # Resolve relation into column name. @@ -57,13 +58,13 @@ module RuboCop::Cop::ActiveRecordHelper # @param table [RuboCop::Rails::SchemaLoader::Table] # @return [Array, String, nil] # - # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#64 + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#69 def resolve_relation_into_column(name:, class_node:, table:); end # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#41 def schema; end - # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#45 + # source://rubocop-rails//lib/rubocop/cop/mixin/active_record_helper.rb#50 def table_name(class_node); end end @@ -394,7 +395,7 @@ class RuboCop::Cop::Rails::ActionControllerFlashBeforeRender < ::RuboCop::Cop::B private - # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#106 + # source://rubocop-rails//lib/rubocop/cop/rails/action_controller_flash_before_render.rb#108 def find_ancestor(node, type:); end # @return [Boolean] @@ -582,13 +583,13 @@ class RuboCop::Cop::Rails::ActionOrder < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#94 def range_with_comments(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#105 + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#101 def range_with_comments_and_lines(node); end # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#68 def register_offense(previous, current); end - # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#109 + # source://rubocop-rails//lib/rubocop/cop/rails/action_order.rb#105 def swap_range(corrector, range1, range2); end end @@ -599,10 +600,10 @@ RuboCop::Cop::Rails::ActionOrder::MSG = T.let(T.unsafe(nil), String) # are more clear and easier to read. # # @example -# #bad +# # bad # book.update_attributes!(author: 'Alice') # -# #good +# # good # book.update!(author: 'Alice') # # source://rubocop-rails//lib/rubocop/cop/rails/active_record_aliases.rb#19 @@ -658,7 +659,7 @@ class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#111 def begin_pos_with_comment(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#137 + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#133 def buffer; end # @return [Boolean] @@ -680,7 +681,7 @@ class RuboCop::Cop::Rails::ActiveRecordCallbacksOrder < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#99 def source_range_with_comment(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#133 + # source://rubocop-rails//lib/rubocop/cop/rails/active_record_callbacks_order.rb#129 def start_line_position(node); end end @@ -771,6 +772,9 @@ class RuboCop::Cop::Rails::ActiveSupportAliases < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#40 def ends_with?(param0 = T.unsafe(nil)); end + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#43 + def on_csend(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_aliases.rb#43 def on_send(node); end @@ -805,7 +809,10 @@ RuboCop::Cop::Rails::ActiveSupportAliases::RESTRICT_ON_SEND = T.let(T.unsafe(nil class RuboCop::Cop::Rails::ActiveSupportOnLoad < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#58 + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#81 + def hook_for_const(const_name); end + + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#71 def on_send(node); end end @@ -815,6 +822,12 @@ RuboCop::Cop::Rails::ActiveSupportOnLoad::LOAD_HOOKS = T.let(T.unsafe(nil), Hash # source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#23 RuboCop::Cop::Rails::ActiveSupportOnLoad::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#58 +RuboCop::Cop::Rails::ActiveSupportOnLoad::RAILS_5_2_LOAD_HOOKS = T.let(T.unsafe(nil), Hash) + +# source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#62 +RuboCop::Cop::Rails::ActiveSupportOnLoad::RAILS_7_1_LOAD_HOOKS = T.let(T.unsafe(nil), Hash) + # source://rubocop-rails//lib/rubocop/cop/rails/active_support_on_load.rb#24 RuboCop::Cop::Rails::ActiveSupportOnLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) @@ -1023,6 +1036,10 @@ RuboCop::Cop::Rails::ApplicationMailer::SUPERCLASS = T.let(T.unsafe(nil), String # Checks that models subclass `ApplicationRecord` with Rails 5.0. # +# It is a common practice to define models inside migrations in order to retain forward +# compatibility by avoiding loading any application code. And so migration files are excluded +# by default for this cop. +# # @example # # # good @@ -1035,7 +1052,7 @@ RuboCop::Cop::Rails::ApplicationMailer::SUPERCLASS = T.let(T.unsafe(nil), String # # ... # end # -# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#24 +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#28 class RuboCop::Cop::Rails::ApplicationRecord < ::RuboCop::Cop::Base include ::RuboCop::Cop::EnforceSuperclass extend ::RuboCop::Cop::AutoCorrector @@ -1048,13 +1065,13 @@ class RuboCop::Cop::Rails::ApplicationRecord < ::RuboCop::Cop::Base def class_new_definition(param0 = T.unsafe(nil)); end end -# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#32 +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#36 RuboCop::Cop::Rails::ApplicationRecord::BASE_PATTERN = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#30 +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#34 RuboCop::Cop::Rails::ApplicationRecord::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#31 +# source://rubocop-rails//lib/rubocop/cop/rails/application_record.rb#35 RuboCop::Cop::Rails::ApplicationRecord::SUPERCLASS = T.let(T.unsafe(nil), String) # Prevents usage of `"*"` on an Arel::Table column reference. @@ -1374,7 +1391,7 @@ RuboCop::Cop::Rails::Blank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # automatically detect an adapter from `development` environment # in `config/database.yml` or the environment variable `DATABASE_URL` # when the `Database` option is not set. -# If the adapter is not `mysql2`, `trilogy`, or `postgresql`, +# If the adapter is not `mysql2`, `trilogy`, `postgresql`, or `postgis`, # this Cop ignores offenses. # # @example @@ -1427,71 +1444,71 @@ RuboCop::Cop::Rails::Blank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) class RuboCop::Cop::Rails::BulkChangeTable < ::RuboCop::Cop::Base include ::RuboCop::Cop::DatabaseTypeResolvable - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#119 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#121 def on_def(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#137 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#139 def on_send(node); end private # @param node [RuboCop::AST::SendNode] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#213 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#219 def add_offense_for_alter_methods(node); end # @param node [RuboCop::AST::SendNode] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#223 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#229 def add_offense_for_change_table(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#190 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#192 def call_to_combinable_alter_method?(child_node); end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#194 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#196 def combinable_alter_methods; end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#203 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#207 def combinable_transformations; end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#158 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#160 def count_transformations(send_nodes); end # @param node [RuboCop::AST::SendNode] (send nil? :change_table ...) # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#169 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#171 def include_bulk_options?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#150 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#152 def send_nodes_from_change_table_block(body); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#177 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#179 def support_bulk_alter?; end end # Record combinable alter methods and register offensive nodes. # -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#228 +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#234 class RuboCop::Cop::Rails::BulkChangeTable::AlterMethodsRecorder # @return [AlterMethodsRecorder] a new instance of AlterMethodsRecorder # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#229 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#235 def initialize; end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#248 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#254 def flush; end - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#253 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#259 def offensive_nodes; end # @param new_node [RuboCop::AST::SendNode] # - # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#235 + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#241 def process(new_node); end end @@ -1516,12 +1533,18 @@ RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_ALTER_METHODS = T.let(T.u # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#111 RuboCop::Cop::Rails::BulkChangeTable::MYSQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#117 +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#118 RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_ALTER_METHODS = T.let(T.unsafe(nil), Array) +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#119 +RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_ALTER_METHODS_SINCE_6_1 = T.let(T.unsafe(nil), Array) + # source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#115 RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS = T.let(T.unsafe(nil), Array) +# source://rubocop-rails//lib/rubocop/cop/rails/bulk_change_table.rb#116 +RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS_SINCE_6_1 = T.let(T.unsafe(nil), Array) + # Checks if collection can be blank-compacted with `compact_blank`. # # @example @@ -1529,6 +1552,10 @@ RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS = T. # # bad # collection.reject(&:blank?) # collection.reject { |_k, v| v.blank? } +# collection.select(&:present?) +# collection.select { |_k, v| v.present? } +# collection.filter(&:present?) +# collection.filter { |_k, v| v.present? } # # # good # collection.compact_blank @@ -1536,62 +1563,71 @@ RuboCop::Cop::Rails::BulkChangeTable::POSTGRESQL_COMBINABLE_TRANSFORMATIONS = T. # # bad # collection.delete_if(&:blank?) # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` # collection.delete_if { |_k, v| v.blank? } # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` -# collection.reject!(&:blank?) # Same behavior as `ActionController::Parameters#compact_blank!` -# collection.reject! { |_k, v| v.blank? } # Same behavior as `ActionController::Parameters#compact_blank!` +# collection.keep_if(&:present?) # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` +# collection.keep_if { |_k, v| v.present? } # Same behavior as `Array#compact_blank!` and `Hash#compact_blank!` # # # good # collection.compact_blank! # -# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#40 +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#43 class RuboCop::Cop::Rails::CompactBlank < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRailsVersion - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#64 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#82 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#50 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#54 def reject_with_block?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#58 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#62 def reject_with_block_pass?(param0 = T.unsafe(nil)); end + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#68 + def select_with_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#76 + def select_with_block_pass?(param0 = T.unsafe(nil)); end + private # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#76 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#95 def bad_method?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#95 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#116 def offense_range(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#105 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#126 def preferred_method(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#91 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#112 def use_hash_value_block_argument?(arguments, receiver_in_block); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#87 + # source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#108 def use_single_value_block_argument?(arguments, receiver_in_block); end end -# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#45 +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#50 +RuboCop::Cop::Rails::CompactBlank::DESTRUCTIVE_METHODS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#48 RuboCop::Cop::Rails::CompactBlank::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#46 +# source://rubocop-rails//lib/rubocop/cop/rails/compact_blank.rb#49 RuboCop::Cop::Rails::CompactBlank::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks legacy syntax usage of `tag` # # NOTE: Allow `tag` when the first argument is a variable because # `tag(name)` is simpler rather than `tag.public_send(name)`. -# And this cop will be renamed to something like `LegacyTag` in the future. (e.g. RuboCop Rails 2.0) +# And this cop will be renamed to something like `LegacyTag` in the future. (e.g. RuboCop Rails 3.0) # # @example # # bad @@ -1740,37 +1776,37 @@ RuboCop::Cop::Rails::CreateTableWithTimestamps::RESTRICT_ON_SEND = T.let(T.unsaf # # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#16 class RuboCop::Cop::Rails::DangerousColumnNames < ::RuboCop::Cop::Base - # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#414 + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#413 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#424 + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#423 def column_name_node_from(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#441 + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#440 def dangerous_column_name?(column_name); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#435 + # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#434 def dangerous_column_name_node?(node); end end # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#17 RuboCop::Cop::Rails::DangerousColumnNames::COLUMN_TYPE_METHOD_NAMES = T.let(T.unsafe(nil), Set) -# Generated from `ActiveRecord::AttributeMethods.dangerous_attribute_methods` on activerecord 7.1.0. +# Generated from `ActiveRecord::AttributeMethods.dangerous_attribute_methods` on activerecord 7.1.3. # # source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#36 RuboCop::Cop::Rails::DangerousColumnNames::DANGEROUS_COLUMN_NAMES = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#410 +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#409 RuboCop::Cop::Rails::DangerousColumnNames::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#412 +# source://rubocop-rails//lib/rubocop/cop/rails/dangerous_column_names.rb#411 RuboCop::Cop::Rails::DangerousColumnNames::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for the correct use of Date methods, @@ -1782,10 +1818,10 @@ RuboCop::Cop::Rails::DangerousColumnNames::RESTRICT_ON_SEND = T.let(T.unsafe(nil # The cop also reports warnings when you are using `to_time` method, # because it doesn't know about Rails time zone either. # -# Two styles are supported for this cop. When `EnforcedStyle` is 'strict' +# Two styles are supported for this cop. When `EnforcedStyle` is `strict` # then the Date methods `today`, `current`, `yesterday`, and `tomorrow` # are prohibited and the usage of both `to_time` -# and 'to_time_in_current_zone' are reported as warning. +# and `to_time_in_current_zone` are reported as warning. # # When `EnforcedStyle` is `flexible` then only `Date.today` is prohibited. # @@ -2505,10 +2541,10 @@ RuboCop::Cop::Rails::DynamicFindBy::MSG = T.let(T.unsafe(nil), String) # when no output would be produced anyway. # # @example -# #bad +# # bad # Rails.logger.debug "The time is #{Time.zone.now}." # -# #good +# # good # Rails.logger.debug { "The time is #{Time.zone.now}." } # # source://rubocop-rails//lib/rubocop/cop/rails/eager_evaluation_log_message.rb#23 @@ -2550,43 +2586,145 @@ RuboCop::Cop::Rails::EagerEvaluationLogMessage::RESTRICT_ON_SEND = T.let(T.unsaf # # @example # # bad +# enum :status, [:active, :archived] +# +# # good +# enum :status, { active: 0, archived: 1 } +# +# # bad # enum status: [:active, :archived] # # # good # enum status: { active: 0, archived: 1 } # -# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#20 +# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#26 class RuboCop::Cop::Rails::EnumHash < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#30 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#40 def array_pair?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#26 - def enum?(param0 = T.unsafe(nil)); end + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#32 + def enum_with_array?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#34 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#36 + def enum_with_old_syntax?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#44 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#53 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#89 + def build_hash(array); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#69 def enum_name(key); end - # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#62 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#65 + def message(key); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#78 def source(elem); end end -# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#23 +# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#29 RuboCop::Cop::Rails::EnumHash::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#24 +# source://rubocop-rails//lib/rubocop/cop/rails/enum_hash.rb#30 RuboCop::Cop::Rails::EnumHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Looks for enums written with keyword arguments syntax. +# +# Defining enums with keyword arguments syntax is deprecated and will be removed in Rails 8.0. +# Positional arguments should be used instead: +# +# @example +# # bad +# enum status: { active: 0, archived: 1 }, _prefix: true +# +# # good +# enum :status, { active: 0, archived: 1 }, prefix: true +# +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#18 +class RuboCop::Cop::Rails::EnumSyntax < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#34 + def enum?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#38 + def enum_with_options?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#42 + def on_send(node); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#49 + def check_and_correct_keyword_args(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#59 + def check_enum_options(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#71 + def correct_keyword_args(node, key, values, options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#112 + def correct_options(options); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#97 + def enum_name(elem); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#88 + def enum_name_value(key); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#82 + def multiple_enum_definitions?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#108 + def option_key?(pair); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#26 +RuboCop::Cop::Rails::EnumSyntax::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#27 +RuboCop::Cop::Rails::EnumSyntax::MSG_OPTIONS = T.let(T.unsafe(nil), String) + +# From https://github.com/rails/rails/blob/v7.2.1/activerecord/lib/active_record/enum.rb#L231 +# +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#31 +RuboCop::Cop::Rails::EnumSyntax::OPTION_NAMES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#28 +RuboCop::Cop::Rails::EnumSyntax::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rails//lib/rubocop/cop/rails/enum_syntax.rb#32 +RuboCop::Cop::Rails::EnumSyntax::UNDERSCORED_OPTION_NAMES = T.let(T.unsafe(nil), Array) + # Looks for duplicate values in enum declarations. # # @example # # bad +# enum :status, { active: 0, archived: 0 } +# +# # good +# enum :status, { active: 0, archived: 1 } +# +# # bad +# enum :status, [:active, :archived, :active] +# +# # good +# enum :status, [:active, :archived] +# +# # bad # enum status: { active: 0, archived: 0 } # # # good @@ -2598,29 +2736,35 @@ RuboCop::Cop::Rails::EnumHash::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # enum status: [:active, :archived] # -# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#20 +# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#32 class RuboCop::Cop::Rails::EnumUniqueness < ::RuboCop::Cop::Base include ::RuboCop::Cop::Duplication - # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#26 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#38 def enum?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#30 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#46 def enum_values(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#34 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#42 + def enum_with_old_syntax?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#50 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#52 + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#70 def enum_name(key); end + + # source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#79 + def message(key, item); end end -# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#23 +# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#35 RuboCop::Cop::Rails::EnumUniqueness::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#24 +# source://rubocop-rails//lib/rubocop/cop/rails/enum_uniqueness.rb#36 RuboCop::Cop::Rails::EnumUniqueness::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for usage of `Rails.env.development? || Rails.env.test?` which @@ -3103,6 +3247,9 @@ class RuboCop::Cop::Rails::FindById < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#33 def find_by?(param0 = T.unsafe(nil)); end + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#40 + def on_csend(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#40 def on_send(node); end @@ -3111,22 +3258,16 @@ class RuboCop::Cop::Rails::FindById < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#83 - def build_find_by_bad_method(node, id_value); end - - # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#75 + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#74 def build_good_method(id_value); end - # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#79 - def build_where_take_bad_method(id_value); end - - # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#71 + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#70 def find_by_offense_range(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#58 - def register_offense(range, id_value, bad_method); end + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#57 + def register_offense(range, id_value); end - # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#67 + # source://rubocop-rails//lib/rubocop/cop/rails/find_by_id.rb#66 def where_take_offense_range(node, where); end end @@ -3509,6 +3650,8 @@ RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(n # render plain: 'foo/bar', status: 304 # redirect_to root_url, status: 301 # head 200 +# assert_response 200 +# assert_redirected_to '/some/path', status: 301 # # # good # render :foo, status: :ok @@ -3516,6 +3659,8 @@ RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(n # render plain: 'foo/bar', status: :not_modified # redirect_to root_url, status: :moved_permanently # head :ok +# assert_response :ok +# assert_redirected_to '/some/path', status: :moved_permanently # @example EnforcedStyle: numeric # # bad # render :foo, status: :ok @@ -3523,6 +3668,8 @@ RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(n # render plain: 'foo/bar', status: :not_modified # redirect_to root_url, status: :moved_permanently # head :ok +# assert_response :ok +# assert_redirected_to '/some/path', status: :moved_permanently # # # good # render :foo, status: 200 @@ -3530,117 +3677,119 @@ RuboCop::Cop::Rails::HttpPositionalArguments::ROUTING_METHODS = T.let(T.unsafe(n # render plain: 'foo/bar', status: 304 # redirect_to root_url, status: 301 # head 200 +# assert_response 200 +# assert_redirected_to '/some/path', status: 301 # -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#39 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#47 class RuboCop::Cop::Rails::HttpStatus < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#45 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#53 def http_status(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#57 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#67 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#53 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#63 def status_code(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#77 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#87 def checker_class; end end -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#125 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#135 class RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker # @return [NumericStyleChecker] a new instance of NumericStyleChecker # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#132 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#142 def initialize(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#140 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#150 def message; end # Returns the value of attribute node. # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#130 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#140 def node; end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#136 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#146 def offensive?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#144 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#154 def preferred_style; end private - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#150 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#160 def number; end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#158 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#168 def permitted_symbol?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#154 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#164 def symbol; end end -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#127 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#137 RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#126 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#136 RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#128 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#138 RuboCop::Cop::Rails::HttpStatus::NumericStyleChecker::PERMITTED_STATUS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#43 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#51 RuboCop::Cop::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#87 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#97 class RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker # @return [SymbolicStyleChecker] a new instance of SymbolicStyleChecker # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#93 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#103 def initialize(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#101 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#111 def message; end # Returns the value of attribute node. # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#91 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#101 def node; end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#97 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#107 def offensive?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#105 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#115 def preferred_style; end private # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#119 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#129 def custom_http_status_code?; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#115 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#125 def number; end - # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#111 + # source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#121 def symbol; end end -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#89 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#99 RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::DEFAULT_MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#88 +# source://rubocop-rails//lib/rubocop/cop/rails/http_status.rb#98 RuboCop::Cop::Rails::HttpStatus::SymbolicStyleChecker::MSG = T.let(T.unsafe(nil), String) # Checks for places where I18n "lazy" lookup can be used. @@ -4059,6 +4208,9 @@ end # # source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#25 class RuboCop::Cop::Rails::Inquiry < ::RuboCop::Cop::Base + # source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#29 + def on_csend(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/inquiry.rb#29 def on_send(node); end end @@ -4391,7 +4543,7 @@ RuboCop::Cop::Rails::LexicallyScopedActionFilter::MSG = T.let(T.unsafe(nil), Str # source://rubocop-rails//lib/rubocop/cop/rails/lexically_scoped_action_filter.rb#89 RuboCop::Cop::Rails::LexicallyScopedActionFilter::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for calls to `link_to` that contain a +# Checks for calls to `link_to`, `link_to_if`, and `link_to_unless` methods that contain a # `target: '_blank'` but no `rel: 'noopener'`. This can be a security # risk as the loaded page will have control over the previous page # and could change its location for phishing purposes. @@ -4637,60 +4789,111 @@ RuboCop::Cop::Rails::NegateInclude::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/negate_include.rb#26 RuboCop::Cop::Rails::NegateInclude::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Checks for add_column call with NOT NULL constraint in migration file. +# Checks for add_column calls with a NOT NULL constraint without a default +# value. # -# `TEXT` can have default values in PostgreSQL, but not in MySQL. -# It will automatically detect an adapter from `development` environment -# in `config/database.yml` or the environment variable `DATABASE_URL` -# when the `Database` option is not set. If the database is MySQL, -# this cop ignores offenses for the `TEXT`. +# This cop only applies when adding a column to an existing table, since +# existing records will not have a value for the new column. New tables +# can freely use NOT NULL columns without defaults, since there are no +# records that could violate the constraint. +# +# If you need to add a NOT NULL column to an existing table, you must add +# it as nullable first, back-fill the data, and then use +# `change_column_null`. Alternatively, you could add the column with a +# default first to have the database automatically backfill existing rows, +# and then use `change_column_default` to remove the default. +# +# `TEXT` cannot have a default value in MySQL. +# The cop will automatically detect an adapter from `development` +# environment in `config/database.yml` or the environment variable +# `DATABASE_URL` when the `Database` option is not set. If the database +# is MySQL, this cop ignores offenses for `TEXT` columns. # # @example # # bad # add_column :users, :name, :string, null: false # add_reference :products, :category, null: false +# change_table :users do |t| +# t.string :name, null: false +# end # # # good # add_column :users, :name, :string, null: true # add_column :users, :name, :string, null: false, default: '' +# change_table :users do |t| +# t.string :name, null: false, default: '' +# end # add_reference :products, :category -# add_reference :products, :category, null: false, default: 1 +# change_column_null :products, :category_id, false # -# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#24 +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#42 class RuboCop::Cop::Rails::NotNullColumn < ::RuboCop::Cop::Base include ::RuboCop::Cop::DatabaseTypeResolvable - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#30 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#48 def add_not_null_column?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#34 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#60 + def add_not_null_column_in_change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#64 + def add_not_null_column_via_shortcut_in_change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#52 def add_not_null_reference?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#42 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#68 + def add_not_null_reference_in_change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#56 + def change_table?(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#76 def default_option?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#38 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#72 def null_false?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#46 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#85 + def on_block(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#85 + def on_numblock(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#80 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#53 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#101 def check_add_column(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#64 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#113 + def check_add_column_in_change_table(node, table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#121 + def check_add_column_via_shortcut_in_change_table(node, table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#107 def check_add_reference(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#70 + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#129 + def check_add_reference_in_change_table(node, table); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#137 + def check_change_table(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#92 + def check_column(type, pairs); end + + # source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#150 def check_pairs(pairs); end end -# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#27 +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#45 RuboCop::Cop::Rails::NotNullColumn::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#28 +# source://rubocop-rails//lib/rubocop/cop/rails/not_null_column.rb#46 RuboCop::Cop::Rails::NotNullColumn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for places where ordering by `id` column is used. @@ -4883,6 +5086,10 @@ RuboCop::Cop::Rails::OutputSafety::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # `pick` avoids. When called on an Active Record relation, `pick` adds a # limit to the query so that only one value is fetched from the database. # +# Note that when `pick` is added to a relation with an existing limit, it +# causes a subquery to be added. In most cases this is undesirable, and +# care should be taken while resolving this violation. +# # @example # # bad # Model.pluck(:a).first @@ -4892,27 +5099,30 @@ RuboCop::Cop::Rails::OutputSafety::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # Model.pick(:a) # [{ a: :b, c: :d }].pick(:a, :b) # -# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#27 +# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#31 class RuboCop::Cop::Rails::Pick < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRailsVersion - # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#40 + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#44 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#44 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#36 + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#40 def pick_candidate?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#58 - def message(receiver); end + # source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#63 + def message(receiver, current); end end -# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#31 +# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#35 RuboCop::Cop::Rails::Pick::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#32 +# source://rubocop-rails//lib/rubocop/cop/rails/pick.rb#36 RuboCop::Cop::Rails::Pick::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces the use of `pluck` over `map`. @@ -4994,6 +5204,9 @@ class RuboCop::Cop::Rails::PluckId < ::RuboCop::Cop::Base include ::RuboCop::Cop::ActiveRecordHelper extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#40 + def on_csend(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#40 def on_send(node); end @@ -5002,7 +5215,7 @@ class RuboCop::Cop::Rails::PluckId < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#53 + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_id.rb#54 def offense_range(node); end end @@ -5016,19 +5229,23 @@ RuboCop::Cop::Rails::PluckId::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # and can be replaced with `select`. # # Since `pluck` is an eager method and hits the database immediately, -# using `select` helps to avoid additional database queries. +# using `select` helps to avoid additional database queries by running as +# a subquery. # -# This cop has two different enforcement modes. When the `EnforcedStyle` -# is `conservative` (the default) then only calls to `pluck` on a constant -# (i.e. a model class) in the `where` is used as offenses. +# This cop has two modes of enforcement. When the `EnforcedStyle` is set +# to `conservative` (the default), only calls to `pluck` on a constant +# (e.g. a model class) within `where` are considered offenses. # # @example # # bad # Post.where(user_id: User.active.pluck(:id)) +# Post.where(user_id: User.active.ids) +# Post.where.not(user_id: User.active.pluck(:id)) # # # good # Post.where(user_id: User.active.select(:id)) # Post.where(user_id: active_users.select(:id)) +# Post.where.not(user_id: active_users.select(:id)) # @example EnforcedStyle: conservative (default) # # good # Post.where(user_id: active_users.pluck(:id)) @@ -5036,25 +5253,31 @@ RuboCop::Cop::Rails::PluckId::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # bad # Post.where(user_id: active_users.pluck(:id)) # -# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#38 +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#50 class RuboCop::Cop::Rails::PluckInWhere < ::RuboCop::Cop::Base include ::RuboCop::Cop::ActiveRecordHelper include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#46 + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#59 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#59 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#59 + # source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#81 def root_receiver(node); end end -# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#43 -RuboCop::Cop::Rails::PluckInWhere::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#56 +RuboCop::Cop::Rails::PluckInWhere::MSG_IDS = T.let(T.unsafe(nil), String) + +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#55 +RuboCop::Cop::Rails::PluckInWhere::MSG_SELECT = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#44 +# source://rubocop-rails//lib/rubocop/cop/rails/pluck_in_where.rb#57 RuboCop::Cop::Rails::PluckInWhere::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for correct grammar when using ActiveSupport's @@ -5064,79 +5287,83 @@ RuboCop::Cop::Rails::PluckInWhere::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # # bad # 3.day.ago # 1.months.ago +# 5.megabyte +# 1.gigabytes # # # good # 3.days.ago # 1.month.ago +# 5.megabytes +# 1.gigabyte # -# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#17 +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#21 class RuboCop::Cop::Rails::PluralizationGrammar < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#35 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#49 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#53 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#67 def correct_method(method_name); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#96 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#110 def duration_method?(method_name); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#84 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#98 def literal_number?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#49 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#63 def message(number, method_name); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#61 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#75 def offense?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#68 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#82 def plural_method?(method_name); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#80 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#94 def plural_receiver?(number); end - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#88 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#102 def pluralize(method_name); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#72 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#86 def singular_method?(method_name); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#76 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#90 def singular_receiver?(number); end - # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#92 + # source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#106 def singularize(method_name); end end -# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#33 +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#47 RuboCop::Cop::Rails::PluralizationGrammar::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#31 -RuboCop::Cop::Rails::PluralizationGrammar::PLURAL_DURATION_METHODS = T.let(T.unsafe(nil), Hash) +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#45 +RuboCop::Cop::Rails::PluralizationGrammar::PLURAL_METHODS = T.let(T.unsafe(nil), Hash) -# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#29 +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#43 RuboCop::Cop::Rails::PluralizationGrammar::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#20 -RuboCop::Cop::Rails::PluralizationGrammar::SINGULAR_DURATION_METHODS = T.let(T.unsafe(nil), Hash) +# source://rubocop-rails//lib/rubocop/cop/rails/pluralization_grammar.rb#24 +RuboCop::Cop::Rails::PluralizationGrammar::SINGULAR_METHODS = T.let(T.unsafe(nil), Hash) # Checks code that can be written more easily using # `Object#presence` defined by Active Support. @@ -5263,7 +5490,7 @@ RuboCop::Cop::Rails::Presence::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#126 + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#124 def autocorrect(corrector, node); end # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#54 @@ -5275,7 +5502,7 @@ class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#86 def on_and(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#112 + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#110 def on_if(node); end # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#100 @@ -5289,10 +5516,10 @@ class RuboCop::Cop::Rails::Present < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#150 + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#148 def replacement(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#142 + # source://rubocop-rails//lib/rubocop/cop/rails/present.rb#140 def unless_condition(node, method_call); end end @@ -5448,6 +5675,12 @@ RuboCop::Cop::Rails::ReadWriteAttribute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # Detect redundant `all` used as a receiver for Active Record query methods. # +# For the methods `delete_all` and `destroy_all`, this cop will only check cases where the receiver is a model. +# It will ignore cases where the receiver is an association (e.g., `user.articles.all.delete_all`). +# This is because omitting `all` from an association changes the methods +# from `ActiveRecord::Relation` to `ActiveRecord::Associations::CollectionProxy`, +# which can affect their behavior. +# # @example # # bad # User.all.find(id) @@ -5465,62 +5698,52 @@ RuboCop::Cop::Rails::ReadWriteAttribute::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # ActionMailer::Preview.all.first # ActiveSupport::TimeZone.all.first # -# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#28 +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#34 class RuboCop::Cop::Rails::RedundantActiveRecordAllMethod < ::RuboCop::Cop::Base include ::RuboCop::Cop::ActiveRecordHelper include ::RuboCop::Cop::AllowedReceivers include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#148 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#155 def followed_by_query_method?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#152 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#159 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#172 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#184 def offense_range(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#165 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#173 def possible_enumerable_block_method?(node); end -end -# TODO: In the future, please support only RuboCop 1.52+ and use `RuboCop::Cop::AllowedReceivers`: -# https://github.com/rubocop/rubocop/blob/v1.52.0/lib/rubocop/cop/mixin/allowed_receivers.rb -# At that time, this duplicated module implementation can be removed. -# -# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#179 -module RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::AllowedReceivers # @return [Boolean] # # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#180 - def allowed_receiver?(receiver); end - - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#200 - def allowed_receivers; end - - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#186 - def receiver_name(receiver); end + def sensitive_association_method?(node); end end -# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#34 +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#40 RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#146 +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#152 RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::POSSIBLE_ENUMERABLE_BLOCK_METHODS = T.let(T.unsafe(nil), Array) # Defined methods in `ActiveRecord::Querying::QUERYING_METHODS` on activerecord 7.1.0. # -# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#39 +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#45 RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::QUERYING_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#36 +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#42 RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_active_record_all_method.rb#153 +RuboCop::Cop::Rails::RedundantActiveRecordAllMethod::SENSITIVE_METHODS_ON_ASSOCIATION = T.let(T.unsafe(nil), Array) + # Checks Rails model validations for a redundant `allow_nil` when # `allow_blank` is present. # @@ -5669,7 +5892,7 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param association [Symbol] # @return [Array, nil] matching node # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#106 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#109 def any_belongs_to?(param0 = T.unsafe(nil), association:); end # Match a class with a matching association, either by name or an explicit @@ -5686,7 +5909,7 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param fk [Symbol] e.g. `:user_id` # @return [Array] matching nodes # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#132 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#135 def belongs_to?(param0 = T.unsafe(nil), key:, fk:); end # Match a matching `belongs_to` association with a matching explicit `foreign_key` option @@ -5697,7 +5920,7 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param fk [Symbol] e.g. `:user_id` # @return [Array] matching nodes # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#167 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#170 def belongs_to_with_a_matching_fk?(param0 = T.unsafe(nil), param1); end # Match a matching `belongs_to` association, without an explicit `foreign_key` option @@ -5706,20 +5929,20 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @param key [Symbol] e.g. `:user` # @return [Array] matching nodes # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#150 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#153 def belongs_to_without_fk?(param0 = T.unsafe(nil), param1); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#171 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#174 def on_send(node); end # Match a `belongs_to` association with an optional option in a hash # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#81 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#84 def optional?(param0 = T.unsafe(nil)); end # Match an optional option in a hash # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#87 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#90 def optional_option?(param0 = T.unsafe(nil)); end # Match a `validates` statement with a presence check @@ -5739,42 +5962,47 @@ class RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo < ::RuboCop::C # @example source that DOES NOT match - custom strict validation # validates :user_id, presence: true, strict: MissingUserError # - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#67 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#70 def presence_validation?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#182 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#191 def add_offense_and_correct(node, all_keys, keys, options, presence); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#210 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#219 def belongs_to_for(model_class_node, key); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#242 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#251 def extract_validation_for_keys(corrector, node, keys, options); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#198 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#207 def message_for(keys); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#203 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#212 def non_optional_belongs_to(node, keys); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#223 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#232 def remove_keys_from_validation(corrector, node, keys); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#234 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#243 def remove_presence_option(corrector, presence); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#219 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#228 def remove_validation(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#258 + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#267 def validation_range(node); end end # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#39 RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo::MSG = T.let(T.unsafe(nil), String) +# From https://github.com/rails/rails/blob/7a0bf93b9dd291c7f61121a41b3a813ac8857e6a/activemodel/lib/active_model/validations/validates.rb#L157-L159 +# +# source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#43 +RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo::NON_VALIDATION_OPTIONS = T.let(T.unsafe(nil), Array) + # source://rubocop-rails//lib/rubocop/cop/rails/redundant_presence_validation_on_belongs_to.rb#40 RuboCop::Cop::Rails::RedundantPresenceValidationOnBelongsTo::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) @@ -6165,12 +6393,12 @@ class RuboCop::Cop::Rails::RenderPlainText < ::RuboCop::Cop::Base # @return [Boolean] # # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#56 - def compatible_content_type?(node); end + def compatible_content_type?(pair_node); end # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#52 def find_content_type(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#61 + # source://rubocop-rails//lib/rubocop/cop/rails/render_plain_text.rb#64 def replacement(rest_options, option_value); end end @@ -6254,57 +6482,73 @@ RuboCop::Cop::Rails::RequireDependency::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rails//lib/rubocop/cop/rails/require_dependency.rb#26 RuboCop::Cop::Rails::RequireDependency::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Prefer `response.parsed_body` to `JSON.parse(response.body)`. +# Prefer `response.parsed_body` to custom parsing logic for `response.body`. # # @example # # bad # JSON.parse(response.body) # +# # bad +# Nokogiri::HTML.parse(response.body) +# +# # bad +# Nokogiri::HTML5.parse(response.body) +# # # good # response.parsed_body # -# source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#19 +# source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#26 class RuboCop::Cop::Rails::ResponseParsedBody < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRailsVersion - # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#30 + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#35 def json_parse_response_body?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#41 + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#47 + def nokogiri_html_parse_response_body(param0 = T.unsafe(nil)); end + + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#61 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#51 + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#71 def autocorrect(corrector, node); end -end -# source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#23 -RuboCop::Cop::Rails::ResponseParsedBody::MSG = T.let(T.unsafe(nil), String) + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#75 + def check_json_parse_response_body(node); end -# source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#25 + # source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#86 + def check_nokogiri_html_parse_response_body(node); end +end + +# source://rubocop-rails//lib/rubocop/cop/rails/response_parsed_body.rb#30 RuboCop::Cop::Rails::ResponseParsedBody::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks whether the change method of the migration file is # reversible. # # @example -# # remove_index -# # # bad # def change -# remove_index :users, name: :index_users_on_email +# change_table :users do |t| +# t.remove :name +# end # end # # # good # def change -# remove_index :users, :email +# change_table :users do |t| +# t.remove :name, type: :string +# end # end # # # good # def change -# remove_index :users, column: :email +# create_table :users do |t| +# t.string :name +# end # end # @example # # drop_table @@ -6406,25 +6650,21 @@ RuboCop::Cop::Rails::ResponseParsedBody::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # remove_columns :users, :name, :email, type: :string # end # @example +# # remove_index +# # # bad # def change -# change_table :users do |t| -# t.remove :name -# end +# remove_index :users, name: :index_users_on_email # end # # # good # def change -# change_table :users do |t| -# t.remove :name, :string -# end +# remove_index :users, :email # end # # # good # def change -# create_table :users do |t| -# t.string :name -# end +# remove_index :users, column: :email # end # # source://rubocop-rails//lib/rubocop/cop/rails/reversible_migration.rb#153 @@ -6628,6 +6868,8 @@ RuboCop::Cop::Rails::RootJoinChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # File.binread(Rails.root.join('db', 'schema.rb')) # File.write(Rails.root.join('db', 'schema.rb'), content) # File.binwrite(Rails.root.join('db', 'schema.rb'), content) +# Dir.glob(Rails.root.join('db', 'schema.rb')) +# Dir[Rails.root.join('db', 'schema.rb')] # # # good # Rails.root.join('db', 'schema.rb').open @@ -6636,85 +6878,86 @@ RuboCop::Cop::Rails::RootJoinChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Rails.root.join('db', 'schema.rb').binread # Rails.root.join('db', 'schema.rb').write(content) # Rails.root.join('db', 'schema.rb').binwrite(content) +# Rails.root.glob("db/schema.rb") # -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#35 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#38 class RuboCop::Cop::Rails::RootPathnameMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#172 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#175 def dir_glob?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#189 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#192 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#163 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#166 def pathname_method_for_ruby_2_4_or_lower(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#153 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#156 def pathname_method_for_ruby_2_5_or_higher(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#185 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#188 def rails_root?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#177 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#180 def rails_root_pathname?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#220 - def build_path_glob_replacement(path, method); end + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#224 + def build_path_glob_replacement(path); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#228 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#232 def build_path_replacement(path, method, args); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#262 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#266 def enforce_double_quotes?; end # @yield [method, path, args, rails_root] # - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#205 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#209 def evidence(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#240 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#244 def include_interpolation?(arguments); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#246 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#250 def join_arguments(arguments); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#212 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#216 def pathname_method(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#266 + # source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#270 def string_literals_config; end end -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#41 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#44 RuboCop::Cop::Rails::RootPathnameMethods::DIR_GLOB_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#56 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#59 RuboCop::Cop::Rails::RootPathnameMethods::DIR_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#43 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#46 RuboCop::Cop::Rails::RootPathnameMethods::DIR_NON_GLOB_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#58 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#61 RuboCop::Cop::Rails::RootPathnameMethods::FILE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#120 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#123 RuboCop::Cop::Rails::RootPathnameMethods::FILE_TEST_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#148 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#151 RuboCop::Cop::Rails::RootPathnameMethods::FILE_UTILS_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#39 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#42 RuboCop::Cop::Rails::RootPathnameMethods::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#150 +# source://rubocop-rails//lib/rubocop/cop/rails/root_pathname_methods.rb#153 RuboCop::Cop::Rails::RootPathnameMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Favor `Rails.public_path` over `Rails.root` with `'public'` @@ -6962,18 +7205,18 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#261 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#263 def allowed_receiver?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#319 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#321 def argument?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#221 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#223 def array_parent(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#202 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#204 def assignable_node(node); end # @return [Boolean] @@ -6981,17 +7224,17 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#198 def call_to_persisted?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#228 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#230 def check_used_in_condition_or_compound_boolean(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#257 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#259 def checked_immediately?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#248 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#250 def conditional?(parent); end # Const == Const @@ -7005,48 +7248,48 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#294 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#296 def const_matches?(const, allowed_const); end - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#252 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#254 def deparenthesize(node); end # Check argument signature as no arguments or one hash # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#338 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#340 def expected_signature?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#323 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#325 def explicit_return?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#311 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#313 def find_method_with_sibling_index(node, sibling_index = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#211 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#213 def hash_parent(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#301 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#303 def implicit_return?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#236 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#238 def in_condition_or_compound_boolean?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#244 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#246 def operator_or_single_negative?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#333 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#335 def persist_method?(node, methods = T.unsafe(nil)); end # @return [Boolean] @@ -7056,7 +7299,7 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#271 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#273 def receiver_chain_matches?(node, allowed_receiver); end # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#171 @@ -7064,7 +7307,7 @@ class RuboCop::Cop::Rails::SaveBang < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#328 + # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#330 def return_value_assigned?(node); end # source://rubocop-rails//lib/rubocop/cop/rails/save_bang.rb#182 @@ -7325,46 +7568,46 @@ RuboCop::Cop::Rails::ShortI18n::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # user.touch # -# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#38 +# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#41 class RuboCop::Cop::Rails::SkipsModelValidations < ::RuboCop::Cop::Base # @return [SkipsModelValidations] a new instance of SkipsModelValidations # - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#83 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#86 def initialize(*_arg0); end - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#65 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#68 def good_insert?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#58 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#61 def good_touch?(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#72 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#75 def on_csend(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#72 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#75 def on_send(node); end private # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#95 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#98 def allowed_method?(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#110 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#114 def allowed_methods; end - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#99 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#102 def forbidden_methods; end - # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#91 + # source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#94 def message(node); end end -# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#41 +# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#44 RuboCop::Cop::Rails::SkipsModelValidations::METHODS_WITH_ARGUMENTS = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#39 +# source://rubocop-rails//lib/rubocop/cop/rails/skips_model_validations.rb#42 RuboCop::Cop::Rails::SkipsModelValidations::MSG = T.let(T.unsafe(nil), String) # Checks SQL heredocs to use `.squish`. @@ -7602,43 +7845,46 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#59 def on_const(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#68 + def on_csend(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#68 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#228 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#229 def acceptable_methods(klass, method_name, node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#135 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#136 def attach_timezone_specifier?(date); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#78 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#79 def autocorrect(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#95 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#96 def autocorrect_time_new(node, corrector); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#139 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#140 def build_message(klass, method_name, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#188 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#189 def check_localtime(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#117 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#118 def check_time_node(klass, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#152 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#153 def extract_method_chain(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#212 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#213 def flexible?; end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#220 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#221 def good_methods; end # Only add the method to the chain if the method being @@ -7646,7 +7892,7 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#163 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#164 def method_from_time_class?(node); end # checks that parent node of send_type @@ -7654,22 +7900,22 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#174 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#175 def method_send?(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#208 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#209 def need_check_localtime?(chain); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#204 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#205 def not_danger_chain?(chain); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#251 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#252 def offset_option_provided?(node); end # Time.new, Time.at, and Time.now can be called with a time zone offset @@ -7679,20 +7925,20 @@ class RuboCop::Cop::Rails::TimeZone < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#242 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#243 def offset_provided?(node); end # remove redundant `.in_time_zone` from `Time.zone.now.in_time_zone` # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#104 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#105 def remove_redundant_in_time_zone(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#180 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#181 def safe_method(method_name, node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#216 + # source://rubocop-rails//lib/rubocop/cop/rails/time_zone.rb#217 def strict?; end end @@ -8023,10 +8269,13 @@ class RuboCop::Cop::Rails::UniqBeforePluck < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#84 + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#77 + def autocorrect(corrector, node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#92 def dot_method_begin_pos(method, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#80 + # source://rubocop-rails//lib/rubocop/cop/rails/uniq_before_pluck.rb#88 def dot_method_with_whitespace(method, node); end end @@ -8184,6 +8433,12 @@ RuboCop::Cop::Rails::UnknownEnv::MSG_SIMILAR = T.let(T.unsafe(nil), String) # `ignored_columns` is necessary to drop a column from RDBMS, but you don't need it after the migration # to drop the column. You avoid forgetting to remove `ignored_columns` by this cop. # +# IMPORTANT: This cop can't be used to effectively check for unused columns because the development +# and production schema can be out of sync until the migration has been run on production. As such, +# this cop can cause `ignored_columns` to be removed even though the production schema still contains +# the column, which can lead to downtime when the migration is actually executed. Only enable this cop +# if you know your migrations will be run before any of your Rails applications boot with the modified code. +# # @example # # bad # class User < ApplicationRecord @@ -8195,41 +8450,41 @@ RuboCop::Cop::Rails::UnknownEnv::MSG_SIMILAR = T.let(T.unsafe(nil), String) # self.ignored_columns = [:still_existing_column] # end # -# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#21 +# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#27 class RuboCop::Cop::Rails::UnusedIgnoredColumns < ::RuboCop::Cop::Base include ::RuboCop::Cop::ActiveRecordHelper - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#31 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#37 def appended_ignored_columns(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#35 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#41 def column_name(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#27 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#33 def ignored_columns(param0 = T.unsafe(nil)); end - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#39 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#45 def on_op_asgn(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#39 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#45 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#54 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#60 def check_column_existence(column_node, table); end - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#63 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#69 def class_node(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#67 + # source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#73 def table(node); end end -# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#24 +# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#30 RuboCop::Cop::Rails::UnusedIgnoredColumns::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#25 +# source://rubocop-rails//lib/rubocop/cop/rails/unused_ignored_columns.rb#31 RuboCop::Cop::Rails::UnusedIgnoredColumns::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # If you try to render content along with a non-content status code (100-199, 204, 205, or 304), @@ -8280,6 +8535,7 @@ RuboCop::Cop::Rails::UnusedRenderContent::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # @example # # bad # validates_acceptance_of :foo +# validates_comparison_of :foo # validates_confirmation_of :foo # validates_exclusion_of :foo # validates_format_of :foo @@ -8294,6 +8550,7 @@ RuboCop::Cop::Rails::UnusedRenderContent::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # # good # validates :foo, acceptance: true # validates :foo, confirmation: true +# validates :foo, comparison: true # validates :foo, exclusion: true # validates :foo, format: true # validates :foo, inclusion: true @@ -8301,63 +8558,65 @@ RuboCop::Cop::Rails::UnusedRenderContent::RESTRICT_ON_SEND = T.let(T.unsafe(nil) # validates :foo, numericality: true # validates :foo, presence: true # validates :foo, absence: true -# validates :foo, size: true +# validates :foo, length: true # validates :foo, uniqueness: true # -# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#35 +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#37 class RuboCop::Cop::Rails::Validation < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#57 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#60 def on_send(node); end private - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#130 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#135 def braced_options(options); end - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#83 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#86 def correct_validate_type(corrector, node); end - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#108 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#111 def correct_validate_type_for_array(corrector, node, arguments, loc); end - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#104 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#107 def correct_validate_type_for_hash(corrector, node, arguments); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#126 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#131 def frozen_array_argument?(argument); end - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#73 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#76 def message(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#79 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#82 def preferred_method(method); end - # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#122 + # source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#125 def validate_type(node); end end -# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#55 +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#58 RuboCop::Cop::Rails::Validation::ALLOWLIST = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#38 +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#40 RuboCop::Cop::Rails::Validation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#54 +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#57 RuboCop::Cop::Rails::Validation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#40 +# source://rubocop-rails//lib/rubocop/cop/rails/validation.rb#42 RuboCop::Cop::Rails::Validation::TYPES = T.let(T.unsafe(nil), Array) # Identifies places where manually constructed SQL -# in `where` can be replaced with `where(attribute: value)`. +# in `where` and `where.not` can be replaced with +# `where(attribute: value)` and `where.not(attribute: value)`. # # @example # # bad # User.where('name = ?', 'Gabe') +# User.where.not('name = ?', 'Gabe') # User.where('name = :name', name: 'Gabe') # User.where('name IS NULL') # User.where('name IN (?)', ['john', 'jane']) @@ -8366,62 +8625,71 @@ RuboCop::Cop::Rails::Validation::TYPES = T.let(T.unsafe(nil), Array) # # # good # User.where(name: 'Gabe') +# User.where.not(name: 'Gabe') # User.where(name: nil) # User.where(name: ['john', 'jane']) # User.where(users: { name: 'Gabe' }) # -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#27 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#30 class RuboCop::Cop::Rails::WhereEquals < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#41 + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#44 + def on_csend(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#44 def on_send(node); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#34 + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#37 def where_method_call?(param0 = T.unsafe(nil)); end private - # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#90 - def build_good_method(column, value); end + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#101 + def build_good_method(method_name, column, value); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#71 + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#78 def extract_column_and_value(template_node, value_node); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#67 + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#73 def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#111 + def where_not?(node); end end # column = ? # -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#59 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#65 RuboCop::Cop::Rails::WhereEquals::EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) # column = :column # -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#61 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#67 RuboCop::Cop::Rails::WhereEquals::EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) # column IN (?) # -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#60 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#66 RuboCop::Cop::Rails::WhereEquals::IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) # column IN (:column) # -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#62 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#68 RuboCop::Cop::Rails::WhereEquals::IN_NAMED_RE = T.let(T.unsafe(nil), Regexp) # column IS NULL # -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#63 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#69 RuboCop::Cop::Rails::WhereEquals::IS_NULL_RE = T.let(T.unsafe(nil), Regexp) -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#31 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#34 RuboCop::Cop::Rails::WhereEquals::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#32 +# source://rubocop-rails//lib/rubocop/cop/rails/where_equals.rb#35 RuboCop::Cop::Rails::WhereEquals::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Enforces consistent style when using `exists?`. @@ -8464,6 +8732,9 @@ class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#61 def exists_with_args?(param0 = T.unsafe(nil)); end + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#65 + def on_csend(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#65 def on_send(node); end @@ -8472,34 +8743,34 @@ class RuboCop::Cop::Rails::WhereExists < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#111 - def build_good_method(args); end + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#112 + def build_good_method(args, dot:); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#119 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#120 def build_good_method_exists(args); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#127 - def build_good_method_where(args); end + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#128 + def build_good_method_where(args, dot_source); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#97 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#98 def convertable_args?(args); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#103 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#104 def correction_range(node); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#85 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#86 def exists_style?; end - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#89 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#90 def find_offenses(node, &block); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#81 + # source://rubocop-rails//lib/rubocop/cop/rails/where_exists.rb#82 def where_style?; end end @@ -8537,18 +8808,18 @@ class RuboCop::Cop::Rails::WhereMissing < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#111 + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#115 def message(node, where_argument); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#107 + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#111 def multi_condition?(where_arg); end # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#67 def register_offense(node, where_node, where_argument, range); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#92 + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#93 def remove_where_method(corrector, node, where_node); end # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#84 @@ -8562,7 +8833,7 @@ class RuboCop::Cop::Rails::WhereMissing < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#103 + # source://rubocop-rails//lib/rubocop/cop/rails/where_missing.rb#107 def same_line?(left_joins_node, where_node); end # @return [Boolean] @@ -8602,6 +8873,9 @@ class RuboCop::Cop::Rails::WhereNot < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#40 + def on_csend(node); end + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#40 def on_send(node); end @@ -8610,19 +8884,19 @@ class RuboCop::Cop::Rails::WhereNot < ::RuboCop::Cop::Base private - # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#89 - def build_good_method(column, value); end + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#95 + def build_good_method(dot, column, value); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#70 + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#72 def extract_column_and_value(template_node, value_node); end - # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#66 + # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#67 def offense_range(node); end end # column IS NOT NULL # -# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#62 +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#63 RuboCop::Cop::Rails::WhereNot::IS_NOT_NULL_RE = T.let(T.unsafe(nil), Regexp) # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#30 @@ -8630,22 +8904,22 @@ RuboCop::Cop::Rails::WhereNot::MSG = T.let(T.unsafe(nil), String) # column != ?, column <> ? # -# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#58 +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#59 RuboCop::Cop::Rails::WhereNot::NOT_EQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) # column != :column, column <> :column # -# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#60 +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#61 RuboCop::Cop::Rails::WhereNot::NOT_EQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) # column NOT IN (?) # -# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#59 +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#60 RuboCop::Cop::Rails::WhereNot::NOT_IN_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) # column NOT IN (:column) # -# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#61 +# source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#62 RuboCop::Cop::Rails::WhereNot::NOT_IN_NAMED_RE = T.let(T.unsafe(nil), Regexp) # source://rubocop-rails//lib/rubocop/cop/rails/where_not.rb#31 @@ -8693,63 +8967,179 @@ RuboCop::Cop::Rails::WhereNotWithMultipleConditions::MSG = T.let(T.unsafe(nil), # source://rubocop-rails//lib/rubocop/cop/rails/where_not_with_multiple_conditions.rb#27 RuboCop::Cop::Rails::WhereNotWithMultipleConditions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Identifies places where manually constructed SQL +# in `where` can be replaced with ranges. +# +# @example +# # bad +# User.where('age >= ?', 18) +# User.where.not('age >= ?', 18) +# User.where('age < ?', 18) +# User.where('age >= ? AND age < ?', 18, 21) +# User.where('age >= :start', start: 18) +# User.where('users.age >= ?', 18) +# +# # good +# User.where(age: 18..) +# User.where.not(age: 18..) +# User.where(age: ...18) +# User.where(age: 18...21) +# User.where(users: { age: 18.. }) +# +# # good +# # There are no beginless ranges in ruby. +# User.where('age > ?', 18) +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#37 +class RuboCop::Cop::Rails::WhereRange < ::RuboCop::Cop::Base + include ::RuboCop::Cop::RangeHelp + extend ::RuboCop::Cop::AutoCorrector + extend ::RuboCop::Cop::TargetRubyVersion + extend ::RuboCop::Cop::TargetRailsVersion + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#70 + def on_send(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#63 + def where_range_call?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#174 + def build_good_method(method_name, column, value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#96 + def extract_column_and_value(template_node, values_node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#166 + def find_pair(hash_node, value); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#170 + def offense_range(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#184 + def parentheses_needed?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#188 + def parentheses_not_needed?(node); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#197 + def parenthesized_call_node?(node); end + + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#162 + def range_operator(comparison_operator); end + + # @return [Boolean] + # + # source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#90 + def where_not?(node); end +end + +# column >= ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#48 +RuboCop::Cop::Rails::WhereRange::GTEQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column >= :value +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#54 +RuboCop::Cop::Rails::WhereRange::GTEQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# column <[=] ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#50 +RuboCop::Cop::Rails::WhereRange::LTEQ_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column <[=] :value +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#56 +RuboCop::Cop::Rails::WhereRange::LTEQ_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#43 +RuboCop::Cop::Rails::WhereRange::MSG = T.let(T.unsafe(nil), String) + +# column >= ? AND column <[=] ? +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#52 +RuboCop::Cop::Rails::WhereRange::RANGE_ANONYMOUS_RE = T.let(T.unsafe(nil), Regexp) + +# column >= :value1 AND column <[=] :value2 +# +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#58 +RuboCop::Cop::Rails::WhereRange::RANGE_NAMED_RE = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rails//lib/rubocop/cop/rails/where_range.rb#45 +RuboCop::Cop::Rails::WhereRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + module RuboCop::Cop::Style; end class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#70 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#70 def inverse_block?(param0 = T.unsafe(nil)); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#61 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#61 def inverse_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#91 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#92 def on_block(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#91 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#78 + def on_csend(node); end + + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#92 def on_numblock(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#78 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#78 def on_send(node); end private - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#176 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#177 def camel_case_constant?(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#120 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#121 def correct_inverse_block(corrector, node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#111 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#112 def correct_inverse_method(corrector, node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#127 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#128 def correct_inverse_selector(block, corrector); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#180 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#181 def dot_range(loc); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#163 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#166 def end_parentheses(node, method_call); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#149 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#150 def inverse_blocks; end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#144 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#145 def inverse_methods; end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#190 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#191 def message(method, inverse); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#153 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#154 def negated?(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#157 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#162 def not_to_receiver(node, method_call); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#171 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#172 def possible_class_hierarchy_check?(lhs, rhs, method); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/inverse_methods.rb#184 + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#158 + def relational_comparison_with_safe_navigation?(node); end + + # source://rubocop/1.65.0/lib/rubocop/cop/style/inverse_methods.rb#185 def remove_end_parenthesis(corrector, node, method, method_call); end class << self @@ -8759,27 +9149,24 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base end class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base - # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + # source://rubocop/1.65.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_csend(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + # source://rubocop/1.65.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_send(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 - def on_super(node); end - - # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 + # source://rubocop/1.65.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_yield(node); end private - # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#226 + # source://rubocop/1.65.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#225 def args_begin(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 + # source://rubocop/1.65.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 def args_end(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 + # source://rubocop/1.65.0/lib/rubocop/cop/style/method_call_with_args_parentheses.rb#237 def args_parenthesized?(node); end class << self @@ -8789,81 +9176,84 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base end class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#59 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#60 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#68 def on_and_asgn(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#85 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#86 def on_args(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#120 def on_block(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#89 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#90 def on_blockarg(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#81 def on_def(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#81 def on_defs(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#126 def on_if(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#103 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#104 def on_in_pattern(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#98 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#99 def on_lvasgn(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#93 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#94 def on_masgn(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#120 def on_numblock(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#73 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#74 def on_op_asgn(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#68 def on_or_asgn(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#107 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#108 def on_send(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#126 def on_until(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#126 def on_while(node); end private - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#181 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#196 def add_lhs_to_local_variables_scopes(rhs, lhs); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#189 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#204 def add_masgn_lhs_variables(rhs, lhs); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#195 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#210 def add_match_var_scopes(in_pattern_node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#143 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#144 def add_scope(node, local_variables = T.unsafe(nil)); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#175 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#190 def allow_self(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#149 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#150 def allowed_send_node?(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#166 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#165 + def it_method_in_block?(node); end + + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#181 def on_argument(node); end - # source://rubocop/1.57.2/lib/rubocop/cop/style/redundant_self.rb#158 + # source://rubocop/1.65.0/lib/rubocop/cop/style/redundant_self.rb#173 def regular_method_call?(node); end class << self @@ -8876,15 +9266,27 @@ end # # source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#6 module RuboCop::Cop::TargetRailsVersion - # source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#7 + # source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#11 def minimum_target_rails_version(version); end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#11 + # source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#23 def support_target_rails_version?(version); end end +# Look for `railties` instead of `rails`, to support apps that only use a subset of `rails` +# See https://github.com/rubocop/rubocop/pull/11289 +# +# source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#39 +RuboCop::Cop::TargetRailsVersion::TARGET_GEM_NAME = T.let(T.unsafe(nil), String) + +# Informs the base RuboCop gem that it the Rails version is checked via `requires_gem` API, +# without needing to call this `#support_target_rails_version` method. +# +# source://rubocop-rails//lib/rubocop/cop/mixin/target_rails_version.rb#9 +RuboCop::Cop::TargetRailsVersion::USES_REQUIRES_GEM_API = T.let(T.unsafe(nil), TrueClass) + # RuboCop Rails project namespace # # source://rubocop-rails//lib/rubocop/rails.rb#5 @@ -8927,7 +9329,7 @@ module RuboCop::Rails::SchemaLoader # @return [Schema, nil] # # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#15 - def load(target_ruby_version); end + def load(target_ruby_version, parser_engine); end # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#21 def reset!; end @@ -8935,92 +9337,89 @@ module RuboCop::Rails::SchemaLoader private # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#41 - def load!(target_ruby_version); end - - # source://rubocop-rails//lib/rubocop/rails/schema_loader.rb#49 - def parse(path, target_ruby_version); end + def load!(target_ruby_version, parser_engine); end end # Represent an `add_index` # -# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#176 +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#177 class RuboCop::Rails::SchemaLoader::AddIndex < ::RuboCop::Rails::SchemaLoader::Index # @return [AddIndex] a new instance of AddIndex # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#179 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#180 def initialize(node); end # Returns the value of attribute table_name. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#177 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#178 def table_name; end end # Represent a column # -# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#116 +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#117 class RuboCop::Rails::SchemaLoader::Column # @return [Column] a new instance of Column # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#119 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#120 def initialize(node); end # Returns the value of attribute name. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#117 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#118 def name; end # Returns the value of attribute not_null. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#117 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#118 def not_null; end # Returns the value of attribute type. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#117 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#118 def type; end private - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#129 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#130 def analyze_keywords!(node); end end # Represent an index # -# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#140 +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#141 class RuboCop::Rails::SchemaLoader::Index # @return [Index] a new instance of Index # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#143 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#144 def initialize(node); end # Returns the value of attribute columns. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#141 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 def columns; end # Returns the value of attribute expression. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#141 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 def expression; end # Returns the value of attribute name. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#141 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 def name; end # Returns the value of attribute unique. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#141 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#142 def unique; end private - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#160 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#161 def analyze_keywords!(node); end - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#152 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#153 def build_columns_or_expr(columns); end end @@ -9054,51 +9453,51 @@ class RuboCop::Rails::SchemaLoader::Schema # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#31 def build!(ast); end - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#59 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#60 def each_add_index(ast); end - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#46 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#47 def each_table(ast); end end # Represent a table # -# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#70 +# source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#71 class RuboCop::Rails::SchemaLoader::Table # @return [Table] a new instance of Table # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#73 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#74 def initialize(node); end # Returns the value of attribute columns. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#71 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#72 def columns; end # Returns the value of attribute indices. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#71 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#72 def indices; end # Returns the value of attribute name. # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#71 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#72 def name; end # @return [Boolean] # - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#79 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#80 def with_column?(name:); end private - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#85 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#86 def build_columns(node); end - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#94 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#95 def build_indices(node); end - # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#103 + # source://rubocop-rails//lib/rubocop/rails/schema_loader/schema.rb#104 def each_content(node, &block); end end diff --git a/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi b/sorbet/rbi/gems/rubocop-rspec@3.1.0.rbi similarity index 84% rename from sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi rename to sorbet/rbi/gems/rubocop-rspec@3.1.0.rbi index a2f3ddec1..0a710db6f 100644 --- a/sorbet/rbi/gems/rubocop-rspec@2.25.0.rbi +++ b/sorbet/rbi/gems/rubocop-rspec@3.1.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `rubocop-rspec` gem. # Please instead update this file by running `bin/tapioca gem rubocop-rspec`. + # source://rubocop-rspec//lib/rubocop/rspec.rb#3 module RuboCop; end @@ -180,18 +181,17 @@ RuboCop::Cop::RSpec::AroundBlock::MSG_UNUSED_ARG = T.let(T.unsafe(nil), String) # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#7 class RuboCop::Cop::RSpec::Base < ::RuboCop::Cop::Base include ::RuboCop::RSpec::Language - extend ::RuboCop::RSpec::Language::NodePattern # Set the config for dynamic DSL configuration-aware helpers # that have no other means of accessing the configuration. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#20 + # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#19 def on_new_investigation; end class << self # Invoke the original inherited hook so our cops are recognized # - # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#14 + # source://rubocop-rspec//lib/rubocop/cop/rspec/base.rb#13 def inherited(subclass); end end end @@ -243,7 +243,7 @@ class RuboCop::Cop::RSpec::BeEmpty < ::RuboCop::Cop::RSpec::Base # source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#23 def expect_array_matcher?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#34 + # source://rubocop-rspec//lib/rubocop/cop/rspec/be_empty.rb#35 def on_send(node); end end @@ -387,277 +387,35 @@ RuboCop::Cop::RSpec::BeNil::BE_NIL_MSG = T.let(T.unsafe(nil), String) # source://rubocop-rspec//lib/rubocop/cop/rspec/be_nil.rb#33 RuboCop::Cop::RSpec::BeNil::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Check that before/after(:all) isn't being used. +# Check that before/after(:all/:context) isn't being used. # # @example -# # bad -# # -# # Faster but risk of state leaking between examples -# # +# # bad - Faster but risk of state leaking between examples # describe MyClass do # before(:all) { Widget.create } -# after(:all) { Widget.delete_all } +# after(:context) { Widget.delete_all } # end # -# # good -# # -# # Slower but examples are properly isolated -# # +# # good - Slower but examples are properly isolated # describe MyClass do # before(:each) { Widget.create } # after(:each) { Widget.delete_all } # end # -# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#27 +# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#21 class RuboCop::Cop::RSpec::BeforeAfterAll < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#36 + # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#30 def before_or_after_all(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#40 + # source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#34 def on_send(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#28 +# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#22 RuboCop::Cop::RSpec::BeforeAfterAll::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#33 -RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/current_path_expectation.rb#6 -module RuboCop::Cop::RSpec::Capybara; end - -# Checks that no expectations are set on Capybara's `current_path`. -# -# The -# https://www.rubydoc.info/github/teamcapybara/capybara/master/Capybara/RSpecMatchers#have_current_path-instance_method[`have_current_path` matcher] -# should be used on `page` to set expectations on Capybara's -# current path, since it uses -# https://github.com/teamcapybara/capybara/blob/master/README.md#asynchronous-javascript-ajax-and-friends[Capybara's waiting functionality] -# which ensures that preceding actions (like `click_link`) have -# completed. -# -# This cop does not support autocorrection in some cases. -# -# @example -# # bad -# expect(current_path).to eq('/callback') -# -# # good -# expect(page).to have_current_path('/callback') -# -# # bad (does not support autocorrection) -# expect(page.current_path).to match(variable) -# -# # good -# expect(page).to have_current_path('/callback') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/current_path_expectation.rb#34 -RuboCop::Cop::RSpec::Capybara::CurrentPathExpectation = RuboCop::Cop::Capybara::CurrentPathExpectation - -# Checks for consistent method usage in feature specs. -# -# By default, the cop disables all Capybara-specific methods that have -# the same native RSpec method (e.g. are just aliases). Some teams -# however may prefer using some of the Capybara methods (like `feature`) -# to make it obvious that the test uses Capybara, while still disable -# the rest of the methods, like `given` (alias for `let`), `background` -# (alias for `before`), etc. You can configure which of the methods to -# be enabled by using the EnabledMethods configuration option. -# -# @example -# # bad -# feature 'User logs in' do -# given(:user) { User.new } -# -# background do -# visit new_session_path -# end -# -# scenario 'with OAuth' do -# # ... -# end -# end -# -# # good -# describe 'User logs in' do -# let(:user) { User.new } -# -# before do -# visit new_session_path -# end -# -# it 'with OAuth' do -# # ... -# end -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#44 -class RuboCop::Cop::RSpec::Capybara::FeatureMethods < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::InsideExampleGroup - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#61 - def capybara_speak(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#66 - def feature_method(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#84 - def message(range); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#72 - def on_block(node); end - - private - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#91 - def enabled?(method_name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#95 - def enabled_methods; end -end - -# https://github.com/teamcapybara/capybara/blob/e283c1aeaa72441f5403963577e16333bf111a81/lib/capybara/rspec/features.rb#L31-L36 -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#51 -RuboCop::Cop::RSpec::Capybara::FeatureMethods::MAP = T.let(T.unsafe(nil), Hash) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/feature_methods.rb#48 -RuboCop::Cop::RSpec::Capybara::FeatureMethods::MSG = T.let(T.unsafe(nil), String) - -# Checks for usage of deprecated style methods. -# -# @example when using `assert_style` -# # bad -# page.find(:css, '#first').assert_style(display: 'block') -# -# # good -# page.find(:css, '#first').assert_matches_style(display: 'block') -# @example when using `has_style?` -# # bad -# expect(page.find(:css, 'first') -# .has_style?(display: 'block')).to be true -# -# # good -# expect(page.find(:css, 'first') -# .matches_style?(display: 'block')).to be true -# @example when using `have_style` -# # bad -# expect(page).to have_style(display: 'block') -# -# # good -# expect(page).to match_style(display: 'block') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/match_style.rb#34 -RuboCop::Cop::RSpec::Capybara::MatchStyle = RuboCop::Cop::Capybara::MatchStyle - -# Enforces use of `have_no_*` or `not_to` for negated expectations. -# -# @example EnforcedStyle: not_to (default) -# # bad -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') -# -# # good -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') -# @example EnforcedStyle: have_no -# # bad -# expect(page).not_to have_selector -# expect(page).not_to have_css('a') -# -# # good -# expect(page).to have_no_selector -# expect(page).to have_no_css('a') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/negation_matcher.rb#29 -RuboCop::Cop::RSpec::Capybara::NegationMatcher = RuboCop::Cop::Capybara::NegationMatcher - -# Checks for there is a more specific actions offered by Capybara. -# -# @example -# -# # bad -# find('a').click -# find('button.cls').click -# find('a', exact_text: 'foo').click -# find('div button').click -# -# # good -# click_link -# click_button(class: 'cls') -# click_link(exact_text: 'foo') -# find('div').click_button -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/specific_actions.rb#25 -RuboCop::Cop::RSpec::Capybara::SpecificActions = RuboCop::Cop::Capybara::SpecificActions - -# Checks if there is a more specific finder offered by Capybara. -# -# @example -# # bad -# find('#some-id') -# find('[visible][id=some-id]') -# -# # good -# find_by_id('some-id') -# find_by_id('some-id', visible: true) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/specific_finders.rb#20 -RuboCop::Cop::RSpec::Capybara::SpecificFinders = RuboCop::Cop::Capybara::SpecificFinders - -# Checks for there is a more specific matcher offered by Capybara. -# -# @example -# -# # bad -# expect(page).to have_selector('button') -# expect(page).to have_no_selector('button.cls') -# expect(page).to have_css('button') -# expect(page).to have_no_css('a.cls', href: 'http://example.com') -# expect(page).to have_css('table.cls') -# expect(page).to have_css('select') -# expect(page).to have_css('input', exact_text: 'foo') -# -# # good -# expect(page).to have_button -# expect(page).to have_no_button(class: 'cls') -# expect(page).to have_button -# expect(page).to have_no_link('foo', class: 'cls', href: 'http://example.com') -# expect(page).to have_table(class: 'cls') -# expect(page).to have_select -# expect(page).to have_field('foo') -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/specific_matcher.rb#31 -RuboCop::Cop::RSpec::Capybara::SpecificMatcher = RuboCop::Cop::Capybara::SpecificMatcher - -# Checks for boolean visibility in Capybara finders. -# -# Capybara lets you find elements that match a certain visibility -# using the `:visible` option. `:visible` accepts both boolean and -# symbols as values, however using booleans can have unwanted -# effects. `visible: false` does not find just invisible elements, -# but both visible and invisible elements. For expressiveness and -# clarity, use one of the # symbol values, `:all`, `:hidden` or -# `:visible`. -# Read more in -# https://www.rubydoc.info/gems/capybara/Capybara%2FNode%2FFinders:all[the documentation]. -# -# @example -# # bad -# expect(page).to have_selector('.foo', visible: false) -# expect(page).to have_css('.foo', visible: true) -# expect(page).to have_link('my link', visible: false) -# -# # good -# expect(page).to have_selector('.foo', visible: :visible) -# expect(page).to have_css('.foo', visible: :all) -# expect(page).to have_link('my link', visible: :hidden) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/capybara/visibility_matcher.rb#32 -RuboCop::Cop::RSpec::Capybara::VisibilityMatcher = RuboCop::Cop::Capybara::VisibilityMatcher +# source://rubocop-rspec//lib/rubocop/cop/rspec/before_after_all.rb#27 +RuboCop::Cop::RSpec::BeforeAfterAll::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Prefer negated matchers over `to change.by(0)`. # @@ -714,59 +472,69 @@ RuboCop::Cop::RSpec::Capybara::VisibilityMatcher = RuboCop::Cop::Capybara::Visib # # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#60 class RuboCop::Cop::RSpec::ChangeByZero < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#86 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#88 def change_nodes(param0); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#69 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#71 def expect_change_with_arguments(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#76 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#78 def expect_change_with_block(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#90 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#92 def on_send(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#131 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#133 def autocorrect(corrector, node, change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#138 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#140 def autocorrect_compound(corrector, node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#118 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#120 def compound_expectations?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#122 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#150 + def insert_operator(corrector, node, change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#124 def message(change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#126 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#128 def message_compound(change_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#148 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#174 def negated_matcher; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#152 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#178 def preferred_method; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#103 + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#105 def register_offense(node, change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#163 + def remove_by_zero(corrector, node, change_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#159 + def replace_node(node, change_node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#65 +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#67 RuboCop::Cop::RSpec::ChangeByZero::CHANGE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#62 +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#64 RuboCop::Cop::RSpec::ChangeByZero::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#63 +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#65 RuboCop::Cop::RSpec::ChangeByZero::MSG_COMPOUND = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#66 +# source://rubocop-rspec//lib/rubocop/cop/rspec/change_by_zero.rb#68 RuboCop::Cop::RSpec::ChangeByZero::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) # Enforces consistent use of `be_a` or `be_kind_of`. @@ -1159,8 +927,10 @@ RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # If the first argument of describe is a class, the class is exposed to # each example via described_class. # -# This cop can be configured using the `EnforcedStyle` and `SkipBlocks` -# options. +# This cop can be configured using the `EnforcedStyle`, `SkipBlocks` +# and `OnlyStaticConstants` options. +# `OnlyStaticConstants` is only relevant when `EnforcedStyle` is +# `described_class`. # # There's a known caveat with rspec-rails's `controller` helper that # runs its block in a different context, and `described_class` is not @@ -1181,6 +951,16 @@ RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # describe MyClass do # subject { described_class.do_something } # end +# @example `OnlyStaticConstants: true` (default) +# # good +# describe MyClass do +# subject { MyClass::CONSTANT } +# end +# @example `OnlyStaticConstants: false` +# # bad +# describe MyClass do +# subject { MyClass::CONSTANT } +# end # @example `EnforcedStyle: explicit` # # bad # describe MyClass do @@ -1203,33 +983,38 @@ RuboCop::Cop::RSpec::DescribeSymbol::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # end # end # -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#57 +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#71 class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::RSpec::Namespace extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#66 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#80 def common_instance_exec_closure?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#83 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#97 def contains_described_class?(param0); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#78 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#92 def described_constant(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#86 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#100 def on_block(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#71 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#85 def rspec_block?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#75 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#89 def scope_changing_syntax?(param0 = T.unsafe(nil)); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#103 + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#136 + def allowed?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#117 def autocorrect(corrector, match); end # @example @@ -1243,7 +1028,7 @@ class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base # @param const [Array] # @return [Array] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#179 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#200 def collapse_namespace(namespace, const); end # @example @@ -1253,45 +1038,50 @@ class RuboCop::Cop::RSpec::DescribedClass < ::RuboCop::Cop::RSpec::Base # @param node [RuboCop::AST::Node] # @return [Array] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#196 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#217 def const_name(node); end # @yield [node] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#113 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#127 def find_usage(node, &block); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#164 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#185 def full_const_name(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#123 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#140 def message(offense); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#142 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#163 def offensive?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#150 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#171 def offensive_described_class?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#132 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#159 + def only_static_constants?; end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#149 def scope_change?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#138 + # source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#155 def skippable_block?(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#62 +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#76 RuboCop::Cop::RSpec::DescribedClass::DESCRIBED_CLASS = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#63 +# source://rubocop-rspec//lib/rubocop/cop/rspec/described_class.rb#77 RuboCop::Cop::RSpec::DescribedClass::MSG = T.let(T.unsafe(nil), String) # Avoid opening modules and defining specs within them. @@ -1348,6 +1138,19 @@ RuboCop::Cop::RSpec::DescribedClassModuleWrapping::MSG = T.let(T.unsafe(nil), St # PreferredMethods: # context: describe # +# If you were previously using the `RSpec/Capybara/FeatureMethods` cop and +# want to keep disabling all Capybara-specific methods that have the same +# native RSpec method (e.g. are just aliases), use the following config: +# +# RSpec/Dialect: +# PreferredMethods: +# background: :before +# scenario: :it +# xscenario: :xit +# given: :let +# given!: :let! +# feature: :describe +# # You can expect the following behavior: # # @example @@ -1361,19 +1164,19 @@ RuboCop::Cop::RSpec::DescribedClassModuleWrapping::MSG = T.let(T.unsafe(nil), St # # ... # end # -# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#45 +# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#58 class RuboCop::Cop::RSpec::Dialect < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::MethodPreference extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#54 + # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#67 def on_send(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#52 + # source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#65 def rspec_method?(param0 = T.unsafe(nil)); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#49 +# source://rubocop-rspec//lib/rubocop/cop/rspec/dialect.rb#62 RuboCop::Cop::RSpec::Dialect::MSG = T.let(T.unsafe(nil), String) # Avoid duplicated metadata. @@ -1865,6 +1668,34 @@ end # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_metadata.rb#20 RuboCop::Cop::RSpec::EmptyMetadata::MSG = T.let(T.unsafe(nil), String) +# Check that the `output` matcher is not called with an empty string. +# +# @example +# # bad +# expect { foo }.to output('').to_stdout +# expect { bar }.not_to output('').to_stderr +# +# # good +# expect { foo }.not_to output.to_stdout +# expect { bar }.to output.to_stderr +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#17 +class RuboCop::Cop::RSpec::EmptyOutput < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#24 + def matching_empty_output(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#34 + def on_send(send_node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#20 +RuboCop::Cop::RSpec::EmptyOutput::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/empty_output.rb#21 +RuboCop::Cop::RSpec::EmptyOutput::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Use `eq` instead of `be ==` to compare objects. # # @example @@ -1967,6 +1798,7 @@ RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) # # RSpec allows for auto-generated example descriptions when there is no # description provided or the description is an empty one. +# It is acceptable to use `specify` without a description # # This cop removes empty descriptions. # It also defines whether auto-generated description is allowed, based @@ -1974,17 +1806,23 @@ RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) # # This cop can be configured using the `EnforcedStyle` option # +# @example +# # always good +# specify do +# result = service.call +# expect(result).to be(true) +# end # @example `EnforcedStyle: always_allow` (default) # # bad # it('') { is_expected.to be_good } -# it '' do +# specify '' do # result = service.call # expect(result).to be(true) # end # # # good # it { is_expected.to be_good } -# it do +# specify do # result = service.call # expect(result).to be(true) # end @@ -2006,31 +1844,31 @@ RuboCop::Cop::RSpec::ExampleLength::LABEL = T.let(T.unsafe(nil), String) # expect(result).to be(true) # end # -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#51 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#59 class RuboCop::Cop::RSpec::ExampleWithoutDescription < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#59 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#67 def example_description(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#61 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#69 def on_block(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#75 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#83 def check_example_without_description(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#82 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#91 def disallow_empty_description?(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#56 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#64 RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_ADD_DESCRIPTION = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#54 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_without_description.rb#62 RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.unsafe(nil), String) # Checks for common mistakes in example descriptions. @@ -2050,6 +1888,9 @@ RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.u # it 'should find nothing' do # end # +# it 'will find nothing' do +# end +# # # good # it 'finds nothing' do # end @@ -2071,66 +1912,72 @@ RuboCop::Cop::RSpec::ExampleWithoutDescription::MSG_DEFAULT_ARGUMENT = T.let(T.u # end # @see http://betterspecs.org/#should # -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#46 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#49 class RuboCop::Cop::RSpec::ExampleWording < ::RuboCop::Cop::RSpec::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#58 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#63 def it_description(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#65 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#71 def on_block(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#80 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#89 def add_wording_offense(node, message); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#127 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#136 def custom_transform; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#90 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#99 def docstring(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#131 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#140 def ignored_words; end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#135 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#144 def insufficient_docstring?(description_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#139 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#148 def insufficient_examples; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#144 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#153 def preprocess(message); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#100 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#109 def replacement_text(node); end # Recursive processing is required to process nested dstr nodes # that is the case for \-separated multiline strings with interpolation. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#116 + # source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#125 def text(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#55 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#60 RuboCop::Cop::RSpec::ExampleWording::IT_PREFIX = T.let(T.unsafe(nil), Regexp) -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#51 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#55 RuboCop::Cop::RSpec::ExampleWording::MSG_INSUFFICIENT_DESCRIPTION = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#50 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#54 RuboCop::Cop::RSpec::ExampleWording::MSG_IT = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#49 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#52 RuboCop::Cop::RSpec::ExampleWording::MSG_SHOULD = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#54 +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#53 +RuboCop::Cop::RSpec::ExampleWording::MSG_WILL = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#58 RuboCop::Cop::RSpec::ExampleWording::SHOULD_PREFIX = T.let(T.unsafe(nil), Regexp) +# source://rubocop-rspec//lib/rubocop/cop/rspec/example_wording.rb#59 +RuboCop::Cop::RSpec::ExampleWording::WILL_PREFIX = T.let(T.unsafe(nil), Regexp) + # Checks for excessive whitespace in example descriptions. # # @example @@ -2214,17 +2061,17 @@ RuboCop::Cop::RSpec::ExcessiveDocstringSpacing::MSG = T.let(T.unsafe(nil), Strin class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#56 + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#57 def expect_literal(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#67 + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#68 def on_send(node); end private # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#90 + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#98 def complex_literal?(node); end # This is not implemented using a NodePattern because it seems @@ -2232,21 +2079,21 @@ class RuboCop::Cop::RSpec::ExpectActual < ::RuboCop::Cop::RSpec::Base # # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#82 + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#90 def literal?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#86 + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#94 def simple_literal?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#95 - def swap(corrector, actual, expected); end end # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#44 RuboCop::Cop::RSpec::ExpectActual::COMPLEX_LITERALS = T.let(T.unsafe(nil), Array) +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#54 +RuboCop::Cop::RSpec::ExpectActual::CORRECTABLE_MATCHERS = T.let(T.unsafe(nil), Array) + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#27 RuboCop::Cop::RSpec::ExpectActual::MSG = T.let(T.unsafe(nil), String) @@ -2257,7 +2104,7 @@ RuboCop::Cop::RSpec::ExpectActual::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array RuboCop::Cop::RSpec::ExpectActual::SIMPLE_LITERALS = T.let(T.unsafe(nil), Array) # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_actual.rb#53 -RuboCop::Cop::RSpec::ExpectActual::SUPPORTED_MATCHERS = T.let(T.unsafe(nil), Array) +RuboCop::Cop::RSpec::ExpectActual::SKIPPED_MATCHERS = T.let(T.unsafe(nil), Array) # Checks for consistent style of change matcher. # @@ -2349,6 +2196,36 @@ end # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_hook.rb#25 RuboCop::Cop::RSpec::ExpectInHook::MSG = T.let(T.unsafe(nil), String) +# Do not use `expect` in let. +# +# @example +# # bad +# let(:foo) do +# expect(something).to eq 'foo' +# end +# +# # good +# it do +# expect(something).to eq 'foo' +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#19 +class RuboCop::Cop::RSpec::ExpectInLet < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#23 + def expectation(param0); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#25 + def on_block(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#36 + def message(expect); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/expect_in_let.rb#20 +RuboCop::Cop::RSpec::ExpectInLet::MSG = T.let(T.unsafe(nil), String) + # Checks for opportunities to use `expect { ... }.to output`. # # @example @@ -2378,7 +2255,7 @@ class RuboCop::Cop::RSpec::ExpectOutput < ::RuboCop::Cop::RSpec::Base # # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#43 + # source://rubocop-rspec//lib/rubocop/cop/rspec/expect_output.rb#40 def inside_example_scope?(node); end end @@ -2395,7 +2272,7 @@ module RuboCop::Cop::RSpec::ExplicitHelper # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#182 def predicate_matcher?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#191 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#195 def predicate_matcher_block?(param0 = T.unsafe(nil)); end private @@ -2406,7 +2283,7 @@ module RuboCop::Cop::RSpec::ExplicitHelper # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#139 def check_explicit(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#215 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#219 def corrector_explicit(corrector, to_node, actual, matcher, block_child); end # @return [Boolean] @@ -2414,15 +2291,15 @@ module RuboCop::Cop::RSpec::ExplicitHelper # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#175 def heredoc_argument?(matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#209 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#213 def message_explicit(matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#222 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#226 def move_predicate(corrector, actual, matcher, block_child); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#200 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#204 def predicate_matcher_name?(name); end # @return [Boolean] @@ -2430,10 +2307,10 @@ module RuboCop::Cop::RSpec::ExplicitHelper # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#162 def replaceable_matcher?(matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#251 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#255 def replacement_matcher(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#233 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#237 def to_predicate_method(matcher); end # @return [Boolean] @@ -2448,348 +2325,67 @@ RuboCop::Cop::RSpec::ExplicitHelper::BUILT_IN_MATCHERS = T.let(T.unsafe(nil), Ar # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#125 RuboCop::Cop::RSpec::ExplicitHelper::MSG_EXPLICIT = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#6 -module RuboCop::Cop::RSpec::FactoryBot; end +# Help methods for file. +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#7 +module RuboCop::Cop::RSpec::FileHelp + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#8 + def expanded_file_path; end +end -# Always declare attribute values as blocks. +# Helps find the true end location of nodes which might contain heredocs. # -# @example -# # bad -# kind [:active, :rejected].sample +# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#7 +module RuboCop::Cop::RSpec::FinalEndLocation + # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#8 + def final_end_location(start_node); end +end + +# Checks if examples are focused. # -# # good -# kind { [:active, :rejected].sample } +# This cop does not support autocorrection in some cases. # +# @example # # bad -# closed_at 1.day.from_now +# describe MyClass, focus: true do +# end # -# # good -# closed_at { 1.day.from_now } +# describe MyClass, :focus do +# end # -# # bad -# count 1 +# fdescribe MyClass do +# end # # # good -# count { 1 } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/attribute_defined_statically.rb#30 -RuboCop::Cop::RSpec::FactoryBot::AttributeDefinedStatically = RuboCop::Cop::FactoryBot::AttributeDefinedStatically - -# Use a consistent style for parentheses in factory bot calls. -# -# @example +# describe MyClass do +# end # # # bad -# create :user -# build(:user) -# create(:login) -# create :login -# @example `EnforcedStyle: require_parentheses` (default) -# -# # good -# create(:user) -# create(:user) -# create(:login) -# build(:login) -# @example `EnforcedStyle: omit_parentheses` +# fdescribe 'test' do; end # # # good -# create :user -# build :user -# create :login -# create :login -# -# # also good -# # when method name and first argument are not on same line -# create( -# :user -# ) -# build( -# :user, -# name: 'foo' -# ) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/consistent_parentheses_style.rb#45 -RuboCop::Cop::RSpec::FactoryBot::ConsistentParenthesesStyle = RuboCop::Cop::FactoryBot::ConsistentParenthesesStyle - -# Checks for create_list usage. -# -# This cop can be configured using the `EnforcedStyle` option +# describe 'test' do; end # -# @example `EnforcedStyle: create_list` (default) # # bad -# 3.times { create :user } +# fdescribe 'test' do; end # # # good -# create_list :user, 3 -# -# # bad -# 3.times { create :user, age: 18 } -# -# # good - index is used to alter the created models attributes -# 3.times { |n| create :user, age: n } +# describe 'test' do; end # -# # good - contains a method call, may return different values -# 3.times { create :user, age: rand } -# @example `EnforcedStyle: n_times` # # bad -# create_list :user, 3 +# shared_examples 'test', focus: true do; end # # # good -# 3.times { create :user } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/create_list.rb#36 -RuboCop::Cop::RSpec::FactoryBot::CreateList = RuboCop::Cop::FactoryBot::CreateList - -# Use string value when setting the class attribute explicitly. -# -# This cop would promote faster tests by lazy-loading of -# application files. Also, this could help you suppress potential -# bugs in combination with external libraries by avoiding a preload -# of application files from the factory files. +# shared_examples 'test' do; end # -# @example # # bad -# factory :foo, class: Foo do -# end +# shared_context 'test', focus: true do; end # # # good -# factory :foo, class: 'Foo' do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_class_name.rb#25 -RuboCop::Cop::RSpec::FactoryBot::FactoryClassName = RuboCop::Cop::FactoryBot::FactoryClassName - -# Checks for name style for argument of FactoryBot::Syntax::Methods. +# shared_context 'test' do; end # -# @example EnforcedStyle: symbol (default) -# # bad -# create('user') -# build "user", username: "NAME" -# -# # good -# create(:user) -# build :user, username: "NAME" -# @example EnforcedStyle: string -# # bad -# create(:user) -# build :user, username: "NAME" -# -# # good -# create('user') -# build "user", username: "NAME" -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/factory_name_style.rb#29 -RuboCop::Cop::RSpec::FactoryBot::FactoryNameStyle = RuboCop::Cop::FactoryBot::FactoryNameStyle - -# Use shorthands from `FactoryBot::Syntax::Methods` in your specs. -# -# @example -# # bad -# FactoryBot.create(:bar) -# FactoryBot.build(:bar) -# FactoryBot.attributes_for(:bar) -# -# # good -# create(:bar) -# build(:bar) -# attributes_for(:bar) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/factory_bot/syntax_methods.rb#51 -RuboCop::Cop::RSpec::FactoryBot::SyntaxMethods = RuboCop::Cop::FactoryBot::SyntaxMethods - -# Help methods for file. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#7 -module RuboCop::Cop::RSpec::FileHelp - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/file_help.rb#8 - def expanded_file_path; end -end - -# Checks that spec file paths are consistent and well-formed. -# -# This cop is deprecated. -# We plan to remove it in the next major version update to 3.0. -# The migration targets are `RSpec/SpecFilePathSuffix` -# and `RSpec/SpecFilePathFormat`. -# If you are using this cop, please plan for migration. -# -# By default, this checks that spec file paths are consistent with the -# test subject and enforces that it reflects the described -# class/module and its optionally called out method. -# -# With the configuration option `IgnoreMethods` the called out method will -# be ignored when determining the enforced path. -# -# With the configuration option `CustomTransform` modules or classes can -# be specified that should not as usual be transformed from CamelCase to -# snake_case (e.g. 'RuboCop' => 'rubocop' ). -# -# With the configuration option `SpecSuffixOnly` test files will only -# be checked to ensure they end in '_spec.rb'. This option disables -# checking for consistency in the test subject or test methods. -# -# @example -# # bad -# whatever_spec.rb # describe MyClass -# -# # bad -# my_class_spec.rb # describe MyClass, '#method' -# -# # good -# my_class_spec.rb # describe MyClass -# -# # good -# my_class_method_spec.rb # describe MyClass, '#method' -# -# # good -# my_class/method_spec.rb # describe MyClass, '#method' -# @example when configuration is `IgnoreMethods: true` -# # bad -# whatever_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass, '#method' -# @example when configuration is `SpecSuffixOnly: true` -# # good -# whatever_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass -# -# # good -# my_class_spec.rb # describe MyClass, '#method' -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#65 -class RuboCop::Cop::RSpec::FilePath < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::RSpec::TopLevelGroup - include ::RuboCop::Cop::RSpec::Namespace - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#72 - def example_group(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#81 - def on_top_level_example_group(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#79 - def routing_metadata?(param0); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#142 - def camel_to_snake_case(string); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#149 - def custom_transform; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#91 - def ensure_correct_file_path(send_node, example_group, arguments); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#173 - def expanded_file_path; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#132 - def expected_path(constant); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#157 - def filename_ends_with?(pattern); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#153 - def ignore_methods?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#125 - def name_pattern(method_name); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#107 - def pattern_for(example_group, arguments); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#121 - def pattern_for_spec_suffix_only; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#161 - def relevant_rubocop_rspec_file?(_file); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#103 - def routing_spec?(args); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#169 - def routing_spec_path?; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#165 - def spec_suffix_only?; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/file_path.rb#69 -RuboCop::Cop::RSpec::FilePath::MSG = T.let(T.unsafe(nil), String) - -# Helps find the true end location of nodes which might contain heredocs. -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#7 -module RuboCop::Cop::RSpec::FinalEndLocation - # source://rubocop-rspec//lib/rubocop/cop/rspec/mixin/final_end_location.rb#8 - def final_end_location(start_node); end -end - -# Checks if examples are focused. -# -# This cop does not support autocorrection in some cases. -# -# @example -# # bad -# describe MyClass, focus: true do -# end -# -# describe MyClass, :focus do -# end -# -# fdescribe MyClass do -# end -# -# # good -# describe MyClass do -# end -# -# # bad -# fdescribe 'test' do; end -# -# # good -# describe 'test' do; end -# -# # bad -# fdescribe 'test' do; end -# -# # good -# describe 'test' do; end -# -# # bad -# shared_examples 'test', focus: true do; end -# -# # good -# shared_examples 'test' do; end -# -# # bad -# shared_context 'test', focus: true do; end -# -# # good -# shared_context 'test' do; end -# -# # bad (does not support autocorrection) -# focus 'test' do; end +# # bad (does not support autocorrection) +# focus 'test' do; end # # source://rubocop-rspec//lib/rubocop/cop/rspec/focus.rb#52 class RuboCop::Cop::RSpec::Focus < ::RuboCop::Cop::RSpec::Base @@ -3277,31 +2873,31 @@ class RuboCop::Cop::RSpec::IndexedLet < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#104 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#105 def allowed_identifiers; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#98 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#99 def cop_config_patterns_values; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#78 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#79 def filter_indexed_lets(candidates); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#87 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#88 def indexed_let?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#94 + # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#95 def let_name_stripped_index(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#76 +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#77 RuboCop::Cop::RSpec::IndexedLet::INDEX_REGEX = T.let(T.unsafe(nil), Regexp) # source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#51 RuboCop::Cop::RSpec::IndexedLet::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#75 +# source://rubocop-rspec//lib/rubocop/cop/rspec/indexed_let.rb#76 RuboCop::Cop::RSpec::IndexedLet::SUFFIX_INDEX_REGEX = T.let(T.unsafe(nil), Regexp) # A helper for `inflected` style @@ -3438,7 +3034,7 @@ RuboCop::Cop::RSpec::InstanceSpy::MSG = T.let(T.unsafe(nil), String) # @example with AssignmentOnly configuration # # rubocop.yml # # RSpec/InstanceVariable: -# # AssignmentOnly: false +# # AssignmentOnly: true # # # bad # describe MyClass do @@ -3492,6 +3088,41 @@ end # source://rubocop-rspec//lib/rubocop/cop/rspec/instance_variable.rb#51 RuboCop::Cop::RSpec::InstanceVariable::MSG = T.let(T.unsafe(nil), String) +# Check for `specify` with `is_expected` and one-liner expectations. +# +# @example +# # bad +# specify { is_expected.to be_truthy } +# +# # good +# it { is_expected.to be_truthy } +# +# # good +# specify do +# # ... +# end +# specify { expect(sqrt(4)).to eq(2) } +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#21 +class RuboCop::Cop::RSpec::IsExpectedSpecify < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#29 + def offense?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#33 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#25 +RuboCop::Cop::RSpec::IsExpectedSpecify::IS_EXPECTED_METHODS = T.let(T.unsafe(nil), Set) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#26 +RuboCop::Cop::RSpec::IsExpectedSpecify::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/is_expected_specify.rb#24 +RuboCop::Cop::RSpec::IsExpectedSpecify::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks that only one `it_behaves_like` style is used. # # @example `EnforcedStyle: it_behaves_like` (default) @@ -4002,31 +3633,28 @@ RuboCop::Cop::RSpec::MessageChain::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array class RuboCop::Cop::RSpec::MessageExpectation < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#36 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#35 def message_expectation(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#43 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#42 def on_send(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#41 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#40 def receive_message?(param0); end private # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#56 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#55 def preferred_style?(expectation); end end # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#30 RuboCop::Cop::RSpec::MessageExpectation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#33 -RuboCop::Cop::RSpec::MessageExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_expectation.rb#32 -RuboCop::Cop::RSpec::MessageExpectation::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) +RuboCop::Cop::RSpec::MessageExpectation::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks that message expectations are set using spies. # @@ -4058,26 +3686,26 @@ RuboCop::Cop::RSpec::MessageExpectation::SUPPORTED_STYLES = T.let(T.unsafe(nil), class RuboCop::Cop::RSpec::MessageSpies < ::RuboCop::Cop::RSpec::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#47 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#45 def message_expectation(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#56 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#54 def on_send(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#52 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#50 def receive_message(param0); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#79 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#77 def error_message(receiver); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#75 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#73 def preferred_style?(expectation); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#69 + # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#67 def receive_message_matcher(node); end end @@ -4087,11 +3715,8 @@ RuboCop::Cop::RSpec::MessageSpies::MSG_HAVE_RECEIVED = T.let(T.unsafe(nil), Stri # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#36 RuboCop::Cop::RSpec::MessageSpies::MSG_RECEIVE = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#44 -RuboCop::Cop::RSpec::MessageSpies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - # source://rubocop-rspec//lib/rubocop/cop/rspec/message_spies.rb#42 -RuboCop::Cop::RSpec::MessageSpies::SUPPORTED_STYLES = T.let(T.unsafe(nil), Array) +RuboCop::Cop::RSpec::MessageSpies::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Helper methods to find RSpec metadata. # @@ -4166,59 +3791,59 @@ class RuboCop::Cop::RSpec::MetadataStyle < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#66 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#61 def autocorrect_pair(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#71 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#66 def autocorrect_symbol(corrector, node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#78 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#73 def bad_metadata_pair?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#82 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#77 def bad_metadata_symbol?(_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#86 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#81 def format_symbol_to_pair_source(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#90 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#85 def insert_pair(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#101 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#96 def insert_pair_as_last_argument(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#110 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#105 def insert_pair_to_empty_hash_metadata(corrector, node, hash_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#117 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#112 def insert_pair_to_non_empty_hash_metadata(corrector, node, hash_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#124 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#119 def insert_symbol(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#131 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#126 def message_for_style; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#138 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#133 def on_metadata_pair(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#146 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#141 def on_metadata_symbol(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#154 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#149 def remove_pair(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#164 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#159 def remove_pair_following(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#176 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#171 def remove_pair_preceding(corrector, node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#188 + # source://rubocop-rspec//lib/rubocop/cop/rspec/metadata_style.rb#183 def remove_symbol(corrector, node); end end @@ -4248,6 +3873,43 @@ end # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_example_group_argument.rb#24 RuboCop::Cop::RSpec::MissingExampleGroupArgument::MSG = T.let(T.unsafe(nil), String) +# Checks if `.to`, `not_to` or `to_not` are used. +# +# The RSpec::Expectations::ExpectationTarget must use `to`, `not_to` or +# `to_not` to run. Therefore, this cop checks if other methods are used. +# +# @example +# # bad +# expect(something).kind_of? Foo +# is_expected == 42 +# expect{something}.eq? BarError +# +# # good +# expect(something).to be_a Foo +# is_expected.to eq 42 +# expect{something}.to raise_error BarError +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#22 +class RuboCop::Cop::RSpec::MissingExpectationTargetMethod < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#27 + def expect?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#35 + def expect_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#40 + def expectation_without_runner?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#44 + def on_send(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#23 +RuboCop::Cop::RSpec::MissingExpectationTargetMethod::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/missing_expectation_target_method.rb#24 +RuboCop::Cop::RSpec::MissingExpectationTargetMethod::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for multiple top-level example groups. # # Multiple descriptions for the same class or module should either @@ -4319,12 +3981,16 @@ RuboCop::Cop::RSpec::MultipleDescribes::MSG = T.let(T.unsafe(nil), String) # expect(user.age).to eq(22) # end # end -# @example configuration -# # .rubocop.yml -# # RSpec/MultipleExpectations: -# # Max: 2 -# -# # not flagged by rubocop +# @example `Max: 1` (default) +# # bad +# describe UserCreator do +# it 'builds a user' do +# expect(user.name).to eq("John") +# expect(user.age).to eq(22) +# end +# end +# @example `Max: 2` +# # good # describe UserCreator do # it 'builds a user' do # expect(user.name).to eq("John") @@ -4333,50 +3999,51 @@ RuboCop::Cop::RSpec::MultipleDescribes::MSG = T.let(T.unsafe(nil), String) # end # @see http://betterspecs.org/#single Single expectation test # -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#64 +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#69 class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax - - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#73 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#78 def aggregate_failures?(param0 = T.unsafe(nil), param1); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#84 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#89 def aggregate_failures_block?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#81 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#86 def expect?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#88 + # source://rubocop/1.65.0/lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#93 def on_block(node); end private # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#104 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#109 def example_with_aggregate_failures?(example_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#111 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#116 def find_aggregate_failures(example_node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#116 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#121 def find_expectation(node, &block); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#127 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#132 def flag_example(node, expectation_count:); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#138 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#143 def max_expectations; end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#69 +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#72 RuboCop::Cop::RSpec::MultipleExpectations::ANYTHING = T.let(T.unsafe(nil), Proc) -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#67 +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#70 RuboCop::Cop::RSpec::MultipleExpectations::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#70 -RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc) +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_expectations.rb#73 +RuboCop::Cop::RSpec::MultipleExpectations::TRUE_NODE = T.let(T.unsafe(nil), Proc) # Checks if example groups contain too many `let` and `subject` calls. # @@ -4456,41 +4123,43 @@ RuboCop::Cop::RSpec::MultipleExpectations::TRUE = T.let(T.unsafe(nil), Proc) # # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#84 class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax include ::RuboCop::Cop::RSpec::Variable - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#90 + # source://rubocop/1.65.0/lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#91 def on_block(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#101 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#102 def on_new_investigation; end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#110 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#111 def all_helpers(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#142 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#141 def allow_subject?; end # Returns the value of attribute example_group_memoized_helpers. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#108 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#109 def example_group_memoized_helpers; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#117 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#116 def helpers(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#138 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#137 def max; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#128 + # source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#127 def variable_nodes(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#88 +# source://rubocop-rspec//lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#87 RuboCop::Cop::RSpec::MultipleMemoizedHelpers::MSG = T.let(T.unsafe(nil), String) # Checks if an example group defines `subject` multiple times. @@ -4659,18 +4328,18 @@ class RuboCop::Cop::RSpec::NamedSubject < ::RuboCop::Cop::RSpec::Base # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#120 + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#123 def allow_explicit_subject?(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#124 + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#127 def always?; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#114 + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#117 def check_explicit_subject(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#147 + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#150 def find_subject(block_node); end # @return [Boolean] @@ -4680,15 +4349,15 @@ class RuboCop::Cop::RSpec::NamedSubject < ::RuboCop::Cop::RSpec::Base # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#128 + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#131 def named_only?(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#139 + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#142 def nearest_subject(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#133 + # source://rubocop-rspec//lib/rubocop/cop/rspec/named_subject.rb#136 def subject_definition_is_named?(node); end end @@ -4796,44 +4465,46 @@ end # # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#94 class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableMax include ::RuboCop::Cop::RSpec::TopLevelGroup - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#106 + # source://rubocop/1.65.0/lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#107 def on_top_level_group(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#156 + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#157 def allowed_groups; end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#133 + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#134 def count_up_nesting?(node, example_group); end # @yield [node, nesting] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#118 + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#119 def find_nested_example_groups(node, nesting: T.unsafe(nil), &block); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#143 + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#144 def max_nesting; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#147 + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#148 def max_nesting_config; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#139 + # source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#140 def message(nesting); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#100 +# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#99 RuboCop::Cop::RSpec::NestedGroups::DEPRECATED_MAX_KEY = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#102 +# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#101 RuboCop::Cop::RSpec::NestedGroups::DEPRECATION_WARNING = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#98 +# source://rubocop-rspec//lib/rubocop/cop/rspec/nested_groups.rb#97 RuboCop::Cop::RSpec::NestedGroups::MSG = T.let(T.unsafe(nil), String) # Checks if an example contains any expectation. @@ -5207,519 +4878,38 @@ RuboCop::Cop::RSpec::PendingWithoutReason::MSG = T.let(T.unsafe(nil), String) # expect(foo.something?).to be(true) # # # bad - no autocorrect -# expect(foo) -# .to be_something(<<~TEXT) -# bar -# TEXT -# -# # good -# expect(foo.something?(<<~TEXT)).to be(true) -# bar -# TEXT -# @example Strict: false, EnforcedStyle: explicit -# # bad -# expect(foo).to be_something -# -# # good - the above code is rewritten to it by this cop -# expect(foo.something?).to be_truthy -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#314 -class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RSpec::InflectedHelper - include ::RuboCop::Cop::RSpec::ExplicitHelper - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#331 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#322 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#320 -RuboCop::Cop::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#6 -module RuboCop::Cop::RSpec::Rails; end - -# Checks that tests use RSpec `before` hook over Rails `setup` method. -# -# @example -# # bad -# setup do -# allow(foo).to receive(:bar) -# end -# -# # good -# before do -# allow(foo).to receive(:bar) -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#20 -class RuboCop::Cop::RSpec::Rails::AvoidSetupHook < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#32 - def on_block(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#26 - def setup_call(param0 = T.unsafe(nil)); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/avoid_setup_hook.rb#23 -RuboCop::Cop::RSpec::Rails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String) - -# Checks that tests use `have_http_status` instead of equality matchers. -# -# @example -# # bad -# expect(response.status).to be(200) -# expect(response.code).to eq("200") -# -# # good -# expect(response).to have_http_status(200) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#17 -class RuboCop::Cop::RSpec::Rails::HaveHttpStatus < ::RuboCop::Cop::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#28 - def match_status(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#38 - def on_send(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#20 -RuboCop::Cop::RSpec::Rails::HaveHttpStatus::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#25 -RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/have_http_status.rb#24 -RuboCop::Cop::RSpec::Rails::HaveHttpStatus::RUNNERS = T.let(T.unsafe(nil), Set) - -# Enforces use of symbolic or numeric value to describe HTTP status. -# -# This cop inspects only `have_http_status` calls. -# So, this cop does not check if a method starting with `be_*` is used -# when setting for `EnforcedStyle: symbolic` or -# `EnforcedStyle: numeric`. -# -# @example `EnforcedStyle: symbolic` (default) -# # bad -# it { is_expected.to have_http_status 200 } -# it { is_expected.to have_http_status 404 } -# it { is_expected.to have_http_status "403" } -# -# # good -# it { is_expected.to have_http_status :ok } -# it { is_expected.to have_http_status :not_found } -# it { is_expected.to have_http_status :forbidden } -# it { is_expected.to have_http_status :success } -# it { is_expected.to have_http_status :error } -# @example `EnforcedStyle: numeric` -# # bad -# it { is_expected.to have_http_status :ok } -# it { is_expected.to have_http_status :not_found } -# it { is_expected.to have_http_status "forbidden" } -# -# # good -# it { is_expected.to have_http_status 200 } -# it { is_expected.to have_http_status 404 } -# it { is_expected.to have_http_status 403 } -# it { is_expected.to have_http_status :success } -# it { is_expected.to have_http_status :error } -# @example `EnforcedStyle: be_status` -# # bad -# it { is_expected.to have_http_status :ok } -# it { is_expected.to have_http_status :not_found } -# it { is_expected.to have_http_status "forbidden" } -# it { is_expected.to have_http_status 200 } -# it { is_expected.to have_http_status 404 } -# it { is_expected.to have_http_status "403" } -# -# # good -# it { is_expected.to be_ok } -# it { is_expected.to be_not_found } -# it { is_expected.to have_http_status :success } -# it { is_expected.to have_http_status :error } -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#57 -class RuboCop::Cop::RSpec::Rails::HttpStatus < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#63 - def http_status(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#67 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#83 - def checker_class; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#171 -class RuboCop::Cop::RSpec::Rails::HttpStatus::BeStatusStyleChecker < ::RuboCop::Cop::RSpec::Rails::HttpStatus::StyleCheckerBase - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#177 - def offense_range; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#172 - def offensive?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#181 - def prefer; end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#201 - def normalize_str; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#197 - def number; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#193 - def symbol; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#150 -class RuboCop::Cop::RSpec::Rails::HttpStatus::NumericStyleChecker < ::RuboCop::Cop::RSpec::Rails::HttpStatus::StyleCheckerBase - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#151 - def offensive?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#155 - def prefer; end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#165 - def number; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#161 - def symbol; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#60 -RuboCop::Cop::RSpec::Rails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#95 -class RuboCop::Cop::RSpec::Rails::HttpStatus::StyleCheckerBase - # @return [StyleCheckerBase] a new instance of StyleCheckerBase - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#102 - def initialize(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#118 - def allowed_symbol?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#110 - def current; end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#122 - def custom_http_status_code?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#106 - def message; end - - # Returns the value of attribute node. - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#100 - def node; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#114 - def offense_range; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#98 -RuboCop::Cop::RSpec::Rails::HttpStatus::StyleCheckerBase::ALLOWED_STATUSES = T.let(T.unsafe(nil), Array) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#96 -RuboCop::Cop::RSpec::Rails::HttpStatus::StyleCheckerBase::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#129 -class RuboCop::Cop::RSpec::Rails::HttpStatus::SymbolicStyleChecker < ::RuboCop::Cop::RSpec::Rails::HttpStatus::StyleCheckerBase - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#130 - def offensive?; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#134 - def prefer; end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#144 - def number; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/http_status.rb#140 - def symbol; end -end - -# Identifies redundant spec type. -# -# After setting up rspec-rails, you will have enabled -# `config.infer_spec_type_from_file_location!` by default in -# spec/rails_helper.rb. This cop works in conjunction with this config. -# If you disable this config, disable this cop as well. -# -# @example -# # bad -# # spec/models/user_spec.rb -# RSpec.describe User, type: :model do -# end -# -# # good -# # spec/models/user_spec.rb -# RSpec.describe User do -# end -# -# # good -# # spec/models/user_spec.rb -# RSpec.describe User, type: :common do -# end -# @example `Inferences` configuration -# # .rubocop.yml -# # RSpec/Rails/InferredSpecType: -# # Inferences: -# # services: service -# -# # bad -# # spec/services/user_spec.rb -# RSpec.describe User, type: :service do -# end -# -# # good -# # spec/services/user_spec.rb -# RSpec.describe User do -# end -# -# # good -# # spec/services/user_spec.rb -# RSpec.describe User, type: :common do -# end -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#54 -class RuboCop::Cop::RSpec::Rails::InferredSpecType < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # @param node [RuboCop::AST::BlockNode] - # @return [RuboCop::AST::PairNode, nil] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#79 - def describe_with_type(param0 = T.unsafe(nil)); end - - # @param node [RuboCop::AST::BlockNode] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#60 - def on_block(node); end - - # @param node [RuboCop::AST::BlockNode] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#60 - def on_numblock(node); end - - private - - # @param corrector [RuboCop::AST::Corrector] - # @param node [RuboCop::AST::Node] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#91 - def autocorrect(corrector, node); end - - # @param node [RuboCop::AST::PairNode] - # @return [RuboCop::AST::Node] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#111 - def detect_removable_node(node); end - - # @return [String] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#120 - def file_path; end - - # @return [Hash] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#138 - def inferences; end - - # @param node [RuboCop::AST::PairNode] - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#126 - def inferred_type?(node); end - - # @return [Symbol, nil] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#131 - def inferred_type_from_file_path; end - - # @param node [RuboCop::AST::Node] - # @return [Parser::Source::Range] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#97 - def remove_range(node); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/inferred_spec_type.rb#57 -RuboCop::Cop::RSpec::Rails::InferredSpecType::MSG = T.let(T.unsafe(nil), String) - -# Check if using Minitest matchers. -# -# @example -# # bad -# assert_equal(a, b) -# assert_equal a, b, "must be equal" -# refute_equal(a, b) -# -# # good -# expect(b).to eq(a) -# expect(b).to(eq(a), "must be equal") -# expect(b).not_to eq(a) -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#20 -class RuboCop::Cop::RSpec::Rails::MinitestAssertions < ::RuboCop::Cop::RSpec::Base - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#27 - def minitest_assertion(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#31 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#53 - def message(prefer); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#43 - def replacement(node, expected, actual, failure_message); end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#23 -RuboCop::Cop::RSpec::Rails::MinitestAssertions::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/minitest_assertions.rb#24 -RuboCop::Cop::RSpec::Rails::MinitestAssertions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Enforces use of `be_invalid` or `not_to` for negated be_valid. -# -# @example EnforcedStyle: not_to (default) -# # bad -# expect(foo).to be_invalid -# -# # good -# expect(foo).not_to be_valid -# -# # good (with method chain) -# expect(foo).to be_invalid.and be_odd -# @example EnforcedStyle: be_invalid -# # bad -# expect(foo).not_to be_valid -# -# # good -# expect(foo).to be_invalid -# -# # good (with method chain) -# expect(foo).to be_invalid.or be_even -# -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#33 -class RuboCop::Cop::RSpec::Rails::NegationBeValid < ::RuboCop::Cop::RSpec::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - extend ::RuboCop::Cop::AutoCorrector - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#46 - def be_invalid?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#41 - def not_to?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#50 - def on_send(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#75 - def message(_matcher); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#62 - def offense?(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#71 - def offense_range(node); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#90 - def replaced_matcher; end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#81 - def replaced_runner; end -end - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#37 -RuboCop::Cop::RSpec::Rails::NegationBeValid::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/negation_be_valid.rb#38 -RuboCop::Cop::RSpec::Rails::NegationBeValid::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) - -# Prefer to travel in `before` rather than `around`. +# expect(foo) +# .to be_something(<<~TEXT) +# bar +# TEXT # -# @example +# # good +# expect(foo.something?(<<~TEXT)).to be(true) +# bar +# TEXT +# @example Strict: false, EnforcedStyle: explicit # # bad -# around do |example| -# freeze_time do -# example.run -# end -# end +# expect(foo).to be_something # -# # good -# before { freeze_time } +# # good - the above code is rewritten to it by this cop +# expect(foo.something?).to be_truthy # -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#27 -class RuboCop::Cop::RSpec::Rails::TravelAround < ::RuboCop::Cop::RSpec::Base +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#318 +class RuboCop::Cop::RSpec::PredicateMatcher < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + include ::RuboCop::Cop::RSpec::InflectedHelper + include ::RuboCop::Cop::RSpec::ExplicitHelper extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#39 - def extract_run_in_travel(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#48 - def match_around_each?(param0 = T.unsafe(nil)); end - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#55 + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#335 def on_block(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#55 - def on_numblock(node); end - - private - - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#70 - def autocorrect(corrector, node, run_node, around_node); end - - # @param node [RuboCop::AST::BlockNode] - # @return [RuboCop::AST::BlockNode, nil] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#83 - def extract_surrounding_around_block(node); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#326 + def on_send(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#30 -RuboCop::Cop::RSpec::Rails::TravelAround::MSG = T.let(T.unsafe(nil), String) - -# source://rubocop-rspec//lib/rubocop/cop/rspec/rails/travel_around.rb#32 -RuboCop::Cop::RSpec::Rails::TravelAround::TRAVEL_METHOD_NAMES = T.let(T.unsafe(nil), Set) +# source://rubocop-rspec//lib/rubocop/cop/rspec/predicate_matcher.rb#324 +RuboCop::Cop::RSpec::PredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Check for `once` and `twice` receive counts matchers usage. # @@ -5935,6 +5125,75 @@ RuboCop::Cop::RSpec::RedundantAround::MSG = T.let(T.unsafe(nil), String) # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_around.rb#21 RuboCop::Cop::RSpec::RedundantAround::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) +# Checks for redundant predicate matcher. +# +# @example +# # bad +# expect(foo).to be_exist(bar) +# expect(foo).not_to be_include(bar) +# expect(foo).to be_all(bar) +# +# # good +# expect(foo).to exist(bar) +# expect(foo).not_to include(bar) +# expect(foo).to all be(bar) +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#19 +class RuboCop::Cop::RSpec::RedundantPredicateMatcher < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#28 + def on_send(node); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#44 + def message(bad_method, good_method); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#48 + def replaceable_arguments?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#56 + def replaced_method_name(method_name); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#22 +RuboCop::Cop::RSpec::RedundantPredicateMatcher::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/redundant_predicate_matcher.rb#23 +RuboCop::Cop::RSpec::RedundantPredicateMatcher::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Checks that `remove_const` is not used in specs. +# +# @example +# # bad +# it 'does something' do +# Object.send(:remove_const, :SomeConstant) +# end +# +# before do +# SomeClass.send(:remove_const, :SomeConstant) +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#18 +class RuboCop::Cop::RSpec::RemoveConst < ::RuboCop::Cop::RSpec::Base + # Check for offenses + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#31 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#26 + def remove_const(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#21 +RuboCop::Cop::RSpec::RemoveConst::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/remove_const.rb#23 +RuboCop::Cop::RSpec::RemoveConst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Check for repeated description strings in example groups. # # @example @@ -6250,6 +5509,79 @@ end # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_include_example.rb#49 RuboCop::Cop::RSpec::RepeatedIncludeExample::MSG = T.let(T.unsafe(nil), String) +# Checks for repeated calls to subject missing that it is memoized. +# +# @example +# # bad +# it do +# subject +# expect { subject }.to not_change { A.count } +# end +# +# it do +# expect { subject }.to change { A.count } +# expect { subject }.to not_change { A.count } +# end +# +# # good +# it do +# expect { my_method }.to change { A.count } +# expect { my_method }.to not_change { A.count } +# end +# +# # also good +# it do +# expect { subject.a }.to change { A.count } +# expect { subject.b }.to not_change { A.count } +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#32 +class RuboCop::Cop::RSpec::RepeatedSubjectCall < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::TopLevelGroup + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#65 + def on_top_level_group(node); end + + # Find a named or unnamed subject definition + # + # @example anonymous subject + # subject?(parse('subject { foo }').ast) do |name| + # name # => :subject + # end + # @example named subject + # subject?(parse('subject(:thing) { foo }').ast) do |name| + # name # => :thing + # end + # @param node [RuboCop::AST::Node] + # @yield [Symbol] subject name + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#53 + def subject?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#61 + def subject_calls(param0, param1); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#73 + def detect_offense(subject_node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#85 + def detect_offenses_in_block(node, subject_names = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#97 + def detect_offenses_in_example(node, subject_names); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#111 + def detect_subjects_in_scope(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#81 + def expect_block(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/repeated_subject_call.rb#35 +RuboCop::Cop::RSpec::RepeatedSubjectCall::MSG = T.let(T.unsafe(nil), String) + # Checks for consistent style of stub's return setting. # # Enforces either `and_return` or block-style return in the cases @@ -6462,28 +5794,29 @@ RuboCop::Cop::RSpec::ScatteredLet::MSG = T.let(T.unsafe(nil), String) # # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#25 class RuboCop::Cop::RSpec::ScatteredSetup < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::RSpec::FinalEndLocation include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#32 + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#33 def on_block(node); end private - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#75 + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#76 def autocorrect(corrector, first_occurrence, occurrence); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#60 + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#61 def lines_msg(numbers); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#68 + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#69 def message(occurrences, occurrence); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#47 + # source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#48 def repeated_hooks(node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#29 +# source://rubocop-rspec//lib/rubocop/cop/rspec/scattered_setup.rb#30 RuboCop::Cop::RSpec::ScatteredSetup::MSG = T.let(T.unsafe(nil), String) # Checks for proper shared_context and shared_examples usage. @@ -6566,9 +5899,13 @@ RuboCop::Cop::RSpec::SharedContext::MSG_CONTEXT = T.let(T.unsafe(nil), String) # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_context.rb#56 RuboCop::Cop::RSpec::SharedContext::MSG_EXAMPLES = T.let(T.unsafe(nil), String) -# Enforces use of string to titleize shared examples. +# Checks for consistent style for shared example names. # -# @example +# Enforces either `string` or `symbol` for shared example names. +# +# This cop can be configured using the `EnforcedStyle` option +# +# @example `EnforcedStyle: string` (default) # # bad # it_behaves_like :foo_bar_baz # it_should_behave_like :foo_bar_baz @@ -6582,47 +5919,86 @@ RuboCop::Cop::RSpec::SharedContext::MSG_EXAMPLES = T.let(T.unsafe(nil), String) # shared_examples 'foo bar baz' # shared_examples_for 'foo bar baz' # include_examples 'foo bar baz' +# @example `EnforcedStyle: symbol` +# # bad +# it_behaves_like 'foo bar baz' +# it_should_behave_like 'foo bar baz' +# shared_examples 'foo bar baz' +# shared_examples_for 'foo bar baz' +# include_examples 'foo bar baz' +# +# # good +# it_behaves_like :foo_bar_baz +# it_should_behave_like :foo_bar_baz +# shared_examples :foo_bar_baz +# shared_examples_for :foo_bar_baz +# include_examples :foo_bar_baz # -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#23 +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#42 class RuboCop::Cop::RSpec::SharedExamples < ::RuboCop::Cop::RSpec::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#34 + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#54 def on_send(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#27 + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#47 def shared_examples(param0 = T.unsafe(nil)); end + + private + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#75 + def new_checker(ast_node); end + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#67 + def offense?(ast_node); end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#47 -class RuboCop::Cop::RSpec::SharedExamples::Checker - # @return [Checker] a new instance of Checker +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#104 +class RuboCop::Cop::RSpec::SharedExamples::StringChecker + # @return [StringChecker] a new instance of StringChecker # - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#53 + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#110 def initialize(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#57 + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#114 def message; end # Returns the value of attribute node. # - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#51 + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#108 def node; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#61 + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#118 def preferred_style; end +end - private +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#105 +RuboCop::Cop::RSpec::SharedExamples::StringChecker::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#84 +class RuboCop::Cop::RSpec::SharedExamples::SymbolChecker + # @return [SymbolChecker] a new instance of SymbolChecker + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#90 + def initialize(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#94 + def message; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#68 - def symbol; end + # Returns the value of attribute node. + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#88 + def node; end - # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#72 - def wrap_with_single_quotes(string); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#98 + def preferred_style; end end -# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#48 -RuboCop::Cop::RSpec::SharedExamples::Checker::MSG = T.let(T.unsafe(nil), String) +# source://rubocop-rspec//lib/rubocop/cop/rspec/shared_examples.rb#85 +RuboCop::Cop::RSpec::SharedExamples::SymbolChecker::MSG = T.let(T.unsafe(nil), String) # Checks that chains of messages contain more than one element. # @@ -6664,7 +6040,7 @@ class RuboCop::Cop::RSpec::SingleArgumentMessageChain < ::RuboCop::Cop::RSpec::B # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#83 def key_to_arg(node); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#88 + # source://rubocop-rspec//lib/rubocop/cop/rspec/single_argument_message_chain.rb#87 def replacement(method); end # @return [Boolean] @@ -6914,6 +6290,35 @@ end # source://rubocop-rspec//lib/rubocop/cop/rspec/spec_file_path_suffix.rb#24 RuboCop::Cop::RSpec::SpecFilePathSuffix::MSG = T.let(T.unsafe(nil), String) +# Do not use a string as `instance_double` constant. +# +# @example +# # bad +# instance_double('User', name: 'John') +# +# # good +# instance_double(User, name: 'John') +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#20 +class RuboCop::Cop::RSpec::StringAsInstanceDoubleConstant < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#39 + def autocorrect(corrector, node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#31 + def on_send(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#27 + def stringified_instance_double_const?(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#23 +RuboCop::Cop::RSpec::StringAsInstanceDoubleConstant::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec//lib/rubocop/cop/rspec/string_as_instance_double_constant.rb#24 +RuboCop::Cop::RSpec::StringAsInstanceDoubleConstant::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks that message expectations do not have a configured response. # # @example @@ -7012,13 +6417,13 @@ class RuboCop::Cop::RSpec::StubbedMock < ::RuboCop::Cop::RSpec::Base private - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#155 + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#157 def msg(method_name); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#144 + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#146 def on_expectation(expectation, method_name, matcher); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#161 + # source://rubocop-rspec//lib/rubocop/cop/rspec/stubbed_mock.rb#163 def replacement(method_name); end end @@ -7195,6 +6600,66 @@ module RuboCop::Cop::RSpec::TopLevelGroup def top_level_nodes(node); end end +# Description should be descriptive. +# +# If example group or example contains only `execute string`, numbers +# and regular expressions, the description is not clear. +# +# @example +# # bad +# describe `time` do +# # ... +# end +# +# # bad +# context /when foo/ do +# # ... +# end +# +# # bad +# it 10000 do +# # ... +# end +# +# # good +# describe Foo do +# # ... +# end +# +# # good +# describe '#foo' do +# # ... +# end +# +# # good +# context "when #{foo} is bar" do +# # ... +# end +# +# # good +# it 'does something' do +# # ... +# end +# +# source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#47 +class RuboCop::Cop::RSpec::UndescriptiveLiteralsDescription < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#51 + def example_groups_or_example?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#55 + def on_block(node); end + + private + + # @return [Boolean] + # + # source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#63 + def offense?(node); end +end + +# source://rubocop-rspec//lib/rubocop/cop/rspec/undescriptive_literals_description.rb#48 +RuboCop::Cop::RSpec::UndescriptiveLiteralsDescription::MSG = T.let(T.unsafe(nil), String) + # Checks for a specified error in checking raised errors. # # Enforces one of an Exception type, a string, or a regular @@ -7224,29 +6689,27 @@ end # # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#33 class RuboCop::Cop::RSpec::UnspecifiedException < ::RuboCop::Cop::RSpec::Base - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#38 - def empty_raise_error_or_exception(param0 = T.unsafe(nil)); end + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#42 + def expect_to?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#47 + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#46 def on_send(node); end private # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#59 - def block_with_args?(node); end - - # @return [Boolean] - # - # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#55 + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#54 def empty_exception_matcher?(node); end + + # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#64 + def find_expect_to(node); end end # source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#34 RuboCop::Cop::RSpec::UnspecifiedException::MSG = T.let(T.unsafe(nil), String) -# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#35 +# source://rubocop-rspec//lib/rubocop/cop/rspec/unspecified_exception.rb#36 RuboCop::Cop::RSpec::UnspecifiedException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Helps check offenses with variable definitions @@ -7567,24 +7030,6 @@ end # source://rubocop-rspec//lib/rubocop/cop/rspec/yield.rb#19 RuboCop::Cop::RSpec::Yield::MSG = T.let(T.unsafe(nil), String) -module RuboCop::Cop::Style; end - -class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base - include ::RuboCop::Cop::ConfigurableEnforcedStyle - include ::RuboCop::Cop::RangeHelp - - # source://rubocop/1.57.2/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 - def on_csend(node); end - - # source://rubocop/1.57.2/lib/rubocop/cop/style/trailing_comma_in_arguments.rb#95 - def on_send(node); end - - class << self - # source://rubocop-rspec//lib/rubocop-rspec.rb#60 - def autocorrect_incompatible_with; end - end -end - # RuboCop RSpec project namespace # # source://rubocop-rspec//lib/rubocop/rspec.rb#5 @@ -7646,34 +7091,33 @@ RuboCop::RSpec::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname) class RuboCop::RSpec::Concept include ::RuboCop::RSpec::Language extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::RSpec::Language::NodePattern # @return [Concept] a new instance of Concept # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#11 + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#10 def initialize(node); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#15 + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#14 def ==(other); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#15 + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#14 def eql?(other); end - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#21 + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#20 def hash; end - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#25 + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#24 def to_node; end protected # Returns the value of attribute node. # - # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#31 + # source://rubocop-rspec//lib/rubocop/rspec/concept.rb#30 def node; end end @@ -7859,218 +7303,183 @@ end # In addition to providing useful matchers, this class is responsible for # using the configured aliases. # -# source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#5 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#14 module RuboCop::RSpec::Language extend ::RuboCop::AST::NodePattern::Macros - extend ::RuboCop::RSpec::Language::NodePattern - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#50 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#49 def example?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#29 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#28 def example_group?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#45 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#44 def example_group_with_body?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#26 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#25 def explicit_rspec?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#53 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#52 def hook?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#69 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#68 def include?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#61 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#60 def let?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#23 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#22 def rspec?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#34 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#33 def shared_group?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#38 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#37 def spec_group?(param0 = T.unsafe(nil)); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#77 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#76 def subject?(param0 = T.unsafe(nil)); end class << self # Returns the value of attribute config. # - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#19 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#18 def config; end # Sets the attribute config # # @param value the value to set the attribute config to. # - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#19 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#18 def config=(_arg0); end end end # This is used in Dialect and DescribeClass cops to detect RSpec blocks. # -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#205 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#204 module RuboCop::RSpec::Language::ALL class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#206 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#205 def all(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#79 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#78 module RuboCop::RSpec::Language::ExampleGroups class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#81 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#80 def all(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#91 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#90 def focused(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#87 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#86 def regular(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#95 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#94 def skipped(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#101 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#100 module RuboCop::RSpec::Language::Examples class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#103 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#102 def all(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#114 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#113 def focused(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#122 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#121 def pending(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#110 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#109 def regular(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#118 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#117 def skipped(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#128 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#127 module RuboCop::RSpec::Language::Expectations class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#129 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#128 def all(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#134 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#133 module RuboCop::RSpec::Language::Helpers class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#135 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#134 def all(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#146 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#145 module RuboCop::RSpec::Language::HookScopes class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#148 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#147 def all(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#147 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#146 RuboCop::RSpec::Language::HookScopes::ALL = T.let(T.unsafe(nil), Array) -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#140 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#139 module RuboCop::RSpec::Language::Hooks class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#141 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#140 def all(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#153 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#152 module RuboCop::RSpec::Language::Includes class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#155 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#154 def all(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#164 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#163 def context(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#160 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#159 def examples(element); end end end -# Helper methods to detect RSpec DSL used with send and block -# -# @deprecated Prefer using Node Pattern directly -# Use `'(block (send nil? #Example.all ...) ...)'` instead of -# `block_pattern('#Example.all')` -# -# source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#10 -module RuboCop::RSpec::Language::NodePattern - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#30 - def block_or_numblock_pattern(string); end - - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#18 - def block_pattern(string); end - - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#24 - def numblock_pattern(string); end - - # @deprecated Prefer using Node Pattern directly - # - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#12 - def send_pattern(string); end - - private - - # source://rubocop-rspec//lib/rubocop/rspec/language/node_pattern.rb#37 - def deprecation_warning(method); end -end - -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#170 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#169 module RuboCop::RSpec::Language::Runners class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#173 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#172 def all(element = T.unsafe(nil)); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#171 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#170 RuboCop::RSpec::Language::Runners::ALL = T.let(T.unsafe(nil), Array) -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#181 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#180 module RuboCop::RSpec::Language::SharedGroups class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#183 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#182 def all(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#192 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#191 def context(element); end - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#188 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#187 def examples(element); end end end -# source://rubocop-rspec//lib/rubocop/rspec/language.rb#198 +# source://rubocop-rspec//lib/rubocop/rspec/language.rb#197 module RuboCop::RSpec::Language::Subjects class << self - # source://rubocop-rspec//lib/rubocop/rspec/language.rb#199 + # source://rubocop-rspec//lib/rubocop/rspec/language.rb#198 def all(element); end end end @@ -8105,56 +7514,56 @@ RuboCop::RSpec::Version::STRING = T.let(T.unsafe(nil), String) class RuboCop::RSpec::Wording # @return [Wording] a new instance of Wording # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#12 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#14 def initialize(text, ignore:, replace:); end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#18 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#21 def rewrite; end private - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#72 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#80 def append_suffix(word, suffix); end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#57 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#65 def ignored_word?(word); end # Returns the value of attribute ignores. # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#31 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 def ignores; end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#43 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#51 def remove_should_and_pluralize; end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#33 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#41 def replace_prefix(pattern, replacement); end # Returns the value of attribute replacements. # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#31 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 def replacements; end - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#61 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#69 def substitute(word); end # Returns the value of attribute text. # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#31 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 def text; end # @return [Boolean] # - # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#39 + # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#47 def uppercase?(word); end end -# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#9 +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#11 RuboCop::RSpec::Wording::ES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) -# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#10 +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#12 RuboCop::RSpec::Wording::IES_SUFFIX_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#8 @@ -8162,3 +7571,9 @@ RuboCop::RSpec::Wording::SHOULDNT_BE_PREFIX = T.let(T.unsafe(nil), Regexp) # source://rubocop-rspec//lib/rubocop/rspec/wording.rb#7 RuboCop::RSpec::Wording::SHOULDNT_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#9 +RuboCop::RSpec::Wording::WILL_NOT_PREFIX = T.let(T.unsafe(nil), Regexp) + +# source://rubocop-rspec//lib/rubocop/rspec/wording.rb#10 +RuboCop::RSpec::Wording::WONT_PREFIX = T.let(T.unsafe(nil), Regexp) diff --git a/sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi b/sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi new file mode 100644 index 000000000..b3b3cae30 --- /dev/null +++ b/sorbet/rbi/gems/rubocop-rspec_rails@2.30.0.rbi @@ -0,0 +1,911 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `rubocop-rspec_rails` gem. +# Please instead update this file by running `bin/tapioca gem rubocop-rspec_rails`. + + +# FIXME: This is a workaround for the following issue: +# https://github.com/rubocop/rubocop-rspec_rails/issues/8 +# +# source://rubocop-rspec_rails//lib/rubocop/rspec_rails/version.rb#3 +module RuboCop; end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb#4 +module RuboCop::Cop; end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb#5 +module RuboCop::Cop::RSpecRails; end + +# Checks that tests use RSpec `before` hook over Rails `setup` method. +# +# @example +# # bad +# setup do +# allow(foo).to receive(:bar) +# end +# +# # good +# before do +# allow(foo).to receive(:bar) +# end +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb#19 +class RuboCop::Cop::RSpecRails::AvoidSetupHook < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb#31 + def on_block(node); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb#25 + def setup_call(param0 = T.unsafe(nil)); end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/avoid_setup_hook.rb#22 +RuboCop::Cop::RSpecRails::AvoidSetupHook::MSG = T.let(T.unsafe(nil), String) + +# Checks that tests use `have_http_status` instead of equality matchers. +# +# @example ResponseMethods: ['response', 'last_response'] (default) +# # bad +# expect(response.status).to be(200) +# expect(last_response.code).to eq("200") +# +# # good +# expect(response).to have_http_status(200) +# expect(last_response).to have_http_status(200) +# @example ResponseMethods: ['foo_response'] +# # bad +# expect(foo_response.status).to be(200) +# +# # good +# expect(foo_response).to have_http_status(200) +# +# # also good +# expect(response).to have_http_status(200) +# expect(last_response).to have_http_status(200) +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#28 +class RuboCop::Cop::RSpecRails::HaveHttpStatus < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#39 + def match_status(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#49 + def on_send(node); end + + private + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#71 + def response_methods; end + + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#67 + def response_methods?(name); end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#31 +RuboCop::Cop::RSpecRails::HaveHttpStatus::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#36 +RuboCop::Cop::RSpecRails::HaveHttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Set) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/have_http_status.rb#35 +RuboCop::Cop::RSpecRails::HaveHttpStatus::RUNNERS = T.let(T.unsafe(nil), Set) + +# Enforces use of symbolic or numeric value to describe HTTP status. +# +# This cop inspects only `have_http_status` calls. +# So, this cop does not check if a method starting with `be_*` is used +# when setting for `EnforcedStyle: symbolic` or +# `EnforcedStyle: numeric`. +# +# @example `EnforcedStyle: symbolic` (default) +# # bad +# it { is_expected.to have_http_status 200 } +# it { is_expected.to have_http_status 404 } +# it { is_expected.to have_http_status "403" } +# +# # good +# it { is_expected.to have_http_status :ok } +# it { is_expected.to have_http_status :not_found } +# it { is_expected.to have_http_status :forbidden } +# it { is_expected.to have_http_status :success } +# it { is_expected.to have_http_status :error } +# @example `EnforcedStyle: numeric` +# # bad +# it { is_expected.to have_http_status :ok } +# it { is_expected.to have_http_status :not_found } +# it { is_expected.to have_http_status "forbidden" } +# +# # good +# it { is_expected.to have_http_status 200 } +# it { is_expected.to have_http_status 404 } +# it { is_expected.to have_http_status 403 } +# it { is_expected.to have_http_status :success } +# it { is_expected.to have_http_status :error } +# @example `EnforcedStyle: be_status` +# # bad +# it { is_expected.to have_http_status :ok } +# it { is_expected.to have_http_status :not_found } +# it { is_expected.to have_http_status "forbidden" } +# it { is_expected.to have_http_status 200 } +# it { is_expected.to have_http_status 404 } +# it { is_expected.to have_http_status "403" } +# +# # good +# it { is_expected.to be_ok } +# it { is_expected.to be_not_found } +# it { is_expected.to have_http_status :success } +# it { is_expected.to have_http_status :error } +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#60 +class RuboCop::Cop::RSpecRails::HttpStatus < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#66 + def http_status(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#70 + def on_send(node); end + + private + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#88 + def checker_class; end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#176 +class RuboCop::Cop::RSpecRails::HttpStatus::BeStatusStyleChecker < ::RuboCop::Cop::RSpecRails::HttpStatus::StyleCheckerBase + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#182 + def offense_range; end + + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#177 + def offensive?; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#186 + def prefer; end + + private + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#206 + def normalize_str; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#202 + def number; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#198 + def symbol; end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#155 +class RuboCop::Cop::RSpecRails::HttpStatus::NumericStyleChecker < ::RuboCop::Cop::RSpecRails::HttpStatus::StyleCheckerBase + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#156 + def offensive?; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#160 + def prefer; end + + private + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#170 + def number; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#166 + def symbol; end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#63 +RuboCop::Cop::RSpecRails::HttpStatus::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#100 +class RuboCop::Cop::RSpecRails::HttpStatus::StyleCheckerBase + # @return [StyleCheckerBase] a new instance of StyleCheckerBase + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#107 + def initialize(node); end + + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#123 + def allowed_symbol?; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#115 + def current; end + + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#127 + def custom_http_status_code?; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#111 + def message; end + + # Returns the value of attribute node. + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#105 + def node; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#119 + def offense_range; end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#103 +RuboCop::Cop::RSpecRails::HttpStatus::StyleCheckerBase::ALLOWED_STATUSES = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#101 +RuboCop::Cop::RSpecRails::HttpStatus::StyleCheckerBase::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#134 +class RuboCop::Cop::RSpecRails::HttpStatus::SymbolicStyleChecker < ::RuboCop::Cop::RSpecRails::HttpStatus::StyleCheckerBase + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#135 + def offensive?; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#139 + def prefer; end + + private + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#149 + def number; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/http_status.rb#145 + def symbol; end +end + +# Identifies redundant spec type. +# +# After setting up rspec-rails, you will have enabled +# `config.infer_spec_type_from_file_location!` by default in +# spec/rails_helper.rb. This cop works in conjunction with this config. +# If you disable this config, disable this cop as well. +# +# @example +# # bad +# # spec/models/user_spec.rb +# RSpec.describe User, type: :model do +# end +# +# # good +# # spec/models/user_spec.rb +# RSpec.describe User do +# end +# +# # good +# # spec/models/user_spec.rb +# RSpec.describe User, type: :common do +# end +# @example `Inferences` configuration +# # .rubocop.yml +# # RSpecRails/InferredSpecType: +# # Inferences: +# # services: service +# +# # bad +# # spec/services/user_spec.rb +# RSpec.describe User, type: :service do +# end +# +# # good +# # spec/services/user_spec.rb +# RSpec.describe User do +# end +# +# # good +# # spec/services/user_spec.rb +# RSpec.describe User, type: :common do +# end +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#53 +class RuboCop::Cop::RSpecRails::InferredSpecType < ::RuboCop::Cop::RSpec::Base + extend ::RuboCop::Cop::AutoCorrector + + # @param node [RuboCop::AST::BlockNode] + # @return [RuboCop::AST::PairNode, nil] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#78 + def describe_with_type(param0 = T.unsafe(nil)); end + + # @param node [RuboCop::AST::BlockNode] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#59 + def on_block(node); end + + # @param node [RuboCop::AST::BlockNode] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#59 + def on_numblock(node); end + + private + + # @param corrector [RuboCop::AST::Corrector] + # @param node [RuboCop::AST::Node] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#90 + def autocorrect(corrector, node); end + + # @param node [RuboCop::AST::PairNode] + # @return [RuboCop::AST::Node] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#110 + def detect_removable_node(node); end + + # @return [String] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#119 + def file_path; end + + # @return [Hash] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#137 + def inferences; end + + # @param node [RuboCop::AST::PairNode] + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#125 + def inferred_type?(node); end + + # @return [Symbol, nil] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#130 + def inferred_type_from_file_path; end + + # @param node [RuboCop::AST::Node] + # @return [Parser::Source::Range] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#96 + def remove_range(node); end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/inferred_spec_type.rb#56 +RuboCop::Cop::RSpecRails::InferredSpecType::MSG = T.let(T.unsafe(nil), String) + +# Check if using Minitest-like matchers. +# +# Check the use of minitest-like matchers +# starting with `assert_` or `refute_`. +# +# @example +# # bad +# assert_equal(a, b) +# assert_equal a, b, "must be equal" +# assert_not_includes a, b +# refute_equal(a, b) +# assert_nil a +# refute_empty(b) +# assert_true(a) +# assert_false(a) +# +# # good +# expect(b).to eq(a) +# expect(b).to(eq(a), "must be equal") +# expect(a).not_to include(b) +# expect(b).not_to eq(a) +# expect(a).to eq(nil) +# expect(a).not_to be_empty +# expect(a).to be(true) +# expect(a).to be(false) +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#32 +class RuboCop::Cop::RSpecRails::MinitestAssertions < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#344 + def message(preferred); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#337 + def on_assertion(node, assertion); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#325 + def on_send(node); end +end + +# TODO: replace with `BasicAssertion.subclasses` in Ruby 3.1+ +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#317 +RuboCop::Cop::RSpecRails::MinitestAssertions::ASSERTION_MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#36 +class RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + extend ::RuboCop::AST::NodePattern::Macros + + # @return [BasicAssertion] a new instance of BasicAssertion + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#45 + def initialize(expected, actual, failure_message); end + + # Returns the value of attribute actual. + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#39 + def actual; end + + # @raise [NotImplementedError] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#64 + def assertion; end + + # Returns the value of attribute expected. + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#39 + def expected; end + + # Returns the value of attribute failure_message. + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#39 + def failure_message; end + + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#60 + def negated?(node); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#51 + def replaced(node); end + + class << self + # @raise [NotImplementedError] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#41 + def minitest_assertion; end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#253 +class RuboCop::Cop::RSpecRails::MinitestAssertions::EmptyAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#269 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#265 + def match(actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#261 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#254 +RuboCop::Cop::RSpecRails::MinitestAssertions::EmptyAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#70 +class RuboCop::Cop::RSpecRails::MinitestAssertions::EqualAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#86 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#82 + def match(expected, actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#78 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#71 +RuboCop::Cop::RSpecRails::MinitestAssertions::EqualAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#295 +class RuboCop::Cop::RSpecRails::MinitestAssertions::FalseAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#309 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#305 + def match(actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#301 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#296 +RuboCop::Cop::RSpecRails::MinitestAssertions::FalseAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#158 +class RuboCop::Cop::RSpecRails::MinitestAssertions::InDeltaAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # @return [InDeltaAssertion] a new instance of InDeltaAssertion + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#174 + def initialize(expected, actual, delta, fail_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#180 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#170 + def match(expected, actual, delta, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#166 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#159 +RuboCop::Cop::RSpecRails::MinitestAssertions::InDeltaAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#136 +class RuboCop::Cop::RSpecRails::MinitestAssertions::IncludesAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#152 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#148 + def match(collection, expected, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#144 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#137 +RuboCop::Cop::RSpecRails::MinitestAssertions::IncludesAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#114 +class RuboCop::Cop::RSpecRails::MinitestAssertions::InstanceOfAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#130 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#126 + def match(expected, actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#122 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#115 +RuboCop::Cop::RSpecRails::MinitestAssertions::InstanceOfAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#92 +class RuboCop::Cop::RSpecRails::MinitestAssertions::KindOfAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#108 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#104 + def match(expected, actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#100 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#93 +RuboCop::Cop::RSpecRails::MinitestAssertions::KindOfAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#314 +RuboCop::Cop::RSpecRails::MinitestAssertions::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#210 +class RuboCop::Cop::RSpecRails::MinitestAssertions::MatchAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#225 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#221 + def match(matcher, actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#217 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#211 +RuboCop::Cop::RSpecRails::MinitestAssertions::MatchAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#231 +class RuboCop::Cop::RSpecRails::MinitestAssertions::NilAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#247 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#243 + def match(actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#239 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#232 +RuboCop::Cop::RSpecRails::MinitestAssertions::NilAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#186 +class RuboCop::Cop::RSpecRails::MinitestAssertions::PredicateAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#204 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#198 + def match(subject, predicate, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#194 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#187 +RuboCop::Cop::RSpecRails::MinitestAssertions::PredicateAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#323 +RuboCop::Cop::RSpecRails::MinitestAssertions::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#275 +class RuboCop::Cop::RSpecRails::MinitestAssertions::TrueAssertion < ::RuboCop::Cop::RSpecRails::MinitestAssertions::BasicAssertion + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#289 + def assertion; end + + class << self + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#285 + def match(actual, failure_message); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#281 + def minitest_assertion(param0 = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/minitest_assertions.rb#276 +RuboCop::Cop::RSpecRails::MinitestAssertions::TrueAssertion::MATCHERS = T.let(T.unsafe(nil), Array) + +# Enforces use of `be_invalid` or `not_to` for negated be_valid. +# +# @example EnforcedStyle: not_to (default) +# # bad +# expect(foo).to be_invalid +# +# # good +# expect(foo).not_to be_valid +# +# # good (with method chain) +# expect(foo).to be_invalid.and be_odd +# @example EnforcedStyle: be_invalid +# # bad +# expect(foo).not_to be_valid +# +# # good +# expect(foo).to be_invalid +# +# # good (with method chain) +# expect(foo).to be_invalid.or be_even +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#32 +class RuboCop::Cop::RSpecRails::NegationBeValid < ::RuboCop::Cop::Base + include ::RuboCop::Cop::ConfigurableEnforcedStyle + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#45 + def be_invalid?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#40 + def not_to?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#49 + def on_send(node); end + + private + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#74 + def message(_matcher); end + + # @return [Boolean] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#61 + def offense?(node); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#70 + def offense_range(node); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#87 + def replaced_matcher; end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#78 + def replaced_runner; end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#36 +RuboCop::Cop::RSpecRails::NegationBeValid::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/negation_be_valid.rb#37 +RuboCop::Cop::RSpecRails::NegationBeValid::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + +# Prefer to travel in `before` rather than `around`. +# +# @example +# # bad +# around do |example| +# freeze_time do +# example.run +# end +# end +# +# # good +# before { freeze_time } +# +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#26 +class RuboCop::Cop::RSpecRails::TravelAround < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#38 + def extract_run_in_travel(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#47 + def match_around_each?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#54 + def on_block(node); end + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#54 + def on_numblock(node); end + + private + + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#69 + def autocorrect(corrector, node, run_node, around_node); end + + # @param node [RuboCop::AST::BlockNode] + # @return [RuboCop::AST::BlockNode, nil] + # + # source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#82 + def extract_surrounding_around_block(node); end +end + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#29 +RuboCop::Cop::RSpecRails::TravelAround::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop-rspec_rails//lib/rubocop/cop/rspec_rails/travel_around.rb#31 +RuboCop::Cop::RSpecRails::TravelAround::TRAVEL_METHOD_NAMES = T.let(T.unsafe(nil), Set) + +# source://rubocop-rspec_rails//lib/rubocop-rspec_rails.rb#21 +class RuboCop::Cop::Registry + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#51 + def initialize(cops = T.unsafe(nil), options = T.unsafe(nil)); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#232 + def ==(other); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#97 + def contains_cop_matching?(names); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#179 + def cops; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#224 + def cops_for_department(department); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#93 + def department?(name); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#147 + def department_missing?(badge, name); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#72 + def departments; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#193 + def disabled(config); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#67 + def dismiss(cop); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#247 + def each(&block); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#189 + def enabled(config); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#197 + def enabled?(cop, config); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#213 + def enabled_pending_cop?(cop_cfg, config); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#63 + def enlist(cop); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#253 + def find_by_cop_name(cop_name); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#260 + def find_cops_by_directive(directive); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#265 + def freeze; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#184 + def length; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#220 + def names; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#228 + def names_for_department(department); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#49 + def options; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#151 + def print_warning(name, path); end + + # source://rubocop-rspec_rails//lib/rubocop-rspec_rails.rb#23 + def qualified_cop_name(name, path, warn: T.unsafe(nil)); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#166 + def qualify_badge(badge); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#243 + def select(&block); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#236 + def sort!; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#174 + def to_h; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#159 + def unqualified_cop_names; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#78 + def with_department(department); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#84 + def without_department(department); end + + private + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#283 + def clear_enrollment_queue; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#279 + def initialize_copy(reg); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#309 + def registered?(badge); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#299 + def resolve_badge(given_badge, real_badge, source_path); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#295 + def with(cops); end + + class << self + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#22 + def all; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#274 + def global; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#44 + def qualified_cop?(name); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#26 + def qualified_cop_name(name, origin); end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#40 + def reset!; end + + # source://rubocop/1.65.0/lib/rubocop/cop/registry.rb#32 + def with_temporary_global(temp_global = T.unsafe(nil)); end + end +end + +# source://rubocop-rspec_rails//lib/rubocop/rspec_rails/version.rb#4 +module RuboCop::RSpecRails; end + +# Version information for the RSpec Rails RuboCop plugin. +# +# source://rubocop-rspec_rails//lib/rubocop/rspec_rails/version.rb#6 +module RuboCop::RSpecRails::Version; end + +# source://rubocop-rspec_rails//lib/rubocop/rspec_rails/version.rb#7 +RuboCop::RSpecRails::Version::STRING = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/rubocop@1.57.2.rbi b/sorbet/rbi/gems/rubocop@1.65.0.rbi similarity index 94% rename from sorbet/rbi/gems/rubocop@1.57.2.rbi rename to sorbet/rbi/gems/rubocop@1.65.0.rbi index 713b62b8a..a234caab0 100644 --- a/sorbet/rbi/gems/rubocop@1.57.2.rbi +++ b/sorbet/rbi/gems/rubocop@1.65.0.rbi @@ -4,6 +4,7 @@ # 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 @@ -97,41 +98,44 @@ class RuboCop::CLI private - # source://rubocop//lib/rubocop/cli.rb#152 + # source://rubocop//lib/rubocop/cli.rb#156 def act_on_options; end - # source://rubocop//lib/rubocop/cli.rb#189 + # source://rubocop//lib/rubocop/cli.rb#198 def apply_default_formatter; end - # source://rubocop//lib/rubocop/cli.rb#121 + # 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#178 + # source://rubocop//lib/rubocop/cli.rb#187 def handle_exiting_options; end - # source://rubocop//lib/rubocop/cli.rb#140 + # source://rubocop//lib/rubocop/cli.rb#144 def parallel_by_default!; end - # source://rubocop//lib/rubocop/cli.rb#76 + # source://rubocop//lib/rubocop/cli.rb#80 def profile_if_needed; end - # source://rubocop//lib/rubocop/cli.rb#109 + # source://rubocop//lib/rubocop/cli.rb#113 def require_gem(name); end - # source://rubocop//lib/rubocop/cli.rb#117 + # source://rubocop//lib/rubocop/cli.rb#121 def run_command(name); end - # source://rubocop//lib/rubocop/cli.rb#169 + # source://rubocop//lib/rubocop/cli.rb#174 def set_options_to_config_loader; end - # source://rubocop//lib/rubocop/cli.rb#129 + # source://rubocop//lib/rubocop/cli.rb#133 def suggest_extensions; end # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/cli.rb#133 + # source://rubocop//lib/rubocop/cli.rb#137 def validate_options_vs_config; end end @@ -166,77 +170,83 @@ end class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#22 + # 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#98 + # 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#106 + # 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#102 + # 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#127 + # 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#60 + # 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#48 + # 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#56 + # 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#31 + # 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#153 + # 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#162 def options_config_in_root?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#64 + # 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#144 + # 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#91 + # 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#82 + # 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 @@ -245,23 +255,23 @@ class RuboCop::CLI::Command::AutoGenerateConfig < ::RuboCop::CLI::Command::Base # # @api private # - # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#71 + # 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#52 + # 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#43 + # 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#133 + # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#142 def write_config_file(file_name, file_string, rubocop_yml_contents); end end @@ -288,7 +298,12 @@ RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_OVERRIDDEN = T.let(T.unsafe(n # @api private # # source://rubocop//lib/rubocop/cli/command/auto_generate_config.rb#20 -RuboCop::CLI::Command::AutoGenerateConfig::PHASE_1_SKIPPED = T.let(T.unsafe(nil), String) +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 # @@ -426,7 +441,7 @@ RuboCop::CLI::Command::InitDotfile::DOTFILE = T.let(T.unsafe(nil), String) # @api private # # source://rubocop//lib/rubocop/cli/command/lsp.rb#10 -class RuboCop::CLI::Command::Lsp < ::RuboCop::CLI::Command::Base +class RuboCop::CLI::Command::LSP < ::RuboCop::CLI::Command::Base # @api private # # source://rubocop//lib/rubocop/cli/command/lsp.rb#13 @@ -730,6 +745,11 @@ class RuboCop::CachedData # source://rubocop//lib/rubocop/cached_data.rb#47 def deserialize_offenses(offenses); end + # @api private + # + # source://rubocop//lib/rubocop/cached_data.rb#56 + def location_from_source_buffer(offense, source_buffer); end + # @api private # # source://rubocop//lib/rubocop/cached_data.rb#40 @@ -946,7 +966,7 @@ end # during a run of the rubocop program, if files in several # directories are inspected. # -# source://rubocop//lib/rubocop/config.rb#14 +# source://rubocop//lib/rubocop/config.rb#12 class RuboCop::Config include ::RuboCop::PathUtil include ::RuboCop::FileFinder @@ -954,7 +974,7 @@ class RuboCop::Config # @return [Config] a new instance of Config # - # source://rubocop//lib/rubocop/config.rb#32 + # source://rubocop//lib/rubocop/config.rb#30 def initialize(hash = T.unsafe(nil), loaded_path = T.unsafe(nil)); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -965,15 +985,15 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#172 + # source://rubocop//lib/rubocop/config.rb#170 def active_support_extensions_enabled?; end - # source://rubocop//lib/rubocop/config.rb#98 + # source://rubocop//lib/rubocop/config.rb#96 def add_excludes_from_higher_level(highest_config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#195 + # source://rubocop//lib/rubocop/config.rb#193 def allowed_camel_case_file?(file); end # Paths specified in configuration files starting with .rubocop are @@ -982,25 +1002,27 @@ class RuboCop::Config # config/default.yml, for example, are not relative to RuboCop's config # directory since that wouldn't work. # - # source://rubocop//lib/rubocop/config.rb#239 + # source://rubocop//lib/rubocop/config.rb#237 def base_dir_for_path_parameters; end - # source://rubocop//lib/rubocop/config.rb#264 + # @return [String, nil] + # + # source://rubocop//lib/rubocop/config.rb#267 def bundler_lock_file_path; end - # source://rubocop//lib/rubocop/config.rb#53 + # source://rubocop//lib/rubocop/config.rb#51 def check; end # @api private # @return [Boolean] whether config for this badge has 'Include' or 'Exclude' keys # - # source://rubocop//lib/rubocop/config.rb#144 + # source://rubocop//lib/rubocop/config.rb#142 def clusivity_config_for_badge?(badge); end # source://forwardable/1.3.3/forwardable.rb#231 def delete(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#110 + # source://rubocop//lib/rubocop/config.rb#108 def deprecation_check; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1008,7 +1030,7 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#164 + # source://rubocop//lib/rubocop/config.rb#162 def disabled_new_cops?; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1019,7 +1041,7 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#168 + # source://rubocop//lib/rubocop/config.rb#166 def enabled_new_cops?; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1027,22 +1049,22 @@ class RuboCop::Config # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#217 + # source://rubocop//lib/rubocop/config.rb#215 def file_to_exclude?(file); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#176 + # source://rubocop//lib/rubocop/config.rb#174 def file_to_include?(file); end - # source://rubocop//lib/rubocop/config.rb#160 + # source://rubocop//lib/rubocop/config.rb#158 def for_all_cops; end # Note: the 'Enabled' attribute is same as that returned by `for_cop` # # @return [Config] for the given cop merged with that of its department (if any) # - # source://rubocop//lib/rubocop/config.rb#130 + # source://rubocop//lib/rubocop/config.rb#128 def for_badge(badge); end # Note: the 'Enabled' attribute is calculated according to the department's @@ -1050,7 +1072,7 @@ class RuboCop::Config # # @return [Config] for the given cop / cop name. # - # source://rubocop//lib/rubocop/config.rb#124 + # source://rubocop//lib/rubocop/config.rb#122 def for_cop(cop); end # Note: the 'Enabled' attribute will be present only if specified @@ -1058,17 +1080,22 @@ class RuboCop::Config # # @return [Config] for the given department name. # - # source://rubocop//lib/rubocop/config.rb#155 + # source://rubocop//lib/rubocop/config.rb#153 def for_department(department_name); end - # source://rubocop//lib/rubocop/config.rb#287 + # Returns target's locked gem versions (i.e. from Gemfile.lock or gems.locked) + # + # source://rubocop//lib/rubocop/config.rb#292 + def gem_versions_in_target; end + + # source://rubocop//lib/rubocop/config.rb#296 def inspect; end # True if this is a config file that is shipped with RuboCop # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#78 + # source://rubocop//lib/rubocop/config.rb#76 def internal?; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1077,15 +1104,15 @@ class RuboCop::Config # source://forwardable/1.3.3/forwardable.rb#231 def keys(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#49 + # source://rubocop//lib/rubocop/config.rb#47 def loaded_features; end # Returns the value of attribute loaded_path. # - # source://rubocop//lib/rubocop/config.rb#22 + # source://rubocop//lib/rubocop/config.rb#20 def loaded_path; end - # source://rubocop//lib/rubocop/config.rb#83 + # source://rubocop//lib/rubocop/config.rb#81 def make_excludes_absolute; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1094,16 +1121,19 @@ class RuboCop::Config # source://forwardable/1.3.3/forwardable.rb#231 def merge(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#230 + # source://rubocop//lib/rubocop/config.rb#247 + def parser_engine; end + + # source://rubocop//lib/rubocop/config.rb#228 def path_relative_to_config(path); end - # source://rubocop//lib/rubocop/config.rb#226 + # source://rubocop//lib/rubocop/config.rb#224 def patterns_to_exclude; end - # source://rubocop//lib/rubocop/config.rb#222 + # source://rubocop//lib/rubocop/config.rb#220 def patterns_to_include; end - # source://rubocop//lib/rubocop/config.rb#275 + # source://rubocop//lib/rubocop/config.rb#278 def pending_cops; end # Returns true if there's a chance that an Include pattern matches hidden @@ -1111,19 +1141,19 @@ class RuboCop::Config # # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#209 + # source://rubocop//lib/rubocop/config.rb#207 def possibly_include_hidden?; end # source://forwardable/1.3.3/forwardable.rb#231 def replace(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#73 + # source://rubocop//lib/rubocop/config.rb#71 def signature; end - # source://rubocop//lib/rubocop/config.rb#260 + # source://rubocop//lib/rubocop/config.rb#262 def smart_loaded_path; end - # source://rubocop//lib/rubocop/config.rb#249 + # source://rubocop//lib/rubocop/config.rb#251 def target_rails_version; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1135,7 +1165,7 @@ class RuboCop::Config # source://forwardable/1.3.3/forwardable.rb#231 def to_hash(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#69 + # source://rubocop//lib/rubocop/config.rb#67 def to_s; end # source://forwardable/1.3.3/forwardable.rb#231 @@ -1144,32 +1174,45 @@ class RuboCop::Config # source://forwardable/1.3.3/forwardable.rb#231 def validate(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config.rb#60 + # source://rubocop//lib/rubocop/config.rb#58 def validate_after_resolution; end private - # source://rubocop//lib/rubocop/config.rb#322 + # source://rubocop//lib/rubocop/config.rb#346 def department_of(qualified_cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config.rb#310 + # source://rubocop//lib/rubocop/config.rb#334 def enable_cop?(qualified_cop_name, cop_options); end - # source://rubocop//lib/rubocop/config.rb#297 + # @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#321 + def gem_version_to_major_minor_float(gem_version); end + + # source://rubocop//lib/rubocop/config.rb#327 + 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#308 def read_rails_version_from_bundler_lock_file; end - # source://rubocop//lib/rubocop/config.rb#293 + # @return [Float, nil] The Rails version as a `major.minor` Float. + # + # source://rubocop//lib/rubocop/config.rb#303 def target_rails_version_from_bundler_lock_file; end class << self - # source://rubocop//lib/rubocop/config.rb#24 + # source://rubocop//lib/rubocop/config.rb#22 def create(hash, path, check: T.unsafe(nil)); end end end -# source://rubocop//lib/rubocop/config.rb#19 +# source://rubocop//lib/rubocop/config.rb#17 class RuboCop::Config::CopConfig < ::Struct # Returns the value of attribute metadata # @@ -1202,7 +1245,7 @@ class RuboCop::Config::CopConfig < ::Struct end end -# source://rubocop//lib/rubocop/config.rb#21 +# source://rubocop//lib/rubocop/config.rb#19 RuboCop::Config::DEFAULT_RAILS_VERSION = T.let(T.unsafe(nil), Float) # This class has methods related to finding configuration path. @@ -1236,7 +1279,7 @@ class RuboCop::ConfigFinder # @api private # - # source://rubocop//lib/rubocop/config_finder.rb#59 + # source://rubocop//lib/rubocop/config_finder.rb#69 def expand_path(path); end # @api private @@ -1252,11 +1295,16 @@ class RuboCop::ConfigFinder # @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#52 + # source://rubocop//lib/rubocop/config_finder.rb#62 def find_user_xdg_config; end end end @@ -1287,12 +1335,12 @@ RuboCop::ConfigFinder::XDG_CONFIG = T.let(T.unsafe(nil), String) # during a run of the rubocop program, if files in several # directories are inspected. # -# source://rubocop//lib/rubocop/config_loader.rb#18 +# source://rubocop//lib/rubocop/config_loader.rb#17 class RuboCop::ConfigLoader extend ::RuboCop::FileFinder class << self - # source://rubocop//lib/rubocop/config_loader.rb#138 + # source://rubocop//lib/rubocop/config_loader.rb#137 def add_excludes_from_files(config, config_file); end # Used to add features that were required inside a config or from @@ -1300,13 +1348,13 @@ class RuboCop::ConfigLoader # # @api private # - # source://rubocop//lib/rubocop/config_loader.rb#199 + # source://rubocop//lib/rubocop/config_loader.rb#198 def add_loaded_features(loaded_features); end - # source://rubocop//lib/rubocop/config_loader.rb#81 + # source://rubocop//lib/rubocop/config_loader.rb#80 def add_missing_namespaces(path, hash); end - # source://rubocop//lib/rubocop/config_loader.rb#42 + # source://rubocop//lib/rubocop/config_loader.rb#41 def clear_options; end # Returns the path of .rubocop.yml searching upwards in the @@ -1315,128 +1363,128 @@ class RuboCop::ConfigLoader # user's home directory is checked. If there's no .rubocop.yml # there either, the path to the default file is returned. # - # source://rubocop//lib/rubocop/config_loader.rb#105 + # source://rubocop//lib/rubocop/config_loader.rb#104 def configuration_file_for(target_dir); end - # source://rubocop//lib/rubocop/config_loader.rb#109 + # source://rubocop//lib/rubocop/config_loader.rb#108 def configuration_from_file(config_file, check: T.unsafe(nil)); end # Returns the value of attribute debug. # - # source://rubocop//lib/rubocop/config_loader.rb#34 + # 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#34 + # 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#34 + # source://rubocop//lib/rubocop/config_loader.rb#33 def debug?; end - # source://rubocop//lib/rubocop/config_loader.rb#148 + # source://rubocop//lib/rubocop/config_loader.rb#147 def default_configuration; end # Sets the attribute default_configuration # # @param value the value to set the attribute default_configuration to. # - # source://rubocop//lib/rubocop/config_loader.rb#36 + # 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#34 + # 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#34 + # 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#34 + # 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#34 + # 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#34 + # 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#34 + # 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#34 + # 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#34 + # 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#34 + # source://rubocop//lib/rubocop/config_loader.rb#33 def ignore_unrecognized_cops=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/config_loader.rb#156 + # source://rubocop//lib/rubocop/config_loader.rb#155 def inject_defaults!(project_root); end - # source://rubocop//lib/rubocop/config_loader.rb#48 + # source://rubocop//lib/rubocop/config_loader.rb#47 def load_file(file, check: T.unsafe(nil)); end # @raise [TypeError] # - # source://rubocop//lib/rubocop/config_loader.rb#68 + # source://rubocop//lib/rubocop/config_loader.rb#67 def load_yaml_configuration(absolute_path); end # Returns the value of attribute loaded_features. # - # source://rubocop//lib/rubocop/config_loader.rb#37 + # source://rubocop//lib/rubocop/config_loader.rb#36 def loaded_features; end # Return a recursive merge of two hashes. That is, a normal hash merge, # with the addition that any value that is a hash, and occurs in both # arguments, will also be merged. And so on. # - # source://rubocop//lib/rubocop/config_loader.rb#96 + # source://rubocop//lib/rubocop/config_loader.rb#95 def merge(base_hash, derived_hash); end # Merges the given configuration with the default one. # - # source://rubocop//lib/rubocop/config_loader.rb#192 + # source://rubocop//lib/rubocop/config_loader.rb#191 def merge_with_default(config, config_file, unset_nil: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_loader.rb#129 + # source://rubocop//lib/rubocop/config_loader.rb#128 def pending_cops_only_qualified(pending_cops); end # @return [Boolean] # - # source://rubocop//lib/rubocop/config_loader.rb#133 + # source://rubocop//lib/rubocop/config_loader.rb#132 def possible_new_cops?(config); end # Returns the path RuboCop inferred as the root of the project. No file @@ -1444,48 +1492,48 @@ class RuboCop::ConfigLoader # # @deprecated Use `RuboCop::ConfigFinder.project_root` instead. # - # source://rubocop//lib/rubocop/config_loader.rb#167 + # source://rubocop//lib/rubocop/config_loader.rb#166 def project_root; end - # source://rubocop//lib/rubocop/config_loader.rb#176 + # source://rubocop//lib/rubocop/config_loader.rb#175 def warn_on_pending_cops(pending_cops); end - # source://rubocop//lib/rubocop/config_loader.rb#184 + # source://rubocop//lib/rubocop/config_loader.rb#183 def warn_pending_cop(cop); end private - # source://rubocop//lib/rubocop/config_loader.rb#213 + # source://rubocop//lib/rubocop/config_loader.rb#212 def check_duplication(yaml_code, absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#205 + # source://rubocop//lib/rubocop/config_loader.rb#204 def file_path(file); end # Read the specified file, or exit with a friendly, concise message on # stderr. Care is taken to use the standard OS exit code for a "file not # found" error. # - # source://rubocop//lib/rubocop/config_loader.rb#233 + # source://rubocop//lib/rubocop/config_loader.rb#232 def read_file(absolute_path); end - # source://rubocop//lib/rubocop/config_loader.rb#209 + # source://rubocop//lib/rubocop/config_loader.rb#208 def resolver; end - # source://rubocop//lib/rubocop/config_loader.rb#239 + # source://rubocop//lib/rubocop/config_loader.rb#238 def yaml_safe_load(yaml_code, filename); end - # source://rubocop//lib/rubocop/config_loader.rb#249 + # source://rubocop//lib/rubocop/config_loader.rb#248 def yaml_safe_load!(yaml_code, filename); end end end -# source://rubocop//lib/rubocop/config_loader.rb#21 +# source://rubocop//lib/rubocop/config_loader.rb#20 RuboCop::ConfigLoader::DEFAULT_FILE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/config_loader.rb#19 +# source://rubocop//lib/rubocop/config_loader.rb#18 RuboCop::ConfigLoader::DOTFILE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/config_loader.rb#20 +# source://rubocop//lib/rubocop/config_loader.rb#19 RuboCop::ConfigLoader::RUBOCOP_HOME = T.let(T.unsafe(nil), String) # A help class for ConfigLoader that handles configuration resolution. @@ -1638,7 +1686,7 @@ end # Raised when a RuboCop configuration file is not found. # -# source://rubocop//lib/rubocop/config_loader.rb#10 +# source://rubocop//lib/rubocop/config_loader.rb#9 class RuboCop::ConfigNotFoundError < ::RuboCop::Error; end # This class handles obsolete configuration. @@ -1650,23 +1698,23 @@ class RuboCop::ConfigObsoletion # @api private # @return [ConfigObsoletion] a new instance of ConfigObsoletion # - # source://rubocop//lib/rubocop/config_obsoletion.rb#33 + # source://rubocop//lib/rubocop/config_obsoletion.rb#35 def initialize(config); end # @api private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_obsoletion.rb#39 + # source://rubocop//lib/rubocop/config_obsoletion.rb#41 def reject_obsolete!; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#19 + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 def rules; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#19 + # source://rubocop//lib/rubocop/config_obsoletion.rb#21 def warnings; end private @@ -1675,7 +1723,7 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#69 + # source://rubocop//lib/rubocop/config_obsoletion.rb#72 def load_cop_rules(rules); end # Parameter rules may apply to multiple cops and multiple parameters @@ -1684,7 +1732,7 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#82 + # source://rubocop//lib/rubocop/config_obsoletion.rb#85 def load_parameter_rules(rules); end # Default rules for obsoletions are in config/obsoletion.yml @@ -1692,28 +1740,28 @@ class RuboCop::ConfigObsoletion # # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#50 + # source://rubocop//lib/rubocop/config_obsoletion.rb#52 def load_rules; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#95 + # source://rubocop//lib/rubocop/config_obsoletion.rb#98 def obsoletions; end class << self # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#22 + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 def files; end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#22 + # source://rubocop//lib/rubocop/config_obsoletion.rb#24 def files=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/config_obsoletion.rb#24 + # source://rubocop//lib/rubocop/config_obsoletion.rb#26 def legacy_cop_names; end end end @@ -1866,6 +1914,11 @@ class RuboCop::ConfigObsoletion::ExtractedCop < ::RuboCop::ConfigObsoletion::Cop def feature_loaded?; end end +# @api private +# +# source://rubocop//lib/rubocop/config_obsoletion.rb#18 +RuboCop::ConfigObsoletion::LOAD_RULES_CACHE = T.let(T.unsafe(nil), Hash) + # @api private # # source://rubocop//lib/rubocop/config_obsoletion.rb#14 @@ -2202,13 +2255,13 @@ end # Handles validation of configuration, for example cop names, parameter # names, and Ruby versions. # -# source://rubocop//lib/rubocop/config_validator.rb#8 +# source://rubocop//lib/rubocop/config_validator.rb#6 class RuboCop::ConfigValidator extend ::Forwardable # @return [ConfigValidator] a new instance of ConfigValidator # - # source://rubocop//lib/rubocop/config_validator.rb#27 + # source://rubocop//lib/rubocop/config_validator.rb#26 def initialize(config); end # source://forwardable/1.3.3/forwardable.rb#231 @@ -2217,10 +2270,10 @@ class RuboCop::ConfigValidator # source://forwardable/1.3.3/forwardable.rb#231 def smart_loaded_path(*args, **_arg1, &block); end - # source://rubocop//lib/rubocop/config_validator.rb#63 + # source://rubocop//lib/rubocop/config_validator.rb#62 def target_ruby_version; end - # source://rubocop//lib/rubocop/config_validator.rb#33 + # source://rubocop//lib/rubocop/config_validator.rb#32 def validate; end # Validations that should only be run after all config resolving has @@ -2229,100 +2282,103 @@ class RuboCop::ConfigValidator # chain has been loaded so that only the final value is validated, and # any obsolete but overridden values are ignored. # - # source://rubocop//lib/rubocop/config_validator.rb#59 + # source://rubocop//lib/rubocop/config_validator.rb#58 def validate_after_resolution; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#67 + # source://rubocop//lib/rubocop/config_validator.rb#66 def validate_section_presence(name); end private # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#104 + # source://rubocop//lib/rubocop/config_validator.rb#103 def alert_about_unrecognized_cops(invalid_cop_names); end # source://rubocop//lib/rubocop/config_validator.rb#253 def check_cop_config_value(hash, parent = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/config_validator.rb#77 + # source://rubocop//lib/rubocop/config_validator.rb#76 def check_obsoletions; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#84 + # source://rubocop//lib/rubocop/config_validator.rb#83 def check_target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#195 + # source://rubocop//lib/rubocop/config_validator.rb#194 def each_invalid_parameter(cop_name); end - # source://rubocop//lib/rubocop/config_validator.rb#120 + # source://rubocop//lib/rubocop/config_validator.rb#119 def list_unknown_cops(invalid_cop_names); end # FIXME: Handling colors in exception messages like this is ugly. # - # source://rubocop//lib/rubocop/config_validator.rb#266 - def msg_not_boolean(parent, key, value); end + # source://rubocop//lib/rubocop/config_validator.rb#273 + def param_error_message(parent, key, value, supposed_values); end - # source://rubocop//lib/rubocop/config_validator.rb#242 + # source://rubocop//lib/rubocop/config_validator.rb#241 def reject_conflicting_safe_settings; end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#233 + # source://rubocop//lib/rubocop/config_validator.rb#232 def reject_mutually_exclusive_defaults; end - # source://rubocop//lib/rubocop/config_validator.rb#142 + # source://rubocop//lib/rubocop/config_validator.rb#141 def suggestion(name); end # Returns the value of attribute target_ruby. # - # source://rubocop//lib/rubocop/config_validator.rb#75 + # source://rubocop//lib/rubocop/config_validator.rb#74 def target_ruby; end - # source://rubocop//lib/rubocop/config_validator.rb#207 + # source://rubocop//lib/rubocop/config_validator.rb#206 def validate_enforced_styles(valid_cop_names); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#169 + # source://rubocop//lib/rubocop/config_validator.rb#168 def validate_new_cops_parameter; end - # source://rubocop//lib/rubocop/config_validator.rb#180 + # source://rubocop//lib/rubocop/config_validator.rb#179 def validate_parameter_names(valid_cop_names); end - # source://rubocop//lib/rubocop/config_validator.rb#227 + # source://rubocop//lib/rubocop/config_validator.rb#226 def validate_support_and_has_list(name, formats, valid); end # @raise [ValidationError] # - # source://rubocop//lib/rubocop/config_validator.rb#158 + # source://rubocop//lib/rubocop/config_validator.rb#157 def validate_syntax_cop; end end # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#12 +# source://rubocop//lib/rubocop/config_validator.rb#10 RuboCop::ConfigValidator::COMMON_PARAMS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/config_validator.rb#22 +# source://rubocop//lib/rubocop/config_validator.rb#21 +RuboCop::ConfigValidator::CONFIG_CHECK_AUTOCORRECTS = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/config_validator.rb#20 RuboCop::ConfigValidator::CONFIG_CHECK_DEPARTMENTS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#21 +# source://rubocop//lib/rubocop/config_validator.rb#19 RuboCop::ConfigValidator::CONFIG_CHECK_KEYS = T.let(T.unsafe(nil), Set) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#14 +# source://rubocop//lib/rubocop/config_validator.rb#12 RuboCop::ConfigValidator::INTERNAL_PARAMS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/config_validator.rb#18 +# source://rubocop//lib/rubocop/config_validator.rb#16 RuboCop::ConfigValidator::NEW_COPS_VALUES = T.let(T.unsafe(nil), Array) # source://rubocop//lib/rubocop/cop/util.rb#4 @@ -2356,7 +2412,7 @@ module RuboCop::Cop::Alignment # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#45 def each_bad_alignment(items, base_column); end - # @deprecated Use processed_source.comment_at_line(line) + # @deprecated Use processed_source.line_with_comment?(line) # # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#69 def end_of_line_comment(line); end @@ -2369,7 +2425,7 @@ module RuboCop::Cop::Alignment # @api private # - # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#74 + # source://rubocop//lib/rubocop/cop/mixin/alignment.rb#78 def register_offense(offense_node, message_node); end # @api public @@ -2482,21 +2538,20 @@ module RuboCop::Cop::AllowedMethods # @api public # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#21 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#27 def allowed_methods; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#29 + # 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#33 + # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#39 def cop_config_deprecated_values; end - # @api public # @deprecated Use allowed_method? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#13 - def ignored_method?(name); end + # 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 @@ -2511,31 +2566,31 @@ module RuboCop::Cop::AllowedPattern # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#10 def allowed_line?(line); end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#30 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#42 def allowed_patterns; end - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#46 + # 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#40 + # 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#10 - def ignored_line?(line); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#21 + def ignored_line?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#29 def matches_allowed_pattern?(line); end - # @deprecated Use matches_allowed_pattern?? instead + # @deprecated Use matches_allowed_pattern? instead # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#23 - def matches_ignored_pattern?(line); end + # source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#34 + def matches_ignored_pattern?; end end # This module encapsulates the ability to allow certain receivers in a cop. @@ -2743,34 +2798,34 @@ module RuboCop::Cop::AutocorrectLogic private - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#46 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#51 def disable_offense(offense_range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#113 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#118 def disable_offense_at_end_of_line(range, eol_comment); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#117 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#122 def disable_offense_before_and_after(range_by_lines); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#56 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#61 def disable_offense_with_eol_or_surround_comment(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#109 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#114 def max_line_length; end # Expand the given range to include all of any lines it covers. Does not # include newline at end of the last line. # - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#99 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#104 def range_by_lines(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#90 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#95 def range_of_first_line(range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#67 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#72 def surrounding_heredoc(offense_range); end - # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#78 + # source://rubocop//lib/rubocop/cop/autocorrect_logic.rb#83 def surrounding_percent_array(offense_range); end end @@ -2883,18 +2938,18 @@ class RuboCop::Cop::Base # @return [Base] a new instance of Base # - # source://rubocop//lib/rubocop/cop/base.rb#129 + # 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#239 + # source://rubocop//lib/rubocop/cop/base.rb#272 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#162 + # 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) @@ -2902,19 +2957,25 @@ class RuboCop::Cop::Base # 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#172 + # 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#343 + def always_autocorrect?; end + # Called before any investigation # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#295 + # source://rubocop//lib/rubocop/cop/base.rb#329 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#280 + # source://rubocop//lib/rubocop/cop/base.rb#314 def callbacks_needed; end # Returns the value of attribute config. @@ -2922,23 +2983,29 @@ class RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/base.rb#43 def config; end - # source://rubocop//lib/rubocop/cop/base.rb#223 + # source://rubocop//lib/rubocop/cop/base.rb#252 def config_to_allow_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#227 + # 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#349 + def contextual_autocorrect?; end + # Configuration Helpers # - # source://rubocop//lib/rubocop/cop/base.rb#217 + # source://rubocop//lib/rubocop/cop/base.rb#246 def cop_config; end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # source://rubocop//lib/rubocop/cop/base.rb#238 def cop_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#251 + # source://rubocop//lib/rubocop/cop/base.rb#285 def excluded_file?(file); end # This method should be overridden when a cop's behavior depends @@ -2957,50 +3024,53 @@ class RuboCop::Cop::Base # ResultCache system when those external dependencies change, # ie when the ResultCache should be invalidated. # - # source://rubocop//lib/rubocop/cop/base.rb#205 + # source://rubocop//lib/rubocop/cop/base.rb#234 def external_dependency_checksum; end - # source://rubocop//lib/rubocop/cop/base.rb#308 + # source://rubocop//lib/rubocop/cop/base.rb#353 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#156 + # source://rubocop//lib/rubocop/cop/base.rb#183 def message(_range = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/base.rb#209 + # 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#271 + # source://rubocop//lib/rubocop/cop/base.rb#305 def offenses; end # Called after all on_... have been called # When refining this method, always call `super` # - # source://rubocop//lib/rubocop/cop/base.rb#143 + # 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#137 + # 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#149 + # 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#256 + # source://rubocop//lib/rubocop/cop/base.rb#290 def parse(source, path = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/base.rb#264 + def parser_engine; end + # Returns the value of attribute processed_source. # # source://rubocop//lib/rubocop/cop/base.rb#43 @@ -3010,99 +3080,106 @@ class RuboCop::Cop::Base # # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#262 + # source://rubocop//lib/rubocop/cop/base.rb#296 def ready; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#243 + # source://rubocop//lib/rubocop/cop/base.rb#276 def relevant_file?(file); end - # source://rubocop//lib/rubocop/cop/base.rb#235 + # source://rubocop//lib/rubocop/cop/base.rb#268 def target_rails_version; end - # source://rubocop//lib/rubocop/cop/base.rb#231 + # source://rubocop//lib/rubocop/cop/base.rb#260 def target_ruby_version; end private - # source://rubocop//lib/rubocop/cop/base.rb#436 + # source://rubocop//lib/rubocop/cop/base.rb#471 def annotate(message); end - # source://rubocop//lib/rubocop/cop/base.rb#320 + # source://rubocop//lib/rubocop/cop/base.rb#365 def apply_correction(corrector); end # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#400 + # source://rubocop//lib/rubocop/cop/base.rb#435 def attempt_correction(range, corrector); end # Reserved for Cop::Cop # - # source://rubocop//lib/rubocop/cop/base.rb#316 + # source://rubocop//lib/rubocop/cop/base.rb#361 def callback_argument(range); end # Called to complete an investigation # - # source://rubocop//lib/rubocop/cop/base.rb#349 + # source://rubocop//lib/rubocop/cop/base.rb#394 def complete_investigation; end # @return [Symbol, Corrector] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#374 + # source://rubocop//lib/rubocop/cop/base.rb#409 def correct(range); end - # source://rubocop//lib/rubocop/cop/base.rb#334 + # source://rubocop//lib/rubocop/cop/base.rb#379 def current_corrector; end # Reserved for Commissioner: # - # source://rubocop//lib/rubocop/cop/base.rb#326 + # source://rubocop//lib/rubocop/cop/base.rb#371 def current_offense_locations; end - # source://rubocop//lib/rubocop/cop/base.rb#338 + # source://rubocop//lib/rubocop/cop/base.rb#383 def current_offenses; end - # source://rubocop//lib/rubocop/cop/base.rb#330 + # source://rubocop//lib/rubocop/cop/base.rb#375 def currently_disabled_lines; end - # source://rubocop//lib/rubocop/cop/base.rb#464 + # source://rubocop//lib/rubocop/cop/base.rb#499 def custom_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#460 + # source://rubocop//lib/rubocop/cop/base.rb#495 def default_severity; end - # source://rubocop//lib/rubocop/cop/base.rb#414 + # source://rubocop//lib/rubocop/cop/base.rb#449 def disable_uncorrectable(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#450 + # source://rubocop//lib/rubocop/cop/base.rb#485 def enabled_line?(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#442 + # source://rubocop//lib/rubocop/cop/base.rb#477 def file_name_matches_any?(file, parameter, default_result); end - # source://rubocop//lib/rubocop/cop/base.rb#432 + # source://rubocop//lib/rubocop/cop/base.rb#467 def find_message(range, message); end - # source://rubocop//lib/rubocop/cop/base.rb#456 + # source://rubocop//lib/rubocop/cop/base.rb#491 def find_severity(_range, severity); end - # source://rubocop//lib/rubocop/cop/base.rb#477 + # source://rubocop//lib/rubocop/cop/base.rb#512 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/base.rb#421 + # source://rubocop//lib/rubocop/cop/base.rb#456 def range_from_node_or_range(node_or_range); end - # source://rubocop//lib/rubocop/cop/base.rb#369 + # Actually private methods + # + # source://rubocop//lib/rubocop/cop/base.rb#404 def reset_investigation; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/base.rb#520 + def target_satisfies_all_gem_version_requirements?; end + # @return [Symbol] offense status # - # source://rubocop//lib/rubocop/cop/base.rb#389 + # source://rubocop//lib/rubocop/cop/base.rb#424 def use_corrector(range, corrector); end class << self @@ -3117,46 +3194,54 @@ class RuboCop::Cop::Base # Naming # - # source://rubocop//lib/rubocop/cop/base.rb#89 + # source://rubocop//lib/rubocop/cop/base.rb#93 def badge; end # @api private # - # source://rubocop//lib/rubocop/cop/base.rb#285 + # source://rubocop//lib/rubocop/cop/base.rb#319 def callbacks_needed; end - # source://rubocop//lib/rubocop/cop/base.rb#93 + # source://rubocop//lib/rubocop/cop/base.rb#97 def cop_name; end - # source://rubocop//lib/rubocop/cop/base.rb#97 + # source://rubocop//lib/rubocop/cop/base.rb#101 def department; end - # Cops (other than builtin) are encouraged to implement this + # Returns an 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#67 - def documentation_url; end + # 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#77 + # 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#71 + # 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#114 + # source://rubocop//lib/rubocop/cop/base.rb#118 def joining_forces; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#101 + # 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 @@ -3164,15 +3249,30 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#107 + # 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#83 + # source://rubocop//lib/rubocop/cop/base.rb#87 def support_autocorrect?; end # Override if your cop should be called repeatedly for multiple investigations @@ -3185,22 +3285,17 @@ class RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/base.rb#125 + # source://rubocop//lib/rubocop/cop/base.rb#129 def support_multiple_source?; end private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/base.rb#360 - def builtin?; end - - # source://rubocop//lib/rubocop/cop/base.rb#342 + # source://rubocop//lib/rubocop/cop/base.rb#387 def restrict_on_send; end end end -# source://rubocop//lib/rubocop/cop/base.rb#346 +# source://rubocop//lib/rubocop/cop/base.rb#391 RuboCop::Cop::Base::EMPTY_OFFENSES = T.let(T.unsafe(nil), Array) # Reports of an investigation. @@ -3739,35 +3834,35 @@ class RuboCop::Cop::Bundler::GemVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#113 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#111 def forbidden_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#119 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#117 def forbidden_style?; end # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#93 - def message(range); end + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#103 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#101 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#107 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#105 def required_offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#123 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#121 def required_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#127 + # source://rubocop//lib/rubocop/cop/bundler/gem_version.rb#125 def version_specification?(expression); end end @@ -4089,6 +4184,9 @@ module RuboCop::Cop::CodeLength # 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 @@ -4746,7 +4844,7 @@ module RuboCop::Cop::ConfigurableFormatting # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#29 + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#30 def class_emitter_method?(node, name); end # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#17 @@ -4754,14 +4852,14 @@ module RuboCop::Cop::ConfigurableFormatting # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#23 + # source://rubocop//lib/rubocop/cop/mixin/configurable_formatting.rb#24 def valid_name?(node, name, given_style = T.unsafe(nil)); end end # Handles `Max` configuration parameters, especially setting them to an # appropriate value with --auto-gen-config. # -# @deprecated Use `exclude_limit ParameterName` instead. +# @deprecated Use `exclude_limit ` instead. # # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#8 module RuboCop::Cop::ConfigurableMax @@ -4770,7 +4868,7 @@ module RuboCop::Cop::ConfigurableMax # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#11 def max=(value); end - # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#19 + # source://rubocop//lib/rubocop/cop/mixin/configurable_max.rb#23 def max_parameter_name; end end @@ -4803,22 +4901,22 @@ RuboCop::Cop::ConfigurableNumbering::FORMATS = T.let(T.unsafe(nil), Hash) # # source://rubocop//lib/rubocop/cop/cop.rb#11 class RuboCop::Cop::Cop < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/cop.rb#53 + # source://rubocop//lib/rubocop/cop/cop.rb#65 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#103 + # source://rubocop//lib/rubocop/cop/cop.rb#121 def begin_investigation(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # @deprecated # - # source://rubocop//lib/rubocop/cop/cop.rb#82 + # source://rubocop//lib/rubocop/cop/cop.rb#97 def corrections; end - # source://rubocop//lib/rubocop/cop/cop.rb#70 + # source://rubocop//lib/rubocop/cop/cop.rb#82 def find_location(node, loc); end # Returns the value of attribute offenses. @@ -4828,53 +4926,53 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # Called after all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#96 + # source://rubocop//lib/rubocop/cop/cop.rb#114 def on_investigation_end; end # Called before all on_... have been called # - # source://rubocop//lib/rubocop/cop/cop.rb#90 + # source://rubocop//lib/rubocop/cop/cop.rb#108 def on_new_investigation; end # @deprecated Use class method # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/cop.rb#76 + # source://rubocop//lib/rubocop/cop/cop.rb#88 def support_autocorrect?; end private - # source://rubocop//lib/rubocop/cop/cop.rb#121 + # source://rubocop//lib/rubocop/cop/cop.rb#139 def apply_correction(corrector); end # Override Base # - # source://rubocop//lib/rubocop/cop/cop.rb#117 + # source://rubocop//lib/rubocop/cop/cop.rb#135 def callback_argument(_range); end - # source://rubocop//lib/rubocop/cop/cop.rb#138 + # source://rubocop//lib/rubocop/cop/cop.rb#156 def correction_lambda; end - # source://rubocop//lib/rubocop/cop/cop.rb#144 + # source://rubocop//lib/rubocop/cop/cop.rb#162 def dedupe_on_node(node); end # Just for legacy # # @yield [corrector] # - # source://rubocop//lib/rubocop/cop/cop.rb#126 + # source://rubocop//lib/rubocop/cop/cop.rb#144 def emulate_v0_callsequence(corrector); end - # source://rubocop//lib/rubocop/cop/cop.rb#157 + # source://rubocop//lib/rubocop/cop/cop.rb#175 def range_for_original(range); end - # source://rubocop//lib/rubocop/cop/cop.rb#151 + # source://rubocop//lib/rubocop/cop/cop.rb#169 def suppress_clobbering; end class << self # @deprecated Use Registry.all # - # source://rubocop//lib/rubocop/cop/cop.rb#44 + # source://rubocop//lib/rubocop/cop/cop.rb#48 def all; end # source://rubocop//lib/rubocop/cop/cop.rb#29 @@ -4882,7 +4980,7 @@ class RuboCop::Cop::Cop < ::RuboCop::Cop::Base # @deprecated Use Registry.qualified_cop_name # - # source://rubocop//lib/rubocop/cop/cop.rb#49 + # source://rubocop//lib/rubocop/cop/cop.rb#57 def qualified_cop_name(name, origin); end # @deprecated Use Registry.global @@ -4994,7 +5092,7 @@ class RuboCop::Cop::Corrector < ::Parser::Source::TreeRewriter # Legacy # - # source://parser/3.2.2.4/lib/parser/source/tree_rewriter.rb#252 + # source://parser/3.3.5.0/lib/parser/source/tree_rewriter.rb#252 def rewrite; end # Swaps sources at the given ranges. @@ -5065,7 +5163,12 @@ module RuboCop::Cop::Documentation # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#40 + def builtin?(cop_class); end + + # @api private + # + # source://rubocop//lib/rubocop/cop/documentation.rb#35 def default_base_url; end # @api private @@ -5084,9 +5187,15 @@ module RuboCop::Cop::Documentation # source://rubocop//lib/rubocop/cop/documentation.rb#24 def base_url_for(cop_class, config); end + # @api private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/documentation.rb#40 + def builtin?(cop_class); end + # @api private # - # source://rubocop//lib/rubocop/cop/documentation.rb#34 + # source://rubocop//lib/rubocop/cop/documentation.rb#35 def default_base_url; end # @api private @@ -5226,9 +5335,6 @@ class RuboCop::Cop::EachToForCorrector # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#36 def offending_range; end - - # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#44 - def replacement_range(end_pos); end end # source://rubocop//lib/rubocop/cop/correctors/each_to_for_corrector.rb#10 @@ -5326,24 +5432,24 @@ RuboCop::Cop::EndKeywordAlignment::MSG = T.let(T.unsafe(nil), String) module RuboCop::Cop::EnforceSuperclass # @api private # - # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#19 + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#19 def on_class(node); end # @api private # - # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#25 + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#25 def on_send(node); end private - # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#33 + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#33 def register_offense(offense_node); end class << self # @api private # @private # - # source://rubocop-rails/2.22.1/lib/rubocop/cop/mixin/enforce_superclass.rb#7 + # source://rubocop-rails/2.26.2/lib/rubocop/cop/mixin/enforce_superclass.rb#7 def included(base); end end end @@ -5389,45 +5495,39 @@ class RuboCop::Cop::ForToEachCorrector private - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#55 + # 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#23 + # 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#29 + # 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#25 + # 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#43 - def end_position; 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#23 + # 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#51 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#53 def keyword_begin; end - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#63 - def offending_range; end - - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#67 - def replacement_range(end_pos); end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#37 + # 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#23 + # source://rubocop//lib/rubocop/cop/correctors/for_to_each_corrector.rb#25 def variable_node; end end @@ -5440,37 +5540,53 @@ RuboCop::Cop::ForToEachCorrector::CORRECTION = T.let(T.unsafe(nil), String) class RuboCop::Cop::Force # @return [Force] a new instance of Force # - # source://rubocop//lib/rubocop/cop/force.rb#22 + # 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#7 + # source://rubocop//lib/rubocop/cop/force.rb#17 def cops; end - # source://rubocop//lib/rubocop/cop/force.rb#38 + # source://rubocop//lib/rubocop/cop/force.rb#50 def investigate(_processed_source); end - # source://rubocop//lib/rubocop/cop/force.rb#26 + # source://rubocop//lib/rubocop/cop/force.rb#36 def name; end - # source://rubocop//lib/rubocop/cop/force.rb#30 + # source://rubocop//lib/rubocop/cop/force.rb#40 def run_hook(method_name, *args); end class << self - # source://rubocop//lib/rubocop/cop/force.rb#9 + # source://rubocop//lib/rubocop/cop/force.rb#19 def all; end - # source://rubocop//lib/rubocop/cop/force.rb#18 + # source://rubocop//lib/rubocop/cop/force.rb#28 def force_name; end # @private # - # source://rubocop//lib/rubocop/cop/force.rb#13 + # 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 @@ -5531,9 +5647,38 @@ module RuboCop::Cop::GemDeclaration def gem_declaration?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#5 +# 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. # @@ -5601,7 +5746,7 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#120 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#118 def add_dependency_method?(method_name); end # @return [Boolean] @@ -5614,40 +5759,40 @@ class RuboCop::Cop::Gemspec::DependencyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#134 + # 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#140 + # 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#114 + # 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 + def message(_range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#124 + # 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#128 + # 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#144 + # 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#148 + # source://rubocop//lib/rubocop/cop/gemspec/dependency_version.rb#146 def version_specification?(expression); end end @@ -5836,8 +5981,8 @@ RuboCop::Cop::Gemspec::DevelopmentDependencies::RESTRICT_ON_SEND = T.let(T.unsaf # # # good # Gem::Specification.new do |spec| -# spec.add_runtime_dependency('parallel', '~> 1.10') -# spec.add_runtime_dependency('parser', '>= 2.3.3.1', '< 3.0') +# 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 @@ -6100,7 +6245,7 @@ class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#78 def on_new_investigation; end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#82 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#84 def on_send(node); end # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#65 @@ -6110,13 +6255,13 @@ class RuboCop::Cop::Gemspec::RequiredRubyVersion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#94 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#96 def dynamic_version?(node); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#100 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#102 def extract_ruby_version(required_ruby_version); end - # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#116 + # source://rubocop//lib/rubocop/cop/gemspec/required_ruby_version.rb#120 def not_equal_message(required_ruby_version, target_ruby_version); end end @@ -6140,15 +6285,15 @@ RuboCop::Cop::Gemspec::RequiredRubyVersion::RESTRICT_ON_SEND = T.let(T.unsafe(ni # # bad # Gem::Specification.new do |spec| # if RUBY_VERSION >= '3.0' -# spec.add_runtime_dependency 'gem_a' +# spec.add_dependency 'gem_a' # else -# spec.add_runtime_dependency 'gem_b' +# spec.add_dependency 'gem_b' # end # end # # # good # Gem::Specification.new do |spec| -# spec.add_runtime_dependency 'gem_a' +# spec.add_dependency 'gem_a' # end # # source://rubocop//lib/rubocop/cop/gemspec/ruby_version_globals_usage.rb#28 @@ -6533,40 +6678,45 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#125 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#126 def brackets?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#155 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#156 def breakdown_value_types_of_hash(hash_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#102 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#103 def def_node_that_require_parentheses(node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#179 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#185 def each_omittable_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#175 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#181 def each_omitted_value_pair(hash_value_type_breakdown, &block); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#80 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#81 def enforced_shorthand_syntax; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#117 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#118 def find_ancestor_method_dispatch_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#167 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#168 def hash_with_mixed_shorthand_syntax?(hash_value_type_breakdown); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#171 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#172 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#74 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#176 + def ignore_explicit_omissible_hash_shorthand_syntax?(hash_value_type_breakdown); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#75 def ignore_hash_shorthand_syntax?(pair_node); end # @return [Boolean] @@ -6576,18 +6726,18 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#140 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#141 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#148 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#149 def method_dispatch_as_argument?(method_dispatch_node); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#183 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#189 def mixed_shorthand_syntax_check(hash_value_type_breakdown); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#199 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#205 def no_mixed_shorthand_syntax_check(hash_value_type_breakdown); end # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#49 @@ -6595,22 +6745,22 @@ module RuboCop::Cop::HashShorthandSyntax # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#84 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#85 def require_hash_value?(hash_key_source, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#93 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#94 def require_hash_value_for_around_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#129 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#130 def use_element_of_hash_literal_as_receiver?(ancestor, parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#134 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#135 def use_modifier_form_without_parenthesized_method_call?(ancestor); end end @@ -6623,12 +6773,12 @@ RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_MSG_PREFIX = T.let(T.unsafe(nil), # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#11 RuboCop::Cop::HashShorthandSyntax::DO_NOT_MIX_OMIT_VALUE_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#209 +# source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#216 class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#218 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#225 def first_argument; end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#222 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#229 def last_argument; end # Returns the value of attribute node @@ -6642,7 +6792,7 @@ class RuboCop::Cop::HashShorthandSyntax::DefNode < ::Struct # @return [Object] the newly set value def node=(_); end - # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#210 + # source://rubocop//lib/rubocop/cop/mixin/hash_shorthand_syntax.rb#217 def selector; end class << self @@ -6947,7 +7097,7 @@ RuboCop::Cop::IfThenCorrector::DEFAULT_INDENTATION_WIDTH = T.let(T.unsafe(nil), # @deprecated IgnoredMethods class has been replaced with AllowedMethods. # -# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#40 +# source://rubocop//lib/rubocop/cop/mixin/allowed_methods.rb#46 RuboCop::Cop::IgnoredMethods = RuboCop::Cop::AllowedMethods # Handles adding and checking ignored nodes. @@ -6975,7 +7125,7 @@ end # @deprecated IgnoredPattern class has been replaced with AllowedPattern. # -# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#54 +# source://rubocop//lib/rubocop/cop/mixin/allowed_pattern.rb#66 RuboCop::Cop::IgnoredPattern = RuboCop::Cop::AllowedPattern # Common functionality for checking integer nodes. @@ -8687,35 +8837,35 @@ class RuboCop::Cop::Layout::EmptyComment < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#131 + # 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#135 + # 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#127 + # 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#139 + # 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#117 + # 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#143 + # source://rubocop//lib/rubocop/cop/layout/empty_comment.rb#145 def previous_token(node); end end @@ -8899,15 +9049,19 @@ class RuboCop::Cop::Layout::EmptyLineAfterMagicComment < ::RuboCop::Cop::Base 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, select the + # 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#54 + # 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 @@ -9028,19 +9182,14 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # `AllowAdjacentOneLineDefs` configures whether adjacent # one-line definitions are considered an offense. # -# @example AllowAdjacentOneLineDefs: false +# @example EmptyLineBetweenMethodDefs: true (default) +# # checks for empty lines between method definitions. # # # 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 +# def a +# end +# def b +# end # @example # # # good @@ -9104,14 +9253,19 @@ RuboCop::Cop::Layout::EmptyLineAfterMultilineCondition::MSG = T.let(T.unsafe(nil # class ErrorB < BaseError; end # # class ErrorC < BaseError; end -# @example EmptyLineBetweenMethodDefs: true (default) -# # checks for empty lines between method definitions. +# @example AllowAdjacentOneLineDefs: false # # # bad -# def a -# end -# def b -# end +# 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#108 class RuboCop::Cop::Layout::EmptyLineBetweenDefs < ::RuboCop::Cop::Base @@ -10040,7 +10194,9 @@ RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), St # 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. These style can be configured by each cop. +# 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 @@ -10091,7 +10247,7 @@ RuboCop::Cop::Layout::EmptyLinesAroundModuleBody::KIND = T.let(T.unsafe(nil), St # if true # end # -# source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#75 +# 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 @@ -10099,54 +10255,54 @@ class RuboCop::Cop::Layout::EndAlignment < ::RuboCop::Cop::Base include ::RuboCop::Cop::EndKeywordAlignment extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#105 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#111 def on_case(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#105 + # 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#81 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#83 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#93 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#99 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#89 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#95 def on_module(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#85 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#87 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#101 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#107 def on_until(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#97 + # 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#161 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#167 def alignment_node(node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#178 + # 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#142 + # 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#196 + # 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#116 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#122 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#131 + # 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#120 + # 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#152 + # source://rubocop//lib/rubocop/cop/layout/end_alignment.rb#158 def check_other_alignment(node); end end @@ -10249,13 +10405,13 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#176 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#170 def align_column(asgn_token); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#153 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#147 def align_equal_sign(corrector, token, align_to); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#143 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#137 def align_equal_signs(range, corrector); end # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#52 @@ -10263,46 +10419,46 @@ class RuboCop::Cop::Layout::ExtraSpacing < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#109 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#103 def aligned_tok?(token); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#165 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#159 def all_relevant_assignment_lines(line_number); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#185 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#179 def allow_for_trailing_comments?; end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#78 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#72 def check_assignment(token); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#87 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#81 def check_other(token1, token2, ast); end - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#68 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#62 def check_tokens(ast, token1, token2); end # @yield [range_between(start_pos, end_pos)] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#97 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#91 def extra_space_range(token1, token2); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#139 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#133 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#117 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#111 def ignored_range?(ast, start_pos); end # Returns an array of ranges that should not be reported. It's the # extra spaces between the keys and values in a multiline hash, # since those are handled by the Layout/HashAlignment cop. # - # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#124 + # source://rubocop//lib/rubocop/cop/layout/extra_spacing.rb#118 def ignored_ranges(ast); end end @@ -10423,8 +10579,8 @@ RuboCop::Cop::Layout::ExtraSpacing::MSG_UNNECESSARY = T.let(T.unsafe(nil), Strin # 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 a argument for a method call that -# # is itself a argument in a method call, then the inner argument +# # 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 @@ -10535,7 +10691,10 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # Checks the indentation of the first element in an array literal # where the opening bracket and the first element are on separate lines. -# The other elements' indentations are handled by the ArrayAlignment cop. +# The other elements' indentations are handled by `Layout/ArrayAlignment` cop. +# +# This cop will respect `Layout/ArrayAlignment` and will not work when +# `EnforcedStyle: with_fixed_indentation` is specified for `Layout/ArrayAlignment`. # # By default, array literals that are arguments in a method call with # parentheses, and where the opening square bracket of the array is on the @@ -10555,7 +10714,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # element are on separate lines is indented one step (two spaces) more # # than the position inside the opening parenthesis. # -# #bad +# # bad # array = [ # :value # ] @@ -10563,7 +10722,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # :no_difference # ]) # -# #good +# # good # array = [ # :value # ] @@ -10576,7 +10735,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # separate lines is indented the same as an array literal which is not # # defined inside a method call. # -# #bad +# # bad # # consistent # array = [ # :value @@ -10585,7 +10744,7 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # :its_like_this # ]) # -# #good +# # good # array = [ # :value # ] @@ -10596,61 +10755,69 @@ RuboCop::Cop::Layout::FirstArgumentIndentation::MSG = T.let(T.unsafe(nil), Strin # # The `align_brackets` style enforces that the opening and closing # # brackets are indented to the same position. # -# #bad +# # bad # # align_brackets # and_now_for_something = [ # :completely_different # ] # -# #good +# # good # # align_brackets # and_now_for_something = [ # :completely_different # ] # -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#82 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#85 class RuboCop::Cop::Layout::FirstArrayElementIndentation < ::RuboCop::Cop::Base include ::RuboCop::Cop::Alignment include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::MultilineElementIndentation extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#94 def on_array(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#95 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#100 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#104 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#191 + def array_alignment_config; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#111 def autocorrect(corrector, node); end # Returns the description of what the correct indentation is based on. # - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#142 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#149 def base_description(indent_base_type); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#108 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#115 def brace_alignment_style; end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#112 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#119 def check(array_node, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#126 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#133 def check_right_bracket(right_bracket, first_elem, left_bracket, left_parenthesis); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#155 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#185 + def enforce_first_argument_with_fixed_indentation?; end + + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#162 def message(base_description); end - # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#163 + # source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#170 def message_for_right_bracket(indent_base_type); end end -# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#88 +# source://rubocop//lib/rubocop/cop/layout/first_array_element_indentation.rb#91 RuboCop::Cop::Layout::FirstArrayElementIndentation::MSG = T.let(T.unsafe(nil), String) # Checks for a line break before the first element in a @@ -11179,16 +11346,22 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # 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. -# +# @example EnforcedHashRocketStyle: key (default) # # bad -# do_something(foo: 1, -# bar: 2) +# { +# :foo => bar, +# :ba => baz +# } +# { +# :foo => bar, +# :ba => baz +# } # # # good -# do_something({foo: 1, -# bar: 2}) +# { +# :foo => bar, +# :ba => baz +# } # @example EnforcedHashRocketStyle: separator # # bad # { @@ -11307,22 +11480,16 @@ RuboCop::Cop::Layout::FirstParameterIndentation::MSG = T.let(T.unsafe(nil), Stri # # good # do_something(foo: 1, # bar: 2) -# @example EnforcedHashRocketStyle: key (default) +# @example EnforcedLastArgumentHashStyle: ignore_explicit +# # Ignore only explicit hashes. +# # # bad -# { -# :foo => bar, -# :ba => baz -# } -# { -# :foo => bar, -# :ba => baz -# } +# do_something(foo: 1, +# bar: 2) # # # good -# { -# :foo => bar, -# :ba => baz -# } +# do_something({foo: 1, +# bar: 2}) # # source://rubocop//lib/rubocop/cop/layout/hash_alignment.rb#178 class RuboCop::Cop::Layout::HashAlignment < ::RuboCop::Cop::Base @@ -11649,9 +11816,9 @@ RuboCop::Cop::Layout::HeredocArgumentClosingParenthesis::MSG = T.let(T.unsafe(ni # Checks the indentation of the here document bodies. The bodies # are indented one step. # -# Note: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), +# NOTE: When ``Layout/LineLength``'s `AllowHeredoc` is false (not default), # this cop does not add any offenses for long here documents to -# avoid `Layout/LineLength`'s offenses. +# avoid ``Layout/LineLength``'s offenses. # # @example # # bad @@ -12639,29 +12806,29 @@ RuboCop::Cop::Layout::LineEndStringConcatenationIndentation::PARENT_TYPES_FOR_IN # split across lines. These include arrays, hashes, and # method calls with argument lists. # -# If autocorrection is enabled, the following Layout cops +# If autocorrection is enabled, the following cops # are recommended to further format the broken lines. # (Many of these are enabled by default.) # -# * ArgumentAlignment -# * ArrayAlignment -# * BlockAlignment -# * BlockDelimiters -# * BlockEndNewline -# * ClosingParenthesisIndentation -# * FirstArgumentIndentation -# * FirstArrayElementIndentation -# * FirstHashElementIndentation -# * FirstParameterIndentation -# * HashAlignment -# * IndentationWidth -# * MultilineArrayLineBreaks -# * MultilineBlockLayout -# * MultilineHashBraceLayout -# * MultilineHashKeyLineBreaks -# * MultilineMethodArgumentLineBreaks -# * MultilineMethodParameterLineBreaks -# * ParameterAlignment +# * `Layout/ArgumentAlignment` +# * `Layout/ArrayAlignment` +# * `Layout/BlockAlignment` +# * `Layout/BlockEndNewline` +# * `LayoutClosingParenthesisIndentation` +# * `LayoutFirstArgumentIndentation` +# * `LayoutFirstArrayElementIndentation` +# * `LayoutFirstHashElementIndentation` +# * `LayoutFirstParameterIndentation` +# * `LayoutHashAlignment` +# * `LayoutIndentationWidth` +# * `LayoutMultilineArrayLineBreaks` +# * `LayoutMultilineBlockLayout` +# * `LayoutMultilineHashBraceLayout` +# * `LayoutMultilineHashKeyLineBreaks` +# * `LayoutMultilineMethodArgumentLineBreaks` +# * `LayoutMultilineMethodParameterLineBreaks` +# * `Layout/ParameterAlignment` +# * `Style/BlockDelimiters` # # Together, these cops will pretty print hashes, arrays, # method calls, etc. For example, let's say the max columns @@ -14075,6 +14242,9 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base include ::RuboCop::Cop::CheckAssignment extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#55 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#51 def on_lvasgn(node); end @@ -14083,61 +14253,71 @@ class RuboCop::Cop::Layout::RedundantLineBreak < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#72 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#73 def check_assignment(node, _rhs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 def comment_within?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#90 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 def configured_to_not_be_inspected?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#114 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#127 def convertible_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#68 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#69 def end_with_percent_blank_string?(processed_source); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#142 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 + def index_access_call_chained?(node); end + + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#155 def max_line_length; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#85 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#86 def offense?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#97 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#110 def other_cop_takes_precedence?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#78 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#79 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#103 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#93 + def require_backslash?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#116 def single_line_block_chain_enabled?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#107 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#120 def suitable_as_single_line?(node); end - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#133 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#146 def to_single_line(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#128 + # source://rubocop//lib/rubocop/cop/layout/redundant_line_break.rb#141 def too_long?(node); end end @@ -14272,21 +14452,29 @@ class RuboCop::Cop::Layout::SingleLineBlockChain < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#32 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#51 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#56 def call_method_after_block?(node, dot_range, closing_block_delimiter_line_num); end - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#35 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#40 def offending_range(node); end - # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#57 + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#62 def selector_range(node); end + + class << self + # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#28 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/layout/single_line_block_chain.rb#26 @@ -14893,149 +15081,166 @@ RuboCop::Cop::Layout::SpaceAroundMethodCallOperator::SPACES_REGEXP = T.let(T.uns # # # 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#53 +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#67 class RuboCop::Cop::Layout::SpaceAroundOperators < ::RuboCop::Cop::Base include ::RuboCop::Cop::PrecedingFollowingAlignment include ::RuboCop::Cop::RangeHelp include ::RuboCop::Cop::RationalLiteral extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_and(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_assignment(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_binary(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#111 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#125 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_class(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#78 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#92 def on_if(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#135 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#149 def on_match_pattern(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 def on_op_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#119 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#133 def on_or(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#103 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#117 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#70 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#84 def on_pair(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#85 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#99 def on_resbody(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#66 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#80 def on_sclass(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#93 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#107 def on_send(node); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#127 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#141 def on_special_asgn(node); end private - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#238 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#259 def align_hash_cop_config; end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#181 - def autocorrect(corrector, range); end + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#198 + def autocorrect(corrector, range, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#165 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#179 def check_operator(type, operator, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#191 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#212 def enclose_operator_with_space(corrector, range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#218 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#239 def excess_leading_space?(type, operator, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#233 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 def excess_trailing_space?(right_operand, with_space); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#250 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#277 def force_equal_sign_alignment?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#242 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#263 def hash_table_style?; end # @yield [msg] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#176 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#193 def offense(type, operator, with_space, right_operand); end - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#204 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#225 def offense_message(type, operator, with_space, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#161 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#175 def operator_with_regular_syntax?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#155 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#169 def regular_operator?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#254 - def should_not_have_surrounding_space?(operator); end + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#281 + def should_not_have_surrounding_space?(operator, right_operand); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#246 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#267 def space_around_exponent_operator?; end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#271 + def space_around_slash_operator?(right_operand); end + class << self - # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#62 + # source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#76 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#60 +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#74 RuboCop::Cop::Layout::SpaceAroundOperators::EXCESSIVE_SPACE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#59 +# source://rubocop//lib/rubocop/cop/layout/space_around_operators.rb#73 RuboCop::Cop::Layout::SpaceAroundOperators::IRREGULAR_METHODS = T.let(T.unsafe(nil), Array) # Checks that block braces have or don't have a space before the opening @@ -15088,35 +15293,38 @@ class RuboCop::Cop::Layout::SpaceBeforeBlockBraces < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#124 + # 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#144 + # 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#100 + # 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#140 + # 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#148 + # 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#115 + # 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#108 + # 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#131 + # source://rubocop//lib/rubocop/cop/layout/space_before_block_braces.rb#140 def style_for_empty_braces; end class << self @@ -16108,23 +16316,20 @@ class RuboCop::Cop::Layout::SpaceInsideStringInterpolation < ::RuboCop::Cop::Bas include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#31 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#30 def on_interpolation(begin_node); end private - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#47 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#46 def autocorrect(corrector, begin_node); end - # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#57 + # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#56 def delimiters(begin_node); end end # source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#28 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::NO_SPACE_MSG = T.let(T.unsafe(nil), String) - -# source://rubocop//lib/rubocop/cop/layout/space_inside_string_interpolation.rb#29 -RuboCop::Cop::Layout::SpaceInsideStringInterpolation::SPACE_MSG = T.let(T.unsafe(nil), String) +RuboCop::Cop::Layout::SpaceInsideStringInterpolation::MSG = T.let(T.unsafe(nil), String) # Looks for trailing blank lines and a final newline in the # source code. @@ -16810,22 +17015,22 @@ RuboCop::Cop::Lint::AmbiguousRegexpLiteral::MSG = T.let(T.unsafe(nil), String) # # @example # # bad -# if some_var = true +# if some_var = value # do_something # end # # # good -# if some_var == true +# if some_var == value # do_something # end # @example AllowSafeAssignment: true (default) # # good -# if (some_var = true) +# if (some_var = value) # do_something # end # @example AllowSafeAssignment: false # # bad -# if (some_var = true) +# if (some_var = value) # do_something # end # @@ -16907,10 +17112,10 @@ RuboCop::Cop::Lint::BigDecimalNew::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # Checks for places where binary operator has identical operands. # # It covers arithmetic operators: `-`, `/`, `%`; -# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, `<=`; +# comparison operators: `==`, `===`, `=~`, `>`, `>=`, `<`, ``<=``; # bitwise operators: `|`, `^`, `&`; # boolean operators: `&&`, `||` -# and "spaceship" operator - `<=>`. +# and "spaceship" operator - ``<=>``. # # Simple arithmetic operations are allowed by this cop: `+`, `*`, `**`, `<<` and `>>`. # Although these can be rewritten in a different way, it should not be necessary to @@ -17133,7 +17338,7 @@ end # source://rubocop//lib/rubocop/cop/lint/constant_definition_in_block.rb#67 RuboCop::Cop::Lint::ConstantDefinitionInBlock::MSG = T.let(T.unsafe(nil), String) -# Checks for overwriting an exception with an exception result by use `rescue =>`. +# Checks for overwriting an exception with an exception result by use ``rescue =>``. # # You intended to write as `rescue StandardError`. # However, you have written `rescue => StandardError`. @@ -17278,6 +17483,11 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # 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) @@ -17310,40 +17520,56 @@ RuboCop::Cop::Lint::ConstantResolution::MSG = T.let(T.unsafe(nil), String) # def some_method # my_debugger # end +# @example DebuggerRequires: [my_debugger/start] +# +# # bad (ok during development) # -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#67 +# require 'my_debugger/start' +# +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 class RuboCop::Cop::Lint::Debugger < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#70 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#116 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#142 def assumed_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#95 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#121 def assumed_usage_context?(node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#105 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#131 def chained_method_name(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#89 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#108 def debugger_method?(send_node); end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#82 + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#94 def debugger_methods; end - # source://rubocop//lib/rubocop/cop/lint/debugger.rb#78 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#114 + def debugger_require?(send_node); end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#101 + def debugger_requires; end + + # source://rubocop//lib/rubocop/cop/lint/debugger.rb#90 def message(node); end end -# source://rubocop//lib/rubocop/cop/lint/debugger.rb#68 +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#80 +RuboCop::Cop::Lint::Debugger::BLOCK_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/lint/debugger.rb#79 RuboCop::Cop::Lint::Debugger::MSG = T.let(T.unsafe(nil), String) # Checks for uses of the deprecated class method usages. @@ -18976,36 +19202,45 @@ class RuboCop::Cop::Lint::ErbNewArguments < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#83 + # 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#88 + # 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#153 + # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#160 def arguments_range(node); end - # source://rubocop//lib/rubocop/cop/lint/erb_new_arguments.rb#108 + # 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#123 + # 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#119 + # 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#140 + # 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::MESSAGES = T.let(T.unsafe(nil), Array) +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#80 +# 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 @@ -19047,13 +19282,9 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # floating-point value representation to be exactly the same, which is very unlikely # if you perform any arithmetic operations involving precision loss. # -# @example -# # bad -# x == 0.1 -# x != 0.1 -# -# # good - using BigDecimal -# x.to_d == 0.1.to_d +# # good - comparing against zero +# x == 0.0 +# x != 0.0 # # # good # (x - 0.1).abs < Float::EPSILON @@ -19065,38 +19296,51 @@ RuboCop::Cop::Lint::FlipFlop::MSG = T.let(T.unsafe(nil), String) # # Or some other epsilon based type of comparison: # # https://www.embeddeduse.com/2019/08/26/qt-compare-two-floats/ # -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#31 +# @example +# # bad +# x == 0.1 +# x != 0.1 +# +# # good - using BigDecimal +# x.to_d == 0.1.to_d +# +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 class RuboCop::Cop::Lint::FloatComparison < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#44 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#79 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#89 def check_numeric_returning_method(node); end - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#63 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#73 def check_send(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#47 + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#53 def float?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#68 + def literal_zero?(node); end end -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#34 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 RuboCop::Cop::Lint::FloatComparison::EQUALITY_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#40 RuboCop::Cop::Lint::FloatComparison::FLOAT_INSTANCE_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#35 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#39 RuboCop::Cop::Lint::FloatComparison::FLOAT_RETURNING_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#32 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#36 RuboCop::Cop::Lint::FloatComparison::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#38 +# source://rubocop//lib/rubocop/cop/lint/float_comparison.rb#42 RuboCop::Cop::Lint::FloatComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Identifies Float literals which are, like, really really really @@ -19290,6 +19534,9 @@ class RuboCop::Cop::Lint::HashCompareByIdentity < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#37 def id_as_hash_key?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/lint/hash_compare_by_identity.rb#41 def on_send(node); end end @@ -19457,41 +19704,43 @@ RuboCop::Cop::Lint::IdentityComparison::RESTRICT_ON_SEND = T.let(T.unsafe(nil), # # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#25 class RuboCop::Cop::Lint::ImplicitStringConcatenation < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#33 + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#36 def on_dstr(node); end private - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#83 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#90 def display_str(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#50 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#57 def each_bad_cons(node); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#65 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#72 def ending_delimiter(str); end - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#91 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#98 def str_content(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#75 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#82 def string_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#79 + # source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#86 def string_literals?(node1, node2); end end -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_ARRAY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#30 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#32 RuboCop::Cop::Lint::ImplicitStringConcatenation::FOR_METHOD = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#26 +# source://rubocop//lib/rubocop/cop/lint/implicit_string_concatenation.rb#28 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. @@ -19736,6 +19985,43 @@ end # source://rubocop//lib/rubocop/cop/lint/interpolation_check.rb#28 RuboCop::Cop::Lint::InterpolationCheck::MSG = T.let(T.unsafe(nil), String) +# Emulates the following Ruby warning in Ruby 3.3. +# +# [source,ruby] +# ---- +# $ ruby -e '0.times { it }' +# -e:1: warning: `it` calls without arguments will refer to the first block param in Ruby 3.4; +# use it() or self.it +# ---- +# +# `it` calls without arguments will refer to the first block param in Ruby 3.4. +# So use `it()` or `self.it` to ensure compatibility. +# +# @example +# +# # bad +# do_something { it } +# +# # good +# do_something { it() } +# do_something { self.it } +# +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#27 +class RuboCop::Cop::Lint::ItWithoutArgumentsInBlock < ::RuboCop::Cop::Base + include ::RuboCop::AST::NodePattern::Macros + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#48 + def deprecated_it_method?(node); end + + # source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#33 + def on_block(node); end +end + +# source://rubocop//lib/rubocop/cop/lint/it_without_arguments_in_block.rb#30 +RuboCop::Cop::Lint::ItWithoutArgumentsInBlock::MSG = T.let(T.unsafe(nil), String) + # Checks uses of lambda without a literal block. # It emulates the following warning in Ruby 3.0: # @@ -19870,6 +20156,70 @@ end # source://rubocop//lib/rubocop/cop/lint/literal_as_condition.rb#38 RuboCop::Cop::Lint::LiteralAsCondition::MSG = T.let(T.unsafe(nil), String) +# Checks for literal assignments in the conditions of `if`, `while`, and `until`. +# It emulates the following Ruby warning: +# +# [source,console] +# ---- +# $ ruby -we 'if x = true; end' +# -e:1: warning: found `= literal' in conditional, should be == +# ---- +# +# As a lint cop, it cannot be determined if `==` is appropriate as intended, +# therefore this cop does not provide autocorrection. +# +# @example +# +# # bad +# if x = 42 +# do_something +# end +# +# # good +# if x == 42 +# do_something +# end +# +# # good +# if x = y +# do_something +# end +# +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#35 +class RuboCop::Cop::Lint::LiteralAssignmentInCondition < ::RuboCop::Cop::Base + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_if(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_until(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#39 + def on_while(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#62 + def all_literals?(node); end + + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#79 + def offense_range(asgn_node, rhs); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#75 + def parallel_assignment_with_splat_operator?(node); end + + # @yield [node] + # + # source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#56 + def traverse_node(node, &block); end +end + +# source://rubocop//lib/rubocop/cop/lint/literal_assignment_in_condition.rb#36 +RuboCop::Cop::Lint::LiteralAssignmentInCondition::MSG = T.let(T.unsafe(nil), String) + # Checks for interpolated literals. # # @example @@ -20245,7 +20595,7 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#56 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#58 def each_unsafe_regexp_range(node); end # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#37 @@ -20259,31 +20609,31 @@ class RuboCop::Cop::Lint::MixedCaseRange < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#72 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#74 def build_source_range(range_start, range_end); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#76 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#78 def range_for(char); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#82 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#84 def range_pairs(expr); end - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#102 - def rewrite_regexp_range(source); end + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#104 + def regexp_range(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#92 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#94 def skip_expression?(expr); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#96 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#98 def skip_range?(range_start, range_end); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#86 + # source://rubocop//lib/rubocop/cop/lint/mixed_case_range.rb#88 def unsafe_range?(range_start, range_end); end end @@ -20360,14 +20710,17 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # Checks for nested method definitions. # -# @example AllowedPatterns: ['baz'] -# # good -# def foo(obj) -# obj.do_baz do +# @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 -# end # @example # # # good @@ -20430,17 +20783,14 @@ RuboCop::Cop::Lint::MultipleComparison::SET_OPERATION_OPERATORS = T.let(T.unsafe # end # end # end -# @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 +# @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#97 class RuboCop::Cop::Lint::NestedMethodDefinition < ::RuboCop::Cop::Base @@ -20557,22 +20907,16 @@ class RuboCop::Cop::Lint::NextWithoutAccumulator < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 def on_block(node); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#51 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#42 def on_block_body_of_reduce(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#38 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#28 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#56 - def on_numblock_body_of_reduce(param0 = T.unsafe(nil)); end - private - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#60 + # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#49 def parent_block_node(node); end - - # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#64 - def parent_numblock_node(node); end end # source://rubocop//lib/rubocop/cop/lint/next_without_accumulator.rb#26 @@ -20805,10 +21149,10 @@ RuboCop::Cop::Lint::NonAtomicFileOperation::RESTRICT_ON_SEND = T.let(T.unsafe(ni class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#174 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#172 def loop_variable(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#157 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#155 def method_require?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#65 @@ -20820,19 +21164,19 @@ class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#77 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#147 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#145 def unsorted_dir_block?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#152 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#150 def unsorted_dir_each?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#168 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#166 def unsorted_dir_each_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#162 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#160 def unsorted_dir_glob_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#179 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#177 def var_is_required?(param0, param1); end private @@ -20852,12 +21196,12 @@ class RuboCop::Cop::Lint::NonDeterministicRequireOrder < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#138 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#136 def unsorted_dir_loop?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#142 + # source://rubocop//lib/rubocop/cop/lint/non_deterministic_require_order.rb#140 def unsorted_dir_pass?(node); end end @@ -20932,7 +21276,7 @@ RuboCop::Cop::Lint::NonLocalExitFromIterator::MSG = T.let(T.unsafe(nil), String) # # Conversion with `Integer`, `Float`, etc. will raise an `ArgumentError` # if given input that is not numeric (eg. an empty string), whereas -# `to_i`, etc. will try to convert regardless of input (`''.to_i => 0`). +# `to_i`, etc. will try to convert regardless of input (``''.to_i => 0``). # As such, this cop is disabled by default because it's not necessarily # always correct to raise if a value is not numeric. # @@ -20990,7 +21334,10 @@ class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#103 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#107 def on_send(node); end # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#93 @@ -21003,43 +21350,43 @@ class RuboCop::Cop::Lint::NumberConversion < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#165 def allow_receiver?(receiver); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#172 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#177 def allowed_method_name?(name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#182 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#187 def conversion_method?(method_name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#146 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#151 def correct_method(node, receiver); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#150 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 def correct_sym_method(to_method); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#129 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#134 def handle_as_symbol(node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#110 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#115 def handle_conversion_method(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#190 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#195 def ignored_class?(name); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#186 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#191 def ignored_classes; end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#155 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#160 def remove_parentheses(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#176 + # source://rubocop//lib/rubocop/cop/lint/number_conversion.rb#181 def top_receiver(node); end end @@ -21928,7 +22275,8 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # 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 snake case constant. +# and an offense is not detected when the receiver is a constant. The detection also applies +# 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. @@ -21967,6 +22315,22 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # # # good - without `&.` this will always return `true` # foo&.respond_to?(:to_a) +# +# # bad - for `nil`s conversion methods return default values for the type +# foo&.to_h || {} +# foo&.to_h { |k, v| [k, v] } || {} +# foo&.to_a || [] +# foo&.to_i || 0 +# foo&.to_f || 0.0 +# foo&.to_s || '' +# +# # good +# foo.to_h +# foo.to_h { |k, v| [k, v] } +# foo.to_a +# foo.to_i +# foo.to_f +# foo.to_s # @example AllowedMethods: [nil_safe_method] # # bad # do_something if attrs&.nil_safe_method(:[]) @@ -21975,38 +22339,51 @@ RuboCop::Cop::Lint::RedundantRequireStatement::RUBY_22_LOADED_FEATURES = T.let(T # do_something if attrs.nil_safe_method(:[]) # do_something if attrs&.not_nil_safe_method(:[]) # -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#61 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#78 class RuboCop::Cop::Lint::RedundantSafeNavigation < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods - include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#78 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#95 + def conversion_with_default?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#107 def on_csend(node); end - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#73 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#117 + def on_or(node); end + + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#90 def respond_to_nil_specific_method?(param0 = T.unsafe(nil)); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#91 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#133 + def assume_receiver_instance_exists?(receiver); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#139 def check?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#101 + # source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#149 def condition?(parent, node); end end -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#66 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#82 RuboCop::Cop::Lint::RedundantSafeNavigation::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#68 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#83 +RuboCop::Cop::Lint::RedundantSafeNavigation::MSG_LITERAL = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#85 RuboCop::Cop::Lint::RedundantSafeNavigation::NIL_SPECIFIC_METHODS = T.let(T.unsafe(nil), Set) -# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#70 +# source://rubocop//lib/rubocop/cop/lint/redundant_safe_navigation.rb#87 RuboCop::Cop::Lint::RedundantSafeNavigation::SNAKE_CASE = T.let(T.unsafe(nil), Regexp) # Checks for unneeded usages of splat expansion @@ -22233,21 +22610,21 @@ 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#36 + # 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#36 + # 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#56 + # 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#66 + # 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#74 + # source://rubocop//lib/rubocop/cop/lint/redundant_with_index.rb#78 def with_index_range(send); end end @@ -22581,13 +22958,13 @@ class RuboCop::Cop::Lint::RescueType < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#71 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#69 def correction(*exceptions); end - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#82 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#80 def invalid_exceptions(exceptions); end - # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#78 + # source://rubocop//lib/rubocop/cop/lint/rescue_type.rb#76 def valid_exceptions(exceptions); end end @@ -22678,24 +23055,24 @@ class RuboCop::Cop::Lint::SafeNavigationChain < ::RuboCop::Cop::Base # @param send_node [RuboCop::AST::SendNode] # @return [String] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#63 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#62 def add_safe_navigation_operator(offense_range:, send_node:); end # @param corrector [RuboCop::Cop::Corrector] # @param offense_range [Parser::Source::Range] # @param send_node [RuboCop::AST::SendNode] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#82 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#81 def autocorrect(corrector, offense_range:, send_node:); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#91 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#90 def brackets?(send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#95 + # source://rubocop//lib/rubocop/cop/lint/safe_navigation_chain.rb#94 def require_parentheses?(send_node); end end @@ -22825,7 +23202,7 @@ class RuboCop::Cop::Lint::ScriptPermission < ::RuboCop::Cop::Base private # source://rubocop//lib/rubocop/cop/lint/script_permission.rb#55 - def autocorrect(comment); end + def autocorrect; end # @return [Boolean] # @@ -22849,55 +23226,74 @@ RuboCop::Cop::Lint::ScriptPermission::SHEBANG = T.let(T.unsafe(nil), String) # foo = foo # foo, bar = foo, bar # Foo = Foo +# hash['foo'] = hash['foo'] +# obj.attr = obj.attr # # # good # foo = bar # foo, bar = bar, foo # Foo = Bar +# hash['foo'] = hash['bar'] +# obj.attr = obj.attr2 +# +# # good (method calls possibly can return different results) +# hash[foo] = hash[foo] # -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#19 +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#26 class RuboCop::Cop::Lint::SelfAssignment < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#41 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#57 def on_casgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_cvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_gvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_ivasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#45 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#49 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#65 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#53 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#69 def on_or_asgn(node); end + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#36 + def on_send(node); end + private + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#103 + def handle_attribute_assignment(node); end + + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#92 + def handle_key_assignment(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#61 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#77 def multiple_self_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#71 + # source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#87 def rhs_matches_lhs?(rhs, lhs); end end -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#22 +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#29 RuboCop::Cop::Lint::SelfAssignment::ASSIGNMENT_TYPE_TO_RHS_TYPE = T.let(T.unsafe(nil), Hash) -# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#20 +# source://rubocop//lib/rubocop/cop/lint/self_assignment.rb#27 RuboCop::Cop::Lint::SelfAssignment::MSG = T.let(T.unsafe(nil), String) # Checks for `send`, `public_send`, and `__send__` methods @@ -23037,7 +23433,7 @@ class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base # Get argument references without assignments' references # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#160 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#161 def argument_references(argument); end # Find the first argument assignment, which doesn't reference the @@ -23053,17 +23449,17 @@ class RuboCop::Cop::Lint::ShadowedArgument < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#170 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#171 def ignore_implicit_references?; end # Check whether the given node is nested into block or conditional. # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#151 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#152 def node_within_block_or_conditional?(node, stop_search_node); end - # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#143 + # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#144 def reference_pos(node); end # source://rubocop//lib/rubocop/cop/lint/shadowed_argument.rb#95 @@ -23421,6 +23817,7 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) # 'underscored_string'.to_sym # :'underscored_symbol' # 'hyphenated-string'.to_sym +# "string_#{interpolation}".to_sym # # # good # :string @@ -23428,6 +23825,7 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) # :underscored_string # :underscored_symbol # :'hyphenated-string' +# :"string_#{interpolation}" # @example EnforcedStyle: strict (default) # # # bad @@ -23463,60 +23861,60 @@ RuboCop::Cop::Lint::SuppressedException::MSG = T.let(T.unsafe(nil), String) # b: 2 # } # -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#66 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#68 class RuboCop::Cop::Lint::SymbolConversion < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle include ::RuboCop::Cop::SymbolHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#100 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#105 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#78 def on_send(node); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#83 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#88 def on_sym(node); end private - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#142 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#147 def correct_hash_key(node); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#161 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#166 def correct_inconsistent_hash_keys(keys); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#134 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#139 def in_alias?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#138 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#143 def in_percent_literal_array?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#121 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#126 def properly_quoted?(source, value); end - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#117 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#122 def register_offense(node, correction:, message: T.unsafe(nil)); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#130 + # source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#135 def requires_quotes?(sym_node); end end -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#71 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#73 RuboCop::Cop::Lint::SymbolConversion::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#72 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 RuboCop::Cop::Lint::SymbolConversion::MSG_CONSISTENCY = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#74 +# source://rubocop//lib/rubocop/cop/lint/symbol_conversion.rb#76 RuboCop::Cop::Lint::SymbolConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Repacks Parser's diagnostics/errors @@ -23532,13 +23930,13 @@ class RuboCop::Cop::Lint::Syntax < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/lint/syntax.rb#19 def add_offense_from_diagnostic(diagnostic, ruby_version); end - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#26 + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#29 def add_offense_from_error(error); end - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#31 + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#34 def beautify_message(message); end - # source://rubocop//lib/rubocop/cop/lint/syntax.rb#37 + # source://rubocop//lib/rubocop/cop/lint/syntax.rb#40 def find_severity(_range, _severity); end end @@ -23581,12 +23979,12 @@ class RuboCop::Cop::Lint::ToEnumArguments < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#78 + # 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#63 + # source://rubocop//lib/rubocop/cop/lint/to_enum_arguments.rb#61 def arguments_match?(arguments, def_node); end end @@ -24010,31 +24408,31 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#190 + # 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#198 + # 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#158 + # 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#141 + # 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#175 + # 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#127 + # 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 @@ -24042,7 +24440,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # 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#166 + # 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 @@ -24050,7 +24448,7 @@ class RuboCop::Cop::Lint::UnmodifiedReduceAccumulator < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#182 + # source://rubocop//lib/rubocop/cop/lint/unmodified_reduce_accumulator.rb#183 def returns_accumulator_anywhere?(return_values, accumulator_name); end end @@ -24245,7 +24643,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#194 + # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#200 def conditional_continue_keyword?(break_statement); end # @return [Boolean] @@ -24255,7 +24653,7 @@ class RuboCop::Cop::Lint::UnreachableLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/unreachable_loop.rb#184 + # 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 @@ -24474,7 +24872,7 @@ class RuboCop::Cop::Lint::UnusedMethodArgument < ::RuboCop::Cop::Base def message(variable); end class << self - # source://rubocop-performance/1.19.1/lib/rubocop-performance.rb#15 + # source://rubocop-performance/1.22.1/lib/rubocop-performance.rb#15 def autocorrect_incompatible_with; end # source://rubocop//lib/rubocop/cop/lint/unused_method_argument.rb#75 @@ -25220,7 +25618,7 @@ class RuboCop::Cop::Lint::UselessSetterCall::MethodVariableTracker end # Checks for uses of `Integer#times` that will never yield -# (when the integer <= 0) or that will only ever yield once +# (when the integer ``<= 0``) or that will only ever yield once # (`1.times`). # # @example @@ -25351,42 +25749,47 @@ class RuboCop::Cop::Lint::Void < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/lint/void.rb#212 + # source://rubocop//lib/rubocop/cop/lint/void.rb#222 def autocorrect_nonmutating_send(corrector, node, suggestion); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#208 + # source://rubocop//lib/rubocop/cop/lint/void.rb#216 def autocorrect_void_expression(corrector, node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#196 + # source://rubocop//lib/rubocop/cop/lint/void.rb#204 def autocorrect_void_op(corrector, node); end # source://rubocop//lib/rubocop/cop/lint/void.rb#99 def check_begin(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#108 + # source://rubocop//lib/rubocop/cop/lint/void.rb#113 def check_expression(expr); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#146 + # source://rubocop//lib/rubocop/cop/lint/void.rb#154 def check_literal(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#170 + # source://rubocop//lib/rubocop/cop/lint/void.rb#178 def check_nonmutating(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#154 + # source://rubocop//lib/rubocop/cop/lint/void.rb#162 def check_self(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#128 + # source://rubocop//lib/rubocop/cop/lint/void.rb#136 def check_var(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#162 + # source://rubocop//lib/rubocop/cop/lint/void.rb#170 def check_void_expression(node); end - # source://rubocop//lib/rubocop/cop/lint/void.rb#118 + # source://rubocop//lib/rubocop/cop/lint/void.rb#125 def check_void_op(node, &block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/lint/void.rb#188 + # source://rubocop//lib/rubocop/cop/lint/void.rb#231 + def entirely_literal?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/lint/void.rb#196 def in_void_context?(node); end end @@ -25613,6 +26016,11 @@ module RuboCop::Cop::MethodComplexity # # 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. @@ -25641,9 +26049,9 @@ module RuboCop::Cop::Metrics; end # # Interpreting ABC size: # -# * <= 17 satisfactory -# * 18..30 unsatisfactory -# * > 30 dangerous +# * ``<= 17`` satisfactory +# * `18..30` unsatisfactory +# * `>` 30 dangerous # # You can have repeated "attributes" calls count as a single "branch". # For this purpose, attributes are any method with no argument; no attempt @@ -25747,12 +26155,12 @@ end # source://rubocop//lib/rubocop/cop/metrics/block_length.rb#49 RuboCop::Cop::Metrics::BlockLength::LABEL = T.let(T.unsafe(nil), String) -# Checks for excessive nesting of conditional and looping -# constructs. +# Checks for excessive nesting of conditional and looping constructs. # -# You can configure if blocks are considered using the `CountBlocks` -# option. When set to `false` (the default) blocks are not counted -# towards the nesting level. Set to `true` to count blocks as well. +# 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. # @@ -25771,15 +26179,25 @@ class RuboCop::Cop::Metrics::BlockNesting < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#44 + # 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#54 + # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#62 def count_blocks?; end - # source://rubocop//lib/rubocop/cop/metrics/block_nesting.rb#50 + # @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 @@ -27241,33 +27659,56 @@ class RuboCop::Cop::Naming::BlockForwarding < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#114 def anonymous_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#119 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#87 + def block_argument_name_matched?(block_pass_node, last_argument); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#146 def block_forwarding_name; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#73 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#77 def expected_block_forwarding_style?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#91 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#118 def explicit_block_argument?(node); end - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#95 + # Prevents the following syntax error: + # + # # foo.rb + # def foo(&) + # block_method do + # bar(&) + # end + # end + # + # $ ruby -vc foo.rb + # ruby 3.3.0 (2023-12-25 revision 5124f9ac75) [x86_64-darwin22] + # foo.rb: foo.rb:4: anonymous block parameter is also used within block (SyntaxError) + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#106 + def invalidates_syntax?(block_pass_node); end + + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#122 def register_offense(block_argument, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#111 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#138 def use_block_argument_as_local_variable?(node, last_argument); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#83 + # source://rubocop//lib/rubocop/cop/naming/block_forwarding.rb#110 def use_kwarg_in_method_definition?(node); end class << self @@ -27376,7 +27817,7 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#27 def class_or_struct_return_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#69 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#68 def literal_receiver?(param0 = T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#33 @@ -27391,7 +27832,7 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#74 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#73 def allowed_conditional_expression_on_rhs?(node); end # @return [Boolean] @@ -27401,7 +27842,7 @@ class RuboCop::Cop::Naming::ConstantName < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#78 + # source://rubocop//lib/rubocop/cop/naming/constant_name.rb#77 def contains_constant?(node); end end @@ -27493,8 +27934,6 @@ class RuboCop::Cop::Naming::FileName < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/file_name.rb#165 def find_definition(node); end - # @yield [source_range(processed_source.buffer, 1, 0), msg] - # # source://rubocop//lib/rubocop/cop/naming/file_name.rb#65 def for_bad_filename(file_path); end @@ -27746,13 +28185,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#126 def check_token?(type); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#244 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#243 def create_message(word, message = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#218 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#217 def create_multiple_word_message_for_file(words); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#214 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#213 def create_single_word_message_for_file(word); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#189 @@ -27761,10 +28200,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#160 def extract_regexp(term, term_definition); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#252 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#251 def find_flagged_term(word); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#266 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#265 def format_suggestions(suggestions); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#197 @@ -27773,10 +28212,10 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#100 def investigate_tokens; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#232 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#231 def mask_input(str); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#281 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#280 def offense_range(token, word); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#130 @@ -27785,13 +28224,13 @@ class RuboCop::Cop::Naming::InclusiveLanguage < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#144 def preprocess_flagged_terms; end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#259 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#258 def preprocess_suggestions(suggestions); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#179 def process_allowed_regex(allowed); end - # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#222 + # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#221 def scan_for_words(input); end # source://rubocop//lib/rubocop/cop/naming/inclusive_language.rb#174 @@ -28419,9 +28858,22 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # can be used to specify whether method names and symbols should be checked. # Both are enabled by default. # -# @example AllowedPatterns: ['_v\d+\z'] +# @example EnforcedStyle: normalcase (default) +# # bad +# :some_sym_1 +# variable_1 = 1 +# +# def some_method_1; end +# +# def some_method1(arg_1); end +# # # good -# :some_sym_v1 +# :some_sym1 +# variable1 = 1 +# +# def some_method1; end +# +# def some_method1(arg1); end # @example EnforcedStyle: snake_case # # bad # :some_sym1 @@ -28483,22 +28935,9 @@ RuboCop::Cop::Naming::VariableName::MSG = T.let(T.unsafe(nil), String) # @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 -# +# @example AllowedPatterns: ['_v\d+\z'] # # good -# :some_sym1 -# variable1 = 1 -# -# def some_method1; end -# -# def some_method1(arg1); end +# :some_sym_v1 # # source://rubocop//lib/rubocop/cop/naming/variable_number.rb#103 class RuboCop::Cop::Naming::VariableNumber < ::RuboCop::Cop::Base @@ -29318,6 +29757,101 @@ class RuboCop::Cop::PunctuationCorrector end end +module RuboCop::Cop::RSpec; end + +class RuboCop::Cop::RSpec::MultipleExpectations < ::RuboCop::Cop::RSpec::Base + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#78 + def aggregate_failures?(param0 = T.unsafe(nil), param1); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#89 + def aggregate_failures_block?(param0 = T.unsafe(nil)); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#86 + def expect?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#93 + def on_block(node); end + + private + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#109 + def example_with_aggregate_failures?(example_node); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#116 + def find_aggregate_failures(example_node); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#121 + def find_expectation(node, &block); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#132 + def flag_example(node, expectation_count:); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_expectations.rb#143 + def max_expectations; end +end + +class RuboCop::Cop::RSpec::MultipleMemoizedHelpers < ::RuboCop::Cop::RSpec::Base + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#91 + def on_block(node); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#102 + def on_new_investigation; end + + private + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#111 + def all_helpers(node); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#141 + def allow_subject?; end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#109 + def example_group_memoized_helpers; end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#116 + def helpers(node); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#137 + def max; end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/multiple_memoized_helpers.rb#127 + def variable_nodes(node); end +end + +class RuboCop::Cop::RSpec::NestedGroups < ::RuboCop::Cop::RSpec::Base + # source://rubocop//lib/rubocop/cop/exclude_limit.rb#11 + def max=(value); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/nested_groups.rb#107 + def on_top_level_group(node); end + + private + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/nested_groups.rb#157 + def allowed_groups; end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/nested_groups.rb#134 + def count_up_nesting?(node, example_group); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/nested_groups.rb#119 + def find_nested_example_groups(node, nesting: T.unsafe(nil), &block); end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/nested_groups.rb#144 + def max_nesting; end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/nested_groups.rb#148 + def max_nesting_config; end + + # source://rubocop-rspec/3.1.0/lib/rubocop/cop/rspec/nested_groups.rb#140 + def message(nesting); end +end + # Methods that calculate and return Parser::Source::Ranges # # source://rubocop//lib/rubocop/cop/mixin/range_help.rb#6 @@ -29519,7 +30053,7 @@ class RuboCop::Cop::Registry # @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 + # source://rubocop-rspec_rails/2.30.0/lib/rubocop-rspec_rails.rb#23 def qualified_cop_name(name, path, warn: T.unsafe(nil)); end # source://rubocop//lib/rubocop/cop/registry.rb#166 @@ -29890,6 +30424,7 @@ RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # bad # open(something) # open("| #{something}") +# open("| foo") # URI.open(something) # # # good @@ -29899,7 +30434,6 @@ RuboCop::Cop::Security::MarshalLoad::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # # good (literal strings) # open("foo.text") -# open("| foo") # URI.open("http://example.com") # # source://rubocop//lib/rubocop/cop/security/open.rb#37 @@ -30256,6 +30790,17 @@ module RuboCop::Cop::Style; end # 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 EnforcedStyle: group (default) # # bad @@ -30307,94 +30852,128 @@ module RuboCop::Cop::Style; end # private :bar, :baz # # 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 # -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#70 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#109 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#91 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#135 + def access_modifier_with_attr?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#130 def access_modifier_with_symbol?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#95 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#140 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#145 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#195 def access_modifier_is_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#149 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#199 def access_modifier_is_not_inlined?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#177 + def allow_modifiers_on_attrs?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#173 def allow_modifiers_on_symbols?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#112 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#158 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#269 def def_source(node, def_node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#180 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#230 def find_argument_less_modifier_node(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#169 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#219 def find_corresponding_def_node(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#137 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#187 def group_style?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#141 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#191 def inline_style?; end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#211 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#261 def insert_inline_modifier(corrector, node, modifier_name); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#159 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#209 def message(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#131 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#181 def offense?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#215 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#265 def remove_node(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#194 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#244 def replace_def(corrector, node, def_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#153 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#203 def right_siblings_same_inline_method?(node); end - # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#188 + # source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#238 def select_grouped_def_nodes(node); end end -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#88 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#127 RuboCop::Cop::Style::AccessModifierDeclarations::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#76 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#115 RuboCop::Cop::Style::AccessModifierDeclarations::GROUP_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#81 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#120 RuboCop::Cop::Style::AccessModifierDeclarations::INLINE_STYLE_MESSAGE = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#86 +# source://rubocop//lib/rubocop/cop/style/access_modifier_declarations.rb#125 RuboCop::Cop::Style::AccessModifierDeclarations::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for grouping of accessors in `class` and `module` bodies. @@ -30538,7 +31117,7 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/alias.rb#51 + # source://rubocop//lib/rubocop/cop/style/alias.rb#52 def on_alias(node); end # source://rubocop//lib/rubocop/cop/style/alias.rb#41 @@ -30546,47 +31125,47 @@ class RuboCop::Cop::Style::Alias < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/alias.rb#85 + # 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#75 + # 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#79 + # source://rubocop//lib/rubocop/cop/style/alias.rb#80 def alias_method_possible?(node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#65 + # source://rubocop//lib/rubocop/cop/style/alias.rb#66 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/alias.rb#124 + # source://rubocop//lib/rubocop/cop/style/alias.rb#125 def bareword?(sym_node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#128 + # 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#135 + # 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#142 + # 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#147 + # source://rubocop//lib/rubocop/cop/style/alias.rb#148 def identifier(node); end - # source://rubocop//lib/rubocop/cop/style/alias.rb#113 + # 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#96 + # source://rubocop//lib/rubocop/cop/style/alias.rb#97 def scope_type(node); end end @@ -30710,11 +31289,28 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # This cop identifies places where `do_something(*args, &block)` # can be replaced by `do_something(...)`. # +# 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. +# 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`. # # @example # # bad @@ -30733,21 +31329,24 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # end # @example UseAnonymousForwarding: true (default, only relevant for Ruby >= 3.2) # # bad -# def foo(*args, **kwargs) +# def foo(*args, **kwargs, &block) # args_only(*args) # kwargs_only(**kwargs) +# block_only(&block) # end # # # good -# def foo(*, **) +# def foo(*, **, &) # args_only(*) # kwargs_only(**) +# block_only(&) # end # @example UseAnonymousForwarding: false (only relevant for Ruby >= 3.2) # # good -# def foo(*args, **kwargs) +# 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 @@ -30769,191 +31368,253 @@ RuboCop::Cop::Style::AndOr::MSG = T.let(T.unsafe(nil), String) # def foo(**kwargs) # bar(**kwargs) # end +# @example RedundantRestArgumentNames: ['args', 'arguments'] (default) +# # bad +# def foo(*args) +# bar(*args) +# end # -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#75 +# # 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 +# +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#127 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#89 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#89 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#146 def on_defs(node); end private - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#122 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#187 def add_forward_all_offenses(node, send_classifications, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#233 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#353 def add_parens_if_missing(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#131 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#214 def add_post_ruby_32_offenses(def_node, send_classifications, forwardable_args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#225 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#345 def allow_only_rest_arguments?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#217 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 def arguments_range(node, first_node); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#265 def classification_and_forwards(def_node, send_node, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#159 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 def classify_send_nodes(def_node, send_nodes, referenced_lvars, forwardable_args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#114 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#497 + def explicit_block_name?; end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#170 def extract_forwardable_args(args); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#149 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#240 def non_splat_or_block_pass_lvar_references(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#118 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#182 def only_forwards_all?(send_classifications); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#207 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#294 + def outside_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#174 + def redundant_forwardable_named_args(restarg, kwrestarg, blockarg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#284 + def redundant_named_arg(arg, config_name, keyword); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#327 def register_forward_all_offense(def_or_send, send_or_arguments, rest_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#191 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#300 def register_forward_args_offense(def_arguments_or_send, rest_arg_or_splat); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#199 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#316 + def register_forward_block_arg_offense(add_parens, def_arguments_or_send, block_arg); end + + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#308 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#229 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#349 def use_anonymous_forwarding?; end + + class << self + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#142 + def autocorrect_incompatible_with; end + end end -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#83 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#135 RuboCop::Cop::Style::ArgumentsForwarding::ADDITIONAL_ARG_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#86 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#138 RuboCop::Cop::Style::ArgumentsForwarding::ARGS_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#82 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#140 +RuboCop::Cop::Style::ArgumentsForwarding::BLOCK_MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#134 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_LVAR_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#85 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#137 RuboCop::Cop::Style::ArgumentsForwarding::FORWARDING_MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#87 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#139 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#240 +# source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#360 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#252 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#372 def initialize(def_node, send_node, referenced_lvars, forwardable_args, **config); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#280 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#400 def classification; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#247 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#367 def extract_forwarded_kwrest_arg(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#274 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#394 def forwarded_block_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#250 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#370 def forwarded_block_arg?(param0 = T.unsafe(nil), param1); end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#268 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#388 def forwarded_kwrest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#262 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#382 def forwarded_rest_arg; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#244 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#364 def forwarded_rest_arg?(param0 = T.unsafe(nil), param1); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#348 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#468 def additional_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#344 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#464 def additional_kwargs_or_forwarded_kwargs?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#358 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#478 def allow_offense_for_no_block?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#329 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#449 def any_arg_referenced?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#313 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#433 def arguments; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#292 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#412 def can_forward_all?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#352 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#472 def forward_additional_kwargs?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#309 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#429 def forwarded_rest_and_kwrest_args; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#362 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#491 + def missing_rest_arg_or_kwrest_arg?; end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#482 def no_additional_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#337 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#457 def no_post_splat_args?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#305 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#425 def offensive_block_forwarding?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#325 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#445 def referenced_block_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#321 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#441 def referenced_kwrest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#317 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#437 def referenced_rest_arg?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#301 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#421 def ruby_32_missing_rest_or_kwest?; end - # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#333 + # source://rubocop//lib/rubocop/cop/style/arguments_forwarding.rb#453 def target_ruby_version; end end @@ -30995,6 +31656,46 @@ RuboCop::Cop::Style::ArrayCoercion::CHECK_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/array_coercion.rb#44 RuboCop::Cop::Style::ArrayCoercion::SPLAT_MSG = T.let(T.unsafe(nil), String) +# Identifies usages of `arr[0]` and `arr[-1]` and suggests to change +# them to use `arr.first` and `arr.last` instead. +# +# The cop is disabled by default due to safety concerns. +# +# @example +# # bad +# arr[0] +# arr[-1] +# +# # good +# arr.first +# arr.last +# arr[0] = 2 +# arr[0][-2] +# +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#28 +class RuboCop::Cop::Style::ArrayFirstLast < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#35 + def on_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#58 + def brace_method?(node); end + + # source://rubocop//lib/rubocop/cop/style/array_first_last.rb#53 + def innermost_braces_node(node); end +end + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#31 +RuboCop::Cop::Style::ArrayFirstLast::MSG = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/array_first_last.rb#32 +RuboCop::Cop::Style::ArrayFirstLast::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # In Ruby 3.1, `Array#intersect?` has been added. # # This cop identifies places where `(array1 & array2).any?` @@ -31197,28 +31898,36 @@ RuboCop::Cop::Style::Attr::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # ... # end # -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#19 +# # bad +# f = Tempfile.open('temp') +# +# # good +# Tempfile.open('temp') do |f| +# # ... +# end +# +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#27 class RuboCop::Cop::Style::AutoResourceCleanup < ::RuboCop::Cop::Base - # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#26 + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#32 + def file_open_method?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#36 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#41 + # source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#46 def cleanup?(node); end end -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#20 +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#28 RuboCop::Cop::Style::AutoResourceCleanup::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#24 +# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#29 RuboCop::Cop::Style::AutoResourceCleanup::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/auto_resource_cleanup.rb#22 -RuboCop::Cop::Style::AutoResourceCleanup::TARGET_METHODS = T.let(T.unsafe(nil), Hash) - # Checks if usage of %() or %Q() matches configuration. # # @example EnforcedStyle: bare_percent (default) @@ -31489,13 +32198,24 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # `lambda`, `proc`, and `it` are their defaults. # Additional methods can be added to the `AllowedMethods`. # -# @example AllowedPatterns: ['map'] +# @example EnforcedStyle: line_count_based (default) +# # bad - single line block +# items.each do |item| item / 5 end # -# # good +# # 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 # @example EnforcedStyle: semantic # # Prefer `do...end` over `{...}` for procedural blocks. # @@ -31616,25 +32336,14 @@ RuboCop::Cop::Style::BlockComments::MSG = T.let(T.unsafe(nil), String) # 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 } +# @example AllowedPatterns: ['map'] # -# # bad - multi-line block +# # good # 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 @@ -31812,27 +32521,27 @@ RuboCop::Cop::Style::BlockDelimiters::BRACES_REQUIRED_MESSAGE = T.let(T.unsafe(n # Corrector to correct conditional assignment in `case` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#605 +# 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#610 + # 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#620 + # 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#640 + # 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#634 + # 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#650 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#649 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -32196,9 +32905,12 @@ class RuboCop::Cop::Style::ClassCheck < ::RuboCop::Cop::Base include ::RuboCop::Cop::ConfigurableEnforcedStyle extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/class_check.rb#44 + # source://rubocop//lib/rubocop/cop/style/class_check.rb#45 def message(node); end + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/class_check.rb#33 def on_send(node); end end @@ -32500,17 +33212,19 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # @example # # bad # array.reject(&:nil?) -# array.delete_if(&:nil?) # array.reject { |e| e.nil? } -# array.delete_if { |e| e.nil? } # array.select { |e| !e.nil? } +# array.grep_v(nil) +# array.grep_v(NilClass) # # # good # array.compact # # # bad # hash.reject!(&:nil?) +# array.delete_if(&:nil?) # hash.reject! { |k, v| v.nil? } +# array.delete_if { |e| e.nil? } # hash.select! { |k, v| !v.nil? } # # # good @@ -32519,49 +33233,55 @@ RuboCop::Cop::Style::ClassVars::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # good # params.reject(&:nil?) # -# source://rubocop//lib/rubocop/cop/style/collection_compact.rb#42 +# 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#82 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#85 + def grep_v_with_nil?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#89 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#62 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#64 def reject_method?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#55 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#57 def reject_method_with_block_pass?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#72 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#74 def select_method?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#119 + # 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#97 + # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#106 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/style/collection_compact.rb#127 + # 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#113 + # 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#48 +# 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#49 +# 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#50 +# 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 @@ -32744,40 +33464,42 @@ RuboCop::Cop::Style::ColonMethodDefinition::MSG = T.let(T.unsafe(nil), String) # # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#59 class RuboCop::Cop::Style::CombinableLoops < ::RuboCop::Cop::Base - include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#79 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#77 def on_for(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#66 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 def on_numblock(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#90 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#88 def collection_looping_method?(node); end - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#107 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#105 def combine_with_left_sibling(corrector, node); end + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#112 + def correct_end_of_block(corrector, node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#95 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#93 def same_collection_looping_block?(node, sibling); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#103 + # source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#101 def same_collection_looping_for?(node, sibling); end end -# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#64 +# source://rubocop//lib/rubocop/cop/style/combinable_loops.rb#62 RuboCop::Cop::Style::CombinableLoops::MSG = T.let(T.unsafe(nil), String) # Enforces using `` or %x around command literals. @@ -33055,44 +33777,44 @@ RuboCop::Cop::Style::CommentAnnotation::MSG_SPACE_STYLE = T.let(T.unsafe(nil), S # y # end # -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#43 +# 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#57 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#60 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#80 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#83 def offensive?(comment); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#67 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#70 def register_offense(comment, matched_keyword); end - # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#86 + # source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#89 def source_line(comment); end end -# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#52 +# 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#53 +# 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#49 +# 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#50 +# 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#47 +# 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#55 +# source://rubocop//lib/rubocop/cop/style/commented_keyword.rb#58 RuboCop::Cop::Style::CommentedKeyword::REGEXP = T.let(T.unsafe(nil), Regexp) # Enforces the use of `Comparable#clamp` instead of comparison by minimum and maximum. @@ -33181,20 +33903,23 @@ RuboCop::Cop::Style::ComparableClamp::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar class RuboCop::Cop::Style::ConcatArrayLiterals < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#34 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#69 + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#70 def offense_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#86 + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#87 def percent_literals_includes_only_basic_literals?(node); end - # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#73 + # source://rubocop//lib/rubocop/cop/style/concat_array_literals.rb#74 def preferred_method(node); end end @@ -33208,8 +33933,8 @@ RuboCop::Cop::Style::ConcatArrayLiterals::MSG_FOR_PERCENT_LITERALS = T.let(T.uns 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 -# assignment to the same variable when using the return of the -# condition can be used instead. +# 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 @@ -33550,16 +34275,16 @@ 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#491 + # 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#468 + # 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#441 def remove_whitespace_in_branches(corrector, branch, condition, column); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#478 + # 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 @@ -33657,36 +34382,36 @@ class RuboCop::Cop::Style::Copyright < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/copyright.rb#47 + # 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#78 + # 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#64 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#72 def insert_notice_before(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#43 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#52 def notice; end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#85 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#93 def notice_found?(processed_source); end - # source://rubocop//lib/rubocop/cop/style/copyright.rb#51 - def offense_range; end - # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/copyright.rb#71 + # 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#55 + # source://rubocop//lib/rubocop/cop/style/copyright.rb#60 def verify_autocorrect_notice!; end end @@ -33784,6 +34509,9 @@ class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/date_time.rb#61 def historic_date?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/date_time.rb#70 def on_send(node); end @@ -33792,12 +34520,12 @@ class RuboCop::Cop::Style::DateTime < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/date_time.rb#85 + # source://rubocop//lib/rubocop/cop/style/date_time.rb#86 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/date_time.rb#81 + # source://rubocop//lib/rubocop/cop/style/date_time.rb#82 def disallow_coercion?; end end @@ -34346,34 +35074,52 @@ RuboCop::Cop::Style::Documentation::MSG = T.let(T.unsafe(nil), String) # 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#98 +# 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#105 + # 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#109 + # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#120 def on_def(node); end - # source://rubocop//lib/rubocop/cop/style/documentation_method.rb#109 + # 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#119 + # 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#126 + # 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#102 +# 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 @@ -34540,7 +35286,7 @@ class RuboCop::Cop::Style::EachForSimpleLoop < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#48 + # source://rubocop//lib/rubocop/cop/style/each_for_simple_loop.rb#46 def offending?(node); end end @@ -35406,40 +36152,40 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#195 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#186 def add_offense_for_different_line(node, line_node, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#142 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#131 def add_offense_for_incorrect_line(method_name, line_node, sign, line_diff); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#210 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#201 def add_offense_for_missing_line(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#217 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#208 def add_offense_for_missing_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#189 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#180 def add_offense_for_same_line(node, line_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#154 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#143 def check_file(node, file_node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#167 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#156 def check_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#95 def check_location(node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#202 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#193 def expected_line(sign, line_diff); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#122 def file_and_line(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#177 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#168 def line_difference(line_node, code); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#229 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#220 def missing_line(node, code); end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#109 @@ -35455,20 +36201,13 @@ class RuboCop::Cop::Style::EvalWithLocation < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#118 def special_line_keyword?(node); end - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#181 + # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#172 def string_first_line(str_node); end # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#127 def with_binding?(node); end - - # FIXME: It's a Style/ConditionalAssignment's false positive. - # - # @return [Boolean] - # - # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#133 - def with_lineno?(node); end end # source://rubocop//lib/rubocop/cop/style/eval_with_location.rb#59 @@ -35547,6 +36286,9 @@ class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base # 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 @@ -35554,10 +36296,10 @@ class RuboCop::Cop::Style::ExactRegexpMatch < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#55 + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#57 def exact_match_pattern?(parsed_regexp); end - # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#62 + # source://rubocop//lib/rubocop/cop/style/exact_regexp_match.rb#64 def new_method(node); end end @@ -36284,7 +37026,7 @@ class RuboCop::Cop::Style::For < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/for.rb#82 + # source://rubocop//lib/rubocop/cop/style/for.rb#84 def suspect_enumerable?(node); end end @@ -36319,25 +37061,25 @@ RuboCop::Cop::Style::For::PREFER_FOR = T.let(T.unsafe(nil), String) # # @example EnforcedStyle: format (default) # # bad -# puts sprintf('%10s', 'hoge') -# puts '%10s' % 'hoge' +# puts sprintf('%10s', 'foo') +# puts '%10s' % 'foo' # # # good -# puts format('%10s', 'hoge') +# puts format('%10s', 'foo') # @example EnforcedStyle: sprintf # # bad -# puts format('%10s', 'hoge') -# puts '%10s' % 'hoge' +# puts format('%10s', 'foo') +# puts '%10s' % 'foo' # # # good -# puts sprintf('%10s', 'hoge') +# puts sprintf('%10s', 'foo') # @example EnforcedStyle: percent # # bad -# puts format('%10s', 'hoge') -# puts sprintf('%10s', 'hoge') +# puts format('%10s', 'foo') +# puts sprintf('%10s', 'foo') # # # good -# puts '%10s' % 'hoge' +# puts '%10s' % 'foo' # # source://rubocop//lib/rubocop/cop/style/format_string.rb#50 class RuboCop::Cop::Style::FormatString < ::RuboCop::Cop::Base @@ -36405,10 +37147,14 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # if the number of them is less than or equals to # `MaxUnannotatedPlaceholdersAllowed`. # -# @example AllowedPatterns: ['redirect'] +# @example EnforcedStyle: annotated (default) +# +# # bad +# format('%{greeting}', greeting: 'Hello') +# format('%s', 'Hello') # # # good -# redirect('foo/%{bar_id}') +# format('%s', greeting: 'Hello') # @example EnforcedStyle: template # # # bad @@ -36452,14 +37198,10 @@ RuboCop::Cop::Style::FormatString::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array # # # bad # redirect('foo/%{bar_id}') -# @example EnforcedStyle: annotated (default) -# -# # bad -# format('%{greeting}', greeting: 'Hello') -# format('%s', 'Hello') +# @example AllowedPatterns: ['redirect'] # # # good -# format('%s', greeting: 'Hello') +# redirect('foo/%{bar_id}') # # source://rubocop//lib/rubocop/cop/style/format_string_token.rb#85 class RuboCop::Cop::Style::FormatStringToken < ::RuboCop::Cop::Base @@ -37126,72 +37868,114 @@ RuboCop::Cop::Style::HashConversion::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # @example # # bad # hash.keys.each { |k| p k } -# hash.values.each { |v| p v } +# hash.each { |k, unused_value| p k } # # # good # hash.each_key { |k| p k } +# +# # bad +# hash.values.each { |v| p v } +# hash.each { |unused_key, v| p v } +# +# # good # hash.each_value { |v| p v } # @example AllowedReceivers: ['execute'] # # good # execute(sql).keys.each { |v| p v } # execute(sql).values.each { |v| p v } # -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#30 +# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#36 class RuboCop::Cop::Style::HashEachMethods < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedReceivers include ::RuboCop::Cop::Lint::UnusedArgument extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#38 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#74 + def check_unused_block_args(node, key, value); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#51 + def each_arguments(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#46 def kv_each(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#43 + # 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#47 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#55 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#95 def on_block_pass(node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#47 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#60 def on_numblock(node); end private - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#86 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#180 def check_argument(variable); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#204 def correct_args(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#96 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#190 def correct_implicit(node, corrector, method_name); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#101 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#195 def correct_key_value_each(node, corrector); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#82 - def format_message(method_name); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#176 + def format_message(method_name, current); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#117 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#103 + def handleable?(node); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#211 def kv_range(outer_node); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#63 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#133 + def message(prefer, method_name, unused_code); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#139 + def register_each_args_offense(node, message, prefer, unused_range); end + + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#110 def register_kv_offense(target, method); end - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#72 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#146 def register_kv_with_block_pass_offense(node, target, method); end + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#167 + def root_receiver(node); end + # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#92 + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#121 + def unused_block_arg_exist?(node, block_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#157 + def use_array_converter_method_as_preceding?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#186 def used?(arg); end end -# source://rubocop//lib/rubocop/cop/style/hash_each_methods.rb#35 +# 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. # @@ -37208,9 +37992,9 @@ RuboCop::Cop::Style::HashEachMethods::MSG = T.let(T.unsafe(nil), String) # {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| %i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.select {|k, v| !%i[foo bar].include?(k) } -# {foo: 1, bar: 2, baz: 3}.filter {|k, v| !%i[foo bar].include?(k) } +# {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) @@ -37227,6 +38011,9 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/hash_except.rb#44 def bad_method_with_poro?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#75 def on_send(node); end @@ -37234,42 +38021,42 @@ class RuboCop::Cop::Style::HashExcept < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#93 - def bad_method?(block); end + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#95 + def bad_method?(method_name, block); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#165 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#169 def decorate_source(value); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#173 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#177 def except_key(node); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#152 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#156 def except_key_source(key); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#146 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#150 def extract_body_if_negated(body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#127 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131 def included?(negated, body); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#131 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 def not_included?(negated, body); end - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#182 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#186 def offense_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#135 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#139 def safe_to_register_offense?(block, except_key); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_except.rb#111 + # source://rubocop//lib/rubocop/cop/style/hash_except.rb#115 def semantically_except_method?(send, block); end end @@ -37358,23 +38145,18 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # * 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: 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} +# @example EnforcedStyle: ruby19 (default) +# # bad +# {:a => 2} +# {b: 1, :c => 2} # # # good -# {foo:, bar:} -# -# # good - can't omit `baz` -# {foo: foo, bar: baz} +# {a: 2, b: 1} +# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol +# {d: 1, 'e' => 2} # technically not forbidden # @example EnforcedStyle: hash_rockets # # bad # {a: 1, b: 2} @@ -37422,94 +38204,117 @@ RuboCop::Cop::Style::HashLikeCase::MSG = T.let(T.unsafe(nil), String) # # # good # {foo:, bar:} -# @example EnforcedStyle: ruby19 (default) -# # bad -# {:a => 2} -# {b: 1, :c => 2} +# @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 -# {a: 2, b: 1} -# {:c => 2, 'd' => 2} # acceptable since 'd' isn't a symbol -# {d: 1, 'e' => 2} # technically not forbidden +# {foo:, bar:} # -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#113 +# # good - can't omit `baz` +# {foo: foo, bar: baz} +# @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} +# +# 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#167 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#185 def alternative_style; end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#145 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#163 def hash_rockets_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#177 def no_mixed_keys_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#123 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 def on_hash(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#141 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#159 def ruby19_check(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#149 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#167 def ruby19_no_mixed_keys_check(pairs); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#198 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#217 def acceptable_19_syntax_symbol?(sym_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#252 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#274 def argument_without_space?(node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#178 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#196 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#256 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#278 def autocorrect_hash_rockets(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#265 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#287 def autocorrect_no_mixed_keys(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#231 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#253 def autocorrect_ruby19(corrector, pair_node); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#216 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#238 def check(pairs, delim, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#273 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#295 def force_hash_rockets?(pairs); end - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#244 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#266 def range_for_autocorrect_ruby19(pair_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#188 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#206 def sym_indices?(pairs); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#192 + # source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#210 def word_symbol_pair?(pair); end end -# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#119 +# 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#121 +# 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#120 +# source://rubocop//lib/rubocop/cop/style/hash_syntax.rb#138 RuboCop::Cop::Style::HashSyntax::MSG_NO_MIXED_KEYS = T.let(T.unsafe(nil), String) # Looks for uses of `\_.each_with_object({}) {...}`, @@ -37703,43 +38508,43 @@ class RuboCop::Cop::Style::IdenticalConditionalBranches < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#181 + # 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#190 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#193 def check_expressions(node, expressions, insert_position); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#170 + # 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#230 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#233 def expand_elses(branch); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#245 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#248 def head(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#214 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#217 def last_child_of_parent?(node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#224 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#227 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#220 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#223 def single_child_branch?(branch_node); end - # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#241 + # source://rubocop//lib/rubocop/cop/style/identical_conditional_branches.rb#244 def tail(node); end end @@ -37748,24 +38553,24 @@ RuboCop::Cop::Style::IdenticalConditionalBranches::MSG = T.let(T.unsafe(nil), St # Corrector to correct conditional assignment in `if` statements. # -# source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#560 +# 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#565 + # 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#569 + # 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#583 + # 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#590 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#589 def move_branch_inside_condition(corrector, branch, condition, assignment, column); end end end @@ -38154,7 +38959,7 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#134 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#136 def assume_boolean_value?(condition); end # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#114 @@ -38170,20 +38975,20 @@ class RuboCop::Cop::Style::IfWithBooleanLiteralBranches < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#151 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#153 def opposite_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#141 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#143 def replacement_condition(node, condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#156 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#158 def require_parentheses?(condition); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#120 + # source://rubocop//lib/rubocop/cop/style/if_with_boolean_literal_branches.rb#122 def return_boolean_value?(condition); end end @@ -38436,10 +39241,13 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#61 def inverse_candidate?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#91 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#92 def on_numblock(node); end # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#78 @@ -38449,39 +39257,39 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#176 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#177 def camel_case_constant?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#120 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#121 def correct_inverse_block(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#111 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#112 def correct_inverse_method(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#127 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#128 def correct_inverse_selector(block, corrector); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#180 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#181 def dot_range(loc); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#163 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#166 def end_parentheses(node, method_call); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#149 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#150 def inverse_blocks; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#144 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#145 def inverse_methods; end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#190 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#191 def message(method, inverse); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#153 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#154 def negated?(node); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#157 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#162 def not_to_receiver(node, method_call); end # When comparing classes, `!(Integer < Numeric)` is not the same as @@ -38489,14 +39297,19 @@ class RuboCop::Cop::Style::InverseMethods < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#171 + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#172 def possible_class_hierarchy_check?(lhs, rhs, method); end - # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#184 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#158 + def relational_comparison_with_safe_navigation?(node); end + + # source://rubocop//lib/rubocop/cop/style/inverse_methods.rb#185 def remove_end_parenthesis(corrector, node, method, method_call); end class << self - # source://rubocop-rails/2.22.1/lib/rubocop-rails.rb#22 + # source://rubocop-rails/2.26.2/lib/rubocop-rails.rb#22 def autocorrect_incompatible_with; end end end @@ -38543,12 +39356,14 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # 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? @@ -38559,36 +39374,45 @@ RuboCop::Cop::Style::InverseMethods::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Arr # # good (if) # foo if !condition # -# source://rubocop//lib/rubocop/cop/style/invertible_unless_condition.rb#51 +# 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#56 + # 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#91 + # 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#104 + # 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#85 + # 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#112 + # 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#70 + # 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#54 +# 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 @@ -38939,12 +39763,22 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # NOTE: If one of these configuration is set to nil, any capitalization is allowed. # -# @example ValueCapitalization: uppercase +# @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: TRUE +# # frozen_string_literal: false +# +# module Bar +# # ... +# end # @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) @@ -38997,22 +39831,12 @@ RuboCop::Cop::Style::LineEndConcatenation::SIMPLE_STRING_TOKEN_TYPE = T.let(T.un # # # 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) +# @example ValueCapitalization: uppercase # # bad # # frozen-string-literal: true # -# module Bar -# # ... -# end -# # # good -# # frozen_string_literal: false -# -# module Bar -# # ... -# end +# # frozen-string-literal: TRUE # # source://rubocop//lib/rubocop/cop/style/magic_comment_format.rb#97 class RuboCop::Cop::Style::MagicCommentFormat < ::RuboCop::Cop::Base @@ -39144,6 +39968,7 @@ RuboCop::Cop::Style::MagicCommentFormat::MSG_VALUE = T.let(T.unsafe(nil), String 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 # @@ -39151,6 +39976,9 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), # 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 @@ -39177,45 +40005,163 @@ RuboCop::Cop::Style::MagicCommentFormat::SNAKE_SEPARATOR = T.let(T.unsafe(nil), # # good # array.reject { |e| some_condition? } # -# source://rubocop//lib/rubocop/cop/style/map_compact_with_conditional_block.rb#40 +# 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#46 - def map_and_compact?(param0 = T.unsafe(nil)); end + # 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#72 + # 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#125 - def range(node); end + # 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#91 + # 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#95 + # 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#115 + # 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#105 + # 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#43 +# 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 a local variable +# initialized as an empty array and referred to only by the pushing operation. +# 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 } +# +# # good - contains another operation +# dest = [] +# src.each { |e| dest << e * 2; puts e } +# dest +# +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#50 +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#75 + def after_leaving_scope(scope, _variable_table); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#57 + def each_block_with_push?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#66 + def empty_array_asgn?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#69 + def lvar_ref?(param0 = T.unsafe(nil), param1); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + def on_block(node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#79 + def on_numblock(node); end + + private + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#155 + def correct_push_node(corrector, push_node); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#163 + def correct_return_value_handling(corrector, block, dest_var); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#108 + def dest_used_only_for_mapping?(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#102 + def find_closest_assignment(block, dest_var); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#94 + def find_dest_var(block); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#127 + def new_method_name; end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#116 + def register_offense(block, dest_var, asgn); end + + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#148 + def remove_assignment(corrector, asgn); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#133 + def return_value_used?(node); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_into_array.rb#71 + def joining_forces; end + end +end + +# source://rubocop//lib/rubocop/cop/style/map_into_array.rb#54 +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. # @@ -39243,15 +40189,23 @@ class RuboCop::Cop::Style::MapToHash < ::RuboCop::Cop::Base extend ::RuboCop::Cop::TargetRubyVersion # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#41 - def map_to_h?(param0 = T.unsafe(nil)); end + def map_to_h(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 + def on_csend(node); end - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48 + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#52 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#62 + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#68 def autocorrect(corrector, to_h, map); end + + class << self + # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#48 + def autocorrect_incompatible_with; end + end end # source://rubocop//lib/rubocop/cop/style/map_to_hash.rb#37 @@ -39358,13 +40312,27 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # - Parentheses are required in anonymous arguments, keyword arguments # and block passing in Ruby 3.2. # -# @example AllowParenthesesInStringInterpolation: true +# @example EnforcedStyle: require_parentheses (default) +# +# # bad +# array.delete e # # # good -# "#{t('this.is.good')}" +# array.delete(e) # # # good -# "#{t 'this.is.also.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 # @example EnforcedStyle: omit_parentheses # # # bad @@ -39463,27 +40431,13 @@ RuboCop::Cop::Style::MapToSet::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # # # good # "#{t 'this.is.better'}" -# @example EnforcedStyle: require_parentheses (default) -# -# # bad -# array.delete e -# -# # good -# array.delete(e) +# @example AllowParenthesesInStringInterpolation: true # # # good -# # Operators don't need parens -# foo == bar +# "#{t('this.is.good')}" # # # 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 +# "#{t 'this.is.also.good'}" # # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#202 class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base @@ -39500,27 +40454,24 @@ class RuboCop::Cop::Style::MethodCallWithArgsParentheses < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 - def on_super(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#217 def on_yield(node); end private - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#226 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#225 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#235 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#233 def args_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#239 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses.rb#237 def args_parenthesized?(node); end class << self - # source://rubocop-rails/2.22.1/lib/rubocop-rails.rb#30 + # source://rubocop-rails/2.26.2/lib/rubocop-rails.rb#30 def autocorrect_incompatible_with; end end end @@ -39533,105 +40484,110 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#70 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 def allowed_camel_case_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#165 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#179 def allowed_chained_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#161 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#175 def allowed_multiline_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#75 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 def allowed_string_interpolation_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#174 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#188 def ambiguous_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#203 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#217 def assigned_before?(node, target); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#211 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#225 def assignment_in_condition?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#31 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#32 def autocorrect(corrector, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#142 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#156 def call_as_argument_or_chain?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#99 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#149 + def call_in_argument_with_block?(node); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#105 def call_in_literals?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#110 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#116 def call_in_logical_operators?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#148 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#162 def call_in_match_pattern?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#119 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#125 def call_in_optional_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#123 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#129 def call_in_single_line_inheritance?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#127 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#133 def call_with_ambiguous_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#138 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#145 def call_with_braced_block?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#235 def forwards_anonymous_rest_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#190 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#204 def hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#154 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#168 def hash_literal_in_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#44 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#45 def inside_endless_method_def?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#207 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#221 def inside_string_interpolation?(node); end # Require hash value omission be enclosed in parentheses to prevent the following issue: @@ -39639,20 +40595,25 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#58 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#59 def last_expression?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#87 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#92 def legitimate_call_with_parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#186 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#200 def logical_operator?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#40 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#67 + def method_call_before_constant_resolution?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#41 def offense_range(node); end # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#16 @@ -39660,42 +40621,42 @@ module RuboCop::Cop::Style::MethodCallWithArgsParentheses::OmitParentheses # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#80 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#85 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#194 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#208 def regexp_slash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#49 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#50 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#178 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#192 def splat?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#66 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#71 def super_call_without_arguments?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#62 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#63 def syntax_like_method_call?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#182 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#196 def ternary_if?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#198 + # source://rubocop//lib/rubocop/cop/style/method_call_with_args_parentheses/omit_parentheses.rb#212 def unary_literal?(node); end end @@ -39741,6 +40702,9 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # This cop can be customized allowed methods with `AllowedMethods`. # By default, there are no methods to allowed. # +# NOTE: This cop allows the use of `it()` without arguments in blocks, +# as in `0.times { it() }`, following `Lint/ItWithoutArgumentsInBlock` cop. +# # @example # # bad # object.some_method() @@ -39754,55 +40718,66 @@ RuboCop::Cop::Style::MethodCallWithArgsParentheses::RequireParentheses::REQUIRE_ # # good # object.foo() # -# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#26 +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#29 class RuboCop::Cop::Style::MethodCallWithoutArgsParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedMethods include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#33 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#37 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#60 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#66 def allowed_method_name?(name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#74 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#94 def any_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#56 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#62 def default_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#52 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#58 def ineligible_node?(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#97 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#117 def offense_range(node); end - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#45 + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#86 + def parenthesized_it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#51 def register_offense(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#64 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#70 def same_name_assignment?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#90 + # source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#110 def variable_in_mass_assignment?(variable_name, node); end end -# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#31 +# source://rubocop//lib/rubocop/cop/style/method_call_without_args_parentheses.rb#34 RuboCop::Cop::Style::MethodCallWithoutArgsParentheses::MSG = T.let(T.unsafe(nil), String) # Checks for methods called on a do...end block. The point of @@ -40241,12 +41216,12 @@ RuboCop::Cop::Style::MissingElse::MSG_NIL = T.let(T.unsafe(nil), String) # defining `respond_to_missing?`. # # @example -# #bad +# # bad # def method_missing(name, *args) # # ... # end # -# #good +# # good # def respond_to_missing?(name, include_private) # # ... # end @@ -40778,33 +41753,33 @@ class RuboCop::Cop::Style::MultilineMethodSignature < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#60 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#69 def arguments_range(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#41 + # 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#72 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#81 def closing_line(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#76 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#85 def correction_exceeds_max_line_length?(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#84 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#93 def definition_width(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#80 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#89 def indentation_width(node); end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#56 + # 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#88 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#97 def max_line_length; end - # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#68 + # source://rubocop//lib/rubocop/cop/style/multiline_method_signature.rb#77 def opening_line(node); end end @@ -40851,28 +41826,28 @@ class RuboCop::Cop::Style::MultilineTernaryOperator < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#60 + # 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#84 + # 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#90 + # 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#56 + # 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#70 + # 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#94 + # source://rubocop//lib/rubocop/cop/style/multiline_ternary_operator.rb#96 def use_assignment_method?(node); end end @@ -41884,17 +42859,17 @@ class RuboCop::Cop::Style::NilComparison < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#65 + # 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#77 + # 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#69 + # source://rubocop//lib/rubocop/cop/style/nil_comparison.rb#71 def style_check?(node, &block); end end @@ -42445,16 +43420,16 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base include ::RuboCop::Cop::AllowedPattern extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#166 + # 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#171 + # 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#161 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#169 def predicate(param0 = T.unsafe(nil)); end private @@ -42467,23 +43442,28 @@ class RuboCop::Cop::Style::NumericPredicate < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#111 def check(node); end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#152 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#154 def invert; end - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#132 + # @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(numeric, operation); end + def replacement(node, numeric, operation); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#144 + # 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#140 + # source://rubocop//lib/rubocop/cop/style/numeric_predicate.rb#142 def require_parentheses?(node); end end @@ -42534,11 +43514,13 @@ class RuboCop::Cop::Style::ObjectThen < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/object_then.rb#48 def check_method_node(node); end - # source://rubocop//lib/rubocop/cop/style/object_then.rb#68 + # source://rubocop//lib/rubocop/cop/style/object_then.rb#70 def message(node); end - # source://rubocop//lib/rubocop/cop/style/object_then.rb#57 - def preferred_method(node); end + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/object_then.rb#59 + def preferred_method?(node); end end # source://rubocop//lib/rubocop/cop/style/object_then.rb#32 @@ -42670,8 +43652,8 @@ end RuboCop::Cop::Style::OpenStructUse::MSG = T.let(T.unsafe(nil), String) # Checks for redundant dot before operator method call. -# The target operator methods are `|`, `^`, `&`, `<=>`, `==`, `===`, `=~`, `>`, `>=`, `<`, -# `<=`, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. +# The target operator methods are `|`, `^`, `&`, ``<=>``, `==`, `===`, `=~`, `>`, `>=`, `<`, +# ``<=``, `<<`, `>>`, `+`, `-`, `*`, `/`, `%`, `**`, `~`, `!`, `!=`, and `!~`. # # @example # @@ -43004,7 +43986,7 @@ class RuboCop::Cop::Style::ParallelAssignment::AssignmentSorter def tsort_each_child(assignment); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#145 - def tsort_each_node(&block); end + def tsort_each_node(*_arg0, **_arg1, &_arg2); end # source://rubocop//lib/rubocop/cop/style/parallel_assignment.rb#136 def uses_var?(param0, param1); end @@ -43176,20 +44158,20 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#122 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#130 def allow_multiline_conditions?; end - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#110 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#118 def message(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#111 def modifier_op?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#116 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#124 def parens_allowed?(node); end # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#80 @@ -43197,7 +44179,12 @@ class RuboCop::Cop::Style::ParenthesesAroundCondition < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#95 + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#96 + def require_parentheses?(node, condition_body); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/parentheses_around_condition.rb#103 def semicolon_separated_expressions?(first_exp, rest_exps); end end @@ -43508,7 +44495,7 @@ RuboCop::Cop::Style::Proc::MSG = T.let(T.unsafe(nil), String) # # String interpolation is always kept in double quotes. # -# Note: `Lint/SymbolConversion` can be used in parallel to ensure that symbols +# 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. # @@ -43618,56 +44605,56 @@ RuboCop::Cop::Style::QuotedSymbols::MSG_SINGLE = T.let(T.unsafe(nil), String) # raise MyCustomError.new(arg1, arg2, arg3) # fail 'message' # -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#44 +# 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#53 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#56 def on_send(node); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#129 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#132 def acceptable_exploded_args?(args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#143 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#146 def allowed_non_exploded_type?(arg); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#92 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#95 def check_compact(node); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#108 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#111 def check_exploded(node); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#66 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#69 def correction_compact_to_exploded(node); end - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#78 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#81 def correction_exploded_to_compact(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#149 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#152 def requires_parens?(parent); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/raise_args.rb#125 + # source://rubocop//lib/rubocop/cop/style/raise_args.rb#128 def use_new_method?(first_arg); end end -# source://rubocop//lib/rubocop/cop/style/raise_args.rb#49 +# 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#48 +# 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#51 +# source://rubocop//lib/rubocop/cop/style/raise_args.rb#54 RuboCop::Cop::Style::RaiseArgs::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for the use of randomly generated numbers, @@ -43787,20 +44774,33 @@ 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 - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#93 + # @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 - # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#86 + # @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#79 + # source://rubocop//lib/rubocop/cop/style/redundant_argument.rb#80 def redundant_argument?(node); end end @@ -43900,22 +44900,25 @@ class RuboCop::Cop::Style::RedundantAssignment < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 + # 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#57 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#58 def check_branch(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#71 + # 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#87 + # 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#76 + # 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#83 + # source://rubocop//lib/rubocop/cop/style/redundant_assignment.rb#91 def check_rescue_node(node); end end @@ -44401,16 +45404,19 @@ class RuboCop::Cop::Style::RedundantCurrentDirectoryInPath < ::RuboCop::Cop::Bas include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#23 + # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#24 def on_send(node); end end -# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#22 RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::CURRENT_DIRECTORY_PATH = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#20 RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::MSG = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/cop/style/redundant_current_directory_in_path.rb#21 +RuboCop::Cop::Style::RedundantCurrentDirectoryInPath::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) + # Checks for redundant uses of double splat hash braces. # # @example @@ -44508,21 +45514,24 @@ RuboCop::Cop::Style::RedundantDoubleSplatHashBraces::MSG = T.let(T.unsafe(nil), class RuboCop::Cop::Style::RedundantEach < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#43 def on_send(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#96 def message(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#85 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#86 def range(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#63 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#64 def redundant_each_method(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#104 + # source://rubocop//lib/rubocop/cop/style/redundant_each.rb#107 def remove_redundant_each(corrector, range, redundant_node); end end @@ -44686,7 +45695,7 @@ 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', +# 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` @@ -45163,42 +46172,47 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base include ::RuboCop::Cop::MatchRange extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#78 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#79 def on_new_investigation; end private # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#166 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#183 def argument_is_method?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#134 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#147 def argument_newline?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#100 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#102 def ends_with_backslash_without_comment?(source_line); end - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#146 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#163 def find_node_for_line(line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#122 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#132 def inside_string_literal?(range, token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#108 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#110 def inside_string_literal_or_method_with_argument?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#118 + def leading_dot_method_chain_with_blank_line?(range); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#190 def method_call_with_arguments?(node); end # A method call without parentheses such as the following cannot remove `\`: @@ -45208,38 +46222,41 @@ class RuboCop::Cop::Style::RedundantLineContinuation < ::RuboCop::Cop::Base # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#130 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#140 def method_with_argument?(current_token, next_token); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#114 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#124 def redundant_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#94 def require_line_continuation?(range); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#152 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#169 def same_line?(node, line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#177 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#194 def start_with_arithmetic_operator?(source_line); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#104 + # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#106 def string_concatenation?(source_line); end end # source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#72 RuboCop::Cop::Style::RedundantLineContinuation::ALLOWED_STRING_TOKENS = T.let(T.unsafe(nil), Array) +# source://rubocop//lib/rubocop/cop/style/redundant_line_continuation.rb#77 +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#73 RuboCop::Cop::Style::RedundantLineContinuation::ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) @@ -45261,41 +46278,43 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base include ::RuboCop::Cop::Parentheses extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#33 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#32 def allowed_pin_operator?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#36 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#35 def arg_in_call_with_block?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#246 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#269 def first_send_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#251 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#274 def first_super_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#256 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#279 def first_yield_argument?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#158 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#175 def interpolation?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#27 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#26 def method_node_and_args(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#38 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#37 def on_begin(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#24 - def range_end?(param0 = T.unsafe(nil)); end - - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#30 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#29 def rescue?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#21 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#23 def square_brackets?(param0 = T.unsafe(nil)); end private + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#177 + def allow_in_multiline_conditions?; end + # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#68 @@ -45303,7 +46322,7 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#61 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#60 def allowed_expression?(node); end # @return [Boolean] @@ -45323,54 +46342,54 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#260 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#283 def call_chain_starts_with_int?(begin_node, send_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#129 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#136 def check(begin_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#160 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#184 def check_send(begin_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#169 + # 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#193 + # 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#107 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#114 def empty_parentheses?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#140 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#147 def find_offense_message(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#112 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#119 def first_arg_begins_with_hash_literal?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#235 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#258 def first_argument?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#54 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#53 def ignore_syntax?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#189 + # 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#208 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#232 def keyword_with_redundant_parentheses?(node); end # @return [Boolean] @@ -45380,33 +46399,38 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#245 def method_call_with_redundant_parentheses?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#121 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#128 def method_chain_begins_with_hash_literal(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#179 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#107 + def multiline_control_flow_statements?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#203 def offense(node, msg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#231 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#254 def only_begin_arg?(args); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#46 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#45 def parens_allowed?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#197 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#221 def raised_to_power_negative_numeric?(begin_node, node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#185 + # source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#209 def suspect_unary?(node); end # @return [Boolean] @@ -45415,6 +46439,9 @@ class RuboCop::Cop::Style::RedundantParentheses < ::RuboCop::Cop::Base def ternary_parentheses_required?; end end +# source://rubocop//lib/rubocop/cop/style/redundant_parentheses.rb#20 +RuboCop::Cop::Style::RedundantParentheses::ALLOWED_NODE_TYPES = T.let(T.unsafe(nil), Array) + # Checks for usage of the %q/%Q syntax when '' or "" would do. # # @example @@ -45830,31 +46857,34 @@ class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#169 + # 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#164 + # 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#138 + # 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#159 + # 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#143 + # 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#155 + # 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#150 + # 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#126 + # 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 @@ -45868,7 +46898,7 @@ class RuboCop::Cop::Style::RedundantReturn < ::RuboCop::Cop::Base # 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#173 + # source://rubocop//lib/rubocop/cop/style/redundant_return.rb#179 def message(node); end end @@ -45895,7 +46925,8 @@ RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # protected scope, you cannot send private messages this way. # # Note we allow uses of `self` with operators because it would be awkward -# otherwise. +# otherwise. Also allows the use of `self.it` without arguments in blocks, +# as in `0.times { self.it }`, following `Lint/ItWithoutArgumentsInBlock` cop. # # @example # @@ -45920,114 +46951,125 @@ RuboCop::Cop::Style::RedundantReturn::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # end # end # -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#44 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#45 class RuboCop::Cop::Style::RedundantSelf < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector # @return [RedundantSelf] a new instance of RedundantSelf # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#59 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#60 def initialize(config = T.unsafe(nil), options = T.unsafe(nil)); end # Assignment of self.x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_and_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#85 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#86 def on_args(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#89 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#90 def on_blockarg(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 def on_def(node); end # Using self.x to distinguish from local variable x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#80 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#81 def on_defs(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_if(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#103 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#104 def on_in_pattern(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#98 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#99 def on_lvasgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#93 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#94 def on_masgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#119 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#120 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#73 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#74 def on_op_asgn(node); end # Assignment of self.x # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#67 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#68 def on_or_asgn(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#107 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#108 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_until(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#125 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#126 def on_while(node); end private - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#196 def add_lhs_to_local_variables_scopes(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#189 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#204 def add_masgn_lhs_variables(rhs, lhs); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#195 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#210 def add_match_var_scopes(in_pattern_node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#143 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#144 def add_scope(node, local_variables = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#175 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#190 def allow_self(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#149 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#150 def allowed_send_node?(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#166 + # Respects `Lint/ItWithoutArgumentsInBlock` cop and the following Ruby 3.3's warning: + # + # $ ruby -e '0.times { begin; it; end }' + # -e:1: warning: `it` calls without arguments will refer to the first block param in + # Ruby 3.4; use it() or self.it + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#165 + def it_method_in_block?(node); end + + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#181 def on_argument(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#158 + # source://rubocop//lib/rubocop/cop/style/redundant_self.rb#173 def regular_method_call?(node); end class << self - # source://rubocop-rails/2.22.1/lib/rubocop-rails.rb#38 + # source://rubocop-rails/2.26.2/lib/rubocop-rails.rb#38 def autocorrect_incompatible_with; end end end -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 RuboCop::Cop::Style::RedundantSelf::KERNEL_METHODS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#49 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#50 RuboCop::Cop::Style::RedundantSelf::KEYWORDS = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#47 +# source://rubocop//lib/rubocop/cop/style/redundant_self.rb#48 RuboCop::Cop::Style::RedundantSelf::MSG = T.let(T.unsafe(nil), String) # Checks for places where redundant assignments are made for in place @@ -46211,6 +47253,9 @@ class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#104 def on_send(node); end @@ -46222,45 +47267,45 @@ class RuboCop::Cop::Style::RedundantSort < ::RuboCop::Cop::Base # This gets the start of the accessor whether it has a dot # (e.g. `.first`) or doesn't (e.g. `[0]`) # - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#192 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#193 def accessor_start(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#182 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#183 def arg_node(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#186 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#187 def arg_value(node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#147 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#148 def autocorrect(corrector, node, sort_node, sorter, accessor); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#165 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#166 def base(accessor, arg); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#114 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#115 def find_redundant_sort(*nodes); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#135 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#136 def message(node, sorter, accessor); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#131 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#132 def offense_range(sort_node, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#124 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#125 def register_offense(node, sort_node, sorter, accessor); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#156 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#157 def replace_with_logical_operator(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#173 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#174 def suffix(sorter); end - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#161 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#162 def suggestion(sorter, accessor, arg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#200 + # source://rubocop//lib/rubocop/cop/style/redundant_sort.rb#201 def with_logical_operator?(node); end end @@ -47222,6 +48267,9 @@ RuboCop::Cop::Style::SafeNavigation::MSG = T.let(T.unsafe(nil), String) class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/sample.rb#41 def on_send(node); end @@ -47230,36 +48278,36 @@ class RuboCop::Cop::Style::Sample < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/sample.rb#123 + # source://rubocop//lib/rubocop/cop/style/sample.rb#122 def correction(shuffle_arg, method, method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#139 + # source://rubocop//lib/rubocop/cop/style/sample.rb#138 def extract_source(args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#117 + # 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#58 + # source://rubocop//lib/rubocop/cop/style/sample.rb#59 def offensive?(method, method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#95 + # source://rubocop//lib/rubocop/cop/style/sample.rb#96 def range_size(range_node); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#130 + # source://rubocop//lib/rubocop/cop/style/sample.rb#129 def sample_arg(method, method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#69 + # source://rubocop//lib/rubocop/cop/style/sample.rb#70 def sample_size(method_args); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#78 + # source://rubocop//lib/rubocop/cop/style/sample.rb#79 def sample_size_for_one_arg(arg); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#88 + # source://rubocop//lib/rubocop/cop/style/sample.rb#89 def sample_size_for_two_args(first, second); end - # source://rubocop//lib/rubocop/cop/style/sample.rb#111 + # source://rubocop//lib/rubocop/cop/style/sample.rb#112 def source_range(shuffle_node, node); end end @@ -47316,6 +48364,9 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#74 def env_const?(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#88 def on_send(node); end @@ -47324,31 +48375,31 @@ class RuboCop::Cop::Style::SelectByRegexp < ::RuboCop::Cop::Base private - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#132 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#133 def extract_send_node(block_node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#145 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#146 def find_regexp(node, block); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#156 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#157 def match_predicate_without_receiver?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#141 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#142 def opposite?(regexp_method_send_node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#106 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#107 def receiver_allowed?(node); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#120 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#121 def register_offense(node, block_node, regexp, replacement); end - # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#112 + # source://rubocop//lib/rubocop/cop/style/select_by_regexp.rb#113 def replacement(regexp_method_send_node, node); end end @@ -47468,40 +48519,45 @@ class RuboCop::Cop::Style::Semicolon < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#102 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#106 def exist_semicolon_after_left_curly_brace?(tokens); end # @return [Boolean] # # source://rubocop//lib/rubocop/cop/style/semicolon.rb#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#98 + # 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#106 + # 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#134 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#142 def expressions_per_line(exprs); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 + # 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#140 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#148 def find_semicolon_positions(line); end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#154 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#162 def range_nodes; end - # source://rubocop//lib/rubocop/cop/style/semicolon.rb#114 + # 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#83 + # source://rubocop//lib/rubocop/cop/style/semicolon.rb#84 def semicolon_position(tokens); end # source://rubocop//lib/rubocop/cop/style/semicolon.rb#79 @@ -47520,12 +48576,12 @@ RuboCop::Cop::Style::Semicolon::MSG = T.let(T.unsafe(nil), String) # # @example # # bad -# Foo.send(:bar) -# quuz.send(:fred) +# Foo.send(bar) +# quuz.send(fred) # # # good -# Foo.__send__(:bar) -# quuz.public_send(:fred) +# Foo.__send__(bar) +# quuz.public_send(fred) # # source://rubocop//lib/rubocop/cop/style/send.rb#16 class RuboCop::Cop::Style::Send < ::RuboCop::Cop::Base @@ -47542,6 +48598,83 @@ 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_send(node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#90 + def allow_send?; end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#94 + def offense_range(node); end + + # source://rubocop//lib/rubocop/cop/style/send_with_literal_method_name.rb#98 + 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) @@ -47699,8 +48832,11 @@ RuboCop::Cop::Style::SignalException::RAISE_MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/signal_exception.rb#114 RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) -# Sometimes using dig method ends up with just a single -# argument. In such cases, dig should be replaced with []. +# Sometimes using `dig` method ends up with just a single +# argument. In such cases, dig should be replaced with `[]`. +# +# Since replacing `hash&.dig(:key)` with `hash[:key]` could potentially lead to error, +# calls to the `dig` method using safe navigation will be ignored. # # @example # # bad @@ -47719,24 +48855,24 @@ RuboCop::Cop::Style::SignalException::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Ar # keys = %i[key1 key2] # { key1: { key2: 'value' } }.dig(*keys) # -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#31 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 class RuboCop::Cop::Style::SingleArgumentDig < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#43 + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#46 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 + # source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#42 def single_argument_dig?(param0 = T.unsafe(nil)); end end -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#36 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#39 RuboCop::Cop::Style::SingleArgumentDig::IGNORED_ARGUMENT_TYPES = T.let(T.unsafe(nil), Array) -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#34 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#37 RuboCop::Cop::Style::SingleArgumentDig::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#35 +# source://rubocop//lib/rubocop/cop/style/single_argument_dig.rb#38 RuboCop::Cop::Style::SingleArgumentDig::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks whether the block parameters of a single-line @@ -47942,32 +49078,69 @@ RuboCop::Cop::Style::SingleLineMethods::MSG = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/cop/style/single_line_methods.rb#39 RuboCop::Cop::Style::SingleLineMethods::NOT_SUPPORTED_ENDLESS_METHOD_BODY_TYPES = T.let(T.unsafe(nil), Array) -# Checks that arrays are sliced with endless ranges instead of -# `ary[start..-1]` on Ruby 2.6+. +# Checks that arrays are not sliced with the redundant `ary[0..-1]`, replacing it with `ary`, +# and ensures arrays are sliced with endless ranges instead of `ary[start..-1]` on Ruby 2.6+, +# and with beginless ranges instead of `ary[nil..end]` on Ruby 2.7+. # # @example # # bad -# items[1..-1] +# items[0..-1] +# items[0..nil] +# items[0...nil] +# +# # good +# items +# +# # bad +# items[1..-1] # Ruby 2.6+ +# items[1..nil] # Ruby 2.6+ +# +# # good +# items[1..] # Ruby 2.6+ +# +# # bad +# items[nil..42] # Ruby 2.7+ # # # good -# items[1..] +# items[..42] # Ruby 2.7+ +# items[0..42] # Ruby 2.7+ # -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#28 +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#46 class RuboCop::Cop::Style::SlicingWithRange < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#40 + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#77 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#38 + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#73 + def range_from_zero?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#57 + def range_from_zero_till_minus_one?(param0 = T.unsafe(nil)); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#65 def range_till_minus_one?(param0 = T.unsafe(nil)); end + + private + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#111 + def beginless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#107 + def endless(range_node); end + + # source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#93 + def offense_message_with_removal_range(range_node, selector); end end -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#34 +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#52 RuboCop::Cop::Style::SlicingWithRange::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#35 +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#53 +RuboCop::Cop::Style::SlicingWithRange::MSG_USELESS_RANGE = T.let(T.unsafe(nil), String) + +# source://rubocop//lib/rubocop/cop/style/slicing_with_range.rb#54 RuboCop::Cop::Style::SlicingWithRange::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # If the branch of a conditional consists solely of a conditional node, @@ -48111,13 +49284,30 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # will add a require statement to the top of the file if # enabled by RequireEnglish config. # -# Like `use_perl_names` but allows builtin global vars. -# +# @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 ARGV +# 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 @@ -48136,31 +49326,14 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $~ # puts $= # puts $* +# @example EnforcedStyle: use_builtin_english_names # -# @example EnforcedStyle: use_english_names (default) # # good -# require 'English' # or this could be in another file. -# +# # Like `use_perl_names` but allows builtin global vars. # 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 ARGV # puts $: # puts $" # puts $0 @@ -48179,90 +49352,89 @@ RuboCop::Cop::Style::SoleNestedConditional::MSG = T.let(T.unsafe(nil), String) # puts $~ # puts $= # puts $* -# @example EnforcedStyle: use_builtin_english_names # -# source://rubocop//lib/rubocop/cop/style/special_global_vars.rb#87 +# 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#176 + # 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#168 + # 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#152 + # 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#147 + # 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#247 + # 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#241 + # 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#190 + # 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#212 + # 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#198 + # 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#235 + # 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#227 + # 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#216 + # 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#251 + # 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#128 +# 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#100 +# 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#145 +# 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#93 +# 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#96 +# 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#98 +# 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#122 +# 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#124 +# 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#139 +# 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. @@ -48461,6 +49633,9 @@ class RuboCop::Cop::Style::StringChars < ::RuboCop::Cop::Base include ::RuboCop::Cop::RangeHelp extend ::RuboCop::Cop::AutoCorrector + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 + def on_csend(node); end + # source://rubocop//lib/rubocop/cop/style/string_chars.rb#29 def on_send(node); end end @@ -48808,7 +49983,10 @@ class RuboCop::Cop::Style::Strip < ::RuboCop::Cop::Base # source://rubocop//lib/rubocop/cop/style/strip.rb#24 def lstrip_rstrip(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/strip.rb#29 + # source://rubocop//lib/rubocop/cop/style/strip.rb#31 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/strip.rb#31 def on_send(node); end end @@ -48858,6 +50036,141 @@ 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. +# +# @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 +# +# # 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#54 +class RuboCop::Cop::Style::SuperArguments < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#62 + def on_super(super_node); end + + private + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#81 + def arguments_identical?(def_node, def_args, super_args); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#136 + def block_arg_same?(def_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#147 + def block_reassigned?(def_node, block_arg_name); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#158 + def forward_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#116 + def keyword_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#126 + def keyword_rest_arg_same?(def_arg, super_arg); end + + # @return [Boolean] + # + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#99 + def positional_arg_same?(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#106 + def positional_rest_arg_same(def_arg, super_arg); end + + # source://rubocop//lib/rubocop/cop/style/super_arguments.rb#162 + def preprocess_super_args(super_args); end +end + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#58 +RuboCop::Cop::Style::SuperArguments::ASSIGN_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#57 +RuboCop::Cop::Style::SuperArguments::DEF_TYPES = T.let(T.unsafe(nil), Array) + +# source://rubocop//lib/rubocop/cop/style/super_arguments.rb#60 +RuboCop::Cop::Style::SuperArguments::MSG = T.let(T.unsafe(nil), String) + +# Enforces the presence of parentheses in `super` containing arguments. +# +# `super` is a keyword and is provided as a distinct cop from those designed for method call. +# +# @example +# +# # bad +# super name, age +# +# # good +# super(name, age) +# +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#18 +class RuboCop::Cop::Style::SuperWithArgsParentheses < ::RuboCop::Cop::Base + extend ::RuboCop::Cop::AutoCorrector + + # source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#23 + def on_super(node); end +end + +# source://rubocop//lib/rubocop/cop/style/super_with_args_parentheses.rb#21 +RuboCop::Cop::Style::SuperWithArgsParentheses::MSG = T.let(T.unsafe(nil), String) + # Enforces the use of shorthand-style swapping of 2 variables. # # @example @@ -49058,9 +50371,13 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # `define_method?` methods are allowed by default. # These are customizable with `AllowedMethods` option. # -# @example AllowedPatterns: ['map'] (default) -# # good +# @example +# # bad # something.map { |s| s.upcase } +# something.map { _1.upcase } +# +# # good +# something.map(&:upcase) # @example AllowMethodsWithArguments: false (default) # # bad # something.do_something(foo) { |o| o.bar } @@ -49090,15 +50407,26 @@ RuboCop::Cop::Style::SymbolLiteral::MSG = T.let(T.unsafe(nil), String) # @example AllowedPatterns: [] (default) # # bad # something.map { |s| s.upcase } -# @example -# # bad +# @example AllowedPatterns: ['map'] (default) +# # good # something.map { |s| s.upcase } -# something.map { _1.upcase } +# @example AllCops:ActiveSupportExtensionsEnabled: false (default) +# # bad +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } # # # good -# something.map(&:upcase) +# lambda(&:foo) +# proc(&:foo) +# Proc.new(&:foo) +# @example AllCops:ActiveSupportExtensionsEnabled: true +# # good +# ->(x) { x.foo } +# proc { |x| x.foo } +# Proc.new { |x| x.foo } # -# source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#87 +# 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 @@ -49108,117 +50436,123 @@ class RuboCop::Cop::Style::SymbolProc < ::RuboCop::Cop::Base # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#136 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#189 def destructuring_block_argument?(argument_node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_block(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#116 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#170 def on_numblock(node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#98 + # 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#104 + # 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#101 + # 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#204 + # 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#200 + # 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#151 + # 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#164 + # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#217 def autocorrect(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/symbol_proc.rb#176 + # 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#172 + # 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#190 + # 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#185 + # 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#155 + # 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#147 + # 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#143 + # 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#111 + # 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#94 +# 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#95 +# 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#500 +# 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#505 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#504 def correct(corrector, node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#509 + # 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#523 + # 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#536 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#535 def element_assignment?(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#540 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#539 def extract_branches(node); end - # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#553 + # 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#548 + # 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#527 + # source://rubocop//lib/rubocop/cop/style/conditional_assignment.rb#526 def ternary(node); end end end @@ -49646,7 +50980,7 @@ class RuboCop::Cop::Style::TrailingCommaInArguments < ::RuboCop::Cop::Base def on_send(node); end class << self - # source://rubocop-rspec/2.25.0/lib/rubocop-rspec.rb#60 + # source://rubocop-capybara/2.21.0/lib/rubocop-capybara.rb#21 def autocorrect_incompatible_with; end end end @@ -50040,11 +51374,27 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # `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 +# @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 # @example ExactNameMatch: true (default) # # good # def name @@ -50096,26 +51446,10 @@ RuboCop::Cop::Style::TrailingUnderscoreVariable::UNDERSCORE = T.let(T.unsafe(nil # def self.foo # @foo # end -# @example -# # bad -# def foo -# @foo -# end -# -# def bar=(val) -# @bar = val -# end -# -# def self.baz -# @baz -# end -# +# @example AllowedMethods: ['allowed_method'] # # good -# attr_reader :foo -# attr_writer :bar -# -# class << self -# attr_reader :baz +# def allowed_method +# @foo # end # # source://rubocop//lib/rubocop/cop/style/trivial_accessors.rb#98 @@ -50367,22 +51701,25 @@ class RuboCop::Cop::Style::UnpackFirst < ::RuboCop::Cop::Base extend ::RuboCop::Cop::AutoCorrector extend ::RuboCop::Cop::TargetRubyVersion - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#38 + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 + def on_csend(node); end + + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#37 def on_send(node); end - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#31 + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#30 def unpack_and_first_element?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#54 + # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#53 def first_element_range(node, unpack_call); end end # source://rubocop//lib/rubocop/cop/style/unpack_first.rb#26 RuboCop::Cop::Style::UnpackFirst::MSG = T.let(T.unsafe(nil), String) -# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#28 +# source://rubocop//lib/rubocop/cop/style/unpack_first.rb#27 RuboCop::Cop::Style::UnpackFirst::RESTRICT_ON_SEND = T.let(T.unsafe(nil), Array) # Checks for variable interpolation (like "#@ivar"). @@ -50947,39 +52284,42 @@ class RuboCop::Cop::Style::ZeroLengthPredicate < ::RuboCop::Cop::Base # implement `#size`, but not `#empty`. We ignore those to # reduce false positives. # - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#139 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#143 def non_polymorphic_collection?(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#109 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#110 def nonzero_length_comparison(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#45 + 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#130 - def other_receiver(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#134 + def other_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#101 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#102 def zero_length_comparison(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#96 - def zero_length_predicate(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#126 + def zero_length_node(param0 = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#122 - def zero_length_receiver(param0 = T.unsafe(nil)); end + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#97 + def zero_length_predicate?(param0 = T.unsafe(nil)); end private - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#80 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#81 def check_nonzero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#65 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#66 def check_zero_length_comparison(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#53 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#54 def check_zero_length_predicate(node); end - # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#114 + # source://rubocop//lib/rubocop/cop/style/zero_length_predicate.rb#115 def replacement(node); end end @@ -51126,12 +52466,12 @@ class RuboCop::Cop::Team # source://rubocop//lib/rubocop/cop/team.rb#51 def errors; end - # source://rubocop//lib/rubocop/cop/team.rb#114 + # source://rubocop//lib/rubocop/cop/team.rb#122 def external_dependency_checksum; end # @deprecated # - # source://rubocop//lib/rubocop/cop/team.rb#110 + # source://rubocop//lib/rubocop/cop/team.rb#114 def forces; end # source://rubocop//lib/rubocop/cop/team.rb#76 @@ -51139,7 +52479,7 @@ class RuboCop::Cop::Team # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#81 + # source://rubocop//lib/rubocop/cop/team.rb#85 def investigate(processed_source, offset: T.unsafe(nil), original: T.unsafe(nil)); end # Returns the value of attribute updated_source_file. @@ -51159,57 +52499,57 @@ class RuboCop::Cop::Team private - # source://rubocop//lib/rubocop/cop/team.rb#121 + # source://rubocop//lib/rubocop/cop/team.rb#129 def autocorrect(processed_source, report, original:, offset:); end - # source://rubocop//lib/rubocop/cop/team.rb#182 + # source://rubocop//lib/rubocop/cop/team.rb#193 def autocorrect_report(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#140 + # source://rubocop//lib/rubocop/cop/team.rb#148 def be_ready; end - # source://rubocop//lib/rubocop/cop/team.rb#188 + # source://rubocop//lib/rubocop/cop/team.rb#199 def collate_corrections(report, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#204 + # source://rubocop//lib/rubocop/cop/team.rb#215 def each_corrector(report); end - # source://rubocop//lib/rubocop/cop/team.rb#254 + # source://rubocop//lib/rubocop/cop/team.rb#267 def handle_error(error, location, cop); end - # source://rubocop//lib/rubocop/cop/team.rb#246 + # source://rubocop//lib/rubocop/cop/team.rb#259 def handle_warning(error, location); end # @return [Commissioner::InvestigationReport] # - # source://rubocop//lib/rubocop/cop/team.rb#154 + # source://rubocop//lib/rubocop/cop/team.rb#162 def investigate_partial(cops, processed_source, offset:, original:); end - # source://rubocop//lib/rubocop/cop/team.rb#231 + # source://rubocop//lib/rubocop/cop/team.rb#242 def process_errors(file, errors); end - # source://rubocop//lib/rubocop/cop/team.rb#148 + # source://rubocop//lib/rubocop/cop/team.rb#156 def reset; end # @return [Array] # - # source://rubocop//lib/rubocop/cop/team.rb#160 + # source://rubocop//lib/rubocop/cop/team.rb#168 def roundup_relevant_cops(processed_source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#176 + # source://rubocop//lib/rubocop/cop/team.rb#184 def support_target_rails_version?(cop); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/team.rb#170 + # source://rubocop//lib/rubocop/cop/team.rb#178 def support_target_ruby_version?(cop); end - # source://rubocop//lib/rubocop/cop/team.rb#219 + # source://rubocop//lib/rubocop/cop/team.rb#230 def suppress_clobbering; end - # source://rubocop//lib/rubocop/cop/team.rb#225 + # source://rubocop//lib/rubocop/cop/team.rb#236 def validate_config; end class << self @@ -51460,19 +52800,19 @@ module RuboCop::Cop::Util private - # source://rubocop//lib/rubocop/cop/util.rb#35 + # source://rubocop//lib/rubocop/cop/util.rb#39 def add_parentheses(node, corrector); end - # source://rubocop//lib/rubocop/cop/util.rb#56 + # source://rubocop//lib/rubocop/cop/util.rb#60 def any_descendant?(node, *types); end - # source://rubocop//lib/rubocop/cop/util.rb#71 + # source://rubocop//lib/rubocop/cop/util.rb#75 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/util.rb#83 + # source://rubocop//lib/rubocop/cop/util.rb#87 def args_end(node); end - # source://rubocop//lib/rubocop/cop/util.rb#104 + # source://rubocop//lib/rubocop/cop/util.rb#108 def begins_its_line?(range); end # This is a bad API @@ -51485,78 +52825,78 @@ module RuboCop::Cop::Util # source://rubocop//lib/rubocop/cop/util.rb#22 def comment_lines?(node); end - # source://rubocop//lib/rubocop/cop/util.rb#192 + # source://rubocop//lib/rubocop/cop/util.rb#198 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#130 + # source://rubocop//lib/rubocop/cop/util.rb#134 def double_quotes_required?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#144 + # 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#114 + # source://rubocop//lib/rubocop/cop/util.rb#118 def first_part_of_call_chain(node); end - # source://rubocop//lib/rubocop/cop/util.rb#197 + # source://rubocop//lib/rubocop/cop/util.rb#203 def include_or_equal?(source, target); end - # source://rubocop//lib/rubocop/cop/util.rb#179 + # source://rubocop//lib/rubocop/cop/util.rb#185 def indent(node, offset: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/util.rb#161 + # source://rubocop//lib/rubocop/cop/util.rb#165 def interpret_string_escapes(string); end - # source://rubocop//lib/rubocop/cop/util.rb#165 + # source://rubocop//lib/rubocop/cop/util.rb#169 def line(node_or_range); end - # source://rubocop//lib/rubocop/cop/util.rb#26 + # source://rubocop//lib/rubocop/cop/util.rb#30 def line_range(node); end - # source://rubocop//lib/rubocop/cop/util.rb#140 + # source://rubocop//lib/rubocop/cop/util.rb#144 def needs_escaping?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#87 + # 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#30 + # source://rubocop//lib/rubocop/cop/util.rb#34 def parentheses?(node); end - # source://rubocop//lib/rubocop/cop/util.rb#173 + # source://rubocop//lib/rubocop/cop/util.rb#177 def same_line?(node1, node2); end - # source://rubocop//lib/rubocop/cop/util.rb#148 + # source://rubocop//lib/rubocop/cop/util.rb#152 def to_string_literal(string); end - # source://rubocop//lib/rubocop/cop/util.rb#185 + # source://rubocop//lib/rubocop/cop/util.rb#191 def to_supported_styles(enforced_style); end - # source://rubocop//lib/rubocop/cop/util.rb#157 + # 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#35 + # source://rubocop//lib/rubocop/cop/util.rb#39 def add_parentheses(node, corrector); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#56 + # source://rubocop//lib/rubocop/cop/util.rb#60 def any_descendant?(node, *types); end - # source://rubocop//lib/rubocop/cop/util.rb#71 + # source://rubocop//lib/rubocop/cop/util.rb#75 def args_begin(node); end - # source://rubocop//lib/rubocop/cop/util.rb#83 + # source://rubocop//lib/rubocop/cop/util.rb#87 def args_end(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#104 + # source://rubocop//lib/rubocop/cop/util.rb#108 def begins_its_line?(range); end # This is a bad API @@ -51577,62 +52917,62 @@ module RuboCop::Cop::Util # # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#130 + # source://rubocop//lib/rubocop/cop/util.rb#134 def double_quotes_required?(string); end - # source://rubocop//lib/rubocop/cop/util.rb#144 + # 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#114 + # source://rubocop//lib/rubocop/cop/util.rb#118 def first_part_of_call_chain(node); end - # source://rubocop//lib/rubocop/cop/util.rb#179 + # source://rubocop//lib/rubocop/cop/util.rb#185 def indent(node, offset: T.unsafe(nil)); end - # source://rubocop//lib/rubocop/cop/util.rb#161 + # source://rubocop//lib/rubocop/cop/util.rb#165 def interpret_string_escapes(string); end - # source://rubocop//lib/rubocop/cop/util.rb#165 + # source://rubocop//lib/rubocop/cop/util.rb#169 def line(node_or_range); end - # source://rubocop//lib/rubocop/cop/util.rb#26 + # source://rubocop//lib/rubocop/cop/util.rb#30 def line_range(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#140 + # source://rubocop//lib/rubocop/cop/util.rb#144 def needs_escaping?(string); end # @yield [sexp] # - # source://rubocop//lib/rubocop/cop/util.rb#87 + # 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#30 + # source://rubocop//lib/rubocop/cop/util.rb#34 def parentheses?(node); end # @return [Boolean] # - # source://rubocop//lib/rubocop/cop/util.rb#173 + # source://rubocop//lib/rubocop/cop/util.rb#177 def same_line?(node1, node2); end - # source://rubocop//lib/rubocop/cop/util.rb#148 + # source://rubocop//lib/rubocop/cop/util.rb#152 def to_string_literal(string); end - # source://rubocop//lib/rubocop/cop/util.rb#185 + # source://rubocop//lib/rubocop/cop/util.rb#191 def to_supported_styles(enforced_style); end - # source://rubocop//lib/rubocop/cop/util.rb#157 + # 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#99 +# 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 @@ -51644,7 +52984,7 @@ 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#98 +# 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 @@ -53039,176 +54379,181 @@ RuboCop::Cop::VisibilityHelp::VISIBILITY_SCOPES = T.let(T.unsafe(nil), Set) class RuboCop::DirectiveComment # @return [DirectiveComment] a new instance of DirectiveComment # - # source://rubocop//lib/rubocop/directive_comment.rb#30 + # source://rubocop//lib/rubocop/directive_comment.rb#32 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#80 + # source://rubocop//lib/rubocop/directive_comment.rb#82 def all_cops?; end # Returns the value of attribute comment. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def comment; end # Returns array of specified in this directive cop names # - # source://rubocop//lib/rubocop/directive_comment.rb#85 + # source://rubocop//lib/rubocop/directive_comment.rb#87 def cop_names; end # Returns the value of attribute cop_registry. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def cop_registry; end # Returns the value of attribute cops. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def cops; end # Returns array of specified in this directive department names # when all department disabled # - # source://rubocop//lib/rubocop/directive_comment.rb#91 + # source://rubocop//lib/rubocop/directive_comment.rb#93 def department_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#105 + # source://rubocop//lib/rubocop/directive_comment.rb#107 def directive_count; end # Checks if this directive disables cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#60 + # source://rubocop//lib/rubocop/directive_comment.rb#62 def disabled?; end # Checks if this directive disables all cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#75 + # source://rubocop//lib/rubocop/directive_comment.rb#77 def disabled_all?; end # Checks if this directive enables cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#65 + # source://rubocop//lib/rubocop/directive_comment.rb#67 def enabled?; end # Checks if this directive enables all cops # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#70 + # source://rubocop//lib/rubocop/directive_comment.rb#72 def enabled_all?; end # Checks if directive departments include cop # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#96 + # source://rubocop//lib/rubocop/directive_comment.rb#98 def in_directive_department?(cop); end # Returns line number for directive # - # source://rubocop//lib/rubocop/directive_comment.rb#110 + # source://rubocop//lib/rubocop/directive_comment.rb#112 def line_number; end # Checks if this directive contains all the given cop names # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#42 + # source://rubocop//lib/rubocop/directive_comment.rb#44 def match?(cop_names); end # Returns match captures to directive comment pattern # - # source://rubocop//lib/rubocop/directive_comment.rb#55 + # source://rubocop//lib/rubocop/directive_comment.rb#57 def match_captures; end # Returns the value of attribute mode. # - # source://rubocop//lib/rubocop/directive_comment.rb#28 + # source://rubocop//lib/rubocop/directive_comment.rb#30 def mode; end # Checks if cop department has already used in directive comment # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#101 + # source://rubocop//lib/rubocop/directive_comment.rb#103 def overridden_by_department?(cop); end - # source://rubocop//lib/rubocop/directive_comment.rb#46 + # source://rubocop//lib/rubocop/directive_comment.rb#48 def range; end # Checks if this directive relates to single line # # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#37 + # source://rubocop//lib/rubocop/directive_comment.rb#39 def single_line?; end private - # source://rubocop//lib/rubocop/directive_comment.rb#130 + # source://rubocop//lib/rubocop/directive_comment.rb#133 def all_cop_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#134 + # source://rubocop//lib/rubocop/directive_comment.rb#137 def cop_names_for_department(department); end # @return [Boolean] # - # source://rubocop//lib/rubocop/directive_comment.rb#126 + # source://rubocop//lib/rubocop/directive_comment.rb#129 def department?(name); end - # source://rubocop//lib/rubocop/directive_comment.rb#140 - def exclude_redundant_directive_cop(cops); end + # source://rubocop//lib/rubocop/directive_comment.rb#142 + def exclude_lint_department_cops(cops); end - # source://rubocop//lib/rubocop/directive_comment.rb#120 + # source://rubocop//lib/rubocop/directive_comment.rb#122 def parsed_cop_names; end - # source://rubocop//lib/rubocop/directive_comment.rb#116 + # source://rubocop//lib/rubocop/directive_comment.rb#118 def splitted_cops_string; end class << self - # source://rubocop//lib/rubocop/directive_comment.rb#24 + # source://rubocop//lib/rubocop/directive_comment.rb#26 def before_comment(line); end end end # @api private # -# source://rubocop//lib/rubocop/directive_comment.rb#17 +# 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#15 +# 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#13 +# 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#19 +# source://rubocop//lib/rubocop/directive_comment.rb#21 RuboCop::DirectiveComment::DIRECTIVE_COMMENT_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::REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) +RuboCop::DirectiveComment::LINT_REDUNDANT_DIRECTIVE_COP = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/directive_comment.rb#9 -RuboCop::DirectiveComment::REDUNDANT_DIRECTIVE_COP_DEPARTMENT = T.let(T.unsafe(nil), String) +# source://rubocop//lib/rubocop/directive_comment.rb#13 +RuboCop::DirectiveComment::LINT_SYNTAX_COP = 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 @@ -53349,7 +54694,12 @@ module RuboCop::Ext::RegexpNode private - # source://rubocop//lib/rubocop/ext/regexp_node.rb#68 + # @return [Boolean] + # + # source://rubocop//lib/rubocop/ext/regexp_node.rb#65 + def named_capturing?(exp, event, named); end + + # source://rubocop//lib/rubocop/ext/regexp_node.rb#73 def with_interpolations_blanked; end end @@ -53370,7 +54720,7 @@ module RuboCop::Ext::RegexpParser::Expression; end module RuboCop::Ext::RegexpParser::Expression::Base # Shortcut to `loc.expression` # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#27 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#26 def expression; end # E.g. @@ -53383,7 +54733,7 @@ module RuboCop::Ext::RegexpParser::Expression::Base # # Please open issue if you need other locations # - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#61 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#44 def loc; end # Returns the value of attribute origin. @@ -53400,15 +54750,15 @@ module RuboCop::Ext::RegexpParser::Expression::Base private - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#67 + # 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#79 +# source://rubocop//lib/rubocop/ext/regexp_parser.rb#62 module RuboCop::Ext::RegexpParser::Expression::CharacterSet - # source://rubocop//lib/rubocop/ext/regexp_parser.rb#80 + # source://rubocop//lib/rubocop/ext/regexp_parser.rb#63 def build_location; end end @@ -53721,10 +55071,10 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText private - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#51 + # 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#41 + # 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 @@ -53732,7 +55082,7 @@ class RuboCop::Formatter::ClangStyleFormatter < ::RuboCop::Formatter::SimpleText # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#37 + # source://rubocop//lib/rubocop/formatter/clang_style_formatter.rb#33 def valid_line?(offense); end end @@ -53788,100 +55138,113 @@ class RuboCop::Formatter::DisabledConfigFormatter < ::RuboCop::Formatter::BaseFo # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#27 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#39 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#40 def file_finished(file, offenses); end # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#33 - def file_started(_file, _file_info); end + def file_started(_file, options); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#47 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#48 def finished(_inspected_files); end private # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#68 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#69 def auto_gen_enforced_style?; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#72 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#73 def command; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#156 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#165 def cop_config_params(default_cfg, cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#176 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#185 def default_config(cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#220 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#229 def excludes(offending_files, cop_name, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#191 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#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#241 + # 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#262 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#271 def no_exclude_limit?; end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#101 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#102 def output_cop(cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#128 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#137 def output_cop_comments(output_buffer, cfg, cop_name, offense_count); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#180 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#189 def output_cop_config(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#163 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#172 def output_cop_param_comments(output_buffer, params, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#210 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#219 def output_exclude_list(output_buffer, offending_files, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#245 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#254 def output_exclude_path(output_buffer, exclude_path, parent); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#199 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#208 def output_offending_files(output_buffer, cfg, cop_name); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#95 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#96 def output_offenses; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#258 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#267 def safe_autocorrect?(config); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#115 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#116 def set_max(cfg, cop_name); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#64 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#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#60 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#61 def show_timestamp?; end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#148 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#157 def supports_safe_autocorrect?(cop_class, default_cfg); end # @return [Boolean] # - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#152 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#161 def supports_unsafe_autocorrect?(cop_class, default_cfg); end - # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#91 + # source://rubocop//lib/rubocop/formatter/disabled_config_formatter.rb#92 def timestamp; end class << self @@ -53951,43 +55314,46 @@ end class RuboCop::Formatter::FormatterSet < ::Array # @return [FormatterSet] a new instance of FormatterSet # - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#39 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#40 def initialize(options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#55 + # 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#67 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#68 def close_output_files; end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#50 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#51 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#44 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#45 def file_started(file, options); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def finished(*args); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#34 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#35 def started(*args); end private - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#86 + # source://rubocop//lib/rubocop/formatter/formatter_set.rb#87 def builtin_formatter_class(specified_key); end - # source://rubocop//lib/rubocop/formatter/formatter_set.rb#99 + # 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#75 + # 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#31 +# 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 @@ -54024,38 +55390,38 @@ RuboCop::Formatter::FuubarStyleFormatter::RESET_SEQUENCE = T.let(T.unsafe(nil), # This formatter formats report data as GitHub Workflow commands resulting # in GitHub check annotations when run within GitHub Actions. # -# source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#7 +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#7 class RuboCop::Formatter::GitHubActionsFormatter < ::RuboCop::Formatter::BaseFormatter - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#14 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#14 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#18 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#18 def finished(_inspected_files); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#10 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#10 def started(_target_files); end private - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#29 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#29 def github_escape(string); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#41 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#41 def github_severity(offense); end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#33 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#33 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#45 + # source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#45 def report_offense(file, offense); end end -# source://rubocop//lib/rubocop/formatter/git_hub_actions_formatter.rb#8 +# source://rubocop//lib/rubocop/formatter/github_actions_formatter.rb#8 RuboCop::Formatter::GitHubActionsFormatter::ESCAPE_MAP = T.let(T.unsafe(nil), Hash) # This formatter saves the output as an html file. # -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#10 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#9 class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter # @return [HTMLFormatter] a new instance of HTMLFormatter # @@ -54085,6 +55451,22 @@ class RuboCop::Formatter::HTMLFormatter < ::RuboCop::Formatter::BaseFormatter 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 @@ -54146,67 +55528,67 @@ class RuboCop::Formatter::HTMLFormatter::Color < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 +# 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#61 +# 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#77 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#71 def initialize(files, summary); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#124 + # 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#84 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#78 def binding; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#89 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#83 def decorated_message(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#120 + # 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#75 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 def files; end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#100 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#94 def highlight_source_tag(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#93 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#87 def highlighted_source_line(offense); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#116 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#110 def possible_ellipses(location); end - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#111 + # 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#106 + # 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#75 + # source://rubocop//lib/rubocop/formatter/html_formatter.rb#69 def summary; end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#73 +# 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#65 -RuboCop::Formatter::HTMLFormatter::ERBContext::SEVERITY_COLORS = T.let(T.unsafe(nil), Hash) - # source://rubocop//lib/rubocop/formatter/html_formatter.rb#25 class RuboCop::Formatter::HTMLFormatter::FileOffenses < ::Struct # Returns the value of attribute offenses @@ -54284,27 +55666,27 @@ class RuboCop::Formatter::HTMLFormatter::Summary < ::Struct end end -# source://rubocop//lib/rubocop/formatter/html_formatter.rb#12 +# source://rubocop//lib/rubocop/formatter/html_formatter.rb#11 RuboCop::Formatter::HTMLFormatter::TEMPLATE_PATH = T.let(T.unsafe(nil), String) # This formatter formats the report data in JSON format. # -# source://rubocop//lib/rubocop/formatter/json_formatter.rb#9 +# source://rubocop//lib/rubocop/formatter/json_formatter.rb#8 class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter include ::RuboCop::PathUtil # @return [JSONFormatter] a new instance of JSONFormatter # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#14 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#13 def initialize(output, options = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#23 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#22 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#28 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#27 def finished(inspected_files); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#43 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#42 def hash_for_file(file, offenses); end # TODO: Consider better solution for Offense#real_column. @@ -54312,21 +55694,21 @@ class RuboCop::Formatter::JSONFormatter < ::RuboCop::Formatter::BaseFormatter # So, the minimum value of `last_column` should be 1. # And non-zero value of `last_column` should be used as is. # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#65 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#64 def hash_for_location(offense); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#50 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#49 def hash_for_offense(offense); end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#33 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#32 def metadata_hash; end # Returns the value of attribute output_hash. # - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#12 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#11 def output_hash; end - # source://rubocop//lib/rubocop/formatter/json_formatter.rb#19 + # source://rubocop//lib/rubocop/formatter/json_formatter.rb#18 def started(target_files); end end @@ -54432,6 +55814,9 @@ end # # 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 @@ -54443,7 +55828,7 @@ class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseForm # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#17 def offense_counts; end - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#74 + # 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 @@ -54452,7 +55837,7 @@ class RuboCop::Formatter::OffenseCountFormatter < ::RuboCop::Formatter::BaseForm # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#19 def started(target_files); end - # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#78 + # source://rubocop//lib/rubocop/formatter/offense_count_formatter.rb#77 def total_offense_count(offense_counts); end end @@ -54648,10 +56033,10 @@ class RuboCop::Formatter::TapFormatter < ::RuboCop::Formatter::ClangStyleFormatt private - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#62 def annotate_message(msg); end - # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#70 + # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#66 def message(offense); end # source://rubocop//lib/rubocop/formatter/tap_formatter.rb#39 @@ -54718,50 +56103,63 @@ end # source://rubocop//lib/rubocop/options.rb#8 class RuboCop::IncorrectCopNameError < ::StandardError; end -# Encapsulation of a lockfile for use when checking for gems. -# Does not actually resolve gems, just parses the lockfile. -# -# @api private +# The RuboCop's built-in LSP module. # -# source://rubocop//lib/rubocop/lockfile.rb#7 -class RuboCop::Lockfile - # Gems that the bundle depends on +# source://rubocop//lib/rubocop/lsp.rb#5 +module RuboCop::LSP + private + + # Disable LSP. # - # @api private + # @return [void] # - # source://rubocop//lib/rubocop/lockfile.rb#9 - def dependencies; end + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end - # All activated gems, including transitive dependencies + # Enable LSP. # - # @api private + # @return [void] # - # source://rubocop//lib/rubocop/lockfile.rb#16 - def gems; end + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end - # @api private + # Returns true when LSP is enabled, false when disabled. + # # @return [Boolean] # - # source://rubocop//lib/rubocop/lockfile.rb#24 - def includes_gem?(name); end + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end - private + class << self + # Disable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#25 + def disable(&block); end - # @api private - # - # source://rubocop//lib/rubocop/lockfile.rb#30 - def parser; end -end + # Enable LSP. + # + # @return [void] + # + # source://rubocop//lib/rubocop/lsp.rb#18 + def enable; end -# source://rubocop//lib/rubocop/lsp/logger.rb#13 -module RuboCop::Lsp; end + # Returns true when LSP is enabled, false when disabled. + # + # @return [Boolean] + # + # source://rubocop//lib/rubocop/lsp.rb#11 + def enabled?; end + end +end # Log for Language Server Protocol of RuboCop. # # @api private # # source://rubocop//lib/rubocop/lsp/logger.rb#16 -class RuboCop::Lsp::Logger +class RuboCop::LSP::Logger class << self # @api private # @@ -54775,7 +56173,7 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/routes.rb#18 -class RuboCop::Lsp::Routes +class RuboCop::LSP::Routes # @api private # @return [Routes] a new instance of Routes # @@ -54790,52 +56188,52 @@ class RuboCop::Lsp::Routes # source://rubocop//lib/rubocop/lsp/routes.rb#38 def handle_initialize(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#61 + # source://rubocop//lib/rubocop/lsp/routes.rb#57 def handle_initialized(_request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#170 + # source://rubocop//lib/rubocop/lsp/routes.rb#167 def handle_method_missing(request); end - # source://rubocop//lib/rubocop/lsp/routes.rb#67 + # source://rubocop//lib/rubocop/lsp/routes.rb#64 def handle_shutdown(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#159 + # source://rubocop//lib/rubocop/lsp/routes.rb#156 def handle_unsupported_method(request, method = T.unsafe(nil)); end private # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#208 + # source://rubocop//lib/rubocop/lsp/routes.rb#205 def diagnostic(file_uri, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#178 + # source://rubocop//lib/rubocop/lsp/routes.rb#175 def extract_initialization_options_from(request); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#188 + # source://rubocop//lib/rubocop/lsp/routes.rb#185 def format_file(file_uri, command: T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#222 + # source://rubocop//lib/rubocop/lsp/routes.rb#219 def remove_file_protocol_from(uri); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#226 + # source://rubocop//lib/rubocop/lsp/routes.rb#223 def to_diagnostic(offense); end # @api private # - # source://rubocop//lib/rubocop/lsp/routes.rb#238 + # source://rubocop//lib/rubocop/lsp/routes.rb#235 def to_range(location); end class << self @@ -54853,7 +56251,7 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/runtime.rb#16 -class RuboCop::Lsp::Runtime +class RuboCop::LSP::Runtime # @api private # @return [Runtime] a new instance of Runtime # @@ -54919,42 +56317,42 @@ end # # @api private # -# source://rubocop//lib/rubocop/lsp/server.rb#21 -class RuboCop::Lsp::Server +# source://rubocop//lib/rubocop/lsp/server.rb#22 +class RuboCop::LSP::Server # @api private # @return [Server] a new instance of Server # - # source://rubocop//lib/rubocop/lsp/server.rb#22 + # source://rubocop//lib/rubocop/lsp/server.rb#23 def initialize(config_store); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#56 + # source://rubocop//lib/rubocop/lsp/server.rb#61 def configure(options); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#48 + # source://rubocop//lib/rubocop/lsp/server.rb#53 def format(path, text, command:); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#52 + # source://rubocop//lib/rubocop/lsp/server.rb#57 def offenses(path, text); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#29 + # source://rubocop//lib/rubocop/lsp/server.rb#34 def start; end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#62 + # source://rubocop//lib/rubocop/lsp/server.rb#67 def stop(&block); end # @api private # - # source://rubocop//lib/rubocop/lsp/server.rb#44 + # source://rubocop//lib/rubocop/lsp/server.rb#49 def write(response); end end @@ -54963,7 +56361,7 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/severity.rb#7 -class RuboCop::Lsp::Severity +class RuboCop::LSP::Severity class << self # @api private # @@ -54975,7 +56373,70 @@ end # @api private # # source://rubocop//lib/rubocop/lsp/severity.rb#8 -RuboCop::Lsp::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) +RuboCop::LSP::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# 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 [Boolean] + # + # source://rubocop//lib/rubocop/lockfile.rb#85 + def bundler_lock_parser_defined?; end + + # @api private + # @return [Bundler::LockfileParser, nil] + # + # source://rubocop//lib/rubocop/lockfile.rb#72 + def parser; end +end # Parse different formats of magic comments. # @@ -55334,7 +56795,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#228 + # 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: @@ -55346,12 +56807,12 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#139 + # source://rubocop//lib/rubocop/options.rb#140 def add_autocorrection_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#204 + # source://rubocop//lib/rubocop/options.rb#205 def add_cache_options(opts); end # @api private @@ -55361,42 +56822,42 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#162 + # source://rubocop//lib/rubocop/options.rb#163 def add_config_generation_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#180 + # source://rubocop//lib/rubocop/options.rb#181 def add_cop_selection_csv_option(option, opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#240 + # source://rubocop//lib/rubocop/options.rb#241 def add_general_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#211 + # source://rubocop//lib/rubocop/options.rb#212 def add_lsp_option(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#104 + # source://rubocop//lib/rubocop/options.rb#105 def add_output_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#252 + # source://rubocop//lib/rubocop/options.rb#253 def add_profile_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#217 + # source://rubocop//lib/rubocop/options.rb#218 def add_server_options(opts); end # @api private # - # source://rubocop//lib/rubocop/options.rb#195 + # source://rubocop//lib/rubocop/options.rb#196 def add_severity_option(opts); end # @api private @@ -55406,7 +56867,7 @@ class RuboCop::Options # @api private # - # source://rubocop//lib/rubocop/options.rb#262 + # source://rubocop//lib/rubocop/options.rb#263 def handle_deprecated_option(old_option, new_option); end # Finds the option in `args` starting with -- and converts it to a symbol, @@ -55414,7 +56875,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#296 + # source://rubocop//lib/rubocop/options.rb#297 def long_opt_symbol(args); end # Sets a value in the @options hash, based on the given long option and its @@ -55422,17 +56883,17 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#285 + # source://rubocop//lib/rubocop/options.rb#286 def option(opts, *args); end # @api private # - # source://rubocop//lib/rubocop/options.rb#267 + # source://rubocop//lib/rubocop/options.rb#268 def rainbow; end # @api private # - # source://rubocop//lib/rubocop/options.rb#301 + # source://rubocop//lib/rubocop/options.rb#302 def require_feature(file); end # Creates a section of options in order to separate them visually when @@ -55440,7 +56901,7 @@ class RuboCop::Options # # @api private # - # source://rubocop//lib/rubocop/options.rb#277 + # source://rubocop//lib/rubocop/options.rb#278 def section(opts, heading, &_block); end end @@ -55463,141 +56924,141 @@ RuboCop::Options::E_STDIN_NO_PATH = T.let(T.unsafe(nil), String) # # @api private # -# source://rubocop//lib/rubocop/options.rb#497 +# source://rubocop//lib/rubocop/options.rb#498 module RuboCop::OptionsHelp; end # @api private # -# source://rubocop//lib/rubocop/options.rb#499 +# source://rubocop//lib/rubocop/options.rb#500 RuboCop::OptionsHelp::FORMATTER_OPTION_LIST = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/options.rb#498 +# source://rubocop//lib/rubocop/options.rb#499 RuboCop::OptionsHelp::MAX_EXCL = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/options.rb#501 +# source://rubocop//lib/rubocop/options.rb#502 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#311 +# source://rubocop//lib/rubocop/options.rb#312 class RuboCop::OptionsValidator # @api private # @return [OptionsValidator] a new instance of OptionsValidator # - # source://rubocop//lib/rubocop/options.rb#349 + # source://rubocop//lib/rubocop/options.rb#350 def initialize(options); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#471 + # source://rubocop//lib/rubocop/options.rb#472 def boolean_or_empty_cache?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#437 + # source://rubocop//lib/rubocop/options.rb#442 def disable_parallel_when_invalid_option_combo; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#463 - def display_only_fail_level_offenses_with_autocorrect?; end - - # @api private - # @return [Boolean] - # - # source://rubocop//lib/rubocop/options.rb#467 + # source://rubocop//lib/rubocop/options.rb#468 def except_syntax?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#475 + # source://rubocop//lib/rubocop/options.rb#476 def incompatible_options; end # @api private # - # source://rubocop//lib/rubocop/options.rb#450 + # source://rubocop//lib/rubocop/options.rb#455 def invalid_arguments_for_parallel; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/options.rb#458 + # source://rubocop//lib/rubocop/options.rb#463 def only_includes_redundant_disable?; end # @api private # - # source://rubocop//lib/rubocop/options.rb#384 + # source://rubocop//lib/rubocop/options.rb#382 def validate_auto_gen_config; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#423 + # source://rubocop//lib/rubocop/options.rb#428 def validate_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#487 + # source://rubocop//lib/rubocop/options.rb#488 def validate_cache_enabled_for_cache_root; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#358 + # source://rubocop//lib/rubocop/options.rb#359 def validate_compatibility; end # @api private # - # source://rubocop//lib/rubocop/options.rb#353 + # source://rubocop//lib/rubocop/options.rb#354 def validate_cop_options; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#405 + # source://rubocop//lib/rubocop/options.rb#403 def validate_display_only_correctable_and_autocorrect; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#397 + # source://rubocop//lib/rubocop/options.rb#395 def validate_display_only_failed; end # @api private # @raise [OptionArgumentError] # - # source://rubocop//lib/rubocop/options.rb#414 + # source://rubocop//lib/rubocop/options.rb#412 def validate_display_only_failed_and_display_only_correctable; end # @api private # @raise [OptionParser::MissingArgument] # - # source://rubocop//lib/rubocop/options.rb#479 + # source://rubocop//lib/rubocop/options.rb#480 def validate_exclude_limit_option; end + # @api private + # @raise [OptionArgumentError] + # + # source://rubocop//lib/rubocop/options.rb#421 + 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#318 + # source://rubocop//lib/rubocop/options.rb#319 def validate_cop_list(names); end private # @api private # - # source://rubocop//lib/rubocop/options.rb#335 + # source://rubocop//lib/rubocop/options.rb#336 def format_message_from(name, cop_names); end end end @@ -55610,21 +57071,21 @@ module RuboCop::PathUtil # Returns true for an absolute Unix or Windows path. # - # source://rubocop//lib/rubocop/path_util.rb#72 + # source://rubocop//lib/rubocop/path_util.rb#76 def absolute?(path); end # Returns true for a glob # - # source://rubocop//lib/rubocop/path_util.rb#77 + # source://rubocop//lib/rubocop/path_util.rb#81 def glob?(path); end - # source://rubocop//lib/rubocop/path_util.rb#107 + # source://rubocop//lib/rubocop/path_util.rb#111 def hidden_dir?(path); end - # source://rubocop//lib/rubocop/path_util.rb#90 + # source://rubocop//lib/rubocop/path_util.rb#94 def hidden_file?(path); end - # source://rubocop//lib/rubocop/path_util.rb#81 + # source://rubocop//lib/rubocop/path_util.rb#85 def hidden_file_in_not_hidden_dir?(pattern, path); end # source://rubocop//lib/rubocop/path_util.rb#48 @@ -55632,7 +57093,7 @@ module RuboCop::PathUtil # Loose check to reduce memory allocations # - # source://rubocop//lib/rubocop/path_util.rb#97 + # source://rubocop//lib/rubocop/path_util.rb#101 def maybe_hidden_file?(path); end # source://rubocop//lib/rubocop/path_util.rb#13 @@ -55646,29 +57107,29 @@ module RuboCop::PathUtil # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#72 + # source://rubocop//lib/rubocop/path_util.rb#76 def absolute?(path); end # Returns true for a glob # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#77 + # source://rubocop//lib/rubocop/path_util.rb#81 def glob?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#107 + # source://rubocop//lib/rubocop/path_util.rb#111 def hidden_dir?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#90 + # source://rubocop//lib/rubocop/path_util.rb#94 def hidden_file?(path); end # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#81 + # source://rubocop//lib/rubocop/path_util.rb#85 def hidden_file_in_not_hidden_dir?(pattern, path); end # @return [Boolean] @@ -55680,7 +57141,7 @@ module RuboCop::PathUtil # # @return [Boolean] # - # source://rubocop//lib/rubocop/path_util.rb#97 + # source://rubocop//lib/rubocop/path_util.rb#101 def maybe_hidden_file?(path); end # source://rubocop//lib/rubocop/path_util.rb#13 @@ -55703,7 +57164,7 @@ module RuboCop::PathUtil end end -# source://rubocop//lib/rubocop/path_util.rb#94 +# source://rubocop//lib/rubocop/path_util.rb#98 RuboCop::PathUtil::HIDDEN_FILE_PATTERN = T.let(T.unsafe(nil), String) # source://rubocop//lib/rubocop/path_util.rb#31 @@ -55808,39 +57269,39 @@ RuboCop::RemoteConfig::CACHE_LIFETIME = T.let(T.unsafe(nil), Integer) # # @api private # -# source://rubocop//lib/rubocop/result_cache.rb#12 +# source://rubocop//lib/rubocop/result_cache.rb#11 class RuboCop::ResultCache # @api private # @return [ResultCache] a new instance of ResultCache # - # source://rubocop//lib/rubocop/result_cache.rb#88 + # source://rubocop//lib/rubocop/result_cache.rb#87 def initialize(file, team, options, config_store, cache_root = T.unsafe(nil)); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#101 + # source://rubocop//lib/rubocop/result_cache.rb#100 def debug?; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#109 + # source://rubocop//lib/rubocop/result_cache.rb#108 def load; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#86 + # source://rubocop//lib/rubocop/result_cache.rb#85 def path; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#114 + # source://rubocop//lib/rubocop/result_cache.rb#113 def save(offenses); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#105 + # source://rubocop//lib/rubocop/result_cache.rb#104 def valid?; end private @@ -55848,7 +57309,7 @@ class RuboCop::ResultCache # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#147 + # source://rubocop//lib/rubocop/result_cache.rb#146 def any_symlink?(path); end # We combine team and options into a single "context" checksum to avoid @@ -55858,17 +57319,17 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#237 + # source://rubocop//lib/rubocop/result_cache.rb#236 def context_checksum(team, options); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#190 + # source://rubocop//lib/rubocop/result_cache.rb#189 def digest(path); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#158 + # source://rubocop//lib/rubocop/result_cache.rb#157 def file_checksum(file, config_store); end # Return a hash of the options given at invocation, minus the ones that have @@ -55877,25 +57338,25 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#221 + # source://rubocop//lib/rubocop/result_cache.rb#220 def relevant_options_digest(options); end # The checksum of the RuboCop program running the inspection. # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#175 + # source://rubocop//lib/rubocop/result_cache.rb#174 def rubocop_checksum; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#201 + # source://rubocop//lib/rubocop/result_cache.rb#200 def rubocop_extra_features; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#143 + # source://rubocop//lib/rubocop/result_cache.rb#142 def symlink_protection_triggered?(path); end # The external dependency checksums are cached per RuboCop team so that @@ -55903,19 +57364,19 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#228 + # source://rubocop//lib/rubocop/result_cache.rb#227 def team_checksum(team); end class << self # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#82 + # source://rubocop//lib/rubocop/result_cache.rb#81 def allow_symlinks_in_cache_location?(config_store); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#76 + # source://rubocop//lib/rubocop/result_cache.rb#75 def cache_root(config_store); end # Remove old files so that the cache doesn't grow too big. When the @@ -55927,67 +57388,67 @@ class RuboCop::ResultCache # # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#29 + # source://rubocop//lib/rubocop/result_cache.rb#28 def cleanup(config_store, verbose, cache_root = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def inhibit_cleanup; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def inhibit_cleanup=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#43 + # source://rubocop//lib/rubocop/result_cache.rb#42 def rubocop_required_features; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#43 + # source://rubocop//lib/rubocop/result_cache.rb#42 def rubocop_required_features=(_arg0); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def source_checksum; end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#171 + # source://rubocop//lib/rubocop/result_cache.rb#170 def source_checksum=(_arg0); end private # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#66 + # source://rubocop//lib/rubocop/result_cache.rb#65 def remove_files(files, dirs, remove_count); end # @api private # - # source://rubocop//lib/rubocop/result_cache.rb#53 + # source://rubocop//lib/rubocop/result_cache.rb#52 def remove_oldest_files(files, dirs, cache_root, verbose); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/result_cache.rb#49 + # source://rubocop//lib/rubocop/result_cache.rb#48 def requires_file_removal?(file_count, config_store); end end end # @api private # -# source://rubocop//lib/rubocop/result_cache.rb#17 +# source://rubocop//lib/rubocop/result_cache.rb#16 RuboCop::ResultCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array) # @api private # -# source://rubocop//lib/rubocop/result_cache.rb#13 +# source://rubocop//lib/rubocop/result_cache.rb#12 RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) # This class handles the processing of files, which includes dealing with @@ -55997,145 +57458,145 @@ RuboCop::ResultCache::NON_CHANGING = T.let(T.unsafe(nil), Array) class RuboCop::Runner # @return [Runner] a new instance of Runner # - # source://rubocop//lib/rubocop/runner.rb#59 + # source://rubocop//lib/rubocop/runner.rb#63 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 + # source://rubocop//lib/rubocop/runner.rb#61 def aborting=(_arg0); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#83 + # source://rubocop//lib/rubocop/runner.rb#87 def aborting?; end # Returns the value of attribute errors. # - # source://rubocop//lib/rubocop/runner.rb#56 + # source://rubocop//lib/rubocop/runner.rb#60 def errors; end - # source://rubocop//lib/rubocop/runner.rb#67 + # source://rubocop//lib/rubocop/runner.rb#71 def run(paths); end # Returns the value of attribute warnings. # - # source://rubocop//lib/rubocop/runner.rb#56 + # source://rubocop//lib/rubocop/runner.rb#60 def warnings; end private - # source://rubocop//lib/rubocop/runner.rb#196 + # source://rubocop//lib/rubocop/runner.rb#200 def add_redundant_disables(file, offenses, source); end - # source://rubocop//lib/rubocop/runner.rb#170 + # source://rubocop//lib/rubocop/runner.rb#174 def cached_result(file, team); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#250 + # source://rubocop//lib/rubocop/runner.rb#254 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#328 + # source://rubocop//lib/rubocop/runner.rb#332 def check_for_infinite_loop(processed_source, offenses_by_iteration); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#222 + # source://rubocop//lib/rubocop/runner.rb#226 def check_for_redundant_disables?(source); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#423 + # source://rubocop//lib/rubocop/runner.rb#427 def considered_failure?(offense); end - # source://rubocop//lib/rubocop/runner.rb#456 + # source://rubocop//lib/rubocop/runner.rb#460 def default_config(cop_name); end - # source://rubocop//lib/rubocop/runner.rb#272 + # source://rubocop//lib/rubocop/runner.rb#276 def do_inspection_loop(file); end - # source://rubocop//lib/rubocop/runner.rb#133 + # source://rubocop//lib/rubocop/runner.rb#137 def each_inspected_file(files); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#236 + # source://rubocop//lib/rubocop/runner.rb#240 def except_redundant_cop_disable_directive?; end - # source://rubocop//lib/rubocop/runner.rb#357 + # source://rubocop//lib/rubocop/runner.rb#361 def extract_ruby_sources(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#245 + # source://rubocop//lib/rubocop/runner.rb#249 def file_finished(file, offenses); end - # source://rubocop//lib/rubocop/runner.rb#174 + # source://rubocop//lib/rubocop/runner.rb#178 def file_offense_cache(file); end - # source://rubocop//lib/rubocop/runner.rb#162 + # source://rubocop//lib/rubocop/runner.rb#166 def file_offenses(file); end - # source://rubocop//lib/rubocop/runner.rb#240 + # source://rubocop//lib/rubocop/runner.rb#244 def file_started(file); end - # source://rubocop//lib/rubocop/runner.rb#403 + # source://rubocop//lib/rubocop/runner.rb#407 def filter_cop_classes(cop_classes, config); end - # source://rubocop//lib/rubocop/runner.rb#104 + # source://rubocop//lib/rubocop/runner.rb#108 def find_target_files(paths); end - # source://rubocop//lib/rubocop/runner.rb#414 + # source://rubocop//lib/rubocop/runner.rb#418 def formatter_set; end - # source://rubocop//lib/rubocop/runner.rb#470 + # source://rubocop//lib/rubocop/runner.rb#475 def get_processed_source(file); end - # source://rubocop//lib/rubocop/runner.rb#342 + # source://rubocop//lib/rubocop/runner.rb#346 def inspect_file(processed_source, team = T.unsafe(nil)); end - # source://rubocop//lib/rubocop/runner.rb#115 + # source://rubocop//lib/rubocop/runner.rb#119 def inspect_files(files); end - # source://rubocop//lib/rubocop/runner.rb#303 + # source://rubocop//lib/rubocop/runner.rb#307 def iterate_until_no_changes(source, offenses_by_iteration); end - # source://rubocop//lib/rubocop/runner.rb#148 + # source://rubocop//lib/rubocop/runner.rb#152 def list_files(paths); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#452 + # source://rubocop//lib/rubocop/runner.rb#456 def mark_as_safe_by_config?(config); end - # source://rubocop//lib/rubocop/runner.rb#460 + # source://rubocop//lib/rubocop/runner.rb#464 def minimum_severity_to_fail; end - # source://rubocop//lib/rubocop/runner.rb#364 + # source://rubocop//lib/rubocop/runner.rb#368 def mobilize_team(processed_source); end - # source://rubocop//lib/rubocop/runner.rb#369 + # source://rubocop//lib/rubocop/runner.rb#373 def mobilized_cop_classes(config); end - # source://rubocop//lib/rubocop/runner.rb#432 + # source://rubocop//lib/rubocop/runner.rb#436 def offenses_to_report(offenses); end - # source://rubocop//lib/rubocop/runner.rb#152 + # source://rubocop//lib/rubocop/runner.rb#156 def process_file(file); end - # source://rubocop//lib/rubocop/runner.rb#393 + # source://rubocop//lib/rubocop/runner.rb#397 def qualify_option_cop_names; end # @yield [cop] # - # source://rubocop//lib/rubocop/runner.rb#228 + # source://rubocop//lib/rubocop/runner.rb#232 def redundant_cop_disable_directive(file); end - # source://rubocop//lib/rubocop/runner.rb#262 + # source://rubocop//lib/rubocop/runner.rb#266 def save_in_cache(cache, offenses); end # A Cop::Team instance is stateful and may change when inspecting. @@ -56143,41 +57604,41 @@ class RuboCop::Runner # otherwise dormant team that can be used for config- and option- # level caching in ResultCache. # - # source://rubocop//lib/rubocop/runner.rb#492 + # source://rubocop//lib/rubocop/runner.rb#503 def standby_team(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#410 + # source://rubocop//lib/rubocop/runner.rb#414 def style_guide_cops_only?(config); end # @return [Boolean] # - # source://rubocop//lib/rubocop/runner.rb#444 + # source://rubocop//lib/rubocop/runner.rb#448 def supports_safe_autocorrect?(offense); end # @yield [team] # - # source://rubocop//lib/rubocop/runner.rb#211 + # source://rubocop//lib/rubocop/runner.rb#215 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 + # source://rubocop//lib/rubocop/runner.rb#95 def warm_cache(target_files); end class << self # @return [Array<#call>] # - # source://rubocop//lib/rubocop/runner.rb#29 + # source://rubocop//lib/rubocop/runner.rb#33 def ruby_extractors; end private # @return [#call] # - # source://rubocop//lib/rubocop/runner.rb#36 + # source://rubocop//lib/rubocop/runner.rb#40 def default_ruby_extractor; end end end @@ -56200,12 +57661,12 @@ end # @api private # -# source://rubocop//lib/rubocop/runner.rb#49 +# source://rubocop//lib/rubocop/runner.rb#53 RuboCop::Runner::MAX_ITERATIONS = T.let(T.unsafe(nil), Integer) # @api private # -# source://rubocop//lib/rubocop/runner.rb#52 +# source://rubocop//lib/rubocop/runner.rb#56 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 @@ -56240,173 +57701,180 @@ 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. +# 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#7 +# 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#10 + # 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#149 - def all_cops_include; end + # 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#176 + # source://rubocop//lib/rubocop/target_finder.rb#172 def configured_include?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#19 + # source://rubocop//lib/rubocop/target_finder.rb#208 def debug?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#23 + # source://rubocop//lib/rubocop/target_finder.rb#212 def fail_fast?; 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 + # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#31 - def find(args, mode); end + # source://rubocop//lib/rubocop/target_finder.rb#200 + def force_exclusion?; 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 + # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#83 - def find_files(base_dir, flags); end + # source://rubocop//lib/rubocop/target_finder.rb#204 + def ignore_parent_exclusion?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#15 - def force_exclusion?; end + # source://rubocop//lib/rubocop/target_finder.rb#145 + def included_file?(file); end # @api private - # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#180 - def included_file?(file); end + # source://rubocop//lib/rubocop/target_finder.rb#191 + def order; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#184 + # 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#153 + # source://rubocop//lib/rubocop/target_finder.rb#176 def ruby_executable?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#127 + # source://rubocop//lib/rubocop/target_finder.rb#157 def ruby_extension?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#131 + # source://rubocop//lib/rubocop/target_finder.rb#161 def ruby_extensions; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#172 + # source://rubocop//lib/rubocop/target_finder.rb#149 def ruby_file?(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#138 + # source://rubocop//lib/rubocop/target_finder.rb#168 def ruby_filename?(file); end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#142 + # source://rubocop//lib/rubocop/target_finder.rb#113 def ruby_filenames; end # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#164 + # source://rubocop//lib/rubocop/target_finder.rb#187 def ruby_interpreters(file); end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#168 + # source://rubocop//lib/rubocop/target_finder.rb#153 def stdin?; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#112 + # source://rubocop//lib/rubocop/target_finder.rb#98 def symlink_excluded_or_infinite_loop?(base_dir, current_dir, exclude_pattern, flags); end - # Finds all Ruby source files under the current or other supplied - # 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#56 - def target_files_in_dir(base_dir = T.unsafe(nil)); end - # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_finder.rb#69 + # 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#96 + # source://rubocop//lib/rubocop/target_finder.rb#82 def wanted_dir_patterns(base_dir, exclude_pattern, flags); end - private - # @api private # - # source://rubocop//lib/rubocop/target_finder.rb#201 - def order; end + # source://rubocop//lib/rubocop/target_finder.rb#134 + def without_excluded(files); end end # @api private # -# source://rubocop//lib/rubocop/target_finder.rb#8 +# 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. @@ -56418,34 +57886,34 @@ class RuboCop::TargetRuby # @api private # @return [TargetRuby] a new instance of TargetRuby # - # source://rubocop//lib/rubocop/target_ruby.rb#252 + # source://rubocop//lib/rubocop/target_ruby.rb#254 def initialize(config); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#268 + # source://rubocop//lib/rubocop/target_ruby.rb#270 def rubocop_version_with_support; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#256 + # source://rubocop//lib/rubocop/target_ruby.rb#258 def source; end # @api private # @return [Boolean] # - # source://rubocop//lib/rubocop/target_ruby.rb#264 + # source://rubocop//lib/rubocop/target_ruby.rb#266 def supported?; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#260 + # source://rubocop//lib/rubocop/target_ruby.rb#262 def version; end class << self # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#238 + # source://rubocop//lib/rubocop/target_ruby.rb#240 def supported_versions; end end end @@ -56454,23 +57922,23 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#107 +# source://rubocop//lib/rubocop/target_ruby.rb#187 class RuboCop::TargetRuby::BundlerLockFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#108 + # source://rubocop//lib/rubocop/target_ruby.rb#188 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#141 + # source://rubocop//lib/rubocop/target_ruby.rb#221 def bundler_lock_file_path; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#114 + # source://rubocop//lib/rubocop/target_ruby.rb#194 def find_version; end end @@ -56483,18 +57951,18 @@ RuboCop::TargetRuby::DEFAULT_VERSION = T.let(T.unsafe(nil), Float) # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#226 +# source://rubocop//lib/rubocop/target_ruby.rb#228 class RuboCop::TargetRuby::Default < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#227 + # source://rubocop//lib/rubocop/target_ruby.rb#229 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#233 + # source://rubocop//lib/rubocop/target_ruby.rb#235 def find_version; end end @@ -56502,62 +57970,62 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#148 +# source://rubocop//lib/rubocop/target_ruby.rb#53 class RuboCop::TargetRuby::GemspecFile < ::RuboCop::TargetRuby::Source extend ::RuboCop::AST::NodePattern::Macros - # source://rubocop//lib/rubocop/target_ruby.rb#159 + # source://rubocop//lib/rubocop/target_ruby.rb#64 def gem_requirement_versions(param0 = T.unsafe(nil)); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#165 + # source://rubocop//lib/rubocop/target_ruby.rb#70 def name; end - # source://rubocop//lib/rubocop/target_ruby.rb#154 + # source://rubocop//lib/rubocop/target_ruby.rb#59 def required_ruby_version(param0); end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#214 + # source://rubocop//lib/rubocop/target_ruby.rb#121 def find_default_minimal_known_ruby(right_hand_side); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#171 + # source://rubocop//lib/rubocop/target_ruby.rb#76 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#181 + # source://rubocop//lib/rubocop/target_ruby.rb#86 def gemspec_filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#188 + # source://rubocop//lib/rubocop/target_ruby.rb#93 def gemspec_filepath; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#210 + # source://rubocop//lib/rubocop/target_ruby.rb#117 def version_from_array(array); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#193 + # source://rubocop//lib/rubocop/target_ruby.rb#98 def version_from_gemspec_file(file); end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#198 + # source://rubocop//lib/rubocop/target_ruby.rb#105 def version_from_right_hand_side(right_hand_side); end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#151 +# source://rubocop//lib/rubocop/target_ruby.rb#56 RuboCop::TargetRuby::GemspecFile::GEMSPEC_EXTENSION = T.let(T.unsafe(nil), String) # @api private @@ -56593,49 +58061,49 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#53 +# source://rubocop//lib/rubocop/target_ruby.rb#133 class RuboCop::TargetRuby::RubyVersionFile < ::RuboCop::TargetRuby::Source # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#57 + # source://rubocop//lib/rubocop/target_ruby.rb#137 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#63 + # source://rubocop//lib/rubocop/target_ruby.rb#143 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#71 + # source://rubocop//lib/rubocop/target_ruby.rb#151 def find_version; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#67 + # source://rubocop//lib/rubocop/target_ruby.rb#147 def pattern; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#78 + # source://rubocop//lib/rubocop/target_ruby.rb#158 def version_file; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#54 +# source://rubocop//lib/rubocop/target_ruby.rb#134 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#55 +# source://rubocop//lib/rubocop/target_ruby.rb#135 RuboCop::TargetRuby::RubyVersionFile::RUBY_VERSION_PATTERN = T.let(T.unsafe(nil), Regexp) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#242 +# source://rubocop//lib/rubocop/target_ruby.rb#244 RuboCop::TargetRuby::SOURCES = T.let(T.unsafe(nil), Array) # A place where information about a target ruby version is found. @@ -56671,34 +58139,34 @@ end # # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#86 +# source://rubocop//lib/rubocop/target_ruby.rb#166 class RuboCop::TargetRuby::ToolVersionsFile < ::RuboCop::TargetRuby::RubyVersionFile # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#90 + # source://rubocop//lib/rubocop/target_ruby.rb#170 def name; end private # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#96 + # source://rubocop//lib/rubocop/target_ruby.rb#176 def filename; end # @api private # - # source://rubocop//lib/rubocop/target_ruby.rb#100 + # source://rubocop//lib/rubocop/target_ruby.rb#180 def pattern; end end # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#87 +# source://rubocop//lib/rubocop/target_ruby.rb#167 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_FILENAME = T.let(T.unsafe(nil), String) # @api private # -# source://rubocop//lib/rubocop/target_ruby.rb#88 +# source://rubocop//lib/rubocop/target_ruby.rb#168 RuboCop::TargetRuby::ToolVersionsFile::TOOL_VERSIONS_PATTERN = T.let(T.unsafe(nil), Regexp) # source://rubocop//lib/rubocop/ast_aliases.rb#7 @@ -56724,12 +58192,12 @@ module RuboCop::Version class << self # @api private # - # source://rubocop//lib/rubocop/version.rb#93 + # source://rubocop//lib/rubocop/version.rb#108 def document_version; end # @api private # - # source://rubocop//lib/rubocop/version.rb#43 + # source://rubocop//lib/rubocop/version.rb#58 def extension_versions(env); end # Returns feature version in one of two ways: @@ -56739,12 +58207,17 @@ module RuboCop::Version # # @api private # - # source://rubocop//lib/rubocop/version.rb#77 + # source://rubocop//lib/rubocop/version.rb#92 def feature_version(feature); end # @api private # - # source://rubocop//lib/rubocop/version.rb#98 + # source://rubocop//lib/rubocop/version.rb#43 + def parser_version; end + + # @api private + # + # source://rubocop//lib/rubocop/version.rb#113 def server_mode; end # @api private diff --git a/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi b/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi deleted file mode 100644 index 46bfe6ee6..000000000 --- a/sorbet/rbi/gems/ruby2_keywords@0.0.5.rbi +++ /dev/null @@ -1,8 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `ruby2_keywords` gem. -# Please instead update this file by running `bin/tapioca gem ruby2_keywords`. - -# THIS IS AN EMPTY RBI FILE. -# see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/selenium-webdriver@4.15.0.rbi b/sorbet/rbi/gems/selenium-webdriver@4.22.0.rbi similarity index 95% rename from sorbet/rbi/gems/selenium-webdriver@4.15.0.rbi rename to sorbet/rbi/gems/selenium-webdriver@4.22.0.rbi index bef38f062..e723bdcf9 100644 --- a/sorbet/rbi/gems/selenium-webdriver@4.15.0.rbi +++ b/sorbet/rbi/gems/selenium-webdriver@4.22.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `selenium-webdriver` gem. # Please instead update this file by running `bin/tapioca gem selenium-webdriver`. + # source://selenium-webdriver//lib/selenium/webdriver/atoms.rb#20 module Selenium; end @@ -24,13 +25,13 @@ module Selenium::WebDriver # @overload for # @overload for # @return [Driver] + # @see Selenium::WebDriver::Remote::Driver + # @see Selenium::WebDriver::Firefox::Driver + # @see Selenium::WebDriver::IE::Driver # @see Selenium::WebDriver::Edge::Driver # @see Selenium::WebDriver::Chrome::Driver # @see Selenium::WebDriver::Safari::Driver # @see Selenium::WebDriver::Support::AbstractEventListener - # @see Selenium::WebDriver::Remote::Driver - # @see Selenium::WebDriver::Firefox::Driver - # @see Selenium::WebDriver::IE::Driver # # source://selenium-webdriver//lib/selenium/webdriver.rb#88 def for(*args); end @@ -61,13 +62,11 @@ class Selenium::WebDriver::ActionBuilder # correctly when using asynchronous. # # @param bridge [Selenium::WebDriver::Remote::Bridge] the bridge for the current driver instance. - # @param deprecated_async [Boolean] Whether to perform the actions asynchronously per device. - # Defaults to false for backwards compatibility. # @param devices [Array] list of valid sources of input. # @param async [Boolean] Whether to perform the actions asynchronously per device. # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#41 def initialize(bridge, devices: T.unsafe(nil), async: T.unsafe(nil), duration: T.unsafe(nil)); end # Adds a KeyInput device @@ -79,7 +78,7 @@ class Selenium::WebDriver::ActionBuilder # @param name [String] name for the device # @return [Interactions::KeyInput] The key input added # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#82 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#80 def add_key_input(name); end # Adds a PointerInput device of the given kind @@ -92,7 +91,7 @@ class Selenium::WebDriver::ActionBuilder # @param kind [Symbol] kind of pointer device to create # @return [Interactions::PointerInput] The pointer input added # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#66 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#64 def add_pointer_input(kind, name); end # Adds a WheelInput device @@ -104,12 +103,12 @@ class Selenium::WebDriver::ActionBuilder # @param name [String] name for the device # @return [Interactions::WheelInput] The wheel input added # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#98 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#96 def add_wheel_input(name); end # Clears all actions from the builder. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#209 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#207 def clear_all_actions; end # Retrieves the input device for the given name or type @@ -119,7 +118,7 @@ class Selenium::WebDriver::ActionBuilder # @raise [ArgumentError] # @return [Selenium::WebDriver::Interactions::InputDevice] input device with given name or type # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#110 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#108 def device(name: T.unsafe(nil), type: T.unsafe(nil)); end # Returns the value of attribute devices. @@ -131,7 +130,7 @@ class Selenium::WebDriver::ActionBuilder # # @return [Selenium::WebDriver::Interactions::InputDevice] current KeyInput device # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#134 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#132 def key_inputs; end # Creates a pause for the given device of the given duration. If no duration is given, the pause will only wait @@ -147,7 +146,7 @@ class Selenium::WebDriver::ActionBuilder # @param duration [Float] Duration to pause # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#164 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#162 def pause(device: T.unsafe(nil), duration: T.unsafe(nil)); end # Creates multiple pauses for the given device of the given duration. @@ -163,31 +162,31 @@ class Selenium::WebDriver::ActionBuilder # @param duration [Float] Duration to pause # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#186 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#184 def pauses(device: T.unsafe(nil), number: T.unsafe(nil), duration: T.unsafe(nil)); end # Executes the actions added to the builder. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#199 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#197 def perform; end # Retrieves the current PointerInput devices # # @return [Array] array of current PointerInput devices # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#124 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#122 def pointer_inputs; end # Releases all action states from the browser. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#217 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#215 def release_actions; end # Retrieves the current WheelInput device # # @return [Selenium::WebDriver::Interactions::InputDevice] current WheelInput devices # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#144 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#142 def wheel_inputs; end private @@ -196,14 +195,14 @@ class Selenium::WebDriver::ActionBuilder # # @raise [TypeError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#239 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#237 def add_input(device); end # Adds pauses for all devices but the given devices # # @param action_devices [Array[InputDevice]] Array of Input Devices performing an action in this tick. # - # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#229 + # source://selenium-webdriver//lib/selenium/webdriver/common/action_builder.rb#227 def tick(*action_devices); end end @@ -245,24 +244,30 @@ end class Selenium::WebDriver::BiDi # @return [BiDi] a new instance of BiDi # - # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#27 + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#29 def initialize(url:); end - # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#35 + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#41 + def add_callback(event, &block); end + + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#37 def callbacks; end - # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#31 + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#33 def close; end - # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#51 + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#61 def error_message(message); end + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#45 + def remove_callback(event, id); end + # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#53 def send_cmd(method, **params); end - # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#39 + # source://selenium-webdriver//lib/selenium/webdriver/bidi.rb#49 def session; end end @@ -524,6 +529,84 @@ class Selenium::WebDriver::BiDi::JavascriptLogEntry < ::Selenium::WebDriver::BiD def type=(_arg0); end end +# source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#23 +class Selenium::WebDriver::BiDi::LogHandler + # @return [LogHandler] a new instance of LogHandler + # + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#27 + def initialize(bidi); end + + # @return [int] id of the handler + # + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#33 + def add_message_handler(type); end + + # @param id [int] of the handler previously added + # + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#44 + def remove_message_handler(id); end + + private + + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#51 + def subscribe_log_entry; end + + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#56 + def unsubscribe_log_entry; end +end + +# source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#0 +class Selenium::WebDriver::BiDi::LogHandler::ConsoleLogEntry < ::Selenium::WebDriver::BiDi::Struct + # source://selenium-webdriver//lib/selenium/webdriver/bidi/struct.rb#27 + def initialize(**kwargs); end + + def args; end + def args=(_); end + def level; end + def level=(_); end + def method; end + def method=(_); end + def text; end + def text=(_); end + def timestamp; end + def timestamp=(_); 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 + +# source://selenium-webdriver//lib/selenium/webdriver/bidi/log_handler.rb#0 +class Selenium::WebDriver::BiDi::LogHandler::JavaScriptLogEntry < ::Selenium::WebDriver::BiDi::Struct + # source://selenium-webdriver//lib/selenium/webdriver/bidi/struct.rb#27 + def initialize(**kwargs); end + + def level; end + def level=(_); end + def stack_trace; end + def stack_trace=(_); end + def text; end + def text=(_); end + def timestamp; end + def timestamp=(_); 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 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#31 class Selenium::WebDriver::BiDi::LogInspector # @return [LogInspector] a new instance of LogInspector @@ -531,34 +614,34 @@ class Selenium::WebDriver::BiDi::LogInspector # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#43 def initialize(driver, browsing_context_ids = T.unsafe(nil)); end - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#53 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#57 def on_console_entry(filter_by = T.unsafe(nil), &block); end - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#71 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#75 def on_javascript_exception(&block); end - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#62 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#66 def on_javascript_log(filter_by = T.unsafe(nil), &block); end - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#78 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#82 def on_log(filter_by = T.unsafe(nil), &block); end private - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#98 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#102 def check_valid_filter(filter_by); end # @yield [event] # - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#104 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#108 def console_log_events(params, filter_by); end # @yield [event] # - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#124 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#128 def javascript_log_events(params, filter_by); end - # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#93 + # source://selenium-webdriver//lib/selenium/webdriver/bidi/log_inspector.rb#97 def on(event, &block); end end @@ -617,8 +700,11 @@ class Selenium::WebDriver::BiDi::Session def unsubscribe(events, browsing_contexts = T.unsafe(nil)); end end -# source://selenium-webdriver//lib/selenium/webdriver/bidi/session.rb#24 -class Selenium::WebDriver::BiDi::Session::Status < ::Struct +# source://selenium-webdriver//lib/selenium/webdriver/bidi/session.rb#0 +class Selenium::WebDriver::BiDi::Session::Status < ::Selenium::WebDriver::BiDi::Struct + # source://selenium-webdriver//lib/selenium/webdriver/bidi/struct.rb#27 + def initialize(**kwargs); end + # Returns the value of attribute message # # @return [Object] the current value of message @@ -650,6 +736,17 @@ class Selenium::WebDriver::BiDi::Session::Status < ::Struct end end +# source://selenium-webdriver//lib/selenium/webdriver/bidi/struct.rb#23 +class Selenium::WebDriver::BiDi::Struct < ::Struct + class << self + # source://selenium-webdriver//lib/selenium/webdriver/bidi/struct.rb#35 + def camel_to_snake(camel_str); end + + # source://selenium-webdriver//lib/selenium/webdriver/bidi/struct.rb#25 + def new(*args, &block); end + end +end + # @api private # # source://selenium-webdriver//lib/selenium/webdriver/common/child_process.rb#26 @@ -725,6 +822,11 @@ class Selenium::WebDriver::ChildProcess # source://selenium-webdriver//lib/selenium/webdriver/common/child_process.rb#113 def terminate(pid); end + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/common/child_process.rb#123 + def waitpid2(pid, flags = T.unsafe(nil)); end + class << self # @api private # @@ -1788,42 +1890,42 @@ class Selenium::WebDriver::Driver # @param sel [String, Hash] id or selector # @return [WebDriver::Element] # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#288 + # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#293 def [](sel); end # @return [ActionBuilder] # @see ActionBuilder # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#126 + # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#141 def action(**opts); end # @return [VirtualAuthenticator] # @see VirtualAuthenticator # - # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#252 + # source://selenium-webdriver//lib/selenium/webdriver/common/driver.rb#263 def add_virtual_authenticator(options); end # driver.all(class: 'bar') #=> [# profile # @return [Profile] a new instance of Profile # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#68 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#74 def initialize(model = T.unsafe(nil)); end # Set a preference for this particular profile. @@ -3435,104 +3556,110 @@ class Selenium::WebDriver::Firefox::Profile # @see http://kb.mozillazine.org/About:config_entries # @see http://preferential.mozdev.org/preferences.html # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#94 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#100 def []=(key, value); end # Add the extension (directory, .zip or .xpi) at the given path to the profile. # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#119 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#125 def add_extension(path, name = T.unsafe(nil)); end # source://selenium-webdriver//lib/selenium/webdriver/common/profile_helper.rb#38 def as_json; end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#75 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#81 def layout_on_disk; end # Sets the attribute load_no_focus_lib # # @param value the value to set the attribute load_no_focus_lib to. # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#37 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#43 def load_no_focus_lib=(_arg0); end # Returns the value of attribute log_file. # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#36 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#42 def log_file; end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#110 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#116 def log_file=(file); end # Returns the value of attribute name. # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#36 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#42 def name; end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#106 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#112 def port=(port); end # @raise [TypeError] # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#123 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#129 def proxy=(proxy); end # Sets the attribute secure_ssl # # @param value the value to set the attribute secure_ssl to. # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#37 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#43 def secure_ssl=(_arg0); end private - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#174 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#180 def delete_extensions_cache(directory); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#178 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#184 def delete_lock_files(directory); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#184 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#190 def extension_name_for(path); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#159 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#165 def install_extensions(directory); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#168 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#174 def read_model_prefs; end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#200 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#206 def read_user_prefs(path); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#150 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#156 def set_manual_proxy_preference(key, value); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#188 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#194 def update_user_prefs_in(directory); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#217 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#223 def write_prefs(prefs, path); end class << self - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#51 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#57 def decoded(json); end # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#44 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#50 def from_name(name); end - # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#40 + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#46 def ini; end end end -# source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#28 +# source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#32 Selenium::WebDriver::Firefox::Profile::DEFAULT_PREFERENCES = T.let(T.unsafe(nil), Hash) +# source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#40 +Selenium::WebDriver::Firefox::Profile::LOCK_FILES = T.let(T.unsafe(nil), Array) + # source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#26 Selenium::WebDriver::Firefox::Profile::VALID_PREFERENCE_TYPES = T.let(T.unsafe(nil), Array) +# source://selenium-webdriver//lib/selenium/webdriver/firefox/profile.rb#27 +Selenium::WebDriver::Firefox::Profile::WEBDRIVER_PREFS = T.let(T.unsafe(nil), Hash) + # @api private # # source://selenium-webdriver//lib/selenium/webdriver/firefox/profiles_ini.rb#24 @@ -3773,28 +3900,28 @@ class Selenium::WebDriver::IE::Options < ::Selenium::WebDriver::Options # @param opts [Hash] the pre-defined options # @return [Options] a new instance of Options # - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#82 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#83 def initialize(**opts); end # Add a command-line argument to use when starting Internet Explorer. # # @param arg [String] The command-line argument to add # - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#95 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#96 def add_argument(arg); end # Returns the value of attribute args. # - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#49 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#50 def args; end private - # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#101 + # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#102 def process_browser_options(browser_options); end end -# source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#47 +# source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#48 Selenium::WebDriver::IE::Options::BROWSER = T.let(T.unsafe(nil), String) # source://selenium-webdriver//lib/selenium/webdriver/ie/options.rb#27 @@ -4441,7 +4568,7 @@ class Selenium::WebDriver::Logger # @param ids [Array, Symbol] # # source://selenium-webdriver//lib/selenium/webdriver/common/logger.rb#106 - def allow(ids); end + def allow(*ids); end # source://forwardable/1.3.3/forwardable.rb#231 def close(*args, **_arg1, &block); end @@ -4450,7 +4577,7 @@ class Selenium::WebDriver::Logger # Overrides default #debug to skip ignored messages by provided id # # @param message [String] - # @param id [Symbol, Array] + # @param id [Symbol, Array] # @yield see #deprecate # # source://selenium-webdriver//lib/selenium/webdriver/common/logger.rb#118 @@ -4473,7 +4600,7 @@ class Selenium::WebDriver::Logger # Used to supply information that suggests an error occurred # # @param message [String] - # @param id [Symbol, Array] + # @param id [Symbol, Array] # @yield see #deprecate # # source://selenium-webdriver//lib/selenium/webdriver/common/logger.rb#140 @@ -4498,7 +4625,7 @@ class Selenium::WebDriver::Logger # Used to supply information of general interest # # @param message [String] - # @param id [Symbol, Array] + # @param id [Symbol, Array] # @yield see #deprecate # # source://selenium-webdriver//lib/selenium/webdriver/common/logger.rb#129 @@ -4536,7 +4663,7 @@ class Selenium::WebDriver::Logger # Used to supply information that suggests action be taken by user # # @param message [String] - # @param id [Symbol, Array] + # @param id [Symbol, Array] # @yield see #deprecate # # source://selenium-webdriver//lib/selenium/webdriver/common/logger.rb#151 @@ -4790,12 +4917,12 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#135 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#141 def assert_executable(path); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#129 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#135 def assert_file(path); end # @api private @@ -4805,13 +4932,13 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#98 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#102 def cygwin?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 - def cygwin_path(path, **opts); end + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#114 + def cygwin_path(path, only_cygwin: T.unsafe(nil), **opts); end # @api private # @@ -4820,7 +4947,7 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#143 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#149 def exit_hook; end # @api private @@ -4830,12 +4957,12 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#173 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#179 def interfaces; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#157 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#163 def ip; end # @api private @@ -4850,7 +4977,7 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#149 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#155 def localhost; end # @api private @@ -4860,12 +4987,12 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#125 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#131 def make_writable(file); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#102 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#106 def null_device; end # @api private @@ -4885,7 +5012,12 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#117 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 + def unix?; end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#123 def unix_path(path); end # @api private @@ -4895,30 +5027,30 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#121 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#127 def windows_path(path); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#106 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 def wrap_in_quotes_if_necessary(str); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#93 def wsl?; end class << self # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#135 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#141 def assert_executable(path); end # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#129 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#135 def assert_file(path); end # @api private @@ -4929,13 +5061,13 @@ module Selenium::WebDriver::Platform # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#98 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#102 def cygwin?; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 - def cygwin_path(path, **opts); end + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#114 + def cygwin_path(path, only_cygwin: T.unsafe(nil), **opts); end # @api private # @@ -4944,7 +5076,7 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#143 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#149 def exit_hook; end # @api private @@ -4954,12 +5086,12 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#173 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#179 def interfaces; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#157 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#163 def ip; end # @api private @@ -4977,7 +5109,7 @@ module Selenium::WebDriver::Platform # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#149 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#155 def localhost; end # @api private @@ -4988,12 +5120,12 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#125 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#131 def make_writable(file); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#102 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#106 def null_device; end # @api private @@ -5012,9 +5144,15 @@ module Selenium::WebDriver::Platform # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#69 def truffleruby?; end + # @api private + # @return [Boolean] + # + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 + def unix?; end + # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#117 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#123 def unix_path(path); end # @api private @@ -5025,18 +5163,18 @@ module Selenium::WebDriver::Platform # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#121 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#127 def windows_path(path); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#106 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#110 def wrap_in_quotes_if_necessary(str); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#89 + # source://selenium-webdriver//lib/selenium/webdriver/common/platform.rb#93 def wsl?; end end end @@ -5094,7 +5232,7 @@ module Selenium::WebDriver::PointerActions # that will be clicked # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#227 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#226 def click(element = T.unsafe(nil), button: T.unsafe(nil), device: T.unsafe(nil)); end # Clicks (without releasing) in the middle of the given element. This is @@ -5110,7 +5248,7 @@ module Selenium::WebDriver::PointerActions # @param device [Symbol || String] optional name of the PointerInput device to click with # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#181 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#180 def click_and_hold(element = T.unsafe(nil), button: T.unsafe(nil), device: T.unsafe(nil)); end # Performs a context-click at middle of the given element. First performs @@ -5130,7 +5268,7 @@ module Selenium::WebDriver::PointerActions # that will be context-clicked # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#284 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#283 def context_click(element = T.unsafe(nil), device: T.unsafe(nil)); end # By default this is set to 250ms in the ActionBuilder constructor @@ -5164,7 +5302,7 @@ module Selenium::WebDriver::PointerActions # that will be double-clicked # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#256 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#255 def double_click(element = T.unsafe(nil), device: T.unsafe(nil)); end # A convenience method that performs click-and-hold at the location of the @@ -5183,7 +5321,7 @@ module Selenium::WebDriver::PointerActions # that will perform the drag and drop # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#307 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#306 def drag_and_drop(source, target, device: T.unsafe(nil)); end # A convenience method that performs click-and-hold at the location of @@ -5200,7 +5338,7 @@ module Selenium::WebDriver::PointerActions # that will perform the drag and drop # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#331 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#330 def drag_and_drop_by(source, right_by, down_by, device: T.unsafe(nil)); end # Moves the pointer from its current position by the given offset. @@ -5217,7 +5355,7 @@ module Selenium::WebDriver::PointerActions # @raise [MoveTargetOutOfBoundsError] if the provided offset is outside the document's boundaries. # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#126 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#125 def move_by(right_by, down_by, device: T.unsafe(nil), duration: T.unsafe(nil), **opts); end # Moves the pointer to the in-view center point of the given element. @@ -5241,10 +5379,9 @@ module Selenium::WebDriver::PointerActions # element. A negative value means coordinates to the left of the center. # @param down_by [Integer] Optional offset from the in-view center of the # element. A negative value means coordinates to the top of the center. - # @param device [Symbol || String] optional name of the PointerInput device to move. # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#98 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#97 def move_to(element, right_by = T.unsafe(nil), down_by = T.unsafe(nil), **opts); end # Moves the pointer to a given location in the viewport. @@ -5261,7 +5398,7 @@ module Selenium::WebDriver::PointerActions # @raise [MoveTargetOutOfBoundsError] if the provided x or y value is outside the document's boundaries. # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#154 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#153 def move_to_location(x, y, device: T.unsafe(nil), duration: T.unsafe(nil), **opts); end # Presses (without releasing) at the current location of the PointerInput device. This is equivalent to: @@ -5302,15 +5439,15 @@ module Selenium::WebDriver::PointerActions # that will be released # @return [ActionBuilder] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#200 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#199 def release(button: T.unsafe(nil), device: T.unsafe(nil)); end private - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#340 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#339 def button_action(button, action, device: T.unsafe(nil), **opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#347 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/pointer_actions.rb#346 def pointer_input(name = T.unsafe(nil)); end end @@ -5547,6 +5684,23 @@ end # source://selenium-webdriver//lib/selenium/webdriver/remote.rb#25 module Selenium::WebDriver::Remote; end +# source://selenium-webdriver//lib/selenium/webdriver/remote/bidi_bridge.rb#23 +class Selenium::WebDriver::Remote::BiDiBridge < ::Selenium::WebDriver::Remote::Bridge + # Returns the value of attribute bidi. + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bidi_bridge.rb#24 + def bidi; end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/bidi_bridge.rb#38 + def close; end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/bidi_bridge.rb#26 + def create_session(capabilities); end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/bidi_bridge.rb#32 + def quit; end +end + # https://w3c.github.io/webdriver/#endpoints # # @api private @@ -5562,107 +5716,118 @@ class Selenium::WebDriver::Remote::Bridge # @param http_client [Object] an HTTP client instance that implements the same protocol as Http::Default # @return [Bridge] a new instance of Bridge # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#39 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#60 def initialize(url:, http_client: T.unsafe(nil)); end # alerts # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#113 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#138 def accept_alert; end # actions # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#372 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#397 def action(async: T.unsafe(nil), devices: T.unsafe(nil), duration: T.unsafe(nil)); end # actions # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#372 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#397 def actions(async: T.unsafe(nil), devices: T.unsafe(nil), duration: T.unsafe(nil)); end # finding elements # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#500 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#525 def active_element; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#348 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#373 def add_cookie(cookie); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#560 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#585 def add_credential(credential, id); end # virtual-authenticator # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#551 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#576 def add_virtual_authenticator(options); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#121 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#146 def alert=(keys); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#125 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#150 def alert_text; end + # @api private + # @raise [WebDriver::Error::WebDriverError] + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#605 + def bidi; end + # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#82 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#107 def browser; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#30 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#32 def capabilities; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#399 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#424 def clear_element(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#294 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#319 def clear_local_storage; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#318 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#343 def clear_session_storage; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#389 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#414 def click_element(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#193 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#218 def close; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#356 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#610 + def command_list; end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#381 def cookie(name); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#360 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#385 def cookies; end # Creates session. @@ -5670,215 +5835,215 @@ class Selenium::WebDriver::Remote::Bridge # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#52 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#75 def create_session(capabilities); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#564 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#589 def credentials(authenticator_id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#364 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#389 def delete_all_cookies; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#352 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#377 def delete_cookie(name); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#117 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#142 def dismiss_alert; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#444 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#469 def element_aria_label(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#440 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#465 def element_aria_role(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#427 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#452 def element_attribute(element, name); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#487 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#512 def element_displayed?(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#432 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#457 def element_dom_attribute(element, name); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#479 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#504 def element_enabled?(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#456 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#481 def element_location(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#468 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#493 def element_location_once_scrolled_into_view(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#436 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#461 def element_property(element, name); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#462 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#487 def element_rect(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#270 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#295 def element_screenshot(element); end # @api private # @return [Boolean] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#483 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#508 def element_selected?(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#473 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#498 def element_size(element); end # element properties # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#423 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#448 def element_tag_name(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#452 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#477 def element_text(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#448 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#473 def element_value(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#492 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#517 def element_value_of_css_property(element, prop); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#335 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#360 def execute_async_script(script, *args); end # javascript execution # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#330 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#355 def execute_script(script, *args); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#29 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#31 def file_detector; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#29 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#31 def file_detector=(_arg0); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#506 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#531 def find_element_by(how, what, parent_ref = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#524 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#549 def find_elements_by(how, what, parent_ref = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#242 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#267 def full_screen_window; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#93 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#118 def get(url); end # navigation # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#133 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#158 def go_back; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#137 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#162 def go_forward; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#29 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#31 def http; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#29 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#31 def http=(_arg0); end # HTML 5 # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#278 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#303 def local_storage_item(key, value = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#290 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#315 def local_storage_keys; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#298 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#323 def local_storage_size; end # cookies # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#344 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#369 def manage; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#233 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#258 def maximize_window(handle = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#229 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#254 def minimize_window; end # Create a new top-level browsing context @@ -5892,236 +6057,223 @@ class Selenium::WebDriver::Remote::Bridge # @return [Hash] Containing 'handle' with the value of the window handle # and 'type' with the value of the created window type # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#163 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#188 def new_window(type); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#149 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#174 def page_source; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#385 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#410 def print_page(options = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#186 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#211 def quit; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#197 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#222 def refresh; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#381 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#406 def release_actions; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#572 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#597 def remove_all_credentials(authenticator_id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#568 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#593 def remove_credential(credential_id, authenticator_id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#286 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#311 def remove_local_storage_item(key); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#310 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#335 def remove_session_storage_item(key); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#556 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#581 def remove_virtual_authenticator(id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#246 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#271 def reposition_window(x, y); end # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#213 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#238 def resize_window(width, height, handle = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#266 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#291 def screenshot; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#377 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#402 def send_actions(data); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#393 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#418 def send_keys_to_element(element, keys); end # Returns the current session ID. # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#78 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#103 def session_id; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#302 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#327 def session_storage_item(key, value = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#314 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#339 def session_storage_keys; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#322 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#347 def session_storage_size; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#255 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#280 def set_window_rect(x: T.unsafe(nil), y: T.unsafe(nil), width: T.unsafe(nil), height: T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#542 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#567 def shadow_root(element); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#89 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#114 def status; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#403 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#428 def submit_element(element); end # finding elements # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#500 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#525 def switch_to_active_element; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#180 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#205 def switch_to_default_content; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#171 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#196 def switch_to_frame(id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#176 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#201 def switch_to_parent_frame; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#167 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#192 def switch_to_window(name); end # timeouts # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#101 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#126 def timeouts; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#105 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#130 def timeouts=(timeouts); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#145 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#170 def title; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#141 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#166 def url; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#576 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#601 def user_verified(verified, authenticator_id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#209 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#234 def window_handle; end # window handling # # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#205 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#230 def window_handles; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#250 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#275 def window_position; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#261 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#286 def window_rect; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#219 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#244 def window_size(handle = T.unsafe(nil)); end private - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#608 - def commands(command); end - # @api private # # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#642 - def convert_locator(how, what); end + def commands(command); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#629 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#663 def element_id_from(id); end - # Escapes invalid characters in CSS selector. - # - # @api private - # @see https://mathiasbynens.be/notes/css-escapes - # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#672 - def escape_css(string); end - # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#604 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#638 def escaper; end # executes a command on the remote server. @@ -6129,23 +6281,55 @@ class Selenium::WebDriver::Remote::Bridge # @api private # @return [WebDriver::Remote::Response] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#588 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#622 def execute(command, opts = T.unsafe(nil), command_hash = T.unsafe(nil)); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#637 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#671 def prepare_capabilities_payload(capabilities); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#633 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#667 def shadow_root_id_from(id); end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#612 + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#646 def unwrap_script_result(arg); end + + class << self + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#38 + def add_command(name, verb, url, &block); end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#48 + def element_class; end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#36 + def element_class=(_arg0); end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#35 + def extra_commands; end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#44 + def locator_converter; end + + # @api private + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#36 + def locator_converter=(_arg0); end + end end # @api private @@ -6155,23 +6339,47 @@ Selenium::WebDriver::Remote::Bridge::COMMANDS = T.let(T.unsafe(nil), Hash) # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#667 -Selenium::WebDriver::Remote::Bridge::ESCAPE_CSS_REGEXP = T.let(T.unsafe(nil), Regexp) +# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge/locator_converter.rb#24 +class Selenium::WebDriver::Remote::Bridge::LocatorConverter + # Converts a locator to a specification compatible one. + # + # @api private + # @param how [String, Symbol] + # @param what [String] + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge/locator_converter.rb#34 + def convert(how, what); end + + private + + # Escapes invalid characters in CSS selector. + # + # @api private + # @see https://mathiasbynens.be/notes/css-escapes + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/bridge/locator_converter.rb#66 + def escape_css(string); end +end + +# @api private +# +# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge/locator_converter.rb#25 +Selenium::WebDriver::Remote::Bridge::LocatorConverter::ESCAPE_CSS_REGEXP = T.let(T.unsafe(nil), Regexp) # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#27 -Selenium::WebDriver::Remote::Bridge::PORT = T.let(T.unsafe(nil), Integer) +# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge/locator_converter.rb#26 +Selenium::WebDriver::Remote::Bridge::LocatorConverter::UNICODE_CODE_POINT = T.let(T.unsafe(nil), Integer) # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#184 -Selenium::WebDriver::Remote::Bridge::QUIT_ERRORS = T.let(T.unsafe(nil), Array) +# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#29 +Selenium::WebDriver::Remote::Bridge::PORT = T.let(T.unsafe(nil), Integer) # @api private # -# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#668 -Selenium::WebDriver::Remote::Bridge::UNICODE_CODE_POINT = T.let(T.unsafe(nil), Integer) +# source://selenium-webdriver//lib/selenium/webdriver/remote/bridge.rb#209 +Selenium::WebDriver::Remote::Bridge::QUIT_ERRORS = T.let(T.unsafe(nil), Array) # Specification of the desired and/or actual capabilities of the browser that the # server is being asked to create. @@ -6424,41 +6632,68 @@ end # source://selenium-webdriver//lib/selenium/webdriver/remote/features.rb#24 Selenium::WebDriver::Remote::Features::REMOTE_COMMANDS = T.let(T.unsafe(nil), Hash) -# source://selenium-webdriver//lib/selenium/webdriver/remote.rb#32 +# source://selenium-webdriver//lib/selenium/webdriver/remote.rb#33 module Selenium::WebDriver::Remote::Http; end # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#24 class Selenium::WebDriver::Remote::Http::Common - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#51 def call(verb, url, command_hash); end - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#39 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#47 def close; end - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#35 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#43 def quit_errors; end # Sets the attribute server_url # # @param value the value to set the attribute server_url to. # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#33 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#41 def server_url=(_arg0); end private - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#74 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#72 + def common_headers; end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#92 def create_response(code, body, content_type); end # @raise [NotImplementedError] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#70 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#88 def request(*_arg0); end # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#64 + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#82 def server_url; end + + class << self + # Returns the value of attribute extra_headers. + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#33 + def extra_headers; end + + # Sets the attribute extra_headers + # + # @param value the value to set the attribute extra_headers to. + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#33 + def extra_headers=(_arg0); end + + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#36 + def user_agent; end + + # Sets the attribute user_agent + # + # @param value the value to set the attribute user_agent to. + # + # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#34 + def user_agent=(_arg0); end + end end # source://selenium-webdriver//lib/selenium/webdriver/remote/http/common.rb#26 @@ -6759,6 +6994,34 @@ Selenium::WebDriver::Safari::Service::EXECUTABLE = T.let(T.unsafe(nil), String) # source://selenium-webdriver//lib/selenium/webdriver/safari/service.rb#26 Selenium::WebDriver::Safari::Service::SHUTDOWN_SUPPORTED = T.let(T.unsafe(nil), FalseClass) +# source://selenium-webdriver//lib/selenium/webdriver/common/script.rb#22 +class Selenium::WebDriver::Script + # @return [Script] a new instance of Script + # + # source://selenium-webdriver//lib/selenium/webdriver/common/script.rb#23 + def initialize(bridge); end + + # @return [int] id of the handler + # + # source://selenium-webdriver//lib/selenium/webdriver/common/script.rb#28 + def add_console_message_handler(&block); end + + # @return [int] id of the handler + # + # source://selenium-webdriver//lib/selenium/webdriver/common/script.rb#33 + def add_javascript_error_handler(&block); end + + # @param id [int] of the handler previously added + # + # source://selenium-webdriver//lib/selenium/webdriver/common/script.rb#38 + def remove_console_message_handler(id); end + + # @param id [int] of the handler previously added + # + # source://selenium-webdriver//lib/selenium/webdriver/common/script.rb#38 + def remove_javascript_error_handler(id); end +end + # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#22 module Selenium::WebDriver::SearchContext # Find the first element matching the given arguments @@ -6773,7 +7036,7 @@ module Selenium::WebDriver::SearchContext # @raise [Error::NoSuchElementError] if the element doesn't exist # @return [Element] # - # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#57 + # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#65 def find_element(*args); end # Find all elements matching the given arguments @@ -6781,13 +7044,30 @@ module Selenium::WebDriver::SearchContext # @raise [ArgumentError] # @see SearchContext#find_element # - # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#72 + # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#80 def find_elements(*args); end private - # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#83 + # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#91 def extract_args(args); end + + class << self + # Returns the value of attribute extra_finders. + # + # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#39 + def extra_finders; end + + # Sets the attribute extra_finders + # + # @param value the value to set the attribute extra_finders to. + # + # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#39 + def extra_finders=(_arg0); end + + # source://selenium-webdriver//lib/selenium/webdriver/common/search_context.rb#41 + def finders; end + end end # @api private @@ -6814,35 +7094,30 @@ class Selenium::WebDriver::SeleniumManager def bin_path=(_arg0); end # @api private - # @param options [Options] browser options. - # @return [String] the path to the correct driver. + # @param arguments [Array] what gets sent to to Selenium Manager binary. + # @return [Hash] paths to the requested assets. # # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#39 - def driver_path(options); end + def binary_paths(*arguments); end private # @api private # @return [String] the path to the correct selenium manager # - # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#76 + # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#50 def binary; end # @api private # - # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#58 - def generate_command(binary, options); end + # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#85 + def platform_location; end # @api private # @raise [Error::WebDriverError] # - # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#108 + # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#63 def run(*command); end - - # @api private - # - # source://selenium-webdriver//lib/selenium/webdriver/common/selenium_manager.rb#94 - def validate_location(location); end end end @@ -7504,7 +7779,7 @@ class Selenium::WebDriver::Support::EventFiringBridge # @api private # # source://selenium-webdriver//lib/selenium/webdriver/support/event_firing_bridge.rb#123 - def method_missing(meth, *args, &blk); end + def method_missing(meth, *_arg1, **_arg2, &_arg3); end end # @api private @@ -7993,49 +8268,57 @@ class Selenium::WebDriver::WebSocketConnection # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#35 def initialize(url:); end + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#55 + def add_callback(event, &block); end + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#51 def callbacks; end # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#45 def close; end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#55 + # @raise [Error::WebDriverError] + # + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#60 + def remove_callback(event, id); end + + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#67 def send_cmd(**payload); end private - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#80 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#92 def attach_socket_listener; end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#120 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#132 def callback_thread(params); end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#103 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#115 def incoming_frame; end # We should be thread-safe to use the hash without synchronization # because its keys are WebSocket message identifiers and they should be # unique within a devtools session. # - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#71 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#83 def messages; end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#158 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#170 def next_id; end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#107 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#119 def process_frame(frame); end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#75 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#87 def process_handshake; end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#141 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#153 def socket; end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#137 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#149 def wait; end - # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#154 + # source://selenium-webdriver//lib/selenium/webdriver/common/websocket_connection.rb#166 def ws; end end @@ -8075,7 +8358,7 @@ module Selenium::WebDriver::WheelActions # @param delta_y [Integer] Distance along Y axis to scroll using the wheel. A negative value scrolls up. # @return [Selenium::WebDriver::WheelActions] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#57 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#58 def scroll_by(delta_x, delta_y, device: T.unsafe(nil)); end # Scrolls by provided amount based on a provided origin. @@ -8084,24 +8367,24 @@ module Selenium::WebDriver::WheelActions # If the origin is an element, and the element is not in the viewport, the bottom of the element will first # be scrolled to the bottom of the viewport. # - # @example Scroll from element by a specified amount with an offset - # el = driver.find_element(id: "some_id") - # origin = WheelActions::ScrollOrigin.element(el, 10, 10) - # driver.action.scroll_from(origin, 100, 200).perform # @example Scroll from element by a specified amount # el = driver.find_element(id: "some_id") # origin = WheelActions::ScrollOrigin.element(el) # driver.action.scroll_from(origin, 0, 200).perform + # @example Scroll from element by a specified amount with an offset + # el = driver.find_element(id: "some_id") + # origin = WheelActions::ScrollOrigin.element(el, 10, 10) + # driver.action.scroll_from(origin, 100, 200).perform # @example Scroll viewport by a specified amount with an offset # origin = WheelActions::ScrollOrigin.viewport(10, 10) # driver.action.scroll_from(origin, 0, 200).perform - # @param delta_x [Integer] Distance along X axis to scroll using the wheel. A negative value scrolls left. # @param scroll_origin [ScrollOrigin] Where scroll originates (viewport or element center) plus provided offsets. + # @param delta_x [Integer] Distance along X axis to scroll using the wheel. A negative value scrolls left. # @param delta_y [Integer] Distance along Y axis to scroll using the wheel. A negative value scrolls up. # @raise [Error::MoveTargetOutOfBoundsError] If the origin with offset is outside the viewport. # @return [Selenium::WebDriver::WheelActions] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#87 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#88 def scroll_from(scroll_origin, delta_x, delta_y, device: T.unsafe(nil)); end # If the element is outside the viewport, scrolls the bottom of the element to the bottom of the viewport. @@ -8109,18 +8392,19 @@ module Selenium::WebDriver::WheelActions # @example Scroll to element # el = driver.find_element(id: "some_id") # driver.action.scroll_to(element).perform - # @param Which [Object] element to scroll into the viewport. + # @param element [Object] Which element to scroll into the viewport. + # @param device [Object] Which device to use to scroll # @return [Selenium::WebDriver::WheelActions] A self reference. # - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#43 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#44 def scroll_to(element, device: T.unsafe(nil)); end private - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#100 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#101 def scroll(**opts); end - # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#108 + # source://selenium-webdriver//lib/selenium/webdriver/common/interactions/wheel_actions.rb#109 def wheel_input(name = T.unsafe(nil)); end end diff --git a/sorbet/rbi/gems/skylight@6.0.1.rbi b/sorbet/rbi/gems/skylight@6.0.4.rbi similarity index 96% rename from sorbet/rbi/gems/skylight@6.0.1.rbi rename to sorbet/rbi/gems/skylight@6.0.4.rbi index e832a51d6..0056da076 100644 --- a/sorbet/rbi/gems/skylight@6.0.1.rbi +++ b/sorbet/rbi/gems/skylight@6.0.4.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `skylight` gem. # Please instead update this file by running `bin/tapioca gem skylight`. + # A HighLine object is a "high-level line oriented" shell over an input and an # output stream. HighLine simplifies common console interaction, effectively # replacing puts() and gets(). User code can simply specify the question to ask @@ -21,7 +22,7 @@ class HighLine # # @return [HighLine] a new instance of HighLine # - # source://skylight//lib/skylight/vendor/cli/highline.rb#176 + # source://skylight//lib/skylight/vendor/cli/highline.rb#175 def initialize(input = T.unsafe(nil), output = T.unsafe(nil), wrap_at = T.unsafe(nil), page_at = T.unsafe(nil), indent_size = T.unsafe(nil), indent_level = T.unsafe(nil)); end # A shortcut to HighLine.ask() a question that only accepts "yes" or "no" @@ -32,7 +33,7 @@ class HighLine # # Raises EOFError if input is exhausted. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#222 + # source://skylight//lib/skylight/vendor/cli/highline.rb#221 def agree(yes_or_no_question, character = T.unsafe(nil)); end # This method is the primary interface for user input. Just provide a @@ -48,7 +49,7 @@ class HighLine # # Raises EOFError if input is exhausted. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#247 + # source://skylight//lib/skylight/vendor/cli/highline.rb#246 def ask(question, answer_type = T.unsafe(nil), &details); end # This method is HighLine's menu handler. For simple usage, you can just @@ -65,47 +66,47 @@ class HighLine # # Raises EOFError if input is exhausted. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#328 + # source://skylight//lib/skylight/vendor/cli/highline.rb#327 def choose(*items, &details); end # Works as an instance method, same as the class method # - # source://skylight//lib/skylight/vendor/cli/highline.rb#393 + # source://skylight//lib/skylight/vendor/cli/highline.rb#392 def color(*args); end # Works as an instance method, same as the class method # - # source://skylight//lib/skylight/vendor/cli/highline.rb#388 + # source://skylight//lib/skylight/vendor/cli/highline.rb#387 def color_code(*colors); end # Executes block or outputs statement with indentation # - # source://skylight//lib/skylight/vendor/cli/highline.rb#660 + # source://skylight//lib/skylight/vendor/cli/highline.rb#659 def indent(increase = T.unsafe(nil), statement = T.unsafe(nil), multiline = T.unsafe(nil)); end # The indentation level # - # source://skylight//lib/skylight/vendor/cli/highline.rb#211 + # source://skylight//lib/skylight/vendor/cli/highline.rb#210 def indent_level; end # The indentation level # - # source://skylight//lib/skylight/vendor/cli/highline.rb#211 + # source://skylight//lib/skylight/vendor/cli/highline.rb#210 def indent_level=(_arg0); end # The indentation size # - # source://skylight//lib/skylight/vendor/cli/highline.rb#209 + # source://skylight//lib/skylight/vendor/cli/highline.rb#208 def indent_size; end # The indentation size # - # source://skylight//lib/skylight/vendor/cli/highline.rb#209 + # source://skylight//lib/skylight/vendor/cli/highline.rb#208 def indent_size=(_arg0); end # Outputs indentation with current settings # - # source://skylight//lib/skylight/vendor/cli/highline.rb#653 + # source://skylight//lib/skylight/vendor/cli/highline.rb#652 def indentation; end # This method is a utility for quickly and easily laying out lists. It can @@ -140,39 +141,39 @@ class HighLine # their own expansions. Color escape expansions do not contribute to the # final field width. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#440 + # source://skylight//lib/skylight/vendor/cli/highline.rb#439 def list(items, mode = T.unsafe(nil), option = T.unsafe(nil)); end # Indentation over multiple lines # - # source://skylight//lib/skylight/vendor/cli/highline.rb#207 + # source://skylight//lib/skylight/vendor/cli/highline.rb#206 def multi_indent; end # Indentation over multiple lines # - # source://skylight//lib/skylight/vendor/cli/highline.rb#207 + # source://skylight//lib/skylight/vendor/cli/highline.rb#206 def multi_indent=(_arg0); end # Outputs newline # - # source://skylight//lib/skylight/vendor/cli/highline.rb#682 + # source://skylight//lib/skylight/vendor/cli/highline.rb#681 def newline; end # Returns the number of columns for the console, or a default it they cannot # be determined. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#690 + # source://skylight//lib/skylight/vendor/cli/highline.rb#689 def output_cols; end # Returns the number of rows for the console, or a default if they cannot be # determined. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#701 + # source://skylight//lib/skylight/vendor/cli/highline.rb#700 def output_rows; end # The current row setting for paging output. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#205 + # source://skylight//lib/skylight/vendor/cli/highline.rb#204 def page_at; end # Set to an integer value to cause HighLine to page output lines over the @@ -180,7 +181,7 @@ class HighLine # set to :auto, HighLine will attempt to determine the rows available # for the @output or use a sensible default. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#646 + # source://skylight//lib/skylight/vendor/cli/highline.rb#645 def page_at=(setting); end # The basic output method for HighLine objects. If the provided _statement_ @@ -192,17 +193,17 @@ class HighLine # the HighLine instance, providing easy access to the ANSI color constants # and the HighLine.color() method. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#616 + # source://skylight//lib/skylight/vendor/cli/highline.rb#615 def say(statement); end # Works as an instance method, same as the class method # - # source://skylight//lib/skylight/vendor/cli/highline.rb#403 + # source://skylight//lib/skylight/vendor/cli/highline.rb#402 def uncolor(string); end # The current column setting for wrapping output. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#203 + # source://skylight//lib/skylight/vendor/cli/highline.rb#202 def wrap_at; end # Set to an integer value to cause HighLine to wrap output lines at the @@ -210,7 +211,7 @@ class HighLine # set to :auto, HighLine will attempt to determine the columns # available for the @output or use a sensible default. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#636 + # source://skylight//lib/skylight/vendor/cli/highline.rb#635 def wrap_at=(setting); end private @@ -218,7 +219,7 @@ class HighLine # Returns the length of the passed +string_with_escapes+, minus and color # sequence escapes. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#1029 + # source://skylight//lib/skylight/vendor/cli/highline.rb#1028 def actual_length(string_with_escapes); end # Ask user if they wish to continue paging output. Allows them to type "q" to @@ -226,16 +227,16 @@ class HighLine # # @return [Boolean] # - # source://skylight//lib/skylight/vendor/cli/highline.rb#992 + # source://skylight//lib/skylight/vendor/cli/highline.rb#991 def continue_paging?; end # A helper method for sending the output stream and error and repeat # of the question. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#733 + # source://skylight//lib/skylight/vendor/cli/highline.rb#732 def explain_error(error); end - # source://skylight//lib/skylight/vendor/cli/highline.rb#710 + # source://skylight//lib/skylight/vendor/cli/highline.rb#709 def format_statement(statement); end # Collects an Array/Hash full of answers as described in @@ -243,7 +244,7 @@ class HighLine # # Raises EOFError if input is exhausted. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#748 + # source://skylight//lib/skylight/vendor/cli/highline.rb#747 def gather; end # Read a line of input from the input stream and process whitespace as @@ -254,7 +255,7 @@ class HighLine # # Raises EOFError if input is exhausted. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#822 + # source://skylight//lib/skylight/vendor/cli/highline.rb#821 def get_line; end # Return a line or character of input, as requested for this question. @@ -265,7 +266,7 @@ class HighLine # # Raises EOFError if input is exhausted. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#880 + # source://skylight//lib/skylight/vendor/cli/highline.rb#879 def get_response; end # Page print a series of at most _page_at_ lines for _output_. After each @@ -275,21 +276,21 @@ class HighLine # Note that the final page of _output_ is *not* printed, but returned # instead. This is to support any special handling for the final sequence. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#977 + # source://skylight//lib/skylight/vendor/cli/highline.rb#976 def page_print(output); end # A helper method used by HighLine::Question.verify_match # for finding whether a list of answers match or differ # from each other. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#809 + # source://skylight//lib/skylight/vendor/cli/highline.rb#808 def unique_answers(list = T.unsafe(nil)); end # Wrap a sequence of _lines_ at _wrap_at_ characters per line. Existing # newlines will not be affected by this process, but additional newlines # may be added. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#1004 + # source://skylight//lib/skylight/vendor/cli/highline.rb#1003 def wrap(text); end class << self @@ -309,22 +310,22 @@ class HighLine # This method returns the original _string_ unchanged if HighLine::use_color? # is +false+. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#377 + # source://skylight//lib/skylight/vendor/cli/highline.rb#376 def color(string, *colors); end # In case you just want the color code, without the embedding and the CLEAR # - # source://skylight//lib/skylight/vendor/cli/highline.rb#383 + # source://skylight//lib/skylight/vendor/cli/highline.rb#382 def color_code(*colors); end # Returns the current color scheme. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#80 + # source://skylight//lib/skylight/vendor/cli/highline.rb#79 def color_scheme; end # Pass ColorScheme to _setting_ to set a HighLine color scheme. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#75 + # source://skylight//lib/skylight/vendor/cli/highline.rb#74 def color_scheme=(setting); end # source://skylight//lib/skylight/vendor/cli/highline/string_extensions.rb#108 @@ -332,7 +333,7 @@ class HighLine # For RGB colors: # - # source://skylight//lib/skylight/vendor/cli/highline.rb#148 + # source://skylight//lib/skylight/vendor/cli/highline.rb#147 def const_missing(name); end # For checking if the current version of HighLine supports RGB colors @@ -341,163 +342,163 @@ class HighLine # # @return [Boolean] # - # source://skylight//lib/skylight/vendor/cli/highline.rb#54 + # source://skylight//lib/skylight/vendor/cli/highline.rb#53 def supports_rgb_color?; end # Pass +false+ to _setting_ to turn off HighLine's EOF tracking. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#62 + # source://skylight//lib/skylight/vendor/cli/highline.rb#61 def track_eof=(setting); end # Returns true if HighLine is currently tracking EOF for input. # # @return [Boolean] # - # source://skylight//lib/skylight/vendor/cli/highline.rb#67 + # source://skylight//lib/skylight/vendor/cli/highline.rb#66 def track_eof?; end # Remove color codes from a string # - # source://skylight//lib/skylight/vendor/cli/highline.rb#398 + # source://skylight//lib/skylight/vendor/cli/highline.rb#397 def uncolor(string); end # Pass +false+ to _setting_ to turn off HighLine's color escapes. # - # source://skylight//lib/skylight/vendor/cli/highline.rb#42 + # source://skylight//lib/skylight/vendor/cli/highline.rb#41 def use_color=(setting); end # Returns true if HighLine is currently using color escapes. # # @return [Boolean] # - # source://skylight//lib/skylight/vendor/cli/highline.rb#47 + # source://skylight//lib/skylight/vendor/cli/highline.rb#46 def use_color?; end # Returns +true+ if HighLine is currently using a color scheme. # # @return [Boolean] # - # source://skylight//lib/skylight/vendor/cli/highline.rb#85 + # source://skylight//lib/skylight/vendor/cli/highline.rb#84 def using_color_scheme?; end end end -# source://skylight//lib/skylight/vendor/cli/highline.rb#126 +# source://skylight//lib/skylight/vendor/cli/highline.rb#125 HighLine::BASIC_COLORS = T.let(T.unsafe(nil), Array) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BLACK = T.let(T.unsafe(nil), String) # These RGB colors are approximate; see http://en.wikipedia.org/wiki/ANSI_escape_code # -# source://skylight//lib/skylight/vendor/cli/highline.rb#111 +# source://skylight//lib/skylight/vendor/cli/highline.rb#110 HighLine::BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::BLINK = T.let(T.unsafe(nil), String) # Blink; support uncommon # -# source://skylight//lib/skylight/vendor/cli/highline.rb#104 +# source://skylight//lib/skylight/vendor/cli/highline.rb#103 HighLine::BLINK_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BLUE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#114 +# source://skylight//lib/skylight/vendor/cli/highline.rb#113 HighLine::BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::BOLD = T.let(T.unsafe(nil), String) # Bold; Note: bold + a color works as you'd expect, # -# source://skylight//lib/skylight/vendor/cli/highline.rb#98 +# source://skylight//lib/skylight/vendor/cli/highline.rb#97 HighLine::BOLD_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_BLACK = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_BLUE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_CYAN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_GRAY = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_GREEN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_MAGENTA = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_NONE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_RED = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_WHITE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::BRIGHT_YELLOW = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#132 +# source://skylight//lib/skylight/vendor/cli/highline.rb#131 HighLine::BRIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::CLEAR = T.let(T.unsafe(nil), String) # Clear color settings # -# source://skylight//lib/skylight/vendor/cli/highline.rb#96 +# source://skylight//lib/skylight/vendor/cli/highline.rb#95 HighLine::CLEAR_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#134 +# source://skylight//lib/skylight/vendor/cli/highline.rb#133 HighLine::COLORS = T.let(T.unsafe(nil), Array) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::CONCEALED = T.let(T.unsafe(nil), String) # Concealed; support uncommon # -# source://skylight//lib/skylight/vendor/cli/highline.rb#106 +# source://skylight//lib/skylight/vendor/cli/highline.rb#105 HighLine::CONCEALED_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::CYAN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#117 +# source://skylight//lib/skylight/vendor/cli/highline.rb#116 HighLine::CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) # ColorScheme objects encapsulate a named set of colors to be used in the @@ -595,44 +596,44 @@ class HighLine::ColorScheme def to_symbol(t); end end -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::DARK = T.let(T.unsafe(nil), String) # for example bold black. Bold without a color displays # the system-defined bold color (e.g. red on Mac iTerm) # -# source://skylight//lib/skylight/vendor/cli/highline.rb#101 +# source://skylight//lib/skylight/vendor/cli/highline.rb#100 HighLine::DARK_STYLE = T.let(T.unsafe(nil), HighLine::Style) # Erase the character under the cursor. # -# source://skylight//lib/skylight/vendor/cli/highline.rb#95 +# source://skylight//lib/skylight/vendor/cli/highline.rb#94 HighLine::ERASE_CHAR_STYLE = T.let(T.unsafe(nil), HighLine::Style) # Embed in a String to clear all previous ANSI sequences. This *MUST* be # done before the program exits! # -# source://skylight//lib/skylight/vendor/cli/highline.rb#94 +# source://skylight//lib/skylight/vendor/cli/highline.rb#93 HighLine::ERASE_LINE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::GRAY = T.let(T.unsafe(nil), String) # Alias for WHITE, since WHITE is actually a light gray on Macs # -# source://skylight//lib/skylight/vendor/cli/highline.rb#121 +# source://skylight//lib/skylight/vendor/cli/highline.rb#120 HighLine::GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::GREEN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#113 +# source://skylight//lib/skylight/vendor/cli/highline.rb#112 HighLine::GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::MAGENTA = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#116 +# source://skylight//lib/skylight/vendor/cli/highline.rb#115 HighLine::MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) # Menu objects encapsulate all the details of a call to HighLine.choose(). @@ -920,133 +921,133 @@ class HighLine::Menu < ::HighLine::Question def update_responses; end end -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::NONE = T.let(T.unsafe(nil), String) # On Mac OSX Terminal, this is black foreground, or bright white background. # Also used as base for RGB colors, if available # -# source://skylight//lib/skylight/vendor/cli/highline.rb#124 +# source://skylight//lib/skylight/vendor/cli/highline.rb#123 HighLine::NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BLACK = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BLUE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_BLACK = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_BLACK_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_BLUE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_BLUE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_CYAN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_GRAY = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_GREEN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_MAGENTA = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_NONE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_RED = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_WHITE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_BRIGHT_YELLOW = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_BRIGHT_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_CYAN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_CYAN_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_GRAY = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_GRAY_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_GREEN = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_GREEN_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_MAGENTA = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_MAGENTA_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_NONE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_NONE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_RED = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_WHITE = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#139 +# source://skylight//lib/skylight/vendor/cli/highline.rb#138 HighLine::ON_YELLOW = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#138 +# source://skylight//lib/skylight/vendor/cli/highline.rb#137 HighLine::ON_YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) # Question objects contain all the details of a single invocation of @@ -1553,32 +1554,32 @@ class HighLine::Question::NoAutoCompleteMatch < ::StandardError; end # An internal HighLine error. User code does not need to trap this. # -# source://skylight//lib/skylight/vendor/cli/highline.rb#34 +# source://skylight//lib/skylight/vendor/cli/highline.rb#33 class HighLine::QuestionError < ::StandardError; end -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::RED = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#112 +# source://skylight//lib/skylight/vendor/cli/highline.rb#111 HighLine::RED_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::RESET = T.let(T.unsafe(nil), String) # Alias for CLEAR. # -# source://skylight//lib/skylight/vendor/cli/highline.rb#97 +# source://skylight//lib/skylight/vendor/cli/highline.rb#96 HighLine::RESET_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::REVERSE = T.let(T.unsafe(nil), String) # Reverse foreground and background # -# source://skylight//lib/skylight/vendor/cli/highline.rb#105 +# source://skylight//lib/skylight/vendor/cli/highline.rb#104 HighLine::REVERSE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#108 +# source://skylight//lib/skylight/vendor/cli/highline.rb#107 HighLine::STYLES = T.let(T.unsafe(nil), Array) # A sample ColorScheme. @@ -1826,39 +1827,39 @@ HighLine::SystemExtensions::CHARACTER_MODE = T.let(T.unsafe(nil), String) # source://skylight//lib/skylight/vendor/cli/highline/system_extensions.rb#12 HighLine::SystemExtensions::JRUBY = T.let(T.unsafe(nil), FalseClass) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::UNDERLINE = T.let(T.unsafe(nil), String) # Underline # -# source://skylight//lib/skylight/vendor/cli/highline.rb#102 +# source://skylight//lib/skylight/vendor/cli/highline.rb#101 HighLine::UNDERLINE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#144 +# source://skylight//lib/skylight/vendor/cli/highline.rb#143 HighLine::UNDERSCORE = T.let(T.unsafe(nil), String) # Alias for UNDERLINE # -# source://skylight//lib/skylight/vendor/cli/highline.rb#103 +# source://skylight//lib/skylight/vendor/cli/highline.rb#102 HighLine::UNDERSCORE_STYLE = T.let(T.unsafe(nil), HighLine::Style) # The version of the installed library. # -# source://skylight//lib/skylight/vendor/cli/highline.rb#31 +# source://skylight//lib/skylight/vendor/cli/highline.rb#30 HighLine::VERSION = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::WHITE = T.let(T.unsafe(nil), String) # On Mac OSX Terminal, white is actually gray # -# source://skylight//lib/skylight/vendor/cli/highline.rb#119 +# source://skylight//lib/skylight/vendor/cli/highline.rb#118 HighLine::WHITE_STYLE = T.let(T.unsafe(nil), HighLine::Style) -# source://skylight//lib/skylight/vendor/cli/highline.rb#137 +# source://skylight//lib/skylight/vendor/cli/highline.rb#136 HighLine::YELLOW = T.let(T.unsafe(nil), String) -# source://skylight//lib/skylight/vendor/cli/highline.rb#115 +# source://skylight//lib/skylight/vendor/cli/highline.rb#114 HighLine::YELLOW_STYLE = T.let(T.unsafe(nil), HighLine::Style) # require "highline/import" adds shortcut methods to Kernel, making @@ -2156,10 +2157,10 @@ class Skylight::CLI::Base < ::Thor # source://skylight//lib/skylight/cli.rb#78 def disable_env_warning; end - # source://thor/1.3.1/lib/thor.rb#40 + # source://thor/1.3.2/lib/thor.rb#40 def doctor(*args); end - # source://thor/1.3.1/lib/thor.rb#40 + # source://thor/1.3.2/lib/thor.rb#40 def merge(*args); end # @api private @@ -2304,10 +2305,10 @@ class Skylight::CLI::Merger < ::Thor::Group # source://skylight//lib/skylight/cli/merger.rb#30 def fetch_apps; end - # source://thor/1.3.1/lib/thor/base.rb#163 + # source://thor/1.3.2/lib/thor/base.rb#163 def merge_token; end - # source://thor/1.3.1/lib/thor/base.rb#163 + # source://thor/1.3.2/lib/thor/base.rb#163 def merge_token=(_arg0); end # source://skylight//lib/skylight/cli/merger.rb#127 @@ -2622,7 +2623,7 @@ class Skylight::Deprecation < ::ActiveSupport::Deprecation def ignored_callstack(path); end class << self - # source://activesupport/7.1.3/lib/active_support/deprecation/instance_delegator.rb#34 + # source://activesupport/7.1.3.4/lib/active_support/deprecation/instance_delegator.rb#34 def ignored_callstack(*_arg0, **_arg1, &_arg2); end end end diff --git a/sorbet/rbi/gems/spoom@1.2.4.rbi b/sorbet/rbi/gems/spoom@1.5.0.rbi similarity index 59% rename from sorbet/rbi/gems/spoom@1.2.4.rbi rename to sorbet/rbi/gems/spoom@1.5.0.rbi index 527807bb2..6ae9f7264 100644 --- a/sorbet/rbi/gems/spoom@1.2.4.rbi +++ b/sorbet/rbi/gems/spoom@1.5.0.rbi @@ -4,130 +4,91 @@ # This is an autogenerated file for types exported from the `spoom` gem. # Please instead update this file by running `bin/tapioca gem spoom`. + # source://spoom//lib/spoom.rb#7 -module Spoom; end +module Spoom + class << self + # source://spoom//lib/spoom/parse.rb#13 + sig { params(ruby: ::String, file: ::String).returns(::Prism::Node) } + def parse_ruby(ruby, file:); end + end +end # source://spoom//lib/spoom/cli/helper.rb#9 module Spoom::Cli; end -# source://spoom//lib/spoom/cli/bump.rb#9 -class Spoom::Cli::Bump < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli/bump.rb#49 - sig { params(directory: ::String).void } - def bump(directory = T.unsafe(nil)); end - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#170 - def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/bump.rb#192 - def undo_changes(files, from_strictness); end -end - -# source://spoom//lib/spoom/cli/config.rb#9 -class Spoom::Cli::Config < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/config.rb#15 - def show; end -end - -# source://spoom//lib/spoom/cli/coverage.rb#9 -class Spoom::Cli::Coverage < ::Thor +# source://spoom//lib/spoom/cli/deadcode.rb#8 +class Spoom::Cli::Deadcode < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # source://spoom//lib/spoom/cli/coverage.rb#198 - def bundle_install(path, sha); end + # source://spoom//lib/spoom/cli/deadcode.rb#52 + sig { params(paths: ::String).void } + def deadcode(*paths); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/coverage.rb#210 - def message_no_data(file); end - - # source://spoom//lib/spoom/cli/coverage.rb#173 - def open(file = T.unsafe(nil)); end - - # source://spoom//lib/spoom/cli/coverage.rb#189 - def parse_time(string, option); end - - # source://spoom//lib/spoom/cli/coverage.rb#142 - def report; end - - # source://spoom//lib/spoom/cli/coverage.rb#20 - def snapshot; end - - # source://spoom//lib/spoom/cli/coverage.rb#42 - def timeline; end + # source://spoom//lib/spoom/cli/deadcode.rb#154 + def remove(location_string); end end -# source://spoom//lib/spoom/cli/coverage.rb#12 -Spoom::Cli::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) - # source://spoom//lib/spoom/cli/helper.rb#10 module Spoom::Cli::Helper include ::Spoom::Colorize requires_ancestor { Thor } - # source://spoom//lib/spoom/cli/helper.rb#119 + # source://spoom//lib/spoom/cli/helper.rb#139 sig { params(string: ::String).returns(::String) } def blue(string); end # Is the `--color` option true? # - # source://spoom//lib/spoom/cli/helper.rb#83 + # source://spoom//lib/spoom/cli/helper.rb#103 sig { returns(T::Boolean) } def color?; end # Colorize a string if `color?` # - # source://spoom//lib/spoom/cli/helper.rb#112 + # source://spoom//lib/spoom/cli/helper.rb#132 sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } def colorize(string, *color); end # Returns the context at `--path` (by default the current working directory) # - # source://spoom//lib/spoom/cli/helper.rb#51 + # source://spoom//lib/spoom/cli/helper.rb#71 sig { returns(::Spoom::Context) } def context; end # Raise if `spoom` is not ran inside a context with a `sorbet/config` file # - # source://spoom//lib/spoom/cli/helper.rb#57 + # source://spoom//lib/spoom/cli/helper.rb#77 sig { returns(::Spoom::Context) } def context_requiring_sorbet!; end - # source://spoom//lib/spoom/cli/helper.rb#124 + # source://spoom//lib/spoom/cli/helper.rb#144 sig { params(string: ::String).returns(::String) } def cyan(string); end # Return the path specified through `--path` # - # source://spoom//lib/spoom/cli/helper.rb#72 + # source://spoom//lib/spoom/cli/helper.rb#92 sig { returns(::String) } def exec_path; end - # source://spoom//lib/spoom/cli/helper.rb#129 + # source://spoom//lib/spoom/cli/helper.rb#149 sig { params(string: ::String).returns(::String) } def gray(string); end - # source://spoom//lib/spoom/cli/helper.rb#134 + # source://spoom//lib/spoom/cli/helper.rb#154 sig { params(string: ::String).returns(::String) } def green(string); end - # source://spoom//lib/spoom/cli/helper.rb#88 + # source://spoom//lib/spoom/cli/helper.rb#108 sig { params(string: ::String).returns(::String) } def highlight(string); end - # source://spoom//lib/spoom/cli/helper.rb#139 + # source://spoom//lib/spoom/cli/helper.rb#159 sig { params(string: ::String).returns(::String) } def red(string); end @@ -145,158 +106,243 @@ module Spoom::Cli::Helper sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } def say_error(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/helper.rb#144 + # Print `message` on `$stderr` + # + # The message is prefixed by a status (default: `Warning`). + # + # source://spoom//lib/spoom/cli/helper.rb#59 + sig { params(message: ::String, status: T.nilable(::String), nl: T::Boolean).void } + def say_warning(message, status: T.unsafe(nil), nl: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/helper.rb#164 sig { params(string: ::String).returns(::String) } def yellow(string); end end -# source://spoom//lib/spoom/cli/lsp.rb#10 -class Spoom::Cli::LSP < ::Thor +# source://spoom//lib/spoom/cli.rb#12 +class Spoom::Cli::Main < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli.rb#101 + def __print_version; end + + # source://spoom//lib/spoom/cli.rb#58 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli.rb#65 + def coverage(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def deadcode(*args); end + + # source://spoom//lib/spoom/cli.rb#75 + def lsp(*args); end + + # source://thor/1.3.2/lib/thor.rb#334 + def srb(*args); end + + # source://spoom//lib/spoom/cli.rb#94 + def tc(*paths_to_select); end + + class << self + # @return [Boolean] + # + # source://spoom//lib/spoom/cli.rb#108 + def exit_on_failure?; end + end +end + +# source://spoom//lib/spoom/cli.rb#81 +Spoom::Cli::Main::SORT_CODE = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli.rb#83 +Spoom::Cli::Main::SORT_ENUM = T.let(T.unsafe(nil), Array) + +# source://spoom//lib/spoom/cli.rb#82 +Spoom::Cli::Main::SORT_LOC = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/bump.rb#9 +module Spoom::Cli::Srb; end + +# source://spoom//lib/spoom/cli/srb/bump.rb#10 +class Spoom::Cli::Srb::Bump < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/bump.rb#50 + sig { params(directory: ::String).void } + def bump(directory = T.unsafe(nil)); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/bump.rb#171 + def print_changes(files, command:, from: T.unsafe(nil), to: T.unsafe(nil), dry: T.unsafe(nil), path: T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/bump.rb#193 + def undo_changes(files, from_strictness); end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#10 +class Spoom::Cli::Srb::Coverage < ::Thor + include ::Spoom::Colorize + include ::Spoom::Cli::Helper + + # source://spoom//lib/spoom/cli/srb/coverage.rb#199 + def bundle_install(path, sha); end + + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#211 + def message_no_data(file); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#174 + def open(file = T.unsafe(nil)); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#190 + def parse_time(string, option); end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#143 + def report; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#21 + def snapshot; end + + # source://spoom//lib/spoom/cli/srb/coverage.rb#43 + def timeline; end +end + +# source://spoom//lib/spoom/cli/srb/coverage.rb#13 +Spoom::Cli::Srb::Coverage::DATA_DIR = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/cli/srb/lsp.rb#11 +class Spoom::Cli::Srb::LSP < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#55 + # source://spoom//lib/spoom/cli/srb/lsp.rb#45 def defs(file, line, col); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#65 + # source://spoom//lib/spoom/cli/srb/lsp.rb#55 def find(query); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#41 + # source://spoom//lib/spoom/cli/srb/lsp.rb#31 def hover(file, line, col); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#26 + # source://spoom//lib/spoom/cli/srb/lsp.rb#16 def list; end - # source://spoom//lib/spoom/cli/lsp.rb#114 + # source://spoom//lib/spoom/cli/srb/lsp.rb#104 def lsp_client; end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#85 + # source://spoom//lib/spoom/cli/srb/lsp.rb#75 def refs(file, line, col); end - # source://spoom//lib/spoom/cli/lsp.rb#137 + # source://spoom//lib/spoom/cli/srb/lsp.rb#127 def run(&block); end - # source://spoom//lib/spoom/cli/lsp.rb#16 - def show; end - # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#95 + # source://spoom//lib/spoom/cli/srb/lsp.rb#85 def sigs(file, line, col); end - # source://spoom//lib/spoom/cli/lsp.rb#129 + # source://spoom//lib/spoom/cli/srb/lsp.rb#119 def symbol_printer; end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#75 + # source://spoom//lib/spoom/cli/srb/lsp.rb#65 def symbols(file); end - # source://spoom//lib/spoom/cli/lsp.rb#162 + # source://spoom//lib/spoom/cli/srb/lsp.rb#152 def to_uri(path); end # TODO: options, filter, limit, kind etc.. filter rbi # - # source://spoom//lib/spoom/cli/lsp.rb#105 + # source://spoom//lib/spoom/cli/srb/lsp.rb#95 def types(file, line, col); end end -# source://spoom//lib/spoom/cli.rb#16 -class Spoom::Cli::Main < ::Thor - include ::Spoom::Colorize - include ::Spoom::Cli::Helper - - # source://spoom//lib/spoom/cli.rb#61 - def __print_version; end - - # source://thor/1.3.1/lib/thor.rb#334 +# source://spoom//lib/spoom/cli/srb.rb#12 +class Spoom::Cli::Srb::Main < ::Thor + # source://thor/1.3.2/lib/thor.rb#334 def bump(*args); end - # source://thor/1.3.1/lib/thor.rb#334 - def config(*args); end - - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def coverage(*args); end - # source://spoom//lib/spoom/cli.rb#43 - def files; end + def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def lsp(*args); end - # source://thor/1.3.1/lib/thor.rb#334 + # source://thor/1.3.2/lib/thor.rb#334 def tc(*args); end - - class << self - # @return [Boolean] - # - # source://spoom//lib/spoom/cli.rb#68 - def exit_on_failure?; end - end end -# source://spoom//lib/spoom/cli/run.rb#6 -class Spoom::Cli::Run < ::Thor +# source://spoom//lib/spoom/cli/srb/tc.rb#7 +class Spoom::Cli::Srb::Tc < ::Thor include ::Spoom::Colorize include ::Spoom::Cli::Helper - # source://spoom//lib/spoom/cli/run.rb#131 + # source://spoom//lib/spoom/cli/srb/tc.rb#132 def colorize_message(message); end - # source://spoom//lib/spoom/cli/run.rb#122 + # source://spoom//lib/spoom/cli/srb/tc.rb#123 def format_error(error, format); end def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://spoom//lib/spoom/cli/run.rb#26 + # source://spoom//lib/spoom/cli/srb/tc.rb#27 def tc(*paths_to_select); end end -# source://spoom//lib/spoom/cli/run.rb#15 -Spoom::Cli::Run::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) +# source://spoom//lib/spoom/cli/srb/tc.rb#16 +Spoom::Cli::Srb::Tc::DEFAULT_FORMAT = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/cli/run.rb#11 -Spoom::Cli::Run::SORT_CODE = T.let(T.unsafe(nil), String) +# source://spoom//lib/spoom/cli/srb/tc.rb#12 +Spoom::Cli::Srb::Tc::SORT_CODE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/cli/run.rb#13 -Spoom::Cli::Run::SORT_ENUM = T.let(T.unsafe(nil), Array) +# source://spoom//lib/spoom/cli/srb/tc.rb#14 +Spoom::Cli::Srb::Tc::SORT_ENUM = T.let(T.unsafe(nil), Array) -# source://spoom//lib/spoom/cli/run.rb#12 -Spoom::Cli::Run::SORT_LOC = T.let(T.unsafe(nil), String) +# source://spoom//lib/spoom/cli/srb/tc.rb#13 +Spoom::Cli::Srb::Tc::SORT_LOC = T.let(T.unsafe(nil), String) # source://spoom//lib/spoom/colors.rb#5 class Spoom::Color < ::T::Enum enums do - CLEAR = new - BOLD = new BLACK = new - RED = new - GREEN = new - YELLOW = new BLUE = new - MAGENTA = new + BOLD = new + CLEAR = new CYAN = new - WHITE = new + GREEN = new LIGHT_BLACK = new - LIGHT_RED = new - LIGHT_GREEN = new - LIGHT_YELLOW = new LIGHT_BLUE = new - LIGHT_MAGENTA = new LIGHT_CYAN = new + LIGHT_GREEN = new + LIGHT_MAGENTA = new + LIGHT_RED = new LIGHT_WHITE = new + LIGHT_YELLOW = new + MAGENTA = new + RED = new + WHITE = new + YELLOW = new end # source://spoom//lib/spoom/colors.rb#32 @@ -380,7 +426,7 @@ module Spoom::Context::Bundle # Returns `nil` if `gem` cannot be found in the Gemfile. # # source://spoom//lib/spoom/context/bundle.rb#62 - sig { params(gem: ::String).returns(T.nilable(::String)) } + sig { params(gem: ::String).returns(T.nilable(::Gem::Version)) } def gem_version_from_gemfile_lock(gem); end # source://spoom//lib/spoom/context/bundle.rb#51 @@ -579,7 +625,7 @@ module Spoom::Context::Git sig { params(arg: ::String).returns(::Spoom::ExecResult) } def git_show(*arg); end - # Is there uncommited changes in this context directory? + # Is there uncommitted changes in this context directory? # # source://spoom//lib/spoom/context/git.rb#132 sig { params(path: ::String).returns(T::Boolean) } @@ -958,7 +1004,7 @@ class Spoom::Coverage::D3::ColorPalette < ::T::Struct prop :strong, ::String class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -1298,7 +1344,7 @@ class Spoom::Coverage::Snapshot < ::T::Struct sig { params(obj: T::Hash[::String, T.untyped]).returns(::Spoom::Coverage::Snapshot) } def from_obj(obj); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -1353,42 +1399,20 @@ end # source://spoom//lib/spoom/deadcode/erb.rb#27 module Spoom::Deadcode class << self - # source://spoom//lib/spoom/deadcode.rb#51 - sig do - params( - index: ::Spoom::Deadcode::Index, - erb: ::String, - file: ::String, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def index_erb(index, erb, file:, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode.rb#40 - sig do - params( - index: ::Spoom::Deadcode::Index, - ruby: ::String, - file: ::String, - plugins: T::Array[::Spoom::Deadcode::Plugins::Base] - ).void - end - def index_ruby(index, ruby, file:, plugins: T.unsafe(nil)); end - - # source://spoom//lib/spoom/deadcode/plugins.rb#74 - sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + # source://spoom//lib/spoom/deadcode/plugins.rb#75 + sig { params(context: ::Spoom::Context).returns(T::Array[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def load_custom_plugins(context); end - # source://spoom//lib/spoom/deadcode/plugins.rb#60 - sig { params(context: ::Spoom::Context).returns(T::Array[::Spoom::Deadcode::Plugins::Base]) } + # source://spoom//lib/spoom/deadcode/plugins.rb#61 + sig { params(context: ::Spoom::Context).returns(T::Set[T.class_of(Spoom::Deadcode::Plugins::Base)]) } def plugins_from_gemfile_lock(context); end end end -# source://spoom//lib/spoom/deadcode/plugins.rb#25 +# source://spoom//lib/spoom/deadcode/plugins.rb#26 Spoom::Deadcode::DEFAULT_CUSTOM_PLUGINS_PATH = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/deadcode/plugins.rb#27 +# source://spoom//lib/spoom/deadcode/plugins.rb#28 Spoom::Deadcode::DEFAULT_PLUGINS = T.let(T.unsafe(nil), Set) # A definition is a class, module, method, constant, etc. being defined in the code @@ -1398,7 +1422,7 @@ class Spoom::Deadcode::Definition < ::T::Struct const :kind, ::Spoom::Deadcode::Definition::Kind const :name, ::String const :full_name, ::String - const :location, ::Spoom::Deadcode::Location + const :location, ::Spoom::Location const :status, ::Spoom::Deadcode::Definition::Status, default: T.unsafe(nil) # source://spoom//lib/spoom/deadcode/definition.rb#78 @@ -1449,8 +1473,14 @@ class Spoom::Deadcode::Definition < ::T::Struct sig { returns(T::Boolean) } def module?; end + # Utils + # + # source://spoom//lib/spoom/deadcode/definition.rb#100 + sig { params(args: T.untyped).returns(::String) } + def to_json(*args); end + class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -1510,44 +1540,35 @@ end # source://spoom//lib/spoom/deadcode/erb.rb#63 Spoom::Deadcode::ERB::BLOCK_EXPR = T.let(T.unsafe(nil), Regexp) -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/deadcode.rb#20 -class Spoom::Deadcode::Error < ::Spoom::Error - abstract! - - # source://spoom//lib/spoom/deadcode.rb#27 - sig { params(message: ::String, parent: ::Exception).void } - def initialize(message, parent:); end -end - # source://spoom//lib/spoom/deadcode/index.rb#6 class Spoom::Deadcode::Index - # source://spoom//lib/spoom/deadcode/index.rb#16 - sig { void } - def initialize; end + # source://spoom//lib/spoom/deadcode/index.rb#29 + sig { params(model: ::Spoom::Model).void } + def initialize(model); end - # source://spoom//lib/spoom/deadcode/index.rb#51 + # source://spoom//lib/spoom/deadcode/index.rb#219 sig { returns(T::Array[::Spoom::Deadcode::Definition]) } def all_definitions; end - # source://spoom//lib/spoom/deadcode/index.rb#56 - sig { returns(T::Array[::Spoom::Deadcode::Reference]) } + # source://spoom//lib/spoom/deadcode/index.rb#224 + sig { returns(T::Array[::Spoom::Model::Reference]) } def all_references; end - # Indexing - # - # source://spoom//lib/spoom/deadcode/index.rb#24 + # source://spoom//lib/spoom/deadcode/index.rb#99 + sig { params(plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def apply_plugins!(plugins); end + + # source://spoom//lib/spoom/deadcode/index.rb#79 sig { params(definition: ::Spoom::Deadcode::Definition).void } def define(definition); end - # source://spoom//lib/spoom/deadcode/index.rb#10 + # source://spoom//lib/spoom/deadcode/index.rb#23 sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Definition]]) } def definitions; end # Utils # - # source://spoom//lib/spoom/deadcode/index.rb#46 + # source://spoom//lib/spoom/deadcode/index.rb#214 sig { params(name: ::String).returns(T::Array[::Spoom::Deadcode::Definition]) } def definitions_for_name(name); end @@ -1555,398 +1576,192 @@ class Spoom::Deadcode::Index # # To be called once all the files have been indexed and all the definitions and references discovered. # - # source://spoom//lib/spoom/deadcode/index.rb#37 + # source://spoom//lib/spoom/deadcode/index.rb#122 sig { void } def finalize!; end - # source://spoom//lib/spoom/deadcode/index.rb#29 - sig { params(reference: ::Spoom::Deadcode::Reference).void } - def reference(reference); end + # source://spoom//lib/spoom/deadcode/index.rb#94 + sig { params(symbol_def: ::Spoom::Model::SymbolDef).void } + def ignore(symbol_def); end - # source://spoom//lib/spoom/deadcode/index.rb#13 - sig { returns(T::Hash[::String, T::Array[::Spoom::Deadcode::Reference]]) } + # source://spoom//lib/spoom/deadcode/index.rb#50 + sig { params(erb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_erb(erb, file:, plugins: T.unsafe(nil)); end + + # Indexing + # + # source://spoom//lib/spoom/deadcode/index.rb#39 + sig { params(file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_file(file, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/index.rb#55 + sig { params(rb: ::String, file: ::String, plugins: T::Array[::Spoom::Deadcode::Plugins::Base]).void } + def index_ruby(rb, file:, plugins: T.unsafe(nil)); end + + # source://spoom//lib/spoom/deadcode/index.rb#20 + sig { returns(::Spoom::Model) } + def model; end + + # source://spoom//lib/spoom/deadcode/index.rb#84 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_constant(name, location); end + + # source://spoom//lib/spoom/deadcode/index.rb#89 + sig { params(name: ::String, location: ::Spoom::Location).void } + def reference_method(name, location); end + + # source://spoom//lib/spoom/deadcode/index.rb#26 + sig { returns(T::Hash[::String, T::Array[::Spoom::Model::Reference]]) } def references; end end +# source://spoom//lib/spoom/deadcode/index.rb#9 +class Spoom::Deadcode::Index::Error < ::Spoom::Error + # source://spoom//lib/spoom/deadcode/index.rb#13 + sig { params(message: ::String, parent: ::Exception).void } + def initialize(message, parent:); end +end + # source://spoom//lib/spoom/deadcode/indexer.rb#6 -class Spoom::Deadcode::Indexer < ::SyntaxTree::Visitor +class Spoom::Deadcode::Indexer < ::Spoom::Visitor # source://spoom//lib/spoom/deadcode/indexer.rb#16 sig do params( path: ::String, - source: ::String, index: ::Spoom::Deadcode::Index, plugins: T::Array[::Spoom::Deadcode::Plugins::Base] ).void end - def initialize(path, source, index, plugins: T.unsafe(nil)); end + def initialize(path, index, plugins: T.unsafe(nil)); end - # source://spoom//lib/spoom/deadcode/indexer.rb#459 - sig do - params( - node: T.nilable(T.any(::SyntaxTree::ArgParen, ::SyntaxTree::Args, ::SyntaxTree::ArgsForward)) - ).returns(T::Array[::SyntaxTree::Node]) - end - def call_args(node); end + # source://spoom//lib/spoom/deadcode/indexer.rb#13 + sig { returns(::Spoom::Deadcode::Index) } + def index; end - # Context - # - # source://spoom//lib/spoom/deadcode/indexer.rb#367 - sig { returns(::SyntaxTree::Node) } - def current_node; end + # source://spoom//lib/spoom/deadcode/indexer.rb#10 + sig { returns(::String) } + def path; end - # Definition indexing + # Visit # - # source://spoom//lib/spoom/deadcode/indexer.rb#281 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_attr_reader(name, full_name, node); end + # source://spoom//lib/spoom/deadcode/indexer.rb#27 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#293 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_attr_writer(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins.rb#36 +Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) - # source://spoom//lib/spoom/deadcode/indexer.rb#305 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_class(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/base.rb#8 +module Spoom::Deadcode::Plugins; end - # source://spoom//lib/spoom/deadcode/indexer.rb#317 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_constant(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7 +class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#329 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_method(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#7 +class Spoom::Deadcode::Plugins::ActionMailerPreview < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/action_mailer_preview.rb#13 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#341 - sig { params(name: ::String, full_name: ::String, node: ::SyntaxTree::Node).void } - def define_module(name, full_name, node); end +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7 +class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end - # @return [String] - # - # source://spoom//lib/spoom/deadcode/indexer.rb#10 - def file_name; end + # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#39 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#13 - sig { returns(::Spoom::Deadcode::Index) } - def index; end +# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#12 +Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#426 - sig { returns(T.nilable(::String)) } - def last_sig; end +# source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7 +class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end - # source://spoom//lib/spoom/deadcode/indexer.rb#386 - sig { returns(T.nilable(::SyntaxTree::BlockNode)) } - def nesting_block; end +# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7 +class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#391 - sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) } - def nesting_block_call; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7 +class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#396 - sig { returns(T.nilable(::String)) } - def nesting_block_call_name; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64 +Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#381 - sig { returns(T.nilable(::SyntaxTree::ClassDeclaration)) } - def nesting_class; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20 +Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#410 - sig { returns(T.nilable(::String)) } - def nesting_class_name; end +# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49 +Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#418 - sig { returns(T.nilable(::String)) } - def nesting_class_superclass_name; end +# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 +class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base + # source://spoom//lib/spoom/deadcode/plugins/active_support.rb#22 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end +end - # source://spoom//lib/spoom/deadcode/indexer.rb#372 - sig { type_parameters(:N).params(type: T::Class[T.type_parameter(:N)]).returns(T.nilable(T.type_parameter(:N))) } - def nesting_node(type); end +# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#19 +Spoom::Deadcode::Plugins::ActiveSupport::SETUP_AND_TEARDOWN_METHODS = T.let(T.unsafe(nil), Array) - # source://spoom//lib/spoom/deadcode/indexer.rb#445 - sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } - def node_location(node); end +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/deadcode/plugins/base.rb#9 +class Spoom::Deadcode::Plugins::Base + abstract! - # Node utils - # - # source://spoom//lib/spoom/deadcode/indexer.rb#435 - sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } - def node_string(node); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#132 + sig { params(index: ::Spoom::Deadcode::Index).void } + def initialize(index); end - # source://spoom//lib/spoom/deadcode/indexer.rb#10 - sig { returns(::String) } - def path; end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#129 + sig { returns(::Spoom::Deadcode::Index) } + def index; end - # Reference indexing + # Do not override this method, use `on_define_accessor` instead. # - # source://spoom//lib/spoom/deadcode/indexer.rb#355 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } - def reference_constant(name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#360 - sig { params(name: ::String, node: ::SyntaxTree::Node).void } - def reference_method(name, node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#450 - sig { params(node: ::SyntaxTree::Node).returns(::String) } - def symbol_string(node); end - - # Visit - # - # source://spoom//lib/spoom/deadcode/indexer.rb#35 - sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } - def visit(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#45 - sig { override.params(node: ::SyntaxTree::AliasNode).void } - def visit_alias(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#50 - sig { override.params(node: ::SyntaxTree::ARef).void } - def visit_aref(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#57 - sig { override.params(node: ::SyntaxTree::ARefField).void } - def visit_aref_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#64 - sig { override.params(node: ::SyntaxTree::ArgBlock).void } - def visit_arg_block(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#78 - sig { override.params(node: ::SyntaxTree::Binary).void } - def visit_binary(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#94 - sig { override.params(node: ::SyntaxTree::CallNode).void } - def visit_call(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#106 - sig { override.params(node: ::SyntaxTree::ClassDeclaration).void } - def visit_class(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#119 - sig { override.params(node: ::SyntaxTree::Command).void } - def visit_command(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#131 - sig { override.params(node: ::SyntaxTree::CommandCall).void } - def visit_command_call(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#144 - sig { override.params(node: ::SyntaxTree::Const).void } - def visit_const(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#149 - sig { override.params(node: ::SyntaxTree::ConstPathField).void } - def visit_const_path_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#159 - sig { override.params(node: ::SyntaxTree::DefNode).void } - def visit_def(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#167 - sig { override.params(node: ::SyntaxTree::Field).void } - def visit_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#183 - sig { override.params(node: ::SyntaxTree::ModuleDeclaration).void } - def visit_module(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#195 - sig { override.params(node: ::SyntaxTree::OpAssign).void } - def visit_opassign(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#204 - sig { params(send: ::Spoom::Deadcode::Send).void } - def visit_send(send); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#243 - sig { override.params(node: ::SyntaxTree::SymbolLiteral).void } - def visit_symbol_literal(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#252 - sig { override.params(node: ::SyntaxTree::TopConstField).void } - def visit_top_const_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#257 - sig { override.params(node: ::SyntaxTree::VarField).void } - def visit_var_field(node); end - - # source://spoom//lib/spoom/deadcode/indexer.rb#274 - sig { override.params(node: ::SyntaxTree::VCall).void } - def visit_vcall(node); end -end - -# source://spoom//lib/spoom/deadcode.rb#34 -class Spoom::Deadcode::IndexerError < ::Spoom::Deadcode::Error; end - -# source://spoom//lib/spoom/deadcode/location.rb#6 -class Spoom::Deadcode::Location - include ::Comparable - - # source://spoom//lib/spoom/deadcode/location.rb#54 - sig do - params( - file: ::String, - start_line: ::Integer, - start_column: ::Integer, - end_line: ::Integer, - end_column: ::Integer - ).void - end - def initialize(file, start_line, start_column, end_line, end_column); end - - # source://spoom//lib/spoom/deadcode/location.rb#74 - sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } - def <=>(other); end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def end_column; end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def end_line; end - - # source://spoom//lib/spoom/deadcode/location.rb#40 - sig { returns(::String) } - def file; end - - # source://spoom//lib/spoom/deadcode/location.rb#63 - sig { params(other: ::Spoom::Deadcode::Location).returns(T::Boolean) } - def include?(other); end - - # @return [Integer] - # - # source://spoom//lib/spoom/deadcode/location.rb#43 - def start_column; end - - # source://spoom//lib/spoom/deadcode/location.rb#43 - sig { returns(::Integer) } - def start_line; end - - # source://spoom//lib/spoom/deadcode/location.rb#81 - sig { returns(::String) } - def to_s; end - - class << self - # @raise [LocationError] - # - # source://spoom//lib/spoom/deadcode/location.rb#17 - sig { params(location_string: ::String).returns(::Spoom::Deadcode::Location) } - def from_string(location_string); end - - # source://spoom//lib/spoom/deadcode/location.rb#34 - sig { params(file: ::String, location: ::SyntaxTree::Location).returns(::Spoom::Deadcode::Location) } - def from_syntax_tree(file, location); end - end -end - -# source://spoom//lib/spoom/deadcode/location.rb#11 -class Spoom::Deadcode::Location::LocationError < ::Spoom::Error; end - -# source://spoom//lib/spoom/deadcode/plugins.rb#35 -Spoom::Deadcode::PLUGINS_FOR_GEM = T.let(T.unsafe(nil), Hash) - -# source://spoom//lib/spoom/deadcode.rb#33 -class Spoom::Deadcode::ParserError < ::Spoom::Deadcode::Error; end - -# source://spoom//lib/spoom/deadcode/plugins/base.rb#8 -module Spoom::Deadcode::Plugins; end - -# source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#7 -class Spoom::Deadcode::Plugins::ActionMailer < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/action_mailer.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#7 -class Spoom::Deadcode::Plugins::ActionPack < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#31 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end - - # source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#36 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/actionpack.rb#10 -Spoom::Deadcode::Plugins::ActionPack::CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_job.rb#7 -class Spoom::Deadcode::Plugins::ActiveJob < ::Spoom::Deadcode::Plugins::Base; end - -# source://spoom//lib/spoom/deadcode/plugins/active_model.rb#7 -class Spoom::Deadcode::Plugins::ActiveModel < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/active_model.rb#14 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#7 -class Spoom::Deadcode::Plugins::ActiveRecord < ::Spoom::Deadcode::Plugins::Base - # source://spoom//lib/spoom/deadcode/plugins/active_record.rb#74 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end -end - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#64 -Spoom::Deadcode::Plugins::ActiveRecord::ARRAY_METHODS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#20 -Spoom::Deadcode::Plugins::ActiveRecord::CALLBACKS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_record.rb#49 -Spoom::Deadcode::Plugins::ActiveRecord::CRUD_METHODS = T.let(T.unsafe(nil), Array) - -# source://spoom//lib/spoom/deadcode/plugins/active_support.rb#7 -class Spoom::Deadcode::Plugins::ActiveSupport < ::Spoom::Deadcode::Plugins::Base; end - -# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. -# -# source://spoom//lib/spoom/deadcode/plugins/base.rb#9 -class Spoom::Deadcode::Plugins::Base - abstract! - - # Do not override this method, use `on_define_accessor` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#150 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_accessor(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#158 + sig { params(definition: ::Spoom::Model::Attr).void } + def internal_on_define_accessor(definition); end # Do not override this method, use `on_define_class` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#174 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_class(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#182 + sig { params(definition: ::Spoom::Model::Class).void } + def internal_on_define_class(definition); end # Do not override this method, use `on_define_constant` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#204 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_constant(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#212 + sig { params(definition: ::Spoom::Model::Constant).void } + def internal_on_define_constant(definition); end # Do not override this method, use `on_define_method` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_method(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#238 + sig { params(definition: ::Spoom::Model::Method).void } + def internal_on_define_method(definition); end # Do not override this method, use `on_define_module` instead. # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def internal_on_define_module(indexer, definition); end - - # Do not override this method, use `on_send` instead. - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def internal_on_send(indexer, send); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#264 + sig { params(definition: ::Spoom::Model::Module).void } + def internal_on_define_module(definition); end # Called when an accessor is defined. # @@ -1956,15 +1771,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_accessor(indexer, definition) - # definition.ignored! if definition.name == "foo" + # def on_define_accessor(definition) + # @index.ignore(definition) if symbol_def.name == "foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#144 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_accessor(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#152 + sig { params(definition: ::Spoom::Model::Attr).void } + def on_define_accessor(definition); end # Called when a class is defined. # @@ -1974,15 +1789,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_class(indexer, definition) - # definition.ignored! if definition.name == "Foo" + # def on_define_class(definition) + # @index.ignore(definition) if definition.name == "Foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#168 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#176 + sig { params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # Called when a constant is defined. # @@ -1992,15 +1807,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_constant(indexer, definition) - # definition.ignored! if definition.name == "FOO" + # def on_define_constant(definition) + # @index.ignore(definition) if definition.name == "FOO" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#198 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#206 + sig { params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end # Called when a method is defined. # @@ -2010,17 +1825,15 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_method(indexer, definition) - # super # So the `ignore_method_names` DSL is still applied - # - # definition.ignored! if definition.name == "foo" + # def on_define_method(definition) + # @index.ignore(definition) if definition.name == "foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#226 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#232 + sig { params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end # Called when a module is defined. # @@ -2030,76 +1843,80 @@ class Spoom::Deadcode::Plugins::Base # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_define_module(indexer, definition) - # definition.ignored! if definition.name == "Foo" + # def on_define_module(definition) + # @index.ignore(definition) if definition.name == "Foo" # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#252 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#258 + sig { params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end # Called when a send is being processed # # ~~~rb # class MyPlugin < Spoom::Deadcode::Plugins::Base - # def on_send(indexer, send) + # def on_send(send) # return unless send.name == "dsl_method" # return if send.args.empty? # - # method_name = indexer.node_string(send.args.first).delete_prefix(":") - # indexer.reference_method(method_name, send.node) + # method_name = send.args.first.slice.delete_prefix(":") + # @index.reference_method(method_name, send.node, send.loc) # end # end # ~~~ # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#278 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#284 + sig { params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end private # Plugin utils # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#339 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#352 sig { params(name: ::String).returns(::String) } def camelize(name); end - # DSL support - # - # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#301 sig { params(name: T.nilable(::String)).returns(T::Boolean) } def ignored_class_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#307 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#320 sig { params(name: ::String).returns(T::Boolean) } def ignored_constant_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#312 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#325 sig { params(name: ::String).returns(T::Boolean) } def ignored_method_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#317 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#330 sig { params(name: ::String).returns(T::Boolean) } def ignored_module_name?(name); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#322 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#335 sig { params(name: ::String, names_variable: ::Symbol, patterns_variable: ::Symbol).returns(T::Boolean) } def ignored_name?(name, names_variable, patterns_variable); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#300 - sig { params(superclass_name: T.nilable(::String)).returns(T::Boolean) } - def ignored_subclass?(superclass_name); end + # source://spoom//lib/spoom/deadcode/plugins/base.rb#308 + sig { params(definition: ::Spoom::Model::Class).returns(T::Boolean) } + def ignored_subclass?(definition); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#327 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#340 sig { params(const: ::Symbol).returns(T::Set[::String]) } def names(const); end - # source://spoom//lib/spoom/deadcode/plugins/base.rb#332 + # source://spoom//lib/spoom/deadcode/plugins/base.rb#345 sig { params(const: ::Symbol).returns(T::Array[::Regexp]) } def patterns(const); end + # DSL support + # + # source://spoom//lib/spoom/deadcode/plugins/base.rb#293 + sig { params(definition: ::Spoom::Model::Namespace, superclass_name: ::String).returns(T::Boolean) } + def subclass_of?(definition, superclass_name); end + class << self # Mark classes directly subclassing a class matching `names` as ignored. # @@ -2208,32 +2025,36 @@ end # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#7 class Spoom::Deadcode::Plugins::GraphQL < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/graphql.rb#28 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#7 class Spoom::Deadcode::Plugins::Minitest < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#22 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end + + # source://spoom//lib/spoom/deadcode/plugins/minitest.rb#28 + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end end # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#7 class Spoom::Deadcode::Plugins::Namespaces < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#16 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end private # source://spoom//lib/spoom/deadcode/plugins/namespaces.rb#23 - sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } - def used_as_namespace?(indexer); end + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def used_as_namespace?(symbol_def); end end # source://spoom//lib/spoom/deadcode/plugins/rspec.rb#7 @@ -2242,18 +2063,18 @@ class Spoom::Deadcode::Plugins::RSpec < ::Spoom::Deadcode::Plugins::Base; end # source://spoom//lib/spoom/deadcode/plugins/rails.rb#7 class Spoom::Deadcode::Plugins::Rails < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/rails.rb#13 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_class(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Class).void } + def on_define_class(definition); end # source://spoom//lib/spoom/deadcode/plugins/rails.rb#18 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_module(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Module).void } + def on_define_module(definition); end private # source://spoom//lib/spoom/deadcode/plugins/rails.rb#25 - sig { params(indexer: ::Spoom::Deadcode::Indexer).returns(T::Boolean) } - def file_is_helper?(indexer); end + sig { params(symbol_def: ::Spoom::Model::Namespace).returns(T::Boolean) } + def file_is_helper?(symbol_def); end end # source://spoom//lib/spoom/deadcode/plugins/rake.rb#7 @@ -2262,22 +2083,12 @@ class Spoom::Deadcode::Plugins::Rake < ::Spoom::Deadcode::Plugins::Base; end # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#7 class Spoom::Deadcode::Plugins::Rubocop < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#18 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end - - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#23 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end - - private + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#30 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def rubocop_constant?(indexer, definition); end - - # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#35 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def rubocop_method?(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#26 + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/plugins/rubocop.rb#10 @@ -2286,74 +2097,42 @@ Spoom::Deadcode::Plugins::Rubocop::RUBOCOP_CONSTANTS = T.let(T.unsafe(nil), Set) # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#7 class Spoom::Deadcode::Plugins::Ruby < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#24 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send).void } - def on_send(indexer, send); end + sig { override.params(send: ::Spoom::Deadcode::Send).void } + def on_send(send); end private - # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#50 - sig { params(indexer: ::Spoom::Deadcode::Indexer, send: ::Spoom::Deadcode::Send, node: ::SyntaxTree::Node).void } - def reference_symbol_as_constant(indexer, send, node); end + # source://spoom//lib/spoom/deadcode/plugins/ruby.rb#46 + sig { params(send: ::Spoom::Deadcode::Send, node: ::Prism::Node).void } + def reference_symbol_as_constant(send, node); end end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#7 class Spoom::Deadcode::Plugins::Sorbet < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#11 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_constant(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Constant).void } + def on_define_constant(definition); end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#16 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end private - # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#40 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def sorbet_enum_constant?(indexer, definition); end + # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#28 + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_enum_constant?(definition); end # source://spoom//lib/spoom/deadcode/plugins/sorbet.rb#23 - sig { params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).returns(T::Boolean) } - def sorbet_type_member?(indexer, definition); end + sig { params(definition: ::Spoom::Model::Constant).returns(T::Boolean) } + def sorbet_type_member?(definition); end end # source://spoom//lib/spoom/deadcode/plugins/thor.rb#7 class Spoom::Deadcode::Plugins::Thor < ::Spoom::Deadcode::Plugins::Base # source://spoom//lib/spoom/deadcode/plugins/thor.rb#13 - sig { override.params(indexer: ::Spoom::Deadcode::Indexer, definition: ::Spoom::Deadcode::Definition).void } - def on_define_method(indexer, definition); end -end - -# A reference is a call to a method or a constant -# -# source://spoom//lib/spoom/deadcode/reference.rb#7 -class Spoom::Deadcode::Reference < ::T::Struct - const :kind, ::Spoom::Deadcode::Reference::Kind - const :name, ::String - const :location, ::Spoom::Deadcode::Location - - # Kind - # - # source://spoom//lib/spoom/deadcode/reference.rb#24 - sig { returns(T::Boolean) } - def constant?; end - - # source://spoom//lib/spoom/deadcode/reference.rb#29 - sig { returns(T::Boolean) } - def method?; end - - class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 - def inherited(s); end - end -end - -# source://spoom//lib/spoom/deadcode/reference.rb#10 -class Spoom::Deadcode::Reference::Kind < ::T::Enum - enums do - Constant = new - Method = new - end + sig { override.params(definition: ::Spoom::Model::Method).void } + def on_define_method(definition); end end # source://spoom//lib/spoom/deadcode/remover.rb#6 @@ -2363,135 +2142,135 @@ class Spoom::Deadcode::Remover def initialize(context); end # source://spoom//lib/spoom/deadcode/remover.rb#17 - sig { params(kind: ::Spoom::Deadcode::Definition::Kind, location: ::Spoom::Deadcode::Location).void } + sig { params(kind: T.nilable(::Spoom::Deadcode::Definition::Kind), location: ::Spoom::Location).returns(::String) } def remove_location(kind, location); end end # source://spoom//lib/spoom/deadcode/remover.rb#9 class Spoom::Deadcode::Remover::Error < ::Spoom::Error; end -# source://spoom//lib/spoom/deadcode/remover.rb#348 +# source://spoom//lib/spoom/deadcode/remover.rb#372 class Spoom::Deadcode::Remover::NodeContext - # source://spoom//lib/spoom/deadcode/remover.rb#358 - sig { params(source: ::String, node: ::SyntaxTree::Node, nesting: T::Array[::SyntaxTree::Node]).void } - def initialize(source, node, nesting); end + # source://spoom//lib/spoom/deadcode/remover.rb#392 + sig do + params( + source: ::String, + comments: T::Hash[::Integer, ::Prism::Comment], + node: ::Prism::Node, + nesting: T::Array[::Prism::Node] + ).void + end + def initialize(source, comments, node, nesting); end - # source://spoom//lib/spoom/deadcode/remover.rb#467 - sig { returns(T::Array[::SyntaxTree::Node]) } - def attached_comments_and_sigs; end + # source://spoom//lib/spoom/deadcode/remover.rb#506 + sig { params(node: ::Prism::Node).returns(T::Array[::Prism::Comment]) } + def attached_comments(node); end - # source://spoom//lib/spoom/deadcode/remover.rb#480 - sig { returns(T.nilable(::SyntaxTree::MethodAddBlock)) } + # source://spoom//lib/spoom/deadcode/remover.rb#534 + sig { returns(T.nilable(::Prism::CallNode)) } def attached_sig; end - # source://spoom//lib/spoom/deadcode/remover.rb#460 - sig { params(comment: ::SyntaxTree::Node, node: ::SyntaxTree::Node).returns(T::Boolean) } - def comment_for_node?(comment, node); end + # source://spoom//lib/spoom/deadcode/remover.rb#521 + sig { returns(T::Array[::Prism::Node]) } + def attached_sigs; end + + # source://spoom//lib/spoom/deadcode/remover.rb#376 + sig { returns(T::Hash[::Integer, ::Prism::Comment]) } + def comments; end - # source://spoom//lib/spoom/deadcode/remover.rb#355 - sig { returns(T::Array[::SyntaxTree::Node]) } + # source://spoom//lib/spoom/deadcode/remover.rb#494 + sig { params(start_line: ::Integer, end_line: ::Integer).returns(T::Array[::Prism::Comment]) } + def comments_between_lines(start_line, end_line); end + + # source://spoom//lib/spoom/deadcode/remover.rb#382 + sig { returns(T::Array[::Prism::Node]) } def nesting; end - # @return [Array] + # @return [Array] # - # source://spoom//lib/spoom/deadcode/remover.rb#355 + # source://spoom//lib/spoom/deadcode/remover.rb#382 def nesting=(_arg0); end - # source://spoom//lib/spoom/deadcode/remover.rb#407 - sig { returns(T.nilable(::SyntaxTree::Node)) } + # source://spoom//lib/spoom/deadcode/remover.rb#444 + sig { returns(T.nilable(::Prism::Node)) } def next_node; end - # source://spoom//lib/spoom/deadcode/remover.rb#397 - sig { returns(T::Array[::SyntaxTree::Node]) } + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#433 + sig { returns(T::Array[::Prism::Node]) } def next_nodes; end - # source://spoom//lib/spoom/deadcode/remover.rb#352 - sig { returns(::SyntaxTree::Node) } + # source://spoom//lib/spoom/deadcode/remover.rb#379 + sig { returns(::Prism::Node) } def node; end - # source://spoom//lib/spoom/deadcode/remover.rb#495 - sig { params(node: T.any(::Symbol, ::SyntaxTree::Node)).returns(::String) } - def node_string(node); end - - # source://spoom//lib/spoom/deadcode/remover.rb#373 + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#408 sig { returns(::Spoom::Deadcode::Remover::NodeContext) } def parent_context; end - # source://spoom//lib/spoom/deadcode/remover.rb#365 - sig { returns(::SyntaxTree::Node) } + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#400 + sig { returns(::Prism::Node) } def parent_node; end - # source://spoom//lib/spoom/deadcode/remover.rb#392 - sig { returns(T.nilable(::SyntaxTree::Node)) } + # source://spoom//lib/spoom/deadcode/remover.rb#428 + sig { returns(T.nilable(::Prism::Node)) } def previous_node; end - # source://spoom//lib/spoom/deadcode/remover.rb#382 - sig { returns(T::Array[::SyntaxTree::Node]) } + # @raise [Error] + # + # source://spoom//lib/spoom/deadcode/remover.rb#417 + sig { returns(T::Array[::Prism::Node]) } def previous_nodes; end - # source://spoom//lib/spoom/deadcode/remover.rb#412 + # source://spoom//lib/spoom/deadcode/remover.rb#449 sig { returns(T.nilable(::Spoom::Deadcode::Remover::NodeContext)) } def sclass_context; end - # source://spoom//lib/spoom/deadcode/remover.rb#451 - sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) } + # source://spoom//lib/spoom/deadcode/remover.rb#482 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_extend_sig?(node); end - # source://spoom//lib/spoom/deadcode/remover.rb#438 - sig { params(node: T.nilable(::SyntaxTree::Node)).returns(T::Boolean) } + # source://spoom//lib/spoom/deadcode/remover.rb#477 + sig { params(node: T.nilable(::Prism::Node)).returns(T::Boolean) } def sorbet_signature?(node); end end -# source://spoom//lib/spoom/deadcode/remover.rb#505 -class Spoom::Deadcode::Remover::NodeFinder < ::SyntaxTree::Visitor - # source://spoom//lib/spoom/deadcode/remover.rb#554 - sig { params(location: ::Spoom::Deadcode::Location).void } - def initialize(location); end +# source://spoom//lib/spoom/deadcode/remover.rb#549 +class Spoom::Deadcode::Remover::NodeFinder < ::Spoom::Visitor + # source://spoom//lib/spoom/deadcode/remover.rb#621 + sig { params(location: ::Spoom::Location, kind: T.nilable(::Spoom::Deadcode::Definition::Kind)).void } + def initialize(location, kind); end - # source://spoom//lib/spoom/deadcode/remover.rb#548 - sig { returns(T.nilable(::SyntaxTree::Node)) } + # source://spoom//lib/spoom/deadcode/remover.rb#615 + sig { returns(T.nilable(::Prism::Node)) } def node; end - # source://spoom//lib/spoom/deadcode/remover.rb#551 - sig { returns(T::Array[::SyntaxTree::Node]) } + # source://spoom//lib/spoom/deadcode/remover.rb#618 + sig { returns(T::Array[::Prism::Node]) } def nodes_nesting; end - # @return [Array] - # - # source://spoom//lib/spoom/deadcode/remover.rb#551 - def nodes_nesting=(_arg0); end - - # source://spoom//lib/spoom/deadcode/remover.rb#562 - sig { override.params(node: T.nilable(::SyntaxTree::Node)).void } + # source://spoom//lib/spoom/deadcode/remover.rb#630 + sig { override.params(node: T.nilable(::Prism::Node)).void } def visit(node); end - private - - # TODO: remove once SyntaxTree location are fixed - # - # source://spoom//lib/spoom/deadcode/remover.rb#601 - sig { params(node: ::SyntaxTree::Node, nodes: T::Array[::SyntaxTree::Node]).returns(::Spoom::Deadcode::Location) } - def location_from_children(node, nodes); end - - # TODO: remove once SyntaxTree location are fixed - # - # source://spoom//lib/spoom/deadcode/remover.rb#586 - sig { params(node: ::SyntaxTree::Node).returns(::Spoom::Deadcode::Location) } - def location_from_node(node); end - class << self - # source://spoom//lib/spoom/deadcode/remover.rb#512 + # source://spoom//lib/spoom/deadcode/remover.rb#556 sig do params( source: ::String, - location: ::Spoom::Deadcode::Location, - kind: ::Spoom::Deadcode::Definition::Kind + location: ::Spoom::Location, + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) ).returns(::Spoom::Deadcode::Remover::NodeContext) end def find(source, location, kind); end - # source://spoom//lib/spoom/deadcode/remover.rb#531 - sig { params(node: ::SyntaxTree::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } + # source://spoom//lib/spoom/deadcode/remover.rb#590 + sig { params(node: ::Prism::Node, kind: ::Spoom::Deadcode::Definition::Kind).returns(T::Boolean) } def node_match_kind?(node, kind); end end end @@ -2502,8 +2281,8 @@ class Spoom::Deadcode::Remover::NodeRemover sig do params( source: ::String, - kind: ::Spoom::Deadcode::Definition::Kind, - location: ::Spoom::Deadcode::Location + kind: T.nilable(::Spoom::Deadcode::Definition::Kind), + location: ::Spoom::Location ).void end def initialize(source, kind, location); end @@ -2518,65 +2297,61 @@ class Spoom::Deadcode::Remover::NodeRemover private - # source://spoom//lib/spoom/deadcode/remover.rb#142 + # source://spoom//lib/spoom/deadcode/remover.rb#153 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_attr_accessor(context); end - # source://spoom//lib/spoom/deadcode/remover.rb#290 + # source://spoom//lib/spoom/deadcode/remover.rb#331 sig { params(start_char: ::Integer, end_char: ::Integer).void } def delete_chars(start_char, end_char); end - # source://spoom//lib/spoom/deadcode/remover.rb#69 + # source://spoom//lib/spoom/deadcode/remover.rb#73 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_constant_assignment(context); end - # source://spoom//lib/spoom/deadcode/remover.rb#300 - sig { params(line_number: ::Integer, start_column: ::Integer, end_column: ::Integer).void } - def delete_line_part(line_number, start_column, end_column); end - - # source://spoom//lib/spoom/deadcode/remover.rb#283 + # source://spoom//lib/spoom/deadcode/remover.rb#324 sig { params(start_line: ::Integer, end_line: ::Integer).void } def delete_lines(start_line, end_line); end - # source://spoom//lib/spoom/deadcode/remover.rb#250 + # source://spoom//lib/spoom/deadcode/remover.rb#261 sig { params(context: ::Spoom::Deadcode::Remover::NodeContext).void } def delete_node_and_comments_and_sigs(context); end - # source://spoom//lib/spoom/deadcode/remover.rb#207 + # source://spoom//lib/spoom/deadcode/remover.rb#218 sig do params( - node: ::SyntaxTree::Node, + node: ::Prism::Node, send_context: ::Spoom::Deadcode::Remover::NodeContext, was_removed: T::Boolean ).void end def insert_accessor(node, send_context, was_removed:); end - # source://spoom//lib/spoom/deadcode/remover.rb#295 + # source://spoom//lib/spoom/deadcode/remover.rb#336 sig { params(start_char: ::Integer, end_char: ::Integer, replacement: ::String).void } def replace_chars(start_char, end_char, replacement); end - # source://spoom//lib/spoom/deadcode/remover.rb#315 + # source://spoom//lib/spoom/deadcode/remover.rb#341 sig do params( - node: ::SyntaxTree::MethodAddBlock, + node: ::Prism::CallNode, name: ::String, - kind: ::Spoom::Deadcode::Definition::Kind + kind: T.nilable(::Spoom::Deadcode::Definition::Kind) ).returns(::String) end def transform_sig(node, name:, kind:); end end -# An abstraction to simplify handling of SyntaxTree::CallNode, SyntaxTree::Command, SyntaxTree::CommandCall and -# SyntaxTree::VCall nodes. +# An abstraction to simplify handling of Prism::CallNode nodes. # -# source://spoom//lib/spoom/deadcode/send.rb#8 +# source://spoom//lib/spoom/deadcode/send.rb#7 class Spoom::Deadcode::Send < ::T::Struct - const :node, ::SyntaxTree::Node + const :node, ::Prism::CallNode const :name, ::String - const :recv, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) - const :args, T::Array[::SyntaxTree::Node], default: T.unsafe(nil) - const :block, T.nilable(::SyntaxTree::Node), default: T.unsafe(nil) + const :recv, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :args, T::Array[::Prism::Node], default: T.unsafe(nil) + const :block, T.nilable(::Prism::Node), default: T.unsafe(nil) + const :location, ::Spoom::Location # source://spoom//lib/spoom/deadcode/send.rb#22 sig do @@ -2589,11 +2364,11 @@ class Spoom::Deadcode::Send < ::T::Struct def each_arg(arg_type, &block); end # source://spoom//lib/spoom/deadcode/send.rb#29 - sig { params(block: T.proc.params(key: ::SyntaxTree::Node, value: T.nilable(::SyntaxTree::Node)).void).void } + sig { params(block: T.proc.params(key: ::Prism::Node, value: T.nilable(::Prism::Node)).void).void } def each_arg_assoc(&block); end class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -2613,7 +2388,7 @@ class Spoom::ExecResult < ::T::Struct def to_s; end class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -2708,16 +2483,10 @@ class Spoom::FileTree # Return a map of typing scores for each node in the tree # - # source://spoom//lib/spoom/file_tree.rb#67 + # source://spoom//lib/spoom/file_tree.rb#59 sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } def nodes_strictness_scores(context); end - # Return a map of strictnesses for each node in the tree - # - # source://spoom//lib/spoom/file_tree.rb#59 - sig { params(context: ::Spoom::Context).returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } - def nodes_strictnesses(context); end - # All the paths in this tree # # source://spoom//lib/spoom/file_tree.rb#53 @@ -2726,18 +2495,14 @@ class Spoom::FileTree # Return a map of typing scores for each path in the tree # - # source://spoom//lib/spoom/file_tree.rb#75 + # source://spoom//lib/spoom/file_tree.rb#67 sig { params(context: ::Spoom::Context).returns(T::Hash[::String, ::Float]) } def paths_strictness_scores(context); end - # source://spoom//lib/spoom/file_tree.rb#80 + # source://spoom//lib/spoom/file_tree.rb#72 sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean).void } def print(out: T.unsafe(nil), colors: T.unsafe(nil)); end - # source://spoom//lib/spoom/file_tree.rb#86 - sig { params(context: ::Spoom::Context, out: T.any(::IO, ::StringIO), colors: T::Boolean).void } - def print_with_strictnesses(context, out: T.unsafe(nil), colors: T.unsafe(nil)); end - # All root nodes # # source://spoom//lib/spoom/file_tree.rb#39 @@ -2747,68 +2512,68 @@ end # A visitor that collects all the nodes in a tree # -# source://spoom//lib/spoom/file_tree.rb#140 +# source://spoom//lib/spoom/file_tree.rb#124 class Spoom::FileTree::CollectNodes < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#147 + # source://spoom//lib/spoom/file_tree.rb#131 sig { void } def initialize; end - # source://spoom//lib/spoom/file_tree.rb#144 + # source://spoom//lib/spoom/file_tree.rb#128 sig { returns(T::Array[::Spoom::FileTree::Node]) } def nodes; end - # source://spoom//lib/spoom/file_tree.rb#153 + # source://spoom//lib/spoom/file_tree.rb#137 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end end # A visitor that collects the typing score of each node in a tree # -# source://spoom//lib/spoom/file_tree.rb#183 +# source://spoom//lib/spoom/file_tree.rb#167 class Spoom::FileTree::CollectScores < ::Spoom::FileTree::CollectStrictnesses - # source://spoom//lib/spoom/file_tree.rb#190 + # source://spoom//lib/spoom/file_tree.rb#174 sig { params(context: ::Spoom::Context).void } def initialize(context); end - # source://spoom//lib/spoom/file_tree.rb#187 + # source://spoom//lib/spoom/file_tree.rb#171 sig { returns(T::Hash[::Spoom::FileTree::Node, ::Float]) } def scores; end - # source://spoom//lib/spoom/file_tree.rb#197 + # source://spoom//lib/spoom/file_tree.rb#181 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end private - # source://spoom//lib/spoom/file_tree.rb#206 + # source://spoom//lib/spoom/file_tree.rb#190 sig { params(node: ::Spoom::FileTree::Node).returns(::Float) } def node_score(node); end - # source://spoom//lib/spoom/file_tree.rb#215 + # source://spoom//lib/spoom/file_tree.rb#199 sig { params(strictness: T.nilable(::String)).returns(::Float) } def strictness_score(strictness); end end # A visitor that collects the strictness of each node in a tree # -# source://spoom//lib/spoom/file_tree.rb#160 +# source://spoom//lib/spoom/file_tree.rb#144 class Spoom::FileTree::CollectStrictnesses < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#167 + # source://spoom//lib/spoom/file_tree.rb#151 sig { params(context: ::Spoom::Context).void } def initialize(context); end - # source://spoom//lib/spoom/file_tree.rb#164 + # source://spoom//lib/spoom/file_tree.rb#148 sig { returns(T::Hash[::Spoom::FileTree::Node, T.nilable(::String)]) } def strictnesses; end - # source://spoom//lib/spoom/file_tree.rb#174 + # source://spoom//lib/spoom/file_tree.rb#158 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end end # A node representing either a file or a directory inside a FileTree # -# source://spoom//lib/spoom/file_tree.rb#94 +# source://spoom//lib/spoom/file_tree.rb#78 class Spoom::FileTree::Node < ::T::Struct const :parent, T.nilable(::Spoom::FileTree::Node) const :name, ::String @@ -2816,12 +2581,12 @@ class Spoom::FileTree::Node < ::T::Struct # Full path to this node from root # - # source://spoom//lib/spoom/file_tree.rb#108 + # source://spoom//lib/spoom/file_tree.rb#92 sig { returns(::String) } def path; end class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -2830,9 +2595,9 @@ end # # See `FileTree#print` # -# source://spoom//lib/spoom/file_tree.rb#228 +# source://spoom//lib/spoom/file_tree.rb#212 class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor - # source://spoom//lib/spoom/file_tree.rb#238 + # source://spoom//lib/spoom/file_tree.rb#222 sig do params( strictnesses: T::Hash[::Spoom::FileTree::Node, T.nilable(::String)], @@ -2842,13 +2607,13 @@ class Spoom::FileTree::Printer < ::Spoom::FileTree::Visitor end def initialize(strictnesses, out: T.unsafe(nil), colors: T.unsafe(nil)); end - # source://spoom//lib/spoom/file_tree.rb#246 + # source://spoom//lib/spoom/file_tree.rb#230 sig { override.params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end private - # source://spoom//lib/spoom/file_tree.rb#271 + # source://spoom//lib/spoom/file_tree.rb#255 sig { params(strictness: T.nilable(::String)).returns(::Spoom::Color) } def strictness_color(strictness); end end @@ -2857,19 +2622,19 @@ end # # @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. # -# source://spoom//lib/spoom/file_tree.rb#117 +# source://spoom//lib/spoom/file_tree.rb#101 class Spoom::FileTree::Visitor abstract! - # source://spoom//lib/spoom/file_tree.rb#129 + # source://spoom//lib/spoom/file_tree.rb#113 sig { params(node: ::Spoom::FileTree::Node).void } def visit_node(node); end - # source://spoom//lib/spoom/file_tree.rb#134 + # source://spoom//lib/spoom/file_tree.rb#118 sig { params(nodes: T::Array[::Spoom::FileTree::Node]).void } def visit_nodes(nodes); end - # source://spoom//lib/spoom/file_tree.rb#124 + # source://spoom//lib/spoom/file_tree.rb#108 sig { params(tree: ::Spoom::FileTree).void } def visit_tree(tree); end end @@ -2887,10 +2652,10 @@ class Spoom::Git::Commit < ::T::Struct def timestamp; end class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end - # Parse a line formated as `%h %at` into a `Commit` + # Parse a line formatted as `%h %at` into a `Commit` # # source://spoom//lib/spoom/context/git.rb#14 sig { params(string: ::String).returns(T.nilable(::Spoom::Git::Commit)) } @@ -2984,7 +2749,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct const :range, ::Spoom::LSP::Range const :code, ::Integer const :message, ::String - const :informations, ::Object + const :information, ::Object # source://spoom//lib/spoom/sorbet/lsp/structures.rb#202 sig { override.params(printer: ::Spoom::LSP::SymbolPrinter).void } @@ -2999,7 +2764,7 @@ class Spoom::LSP::Diagnostic < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Diagnostic) } def from_json(json); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -3032,7 +2797,7 @@ class Spoom::LSP::DocumentSymbol < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::DocumentSymbol) } def from_json(json); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -3041,7 +2806,7 @@ end Spoom::LSP::DocumentSymbol::SYMBOL_KINDS = T.let(T.unsafe(nil), Hash) # source://spoom//lib/spoom/sorbet/lsp/errors.rb#6 -class Spoom::LSP::Error < ::StandardError; end +class Spoom::LSP::Error < ::Spoom::Error; end # source://spoom//lib/spoom/sorbet/lsp/errors.rb#7 class Spoom::LSP::Error::AlreadyOpen < ::Spoom::LSP::Error; end @@ -3090,7 +2855,7 @@ class Spoom::LSP::Hover < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Hover) } def from_json(json); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -3115,7 +2880,7 @@ class Spoom::LSP::Location < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Location) } def from_json(json); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -3178,7 +2943,7 @@ class Spoom::LSP::Position < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Position) } def from_json(json); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -3216,7 +2981,7 @@ class Spoom::LSP::Range < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::Range) } def from_json(json); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -3282,7 +3047,7 @@ class Spoom::LSP::SignatureHelp < ::T::Struct sig { params(json: T::Hash[T.untyped, T.untyped]).returns(::Spoom::LSP::SignatureHelp) } def from_json(json); end - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -3330,49 +3095,831 @@ class Spoom::LSP::SymbolPrinter < ::Spoom::Printer def seen; end end -# source://spoom//lib/spoom/printer.rb#7 -class Spoom::Printer - include ::Spoom::Colorize - - # source://spoom//lib/spoom/printer.rb#17 - sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } - def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end +# source://spoom//lib/spoom/location.rb#5 +class Spoom::Location + include ::Comparable - # Colorize `string` with color if `@colors` + # @raise [LocationError] # - # source://spoom//lib/spoom/printer.rb#78 - sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } - def colorize(string, *color); end + # source://spoom//lib/spoom/location.rb#73 + sig do + params( + file: ::String, + start_line: T.nilable(::Integer), + start_column: T.nilable(::Integer), + end_line: T.nilable(::Integer), + end_column: T.nilable(::Integer) + ).void + end + def initialize(file, start_line: T.unsafe(nil), start_column: T.unsafe(nil), end_line: T.unsafe(nil), end_column: T.unsafe(nil)); end - # Decrease indent level + # source://spoom//lib/spoom/location.rb#106 + sig { override.params(other: ::BasicObject).returns(T.nilable(::Integer)) } + def <=>(other); end + + # @return [Integer, nil] # - # source://spoom//lib/spoom/printer.rb#31 - sig { void } - def dedent; end + # source://spoom//lib/spoom/location.rb#62 + def end_column; end - # Increase indent level + # @return [Integer, nil] # - # source://spoom//lib/spoom/printer.rb#25 - sig { void } - def indent; end + # source://spoom//lib/spoom/location.rb#62 + def end_line; end - # source://spoom//lib/spoom/printer.rb#14 - sig { returns(T.any(::IO, ::StringIO)) } - def out; end + # source://spoom//lib/spoom/location.rb#59 + sig { returns(::String) } + def file; end - # @return [IO, StringIO] - # - # source://spoom//lib/spoom/printer.rb#14 - def out=(_arg0); end + # source://spoom//lib/spoom/location.rb#93 + sig { params(other: ::Spoom::Location).returns(T::Boolean) } + def include?(other); end - # Print `string` into `out` + # @return [Integer, nil] # - # source://spoom//lib/spoom/printer.rb#37 - sig { params(string: T.nilable(::String)).void } - def print(string); end + # source://spoom//lib/spoom/location.rb#62 + def start_column; end - # Print `string` colored with `color` into `out` - # + # source://spoom//lib/spoom/location.rb#62 + sig { returns(T.nilable(::Integer)) } + def start_line; end + + # source://spoom//lib/spoom/location.rb#129 + sig { returns(::String) } + def to_s; end + + class << self + # source://spoom//lib/spoom/location.rb#47 + sig { params(file: ::String, location: ::Prism::Location).returns(::Spoom::Location) } + def from_prism(file, location); end + + # @raise [LocationError] + # + # source://spoom//lib/spoom/location.rb#16 + sig { params(location_string: ::String).returns(::Spoom::Location) } + def from_string(location_string); end + end +end + +# source://spoom//lib/spoom/location.rb#10 +class Spoom::Location::LocationError < ::Spoom::Error; end + +# source://spoom//lib/spoom/model/model.rb#5 +class Spoom::Model + # source://spoom//lib/spoom/model/model.rb#238 + sig { void } + def initialize; end + + # Get a symbol by it's full name + # + # Raises an error if the symbol is not found + # + # @raise [Error] + # + # source://spoom//lib/spoom/model/model.rb#247 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def [](full_name); end + + # source://spoom//lib/spoom/model/model.rb#296 + sig { void } + def finalize!; end + + # Register a new symbol by it's full name + # + # If the symbol already exists, it will be returned. + # + # source://spoom//lib/spoom/model/model.rb#258 + sig { params(full_name: ::String).returns(::Spoom::Model::Symbol) } + def register_symbol(full_name); end + + # source://spoom//lib/spoom/model/model.rb#263 + sig { params(full_name: ::String, context: ::Spoom::Model::Symbol).returns(::Spoom::Model::Symbol) } + def resolve_symbol(full_name, context:); end + + # source://spoom//lib/spoom/model/model.rb#290 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def subtypes(symbol); end + + # source://spoom//lib/spoom/model/model.rb#284 + sig { params(symbol: ::Spoom::Model::Symbol).returns(T::Array[::Spoom::Model::Symbol]) } + def supertypes(symbol); end + + # All the symbols registered in this model + # + # source://spoom//lib/spoom/model/model.rb#232 + sig { returns(T::Hash[::String, ::Spoom::Model::Symbol]) } + def symbols; end + + # source://spoom//lib/spoom/model/model.rb#235 + sig { returns(Spoom::Poset[::Spoom::Model::Symbol]) } + def symbols_hierarchy; end + + private + + # source://spoom//lib/spoom/model/model.rb#303 + sig { void } + def compute_symbols_hierarchy!; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#179 +class Spoom::Model::Attr < ::Spoom::Model::Property + abstract! +end + +# source://spoom//lib/spoom/model/model.rb#185 +class Spoom::Model::AttrAccessor < ::Spoom::Model::Attr; end + +# source://spoom//lib/spoom/model/model.rb#183 +class Spoom::Model::AttrReader < ::Spoom::Model::Attr; end + +# source://spoom//lib/spoom/model/model.rb#184 +class Spoom::Model::AttrWriter < ::Spoom::Model::Attr; end + +# Populate a Model by visiting the nodes from a Ruby file +# +# source://spoom//lib/spoom/model/builder.rb#7 +class Spoom::Model::Builder < ::Spoom::Model::NamespaceVisitor + # source://spoom//lib/spoom/model/builder.rb#11 + sig { params(model: ::Spoom::Model, file: ::String).void } + def initialize(model, file); end + + # Accessors + # + # source://spoom//lib/spoom/model/builder.rb#146 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # Classes + # + # source://spoom//lib/spoom/model/builder.rb#24 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # Constants + # + # source://spoom//lib/spoom/model/builder.rb#71 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/model/builder.rb#92 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # Methods + # + # source://spoom//lib/spoom/model/builder.rb#127 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # Modules + # + # source://spoom//lib/spoom/model/builder.rb#55 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/model/builder.rb#106 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/model/builder.rb#39 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + private + + # source://spoom//lib/spoom/model/builder.rb#234 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def collect_sigs; end + + # source://spoom//lib/spoom/model/builder.rb#229 + sig { returns(::Spoom::Model::Visibility) } + def current_visibility; end + + # source://spoom//lib/spoom/model/builder.rb#241 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end +end + +# source://spoom//lib/spoom/model/model.rb#117 +class Spoom::Model::Class < ::Spoom::Model::Namespace + # source://spoom//lib/spoom/model/model.rb#129 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + superclass_name: T.nilable(::String) + ).void + end + def initialize(symbol, owner:, location:, superclass_name: T.unsafe(nil)); end + + # source://spoom//lib/spoom/model/model.rb#119 + sig { returns(T.nilable(::String)) } + def superclass_name; end + + # @return [String, nil] + # + # source://spoom//lib/spoom/model/model.rb#119 + def superclass_name=(_arg0); end +end + +# source://spoom//lib/spoom/model/model.rb#138 +class Spoom::Model::Constant < ::Spoom::Model::SymbolDef + # source://spoom//lib/spoom/model/model.rb#143 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + value: ::String + ).void + end + def initialize(symbol, owner:, location:, value:); end + + # source://spoom//lib/spoom/model/model.rb#140 + sig { returns(::String) } + def value; end +end + +# source://spoom//lib/spoom/model/model.rb#8 +class Spoom::Model::Error < ::Spoom::Error; end + +# source://spoom//lib/spoom/model/model.rb#213 +class Spoom::Model::Extend < ::Spoom::Model::Mixin; end + +# source://spoom//lib/spoom/model/model.rb#211 +class Spoom::Model::Include < ::Spoom::Model::Mixin; end + +# source://spoom//lib/spoom/model/model.rb#177 +class Spoom::Model::Method < ::Spoom::Model::Property; end + +# A mixin (include, prepend, extend) to a namespace +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#196 +class Spoom::Model::Mixin + abstract! + + # source://spoom//lib/spoom/model/model.rb#206 + sig { params(name: ::String).void } + def initialize(name); end + + # source://spoom//lib/spoom/model/model.rb#203 + sig { returns(::String) } + def name; end +end + +# source://spoom//lib/spoom/model/model.rb#136 +class Spoom::Model::Module < ::Spoom::Model::Namespace; end + +# A class or module +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#97 +class Spoom::Model::Namespace < ::Spoom::Model::SymbolDef + abstract! + + # source://spoom//lib/spoom/model/model.rb#107 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location + ).void + end + def initialize(symbol, owner:, location:); end + + # source://spoom//lib/spoom/model/model.rb#101 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def children; end + + # source://spoom//lib/spoom/model/model.rb#104 + sig { returns(T::Array[::Spoom::Model::Mixin]) } + def mixins; end +end + +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/namespace_visitor.rb#6 +class Spoom::Model::NamespaceVisitor < ::Spoom::Visitor + abstract! + + # source://spoom//lib/spoom/model/namespace_visitor.rb#12 + sig { void } + def initialize; end + + # source://spoom//lib/spoom/model/namespace_visitor.rb#19 + sig { override.params(node: T.nilable(::Prism::Node)).void } + def visit(node); end +end + +# source://spoom//lib/spoom/model/model.rb#212 +class Spoom::Model::Prepend < ::Spoom::Model::Mixin; end + +# A method or an attribute accessor +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#151 +class Spoom::Model::Property < ::Spoom::Model::SymbolDef + abstract! + + # source://spoom//lib/spoom/model/model.rb#169 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location, + visibility: ::Spoom::Model::Visibility, + sigs: T::Array[::Spoom::Model::Sig] + ).void + end + def initialize(symbol, owner:, location:, visibility:, sigs: T.unsafe(nil)); end + + # source://spoom//lib/spoom/model/model.rb#158 + sig { returns(T::Array[::Spoom::Model::Sig]) } + def sigs; end + + # source://spoom//lib/spoom/model/model.rb#155 + sig { returns(::Spoom::Model::Visibility) } + def visibility; end +end + +# A reference to something that looks like a constant or a method +# +# Constants could be classes, modules, or actual constants. +# Methods could be accessors, instance or class methods, aliases, etc. +# +# source://spoom//lib/spoom/model/reference.rb#10 +class Spoom::Model::Reference < ::T::Struct + const :kind, ::Spoom::Model::Reference::Kind + const :name, ::String + const :location, ::Spoom::Location + + # source://spoom//lib/spoom/model/reference.rb#39 + sig { returns(T::Boolean) } + def constant?; end + + # source://spoom//lib/spoom/model/reference.rb#44 + sig { returns(T::Boolean) } + def method?; end + + class << self + # source://spoom//lib/spoom/model/reference.rb#24 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def constant(name, location); end + + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 + def inherited(s); end + + # source://spoom//lib/spoom/model/reference.rb#29 + sig { params(name: ::String, location: ::Spoom::Location).returns(::Spoom::Model::Reference) } + def method(name, location); end + end +end + +# source://spoom//lib/spoom/model/reference.rb#13 +class Spoom::Model::Reference::Kind < ::T::Enum + enums do + Constant = new + Method = new + end +end + +# Visit a file to collect all the references to constants and methods +# +# source://spoom//lib/spoom/model/references_visitor.rb#7 +class Spoom::Model::ReferencesVisitor < ::Spoom::Visitor + # source://spoom//lib/spoom/model/references_visitor.rb#14 + sig { params(file: ::String).void } + def initialize(file); end + + # source://spoom//lib/spoom/model/references_visitor.rb#11 + sig { returns(T::Array[::Spoom::Model::Reference]) } + def references; end + + # source://spoom//lib/spoom/model/references_visitor.rb#22 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#27 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#33 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#44 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#68 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#52 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#60 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#85 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#91 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#97 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#103 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#109 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#115 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#121 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#126 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#131 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#139 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#147 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#155 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#161 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#166 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#177 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + private + + # source://spoom//lib/spoom/model/references_visitor.rb#195 + sig { params(node: ::Prism::Node).returns(::Spoom::Location) } + def node_location(node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#185 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_constant(name, node); end + + # source://spoom//lib/spoom/model/references_visitor.rb#190 + sig { params(name: ::String, node: ::Prism::Node).void } + def reference_method(name, node); end +end + +# A Sorbet signature (sig block) +# +# source://spoom//lib/spoom/model/model.rb#216 +class Spoom::Model::Sig + # source://spoom//lib/spoom/model/model.rb#223 + sig { params(string: ::String).void } + def initialize(string); end + + # source://spoom//lib/spoom/model/model.rb#220 + sig { returns(::String) } + def string; end +end + +# source://spoom//lib/spoom/model/model.rb#115 +class Spoom::Model::SingletonClass < ::Spoom::Model::Namespace; end + +# A Symbol is a uniquely named entity in the Ruby codebase +# +# A symbol can have multiple definitions, e.g. a class can be reopened. +# Sometimes a symbol can have multiple definitions of different types, +# e.g. `foo` method can be defined both as a method and as an attribute accessor. +# +# source://spoom//lib/spoom/model/model.rb#15 +class Spoom::Model::Symbol + # source://spoom//lib/spoom/model/model.rb#27 + sig { params(full_name: ::String).void } + def initialize(full_name); end + + # The definitions of this symbol (where it exists in the code) + # + # source://spoom//lib/spoom/model/model.rb#24 + sig { returns(T::Array[::Spoom::Model::SymbolDef]) } + def definitions; end + + # The full, unique name of this symbol + # + # source://spoom//lib/spoom/model/model.rb#20 + sig { returns(::String) } + def full_name; end + + # The short name of this symbol + # + # source://spoom//lib/spoom/model/model.rb#34 + sig { returns(::String) } + def name; end + + # source://spoom//lib/spoom/model/model.rb#39 + sig { returns(::String) } + def to_s; end +end + +# A SymbolDef is a definition of a Symbol +# +# It can be a class, module, constant, method, etc. +# A SymbolDef has a location pointing to the actual code that defines the symbol. +# +# @abstract It cannot be directly instantiated. Subclasses must implement the `abstract` methods below. +# +# source://spoom//lib/spoom/model/model.rb#55 +class Spoom::Model::SymbolDef + abstract! + + # source://spoom//lib/spoom/model/model.rb#74 + sig do + params( + symbol: ::Spoom::Model::Symbol, + owner: T.nilable(::Spoom::Model::Namespace), + location: ::Spoom::Location + ).void + end + def initialize(symbol, owner:, location:); end + + # The full name of the symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#85 + sig { returns(::String) } + def full_name; end + + # The actual code location of this definition + # + # source://spoom//lib/spoom/model/model.rb#71 + sig { returns(::Spoom::Location) } + def location; end + + # The short name of the symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#91 + sig { returns(::String) } + def name; end + + # The enclosing namespace this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#67 + sig { returns(T.nilable(::Spoom::Model::Namespace)) } + def owner; end + + # The symbol this definition belongs to + # + # source://spoom//lib/spoom/model/model.rb#63 + sig { returns(::Spoom::Model::Symbol) } + def symbol; end +end + +# source://spoom//lib/spoom/model/model.rb#44 +class Spoom::Model::UnresolvedSymbol < ::Spoom::Model::Symbol + # source://spoom//lib/spoom/model/model.rb#46 + sig { override.returns(::String) } + def to_s; end +end + +# source://spoom//lib/spoom/model/model.rb#187 +class Spoom::Model::Visibility < ::T::Enum + enums do + Private = new + Protected = new + Public = new + end +end + +# source://spoom//lib/spoom/parse.rb#7 +class Spoom::ParseError < ::Spoom::Error; end + +# A Poset is a set of elements with a partial order relation. +# +# The partial order relation is a binary relation that is reflexive, antisymmetric, and transitive. +# It can be used to represent a hierarchy of classes or modules, the dependencies between gems, etc. +# +# source://spoom//lib/spoom/poset.rb#9 +class Spoom::Poset + extend T::Generic + + E = type_member { { upper: Object } } + + # source://spoom//lib/spoom/poset.rb#18 + sig { void } + def initialize; end + + # Get the POSet element for a given value + # + # Raises if the element is not found + # + # @raise [Error] + # + # source://spoom//lib/spoom/poset.rb#26 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def [](value); end + + # Add a direct edge from one element to another + # + # Transitive edges (transitive closure) are automatically computed. + # Adds the elements if they don't exist. + # If the direct edge already exists, nothing is done. + # + # source://spoom//lib/spoom/poset.rb#54 + sig { params(from: E, to: E).void } + def add_direct_edge(from, to); end + + # Add an element to the POSet + # + # source://spoom//lib/spoom/poset.rb#35 + sig { params(value: E).returns(Spoom::Poset::Element[E]) } + def add_element(value); end + + # Is there a direct edge from `from` to `to`? + # + # source://spoom//lib/spoom/poset.rb#101 + sig { params(from: E, to: E).returns(T::Boolean) } + def direct_edge?(from, to); end + + # Is there an edge (direct or indirect) from `from` to `to`? + # + # source://spoom//lib/spoom/poset.rb#92 + sig { params(from: E, to: E).returns(T::Boolean) } + def edge?(from, to); end + + # Is the given value a element in the POSet? + # + # source://spoom//lib/spoom/poset.rb#44 + sig { params(value: E).returns(T::Boolean) } + def element?(value); end + + # Show the POSet as a DOT graph using xdot (used for debugging) + # + # source://spoom//lib/spoom/poset.rb#107 + sig { params(direct: T::Boolean, transitive: T::Boolean).void } + def show_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end + + # Return the POSet as a DOT graph + # + # source://spoom//lib/spoom/poset.rb#116 + sig { params(direct: T::Boolean, transitive: T::Boolean).returns(::String) } + def to_dot(direct: T.unsafe(nil), transitive: T.unsafe(nil)); end +end + +# An element in a POSet +# +# source://spoom//lib/spoom/poset.rb#136 +class Spoom::Poset::Element + extend T::Generic + include ::Comparable + + E = type_member { { upper: Object } } + + # source://spoom//lib/spoom/poset.rb#152 + sig { params(value: E).void } + def initialize(value); end + + # source://spoom//lib/spoom/poset.rb#161 + sig { params(other: T.untyped).returns(T.nilable(::Integer)) } + def <=>(other); end + + # Direct and indirect ancestors of this element + # + # source://spoom//lib/spoom/poset.rb#180 + sig { returns(T::Array[E]) } + def ancestors; end + + # Direct children of this element + # + # source://spoom//lib/spoom/poset.rb#186 + sig { returns(T::Array[E]) } + def children; end + + # Direct and indirect descendants of this element + # + # source://spoom//lib/spoom/poset.rb#192 + sig { returns(T::Array[E]) } + def descendants; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set] + # + # source://spoom//lib/spoom/poset.rb#149 + def dfroms; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # source://spoom//lib/spoom/poset.rb#149 + sig { returns(T::Set[Spoom::Poset::Element[E]]) } + def dtos; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set] + # + # source://spoom//lib/spoom/poset.rb#149 + def froms; end + + # Direct parents of this element + # + # source://spoom//lib/spoom/poset.rb#174 + sig { returns(T::Array[E]) } + def parents; end + + # Edges (direct and indirect) from this element to other elements in the same POSet + # + # @return [Set] + # + # source://spoom//lib/spoom/poset.rb#149 + def tos; end + + # The value held by this element + # + # source://spoom//lib/spoom/poset.rb#145 + sig { returns(E) } + def value; end +end + +# source://spoom//lib/spoom/poset.rb#13 +class Spoom::Poset::Error < ::Spoom::Error; end + +# source://spoom//lib/spoom/printer.rb#7 +class Spoom::Printer + include ::Spoom::Colorize + + # source://spoom//lib/spoom/printer.rb#17 + sig { params(out: T.any(::IO, ::StringIO), colors: T::Boolean, indent_level: ::Integer).void } + def initialize(out: T.unsafe(nil), colors: T.unsafe(nil), indent_level: T.unsafe(nil)); end + + # Colorize `string` with color if `@colors` + # + # source://spoom//lib/spoom/printer.rb#78 + sig { params(string: ::String, color: ::Spoom::Color).returns(::String) } + def colorize(string, *color); end + + # Decrease indent level + # + # source://spoom//lib/spoom/printer.rb#31 + sig { void } + def dedent; end + + # Increase indent level + # + # source://spoom//lib/spoom/printer.rb#25 + sig { void } + def indent; end + + # source://spoom//lib/spoom/printer.rb#14 + sig { returns(T.any(::IO, ::StringIO)) } + def out; end + + # @return [IO, StringIO] + # + # source://spoom//lib/spoom/printer.rb#14 + def out=(_arg0); end + + # Print `string` into `out` + # + # source://spoom//lib/spoom/printer.rb#37 + sig { params(string: T.nilable(::String)).void } + def print(string); end + + # Print `string` colored with `color` into `out` + # # Does not use colors unless `@colors`. # # source://spoom//lib/spoom/printer.rb#47 @@ -3517,7 +4064,7 @@ end Spoom::Sorbet::Config::DEFAULT_ALLOWED_EXTENSIONS = T.let(T.unsafe(nil), Array) # source://spoom//lib/spoom/sorbet.rb#14 -class Spoom::Sorbet::Error < ::StandardError +class Spoom::Sorbet::Error < ::Spoom::Error # source://spoom//lib/spoom/sorbet.rb#29 sig { params(message: ::String, result: ::Spoom::ExecResult).void } def initialize(message, result); end @@ -3545,11 +4092,11 @@ end # source://spoom//lib/spoom/sorbet/errors.rb#7 Spoom::Sorbet::Errors::DEFAULT_ERROR_URL_BASE = T.let(T.unsafe(nil), String) -# source://spoom//lib/spoom/sorbet/errors.rb#125 +# source://spoom//lib/spoom/sorbet/errors.rb#127 class Spoom::Sorbet::Errors::Error include ::Comparable - # source://spoom//lib/spoom/sorbet/errors.rb#151 + # source://spoom//lib/spoom/sorbet/errors.rb#153 sig do params( file: T.nilable(::String), @@ -3563,39 +4110,39 @@ class Spoom::Sorbet::Errors::Error # By default errors are sorted by location # - # source://spoom//lib/spoom/sorbet/errors.rb#162 + # source://spoom//lib/spoom/sorbet/errors.rb#164 sig { params(other: T.untyped).returns(::Integer) } def <=>(other); end # @return [Integer, nil] # - # source://spoom//lib/spoom/sorbet/errors.rb#133 + # source://spoom//lib/spoom/sorbet/errors.rb#135 def code; end - # source://spoom//lib/spoom/sorbet/errors.rb#130 + # source://spoom//lib/spoom/sorbet/errors.rb#132 sig { returns(T.nilable(::String)) } def file; end # Other files associated with the error # - # source://spoom//lib/spoom/sorbet/errors.rb#140 + # source://spoom//lib/spoom/sorbet/errors.rb#142 sig { returns(T::Set[::String]) } def files_from_error_sections; end - # source://spoom//lib/spoom/sorbet/errors.rb#133 + # source://spoom//lib/spoom/sorbet/errors.rb#135 sig { returns(T.nilable(::Integer)) } def line; end # @return [String, nil] # - # source://spoom//lib/spoom/sorbet/errors.rb#130 + # source://spoom//lib/spoom/sorbet/errors.rb#132 def message; end - # source://spoom//lib/spoom/sorbet/errors.rb#136 + # source://spoom//lib/spoom/sorbet/errors.rb#138 sig { returns(T::Array[::String]) } def more; end - # source://spoom//lib/spoom/sorbet/errors.rb#169 + # source://spoom//lib/spoom/sorbet/errors.rb#171 sig { returns(::String) } def to_s; end end @@ -3604,46 +4151,55 @@ end # # source://spoom//lib/spoom/sorbet/errors.rb#18 class Spoom::Sorbet::Errors::Parser - # source://spoom//lib/spoom/sorbet/errors.rb#43 + # source://spoom//lib/spoom/sorbet/errors.rb#45 sig { params(error_url_base: ::String).void } def initialize(error_url_base: T.unsafe(nil)); end - # source://spoom//lib/spoom/sorbet/errors.rb#50 + # source://spoom//lib/spoom/sorbet/errors.rb#52 sig { params(output: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def parse(output); end private - # source://spoom//lib/spoom/sorbet/errors.rb#114 + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#116 sig { params(line: ::String).void } def append_error(line); end - # source://spoom//lib/spoom/sorbet/errors.rb#106 + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#108 sig { void } def close_error; end - # source://spoom//lib/spoom/sorbet/errors.rb#73 + # source://spoom//lib/spoom/sorbet/errors.rb#75 sig { params(error_url_base: ::String).returns(::Regexp) } def error_line_match_regexp(error_url_base); end - # source://spoom//lib/spoom/sorbet/errors.rb#90 + # source://spoom//lib/spoom/sorbet/errors.rb#92 sig { params(line: ::String).returns(T.nilable(::Spoom::Sorbet::Errors::Error)) } def match_error_line(line); end - # source://spoom//lib/spoom/sorbet/errors.rb#99 + # @raise [ParseError] + # + # source://spoom//lib/spoom/sorbet/errors.rb#101 sig { params(error: ::Spoom::Sorbet::Errors::Error).void } def open_error(error); end class << self - # source://spoom//lib/spoom/sorbet/errors.rb#36 + # source://spoom//lib/spoom/sorbet/errors.rb#38 sig { params(output: ::String, error_url_base: ::String).returns(T::Array[::Spoom::Sorbet::Errors::Error]) } def parse_string(output, error_url_base: T.unsafe(nil)); end end end -# source://spoom//lib/spoom/sorbet/errors.rb#21 +# source://spoom//lib/spoom/sorbet/errors.rb#23 Spoom::Sorbet::Errors::Parser::HEADER = T.let(T.unsafe(nil), Array) +# source://spoom//lib/spoom/sorbet/errors.rb#21 +class Spoom::Sorbet::Errors::Parser::ParseError < ::Spoom::Error; end + # source://spoom//lib/spoom/sorbet.rb#37 Spoom::Sorbet::GEM_PATH = T.let(T.unsafe(nil), String) @@ -3775,3 +4331,602 @@ end # source://spoom//lib/spoom/version.rb#5 Spoom::VERSION = T.let(T.unsafe(nil), String) + +# source://spoom//lib/spoom/visitor.rb#7 +class Spoom::Visitor < ::Prism::Visitor + # source://spoom//lib/spoom/visitor.rb#16 + sig { override.params(node: ::Prism::AliasGlobalVariableNode).void } + def visit_alias_global_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#21 + sig { override.params(node: ::Prism::AliasMethodNode).void } + def visit_alias_method_node(node); end + + # source://spoom//lib/spoom/visitor.rb#26 + sig { override.params(node: ::Prism::AlternationPatternNode).void } + def visit_alternation_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#31 + sig { override.params(node: ::Prism::AndNode).void } + def visit_and_node(node); end + + # source://spoom//lib/spoom/visitor.rb#36 + sig { override.params(node: ::Prism::ArgumentsNode).void } + def visit_arguments_node(node); end + + # source://spoom//lib/spoom/visitor.rb#41 + sig { override.params(node: ::Prism::ArrayNode).void } + def visit_array_node(node); end + + # source://spoom//lib/spoom/visitor.rb#46 + sig { override.params(node: ::Prism::ArrayPatternNode).void } + def visit_array_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#51 + sig { override.params(node: ::Prism::AssocNode).void } + def visit_assoc_node(node); end + + # source://spoom//lib/spoom/visitor.rb#56 + sig { override.params(node: ::Prism::AssocSplatNode).void } + def visit_assoc_splat_node(node); end + + # source://spoom//lib/spoom/visitor.rb#61 + sig { override.params(node: ::Prism::BackReferenceReadNode).void } + def visit_back_reference_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#66 + sig { override.params(node: ::Prism::BeginNode).void } + def visit_begin_node(node); end + + # source://spoom//lib/spoom/visitor.rb#71 + sig { override.params(node: ::Prism::BlockArgumentNode).void } + def visit_block_argument_node(node); end + + # source://spoom//lib/spoom/visitor.rb#76 + sig { override.params(node: ::Prism::BlockLocalVariableNode).void } + def visit_block_local_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#81 + sig { override.params(node: ::Prism::BlockNode).void } + def visit_block_node(node); end + + # source://spoom//lib/spoom/visitor.rb#86 + sig { override.params(node: ::Prism::BlockParameterNode).void } + def visit_block_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#91 + sig { override.params(node: ::Prism::BlockParametersNode).void } + def visit_block_parameters_node(node); end + + # source://spoom//lib/spoom/visitor.rb#96 + sig { override.params(node: ::Prism::BreakNode).void } + def visit_break_node(node); end + + # source://spoom//lib/spoom/visitor.rb#101 + sig { override.params(node: ::Prism::CallAndWriteNode).void } + def visit_call_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#106 + sig { override.params(node: ::Prism::CallNode).void } + def visit_call_node(node); end + + # source://spoom//lib/spoom/visitor.rb#111 + sig { override.params(node: ::Prism::CallOperatorWriteNode).void } + def visit_call_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#116 + sig { override.params(node: ::Prism::CallOrWriteNode).void } + def visit_call_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#121 + sig { override.params(node: ::Prism::CallTargetNode).void } + def visit_call_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#126 + sig { override.params(node: ::Prism::CapturePatternNode).void } + def visit_capture_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#131 + sig { override.params(node: ::Prism::CaseMatchNode).void } + def visit_case_match_node(node); end + + # source://spoom//lib/spoom/visitor.rb#136 + sig { override.params(node: ::Prism::CaseNode).void } + def visit_case_node(node); end + + # source://spoom//lib/spoom/visitor.rb#11 + sig { override.params(node: ::Prism::Node).void } + def visit_child_nodes(node); end + + # source://spoom//lib/spoom/visitor.rb#141 + sig { override.params(node: ::Prism::ClassNode).void } + def visit_class_node(node); end + + # source://spoom//lib/spoom/visitor.rb#146 + sig { override.params(node: ::Prism::ClassVariableAndWriteNode).void } + def visit_class_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#151 + sig { override.params(node: ::Prism::ClassVariableOperatorWriteNode).void } + def visit_class_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#156 + sig { override.params(node: ::Prism::ClassVariableOrWriteNode).void } + def visit_class_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#161 + sig { override.params(node: ::Prism::ClassVariableReadNode).void } + def visit_class_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#166 + sig { override.params(node: ::Prism::ClassVariableTargetNode).void } + def visit_class_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#171 + sig { override.params(node: ::Prism::ClassVariableWriteNode).void } + def visit_class_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#176 + sig { override.params(node: ::Prism::ConstantAndWriteNode).void } + def visit_constant_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#181 + sig { override.params(node: ::Prism::ConstantOperatorWriteNode).void } + def visit_constant_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#186 + sig { override.params(node: ::Prism::ConstantOrWriteNode).void } + def visit_constant_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#191 + sig { override.params(node: ::Prism::ConstantPathAndWriteNode).void } + def visit_constant_path_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#196 + sig { override.params(node: ::Prism::ConstantPathNode).void } + def visit_constant_path_node(node); end + + # source://spoom//lib/spoom/visitor.rb#201 + sig { override.params(node: ::Prism::ConstantPathOperatorWriteNode).void } + def visit_constant_path_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#206 + sig { override.params(node: ::Prism::ConstantPathOrWriteNode).void } + def visit_constant_path_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#211 + sig { override.params(node: ::Prism::ConstantPathTargetNode).void } + def visit_constant_path_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#216 + sig { override.params(node: ::Prism::ConstantPathWriteNode).void } + def visit_constant_path_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#221 + sig { override.params(node: ::Prism::ConstantReadNode).void } + def visit_constant_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#226 + sig { override.params(node: ::Prism::ConstantTargetNode).void } + def visit_constant_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#231 + sig { override.params(node: ::Prism::ConstantWriteNode).void } + def visit_constant_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#236 + sig { override.params(node: ::Prism::DefNode).void } + def visit_def_node(node); end + + # source://spoom//lib/spoom/visitor.rb#241 + sig { override.params(node: ::Prism::DefinedNode).void } + def visit_defined_node(node); end + + # source://spoom//lib/spoom/visitor.rb#246 + sig { override.params(node: ::Prism::ElseNode).void } + def visit_else_node(node); end + + # source://spoom//lib/spoom/visitor.rb#251 + sig { override.params(node: ::Prism::EmbeddedStatementsNode).void } + def visit_embedded_statements_node(node); end + + # source://spoom//lib/spoom/visitor.rb#256 + sig { override.params(node: ::Prism::EmbeddedVariableNode).void } + def visit_embedded_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#261 + sig { override.params(node: ::Prism::EnsureNode).void } + def visit_ensure_node(node); end + + # source://spoom//lib/spoom/visitor.rb#266 + sig { override.params(node: ::Prism::FalseNode).void } + def visit_false_node(node); end + + # source://spoom//lib/spoom/visitor.rb#271 + sig { override.params(node: ::Prism::FindPatternNode).void } + def visit_find_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#276 + sig { override.params(node: ::Prism::FlipFlopNode).void } + def visit_flip_flop_node(node); end + + # source://spoom//lib/spoom/visitor.rb#281 + sig { override.params(node: ::Prism::FloatNode).void } + def visit_float_node(node); end + + # source://spoom//lib/spoom/visitor.rb#286 + sig { override.params(node: ::Prism::ForNode).void } + def visit_for_node(node); end + + # source://spoom//lib/spoom/visitor.rb#291 + sig { override.params(node: ::Prism::ForwardingArgumentsNode).void } + def visit_forwarding_arguments_node(node); end + + # source://spoom//lib/spoom/visitor.rb#296 + sig { override.params(node: ::Prism::ForwardingParameterNode).void } + def visit_forwarding_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#301 + sig { override.params(node: ::Prism::ForwardingSuperNode).void } + def visit_forwarding_super_node(node); end + + # source://spoom//lib/spoom/visitor.rb#306 + sig { override.params(node: ::Prism::GlobalVariableAndWriteNode).void } + def visit_global_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#311 + sig { override.params(node: ::Prism::GlobalVariableOperatorWriteNode).void } + def visit_global_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#316 + sig { override.params(node: ::Prism::GlobalVariableOrWriteNode).void } + def visit_global_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#321 + sig { override.params(node: ::Prism::GlobalVariableReadNode).void } + def visit_global_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#326 + sig { override.params(node: ::Prism::GlobalVariableTargetNode).void } + def visit_global_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#331 + sig { override.params(node: ::Prism::GlobalVariableWriteNode).void } + def visit_global_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#336 + sig { override.params(node: ::Prism::HashNode).void } + def visit_hash_node(node); end + + # source://spoom//lib/spoom/visitor.rb#341 + sig { override.params(node: ::Prism::HashPatternNode).void } + def visit_hash_pattern_node(node); end + + # source://spoom//lib/spoom/visitor.rb#346 + sig { override.params(node: ::Prism::IfNode).void } + def visit_if_node(node); end + + # source://spoom//lib/spoom/visitor.rb#351 + sig { override.params(node: ::Prism::ImaginaryNode).void } + def visit_imaginary_node(node); end + + # source://spoom//lib/spoom/visitor.rb#356 + sig { override.params(node: ::Prism::ImplicitNode).void } + def visit_implicit_node(node); end + + # source://spoom//lib/spoom/visitor.rb#361 + sig { override.params(node: ::Prism::ImplicitRestNode).void } + def visit_implicit_rest_node(node); end + + # source://spoom//lib/spoom/visitor.rb#366 + sig { override.params(node: ::Prism::InNode).void } + def visit_in_node(node); end + + # source://spoom//lib/spoom/visitor.rb#371 + sig { override.params(node: ::Prism::IndexAndWriteNode).void } + def visit_index_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#376 + sig { override.params(node: ::Prism::IndexOperatorWriteNode).void } + def visit_index_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#381 + sig { override.params(node: ::Prism::IndexOrWriteNode).void } + def visit_index_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#386 + sig { override.params(node: ::Prism::IndexTargetNode).void } + def visit_index_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#391 + sig { override.params(node: ::Prism::InstanceVariableAndWriteNode).void } + def visit_instance_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#396 + sig { override.params(node: ::Prism::InstanceVariableOperatorWriteNode).void } + def visit_instance_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#401 + sig { override.params(node: ::Prism::InstanceVariableOrWriteNode).void } + def visit_instance_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#406 + sig { override.params(node: ::Prism::InstanceVariableReadNode).void } + def visit_instance_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#411 + sig { override.params(node: ::Prism::InstanceVariableTargetNode).void } + def visit_instance_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#416 + sig { override.params(node: ::Prism::InstanceVariableWriteNode).void } + def visit_instance_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#421 + sig { override.params(node: ::Prism::IntegerNode).void } + def visit_integer_node(node); end + + # source://spoom//lib/spoom/visitor.rb#426 + sig { override.params(node: ::Prism::InterpolatedMatchLastLineNode).void } + def visit_interpolated_match_last_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#431 + sig { override.params(node: ::Prism::InterpolatedRegularExpressionNode).void } + def visit_interpolated_regular_expression_node(node); end + + # source://spoom//lib/spoom/visitor.rb#436 + sig { override.params(node: ::Prism::InterpolatedStringNode).void } + def visit_interpolated_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#441 + sig { override.params(node: ::Prism::InterpolatedSymbolNode).void } + def visit_interpolated_symbol_node(node); end + + # source://spoom//lib/spoom/visitor.rb#446 + sig { override.params(node: ::Prism::InterpolatedXStringNode).void } + def visit_interpolated_x_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#451 + sig { override.params(node: ::Prism::KeywordHashNode).void } + def visit_keyword_hash_node(node); end + + # source://spoom//lib/spoom/visitor.rb#456 + sig { override.params(node: ::Prism::KeywordRestParameterNode).void } + def visit_keyword_rest_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#461 + sig { override.params(node: ::Prism::LambdaNode).void } + def visit_lambda_node(node); end + + # source://spoom//lib/spoom/visitor.rb#466 + sig { override.params(node: ::Prism::LocalVariableAndWriteNode).void } + def visit_local_variable_and_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#471 + sig { override.params(node: ::Prism::LocalVariableOperatorWriteNode).void } + def visit_local_variable_operator_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#476 + sig { override.params(node: ::Prism::LocalVariableOrWriteNode).void } + def visit_local_variable_or_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#481 + sig { override.params(node: ::Prism::LocalVariableReadNode).void } + def visit_local_variable_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#486 + sig { override.params(node: ::Prism::LocalVariableTargetNode).void } + def visit_local_variable_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#491 + sig { override.params(node: ::Prism::LocalVariableWriteNode).void } + def visit_local_variable_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#496 + sig { override.params(node: ::Prism::MatchLastLineNode).void } + def visit_match_last_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#501 + sig { override.params(node: ::Prism::MatchPredicateNode).void } + def visit_match_predicate_node(node); end + + # source://spoom//lib/spoom/visitor.rb#506 + sig { override.params(node: ::Prism::MatchRequiredNode).void } + def visit_match_required_node(node); end + + # source://spoom//lib/spoom/visitor.rb#511 + sig { override.params(node: ::Prism::MatchWriteNode).void } + def visit_match_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#516 + sig { override.params(node: ::Prism::MissingNode).void } + def visit_missing_node(node); end + + # source://spoom//lib/spoom/visitor.rb#521 + sig { override.params(node: ::Prism::ModuleNode).void } + def visit_module_node(node); end + + # source://spoom//lib/spoom/visitor.rb#526 + sig { override.params(node: ::Prism::MultiTargetNode).void } + def visit_multi_target_node(node); end + + # source://spoom//lib/spoom/visitor.rb#531 + sig { override.params(node: ::Prism::MultiWriteNode).void } + def visit_multi_write_node(node); end + + # source://spoom//lib/spoom/visitor.rb#536 + sig { override.params(node: ::Prism::NextNode).void } + def visit_next_node(node); end + + # source://spoom//lib/spoom/visitor.rb#541 + sig { override.params(node: ::Prism::NilNode).void } + def visit_nil_node(node); end + + # source://spoom//lib/spoom/visitor.rb#546 + sig { override.params(node: ::Prism::NoKeywordsParameterNode).void } + def visit_no_keywords_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#551 + sig { override.params(node: ::Prism::NumberedParametersNode).void } + def visit_numbered_parameters_node(node); end + + # source://spoom//lib/spoom/visitor.rb#556 + sig { override.params(node: ::Prism::NumberedReferenceReadNode).void } + def visit_numbered_reference_read_node(node); end + + # source://spoom//lib/spoom/visitor.rb#561 + sig { override.params(node: ::Prism::OptionalKeywordParameterNode).void } + def visit_optional_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#566 + sig { override.params(node: ::Prism::OptionalParameterNode).void } + def visit_optional_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#571 + sig { override.params(node: ::Prism::OrNode).void } + def visit_or_node(node); end + + # source://spoom//lib/spoom/visitor.rb#576 + sig { override.params(node: ::Prism::ParametersNode).void } + def visit_parameters_node(node); end + + # source://spoom//lib/spoom/visitor.rb#581 + sig { override.params(node: ::Prism::ParenthesesNode).void } + def visit_parentheses_node(node); end + + # source://spoom//lib/spoom/visitor.rb#586 + sig { override.params(node: ::Prism::PinnedExpressionNode).void } + def visit_pinned_expression_node(node); end + + # source://spoom//lib/spoom/visitor.rb#591 + sig { override.params(node: ::Prism::PinnedVariableNode).void } + def visit_pinned_variable_node(node); end + + # source://spoom//lib/spoom/visitor.rb#596 + sig { override.params(node: ::Prism::PostExecutionNode).void } + def visit_post_execution_node(node); end + + # source://spoom//lib/spoom/visitor.rb#601 + sig { override.params(node: ::Prism::PreExecutionNode).void } + def visit_pre_execution_node(node); end + + # source://spoom//lib/spoom/visitor.rb#606 + sig { override.params(node: ::Prism::ProgramNode).void } + def visit_program_node(node); end + + # source://spoom//lib/spoom/visitor.rb#611 + sig { override.params(node: ::Prism::RangeNode).void } + def visit_range_node(node); end + + # source://spoom//lib/spoom/visitor.rb#616 + sig { override.params(node: ::Prism::RationalNode).void } + def visit_rational_node(node); end + + # source://spoom//lib/spoom/visitor.rb#621 + sig { override.params(node: ::Prism::RedoNode).void } + def visit_redo_node(node); end + + # source://spoom//lib/spoom/visitor.rb#626 + sig { override.params(node: ::Prism::RegularExpressionNode).void } + def visit_regular_expression_node(node); end + + # source://spoom//lib/spoom/visitor.rb#631 + sig { override.params(node: ::Prism::RequiredKeywordParameterNode).void } + def visit_required_keyword_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#636 + sig { override.params(node: ::Prism::RequiredParameterNode).void } + def visit_required_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#641 + sig { override.params(node: ::Prism::RescueModifierNode).void } + def visit_rescue_modifier_node(node); end + + # source://spoom//lib/spoom/visitor.rb#646 + sig { override.params(node: ::Prism::RescueNode).void } + def visit_rescue_node(node); end + + # source://spoom//lib/spoom/visitor.rb#651 + sig { override.params(node: ::Prism::RestParameterNode).void } + def visit_rest_parameter_node(node); end + + # source://spoom//lib/spoom/visitor.rb#656 + sig { override.params(node: ::Prism::RetryNode).void } + def visit_retry_node(node); end + + # source://spoom//lib/spoom/visitor.rb#661 + sig { override.params(node: ::Prism::ReturnNode).void } + def visit_return_node(node); end + + # source://spoom//lib/spoom/visitor.rb#666 + sig { override.params(node: ::Prism::SelfNode).void } + def visit_self_node(node); end + + # source://spoom//lib/spoom/visitor.rb#671 + sig { override.params(node: ::Prism::SingletonClassNode).void } + def visit_singleton_class_node(node); end + + # source://spoom//lib/spoom/visitor.rb#676 + sig { override.params(node: ::Prism::SourceEncodingNode).void } + def visit_source_encoding_node(node); end + + # source://spoom//lib/spoom/visitor.rb#681 + sig { override.params(node: ::Prism::SourceFileNode).void } + def visit_source_file_node(node); end + + # source://spoom//lib/spoom/visitor.rb#686 + sig { override.params(node: ::Prism::SourceLineNode).void } + def visit_source_line_node(node); end + + # source://spoom//lib/spoom/visitor.rb#691 + sig { override.params(node: ::Prism::SplatNode).void } + def visit_splat_node(node); end + + # source://spoom//lib/spoom/visitor.rb#696 + sig { override.params(node: ::Prism::StatementsNode).void } + def visit_statements_node(node); end + + # source://spoom//lib/spoom/visitor.rb#701 + sig { override.params(node: ::Prism::StringNode).void } + def visit_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#706 + sig { override.params(node: ::Prism::SuperNode).void } + def visit_super_node(node); end + + # source://spoom//lib/spoom/visitor.rb#711 + sig { override.params(node: ::Prism::SymbolNode).void } + def visit_symbol_node(node); end + + # source://spoom//lib/spoom/visitor.rb#716 + sig { override.params(node: ::Prism::TrueNode).void } + def visit_true_node(node); end + + # source://spoom//lib/spoom/visitor.rb#721 + sig { override.params(node: ::Prism::UndefNode).void } + def visit_undef_node(node); end + + # source://spoom//lib/spoom/visitor.rb#726 + sig { override.params(node: ::Prism::UnlessNode).void } + def visit_unless_node(node); end + + # source://spoom//lib/spoom/visitor.rb#731 + sig { override.params(node: ::Prism::UntilNode).void } + def visit_until_node(node); end + + # source://spoom//lib/spoom/visitor.rb#736 + sig { override.params(node: ::Prism::WhenNode).void } + def visit_when_node(node); end + + # source://spoom//lib/spoom/visitor.rb#741 + sig { override.params(node: ::Prism::WhileNode).void } + def visit_while_node(node); end + + # source://spoom//lib/spoom/visitor.rb#746 + sig { override.params(node: ::Prism::XStringNode).void } + def visit_x_string_node(node); end + + # source://spoom//lib/spoom/visitor.rb#751 + sig { override.params(node: ::Prism::YieldNode).void } + def visit_yield_node(node); end +end diff --git a/sorbet/rbi/gems/stackprof@0.2.25.rbi b/sorbet/rbi/gems/stackprof@0.2.26.rbi similarity index 98% rename from sorbet/rbi/gems/stackprof@0.2.25.rbi rename to sorbet/rbi/gems/stackprof@0.2.26.rbi index eb8c92fe0..857c5f982 100644 --- a/sorbet/rbi/gems/stackprof@0.2.25.rbi +++ b/sorbet/rbi/gems/stackprof@0.2.26.rbi @@ -4,7 +4,8 @@ # This is an autogenerated file for types exported from the `stackprof` gem. # Please instead update this file by running `bin/tapioca gem stackprof`. -# source://stackprof//lib/stackprof.rb#16 + +# source://stackprof//lib/stackprof.rb#20 module StackProf class << self def results(*_arg0); end @@ -237,5 +238,5 @@ end # source://stackprof//lib/stackprof/report.rb#9 StackProf::Report::MARSHAL_SIGNATURE = T.let(T.unsafe(nil), String) -# source://stackprof//lib/stackprof.rb#17 +# source://stackprof//lib/stackprof.rb#21 StackProf::VERSION = T.let(T.unsafe(nil), String) diff --git a/sorbet/rbi/gems/stringio@3.1.0.rbi b/sorbet/rbi/gems/stringio@3.1.1.rbi similarity index 99% rename from sorbet/rbi/gems/stringio@3.1.0.rbi rename to sorbet/rbi/gems/stringio@3.1.1.rbi index 01a26ea58..0b17e9140 100644 --- a/sorbet/rbi/gems/stringio@3.1.0.rbi +++ b/sorbet/rbi/gems/stringio@3.1.1.rbi @@ -4,5 +4,6 @@ # This is an autogenerated file for types exported from the `stringio` gem. # Please instead update this file by running `bin/tapioca gem stringio`. + # THIS IS AN EMPTY RBI FILE. # see https://github.com/Shopify/tapioca#manually-requiring-parts-of-a-gem diff --git a/sorbet/rbi/gems/syntax_tree@6.2.0.rbi b/sorbet/rbi/gems/syntax_tree@6.2.0.rbi deleted file mode 100644 index 597be4c1a..000000000 --- a/sorbet/rbi/gems/syntax_tree@6.2.0.rbi +++ /dev/null @@ -1,23133 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `syntax_tree` gem. -# Please instead update this file by running `bin/tapioca gem syntax_tree`. - -# Syntax Tree is a suite of tools built on top of the internal CRuby parser. It -# provides the ability to generate a syntax tree from source, as well as the -# tools necessary to inspect and manipulate that syntax tree. It can be used to -# build formatters, linters, language servers, and more. -# -# source://syntax_tree//lib/syntax_tree/node.rb#3 -module SyntaxTree - class << self - # Parses the given source and returns the formatted source. - # - # source://syntax_tree//lib/syntax_tree.rb#60 - def format(source, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end - - # Parses the given file and returns the formatted source. - # - # source://syntax_tree//lib/syntax_tree.rb#76 - def format_file(filepath, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end - - # Accepts a node in the tree and returns the formatted source. - # - # source://syntax_tree//lib/syntax_tree.rb#86 - def format_node(source, node, maxwidth = T.unsafe(nil), base_indentation = T.unsafe(nil), options: T.unsafe(nil)); end - - # Indexes the given source code to return a list of all class, module, and - # method definitions. Used to quickly provide indexing capability for IDEs or - # documentation generation. - # - # source://syntax_tree//lib/syntax_tree.rb#103 - def index(source); end - - # Indexes the given file to return a list of all class, module, and method - # definitions. Used to quickly provide indexing capability for IDEs or - # documentation generation. - # - # source://syntax_tree//lib/syntax_tree.rb#110 - def index_file(filepath); end - - # A convenience method for creating a new mutation visitor. - # - # @yield [visitor] - # - # source://syntax_tree//lib/syntax_tree.rb#115 - def mutation; end - - # Parses the given source and returns the syntax tree. - # - # source://syntax_tree//lib/syntax_tree.rb#122 - def parse(source); end - - # Parses the given file and returns the syntax tree. - # - # source://syntax_tree//lib/syntax_tree.rb#129 - def parse_file(filepath); end - - # Returns the source from the given filepath taking into account any potential - # magic encoding comments. - # - # source://syntax_tree//lib/syntax_tree.rb#135 - def read(filepath); end - - # This is a hook provided so that plugins can register themselves as the - # handler for a particular file type. - # - # source://syntax_tree//lib/syntax_tree.rb#150 - def register_handler(extension, handler); end - - # Searches through the given source using the given pattern and yields each - # node in the tree that matches the pattern to the given block. - # - # source://syntax_tree//lib/syntax_tree.rb#156 - def search(source, query, &block); end - - # Searches through the given file using the given pattern and yields each - # node in the tree that matches the pattern to the given block. - # - # source://syntax_tree//lib/syntax_tree.rb#165 - def search_file(filepath, query, &block); end - end -end - -# ARef represents when you're pulling a value out of a collection at a -# specific index. Put another way, it's any time you're calling the method -# #[]. -# -# collection[index] -# -# The nodes usually contains two children, the collection and the index. In -# some cases, you don't necessarily have the second child node, because you -# can call procs with a pretty esoteric syntax. In the following example, you -# wouldn't have a second child node: -# -# collection[] -# -# source://syntax_tree//lib/syntax_tree/node.rb#567 -class SyntaxTree::ARef < ::SyntaxTree::Node - # @return [ARef] a new instance of ARef - # - # source://syntax_tree//lib/syntax_tree/node.rb#577 - def initialize(collection:, index:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#632 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#584 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#588 - def child_nodes; end - - # [Node] the value being indexed - # - # source://syntax_tree//lib/syntax_tree/node.rb#569 - def collection; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#575 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#592 - def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#588 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#606 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#615 - def format(q); end - - # [nil | Args] the value being passed within the brackets - # - # source://syntax_tree//lib/syntax_tree/node.rb#572 - def index; end -end - -# ARefField represents assigning values into collections at specific indices. -# Put another way, it's any time you're calling the method #[]=. The -# ARefField node itself is just the left side of the assignment, and they're -# always wrapped in assign nodes. -# -# collection[index] = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#645 -class SyntaxTree::ARefField < ::SyntaxTree::Node - # @return [ARefField] a new instance of ARefField - # - # source://syntax_tree//lib/syntax_tree/node.rb#655 - def initialize(collection:, index:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#710 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#662 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#666 - def child_nodes; end - - # [Node] the value being indexed - # - # source://syntax_tree//lib/syntax_tree/node.rb#647 - def collection; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#653 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#670 - def copy(collection: T.unsafe(nil), index: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#666 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#684 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#693 - def format(q); end - - # [nil | Args] the value being passed within the brackets - # - # source://syntax_tree//lib/syntax_tree/node.rb#650 - def index; end -end - -# Alias represents the use of the +alias+ keyword with regular arguments (not -# global variables). The +alias+ keyword is used to make a method respond to -# another name as well as the current one. -# -# alias aliased_name name -# -# For the example above, in the current context you can now call aliased_name -# and it will execute the name method. When you're aliasing two methods, you -# can either provide bare words (like the example above) or you can provide -# symbols (note that this includes dynamic symbols like -# :"left-#{middle}-right"). -# -# source://syntax_tree//lib/syntax_tree/node.rb#458 -class SyntaxTree::AliasNode < ::SyntaxTree::Node - # @return [AliasNode] a new instance of AliasNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#496 - def initialize(left:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#545 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#503 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#507 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#494 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#511 - def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#507 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#525 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#529 - def format(q); end - - # [DynaSymbol | GVar | SymbolLiteral] the new name of the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#488 - def left; end - - # [Backref | DynaSymbol | GVar | SymbolLiteral] the old name of the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#491 - def right; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#549 - def var_alias?; end -end - -# Formats an argument to the alias keyword. For symbol literals it uses the -# value of the symbol directly to look like bare words. -# -# source://syntax_tree//lib/syntax_tree/node.rb#461 -class SyntaxTree::AliasNode::AliasArgumentFormatter - # @return [AliasArgumentFormatter] a new instance of AliasArgumentFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#466 - def initialize(argument); end - - # [Backref | DynaSymbol | GVar | SymbolLiteral] the argument being passed - # to alias - # - # source://syntax_tree//lib/syntax_tree/node.rb#464 - def argument; end - - # source://syntax_tree//lib/syntax_tree/node.rb#470 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#478 - def format(q); end -end - -# ArgBlock represents using a block operator on an expression. -# -# method(&expression) -# -# source://syntax_tree//lib/syntax_tree/node.rb#887 -class SyntaxTree::ArgBlock < ::SyntaxTree::Node - # @return [ArgBlock] a new instance of ArgBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#894 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#930 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#900 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#904 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#892 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#908 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#904 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#921 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#925 - def format(q); end - - # [nil | Node] the expression being turned into a block - # - # source://syntax_tree//lib/syntax_tree/node.rb#889 - def value; end -end - -# ArgParen represents wrapping arguments to a method inside a set of -# parentheses. -# -# method(argument) -# -# In the example above, there would be an ArgParen node around the Args node -# that represents the set of arguments being sent to the method method. The -# argument child node can be +nil+ if no arguments were passed, as in: -# -# method() -# -# source://syntax_tree//lib/syntax_tree/node.rb#727 -class SyntaxTree::ArgParen < ::SyntaxTree::Node - # @return [ArgParen] a new instance of ArgParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#735 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#784 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#741 - def accept(visitor); end - - # [nil | Args | ArgsForward] the arguments inside the - # parentheses - # - # source://syntax_tree//lib/syntax_tree/node.rb#730 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#788 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#745 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#733 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#749 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#745 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#762 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#766 - def format(q); end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#794 - def trailing_comma?; end -end - -# Star represents using a splat operator on an expression. -# -# method(*arguments) -# -# source://syntax_tree//lib/syntax_tree/node.rb#939 -class SyntaxTree::ArgStar < ::SyntaxTree::Node - # @return [ArgStar] a new instance of ArgStar - # - # source://syntax_tree//lib/syntax_tree/node.rb#946 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#982 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#952 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#956 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#944 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#960 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#956 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#973 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#977 - def format(q); end - - # [nil | Node] the expression being splatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#941 - def value; end -end - -# Args represents a list of arguments being passed to a method call or array -# literal. -# -# method(first, second, third) -# -# source://syntax_tree//lib/syntax_tree/node.rb#821 -class SyntaxTree::Args < ::SyntaxTree::Node - # @return [Args] a new instance of Args - # - # source://syntax_tree//lib/syntax_tree/node.rb#828 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#863 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#834 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#867 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#838 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#826 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#842 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#838 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#855 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#859 - def format(q); end - - # [Array[ Node ]] the arguments that this node wraps - # - # source://syntax_tree//lib/syntax_tree/node.rb#823 - def parts; end -end - -# ArgsForward represents forwarding all kinds of arguments onto another method -# call. -# -# def request(method, path, **headers, &block); end -# -# def get(...) -# request(:GET, ...) -# end -# -# def post(...) -# request(:POST, ...) -# end -# -# In the example above, both the get and post methods are forwarding all of -# their arguments (positional, keyword, and block) on to the request method. -# The ArgsForward node appears in both the caller (the request method calls) -# and the callee (the get and post definitions). -# -# source://syntax_tree//lib/syntax_tree/node.rb#1004 -class SyntaxTree::ArgsForward < ::SyntaxTree::Node - # @return [ArgsForward] a new instance of ArgsForward - # - # source://syntax_tree//lib/syntax_tree/node.rb#1008 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1038 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1013 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1042 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1017 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1006 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1021 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1017 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1030 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1034 - def format(q); end -end - -# ArrayLiteral represents an array literal, which can optionally contain -# elements. -# -# [] -# [one, two, three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#1053 -class SyntaxTree::ArrayLiteral < ::SyntaxTree::Node - # @return [ArrayLiteral] a new instance of ArrayLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#1153 - def initialize(lbracket:, contents:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1229 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1160 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1164 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1151 - def comments; end - - # [nil | Args] the contents of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1148 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1168 - def copy(lbracket: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1164 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1182 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1191 - def format(q); end - - # [nil | LBracket | QSymbolsBeg | QWordsBeg | SymbolsBeg | WordsBeg] the - # bracket that opens this array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1145 - def lbracket; end - - private - - # If we have an empty array that contains only comments, then we're going - # to do some special printing to ensure they get indented correctly. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1259 - def empty_with_comments?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1251 - def qsymbols?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1236 - def qwords?; end -end - -# source://syntax_tree//lib/syntax_tree/node.rb#1063 -SyntaxTree::ArrayLiteral::BREAKABLE_SPACE_SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::ArrayLiteral::BreakableSpaceSeparator) - -# It's very common to use seplist with ->(q) { q.breakable_space }. We wrap -# that pattern into an object to cut down on having to create a bunch of -# lambdas all over the place. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1057 -class SyntaxTree::ArrayLiteral::BreakableSpaceSeparator - # source://syntax_tree//lib/syntax_tree/node.rb#1058 - def call(q); end -end - -# This is a special formatter used if the array literal contains no values -# but _does_ contain comments. In this case we do some special formatting to -# make sure the comments gets indented properly. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1120 -class SyntaxTree::ArrayLiteral::EmptyWithCommentsFormatter - # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1124 - def initialize(lbracket); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1128 - def format(q); end - - # [LBracket] the opening bracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#1122 - def lbracket; end -end - -# Formats an array of multiple simple symbol literals into the %i syntax. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1094 -class SyntaxTree::ArrayLiteral::QSymbolsFormatter - # @return [QSymbolsFormatter] a new instance of QSymbolsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1098 - def initialize(contents); end - - # [Args] the contents of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1096 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1102 - def format(q); end -end - -# Formats an array of multiple simple string literals into the %w syntax. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1066 -class SyntaxTree::ArrayLiteral::QWordsFormatter - # @return [QWordsFormatter] a new instance of QWordsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1070 - def initialize(contents); end - - # [Args] the contents of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#1068 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1074 - def format(q); end -end - -# When we're implementing the === operator for a node, we oftentimes need to -# compare two arrays. We want to skip over the === definition of array and use -# our own here, so we do that using this module. -# -# source://syntax_tree//lib/syntax_tree/node.rb#157 -module SyntaxTree::ArrayMatch - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#158 - def call(left, right); end - end -end - -# AryPtn represents matching against an array pattern using the Ruby 2.7+ -# pattern matching syntax. It’s one of the more complicated nodes, because -# the four parameters that it accepts can almost all be nil. -# -# case [1, 2, 3] -# in [Integer, Integer] -# "matched" -# in Container[Integer, Integer] -# "matched" -# in [Integer, *, Integer] -# "matched" -# end -# -# An AryPtn node is created with four parameters: an optional constant -# wrapper, an array of positional matches, an optional splat with identifier, -# and an optional array of positional matches that occur after the splat. -# All of the in clauses above would create an AryPtn node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1282 -class SyntaxTree::AryPtn < ::SyntaxTree::Node - # @return [AryPtn] a new instance of AryPtn - # - # source://syntax_tree//lib/syntax_tree/node.rb#1320 - def initialize(constant:, requireds:, rest:, posts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1388 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1329 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1333 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1318 - def comments; end - - # [nil | VarRef | ConstPathRef] the optional constant wrapper - # - # source://syntax_tree//lib/syntax_tree/node.rb#1303 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1337 - def copy(constant: T.unsafe(nil), requireds: T.unsafe(nil), rest: T.unsafe(nil), posts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1333 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1359 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1370 - def format(q); end - - # [Array[ Node ]] the list of positional arguments occurring after the - # optional star if there is one - # - # source://syntax_tree//lib/syntax_tree/node.rb#1315 - def posts; end - - # [Array[ Node ]] the regular positional arguments that this array - # pattern is matching against - # - # source://syntax_tree//lib/syntax_tree/node.rb#1307 - def requireds; end - - # [nil | VarField] the optional starred identifier that grabs up a list of - # positional arguments - # - # source://syntax_tree//lib/syntax_tree/node.rb#1311 - def rest; end -end - -# Formats the optional splat of an array pattern. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1284 -class SyntaxTree::AryPtn::RestFormatter - # @return [RestFormatter] a new instance of RestFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#1288 - def initialize(value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1292 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1296 - def format(q); end - - # [VarField] the identifier that represents the remaining positionals - # - # source://syntax_tree//lib/syntax_tree/node.rb#1286 - def value; end -end - -# Assign represents assigning something to a variable or constant. Generally, -# the left side of the assignment is going to be any node that ends with the -# name "Field". -# -# variable = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#1418 -class SyntaxTree::Assign < ::SyntaxTree::Node - # @return [Assign] a new instance of Assign - # - # source://syntax_tree//lib/syntax_tree/node.rb#1429 - def initialize(target:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1479 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1436 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1440 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1427 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1444 - def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1440 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1458 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1462 - def format(q); end - - # [ARefField | ConstPathField | Field | TopConstField | VarField] the target - # to assign the result of the expression to - # - # source://syntax_tree//lib/syntax_tree/node.rb#1421 - def target; end - - # [Node] the expression to be assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#1424 - def value; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1485 - def skip_indent?; end -end - -# Determins if the following value should be indented or not. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1396 -module SyntaxTree::AssignFormatting - class << self - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1397 - def skip_indent?(value); end - end -end - -# Assoc represents a key-value pair within a hash. It is a child node of -# either an AssocListFromArgs or a BareAssocHash. -# -# { key1: value1, key2: value2 } -# -# In the above example, the would be two Assoc nodes. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1497 -class SyntaxTree::Assoc < ::SyntaxTree::Node - # @return [Assoc] a new instance of Assoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#1507 - def initialize(key:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1548 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1514 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1518 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1505 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1522 - def copy(key: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1518 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1536 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1540 - def format(q); end - - # [Node] the key of this pair - # - # source://syntax_tree//lib/syntax_tree/node.rb#1499 - def key; end - - # [nil | Node] the value of this pair - # - # source://syntax_tree//lib/syntax_tree/node.rb#1502 - def value; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#1554 - def format_contents(q); end -end - -# AssocSplat represents double-splatting a value into a hash (either a hash -# literal or a bare hash in a method call). -# -# { **pairs } -# -# source://syntax_tree//lib/syntax_tree/node.rb#1575 -class SyntaxTree::AssocSplat < ::SyntaxTree::Node - # @return [AssocSplat] a new instance of AssocSplat - # - # source://syntax_tree//lib/syntax_tree/node.rb#1582 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1618 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1588 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1592 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1580 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1596 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1592 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1609 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1613 - def format(q); end - - # [nil | Node] the expression that is being splatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#1577 - def value; end -end - -# BEGINBlock represents the use of the +BEGIN+ keyword, which hooks into the -# lifecycle of the interpreter. Whatever is inside the block will get executed -# when the program starts. -# -# BEGIN { -# } -# -# Interestingly, the BEGIN keyword doesn't allow the do and end keywords for -# the block. Only braces are permitted. -# -# source://syntax_tree//lib/syntax_tree/node.rb#175 -class SyntaxTree::BEGINBlock < ::SyntaxTree::Node - # @return [BEGINBlock] a new instance of BEGINBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#185 - def initialize(lbrace:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#236 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#192 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#196 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#183 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#200 - def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#196 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#214 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#223 - def format(q); end - - # [LBrace] the left brace that is seen after the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#177 - def lbrace; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#180 - def statements; end -end - -# Backref represents a global variable referencing a matched value. It comes -# in the form of a $ followed by a positive integer. -# -# $1 -# -# source://syntax_tree//lib/syntax_tree/node.rb#1628 -class SyntaxTree::Backref < ::SyntaxTree::Node - # @return [Backref] a new instance of Backref - # - # source://syntax_tree//lib/syntax_tree/node.rb#1635 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1670 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1641 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1645 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1633 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1649 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1645 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1662 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1666 - def format(q); end - - # [String] the name of the global backreference variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#1630 - def value; end -end - -# Backtick represents the use of the ` operator. It's usually found being used -# for an XStringLiteral, but could also be found as the name of a method being -# defined. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1678 -class SyntaxTree::Backtick < ::SyntaxTree::Node - # @return [Backtick] a new instance of Backtick - # - # source://syntax_tree//lib/syntax_tree/node.rb#1685 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1720 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1691 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1695 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1683 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1699 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1695 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1712 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1716 - def format(q); end - - # [String] the backtick in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#1680 - def value; end -end - -# BareAssocHash represents a hash of contents being passed as a method -# argument (and therefore has omitted braces). It's very similar to an -# AssocListFromArgs node. -# -# method(key1: value1, key2: value2) -# -# source://syntax_tree//lib/syntax_tree/node.rb#1834 -class SyntaxTree::BareAssocHash < ::SyntaxTree::Node - # @return [BareAssocHash] a new instance of BareAssocHash - # - # source://syntax_tree//lib/syntax_tree/node.rb#1841 - def initialize(assocs:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1876 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1847 - def accept(visitor); end - - # [Array[ Assoc | AssocSplat ]] - # - # source://syntax_tree//lib/syntax_tree/node.rb#1836 - def assocs; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1851 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1839 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1855 - def copy(assocs: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1851 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1868 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1872 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1880 - def format_key(q, key); end -end - -# BasicVisitor is the parent class of the Visitor class that provides the -# ability to walk down the tree. It does not define any handlers, so you -# should extend this class if you want your visitor to raise an error if you -# attempt to visit a node that you don't handle. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#8 -class SyntaxTree::BasicVisitor - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#105 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#109 - def visit_all(nodes); end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_child_nodes(node); end - - class << self - # This is the list of all of the valid visit methods. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#72 - def valid_visit_methods; end - - # This method is here to help folks write visitors. - # - # It's not always easy to ensure you're writing the correct method name in - # the visitor since it's perfectly valid to define methods that don't - # override these parent methods. - # - # If you use this method, you can ensure you're writing the correct method - # name. It will raise an error if the visit method you're defining isn't - # actually a method on the parent visitor. - # - # @raise [VisitMethodError] - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#86 - def visit_method(method_name); end - - # This method is here to help folks write visitors. - # - # Within the given block, every method that is defined will be checked to - # ensure it's a valid visit method using the BasicVisitor::visit_method - # method defined above. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#97 - def visit_methods; end - end -end - -# This class is used by DidYouMean to offer corrections to invalid visit -# method names. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#22 -class SyntaxTree::BasicVisitor::VisitMethodChecker - # @return [VisitMethodChecker] a new instance of VisitMethodChecker - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#25 - def initialize(error); end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#29 - def corrections; end - - # Returns the value of attribute visit_method. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#23 - def visit_method; end -end - -# This is raised when you use the Visitor.visit_method method and it fails. -# It is correctable to through DidYouMean. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#11 -class SyntaxTree::BasicVisitor::VisitMethodError < ::StandardError - include ::DidYouMean::Correctable - - # @return [VisitMethodError] a new instance of VisitMethodError - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#14 - def initialize(visit_method); end - - # Returns the value of attribute visit_method. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#12 - def visit_method; end -end - -# This module is responsible for checking all of the methods defined within -# a given block to ensure that they are valid visit methods. -# -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#45 -class SyntaxTree::BasicVisitor::VisitMethodsChecker < ::Module - # @return [VisitMethodsChecker] a new instance of VisitMethodsChecker - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#53 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#65 - def disable!; end - - # This is the status of the checker. It's used to determine whether or not - # we should be checking the methods that are defined. It is kept as an - # instance variable so that it can be disabled later. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#51 - def status; end -end - -# source://syntax_tree//lib/syntax_tree/basic_visitor.rb#46 -class SyntaxTree::BasicVisitor::VisitMethodsChecker::Status < ::Struct - # Returns the value of attribute checking - # - # @return [Object] the current value of checking - def checking; end - - # Sets the attribute checking - # - # @param value [Object] the value to set the attribute checking to. - # @return [Object] the newly set value - def checking=(_); end - - class << self - def [](*_arg0); end - def inspect; end - def keyword_init?; end - def members; end - def new(*_arg0); end - end -end - -# Begin represents a begin..end chain. -# -# begin -# value -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#1899 -class SyntaxTree::Begin < ::SyntaxTree::Node - # @return [Begin] a new instance of Begin - # - # source://syntax_tree//lib/syntax_tree/node.rb#1906 - def initialize(bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1951 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1912 - def accept(visitor); end - - # [BodyStmt] the bodystmt that contains the contents of this begin block - # - # source://syntax_tree//lib/syntax_tree/node.rb#1901 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1916 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1904 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1920 - def copy(bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1916 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1933 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1937 - def format(q); end -end - -# Binary represents any expression that involves two sub-expressions with an -# operator in between. This can be something that looks like a mathematical -# operation: -# -# 1 + 1 -# -# but can also be something like pushing a value onto an array: -# -# array << value -# -# source://syntax_tree//lib/syntax_tree/node.rb#2029 -class SyntaxTree::Binary < ::SyntaxTree::Node - # @return [Binary] a new instance of Binary - # - # source://syntax_tree//lib/syntax_tree/node.rb#2056 - def initialize(left:, operator:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2128 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2064 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2068 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2054 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2072 - def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2068 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2087 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2097 - def format(q); end - - # [Node] the left-hand side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#2045 - def left; end - - # [Symbol] the operator used between the two expressions - # - # source://syntax_tree//lib/syntax_tree/node.rb#2048 - def operator; end - - # [Node] the right-hand side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#2051 - def right; end -end - -# BlockArg represents declaring a block parameter on a method definition. -# -# def method(&block); end -# -# source://syntax_tree//lib/syntax_tree/node.rb#2227 -class SyntaxTree::BlockArg < ::SyntaxTree::Node - # @return [BlockArg] a new instance of BlockArg - # - # source://syntax_tree//lib/syntax_tree/node.rb#2234 - def initialize(name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2270 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2240 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2244 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2232 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2248 - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2244 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2261 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2265 - def format(q); end - - # [nil | Ident] the name of the block argument - # - # source://syntax_tree//lib/syntax_tree/node.rb#2229 - def name; end -end - -# Block represents passing a block to a method call using the +do+ and +end+ -# keywords or the +{+ and +}+ operators. -# -# method do |value| -# end -# -# method { |value| } -# -# source://syntax_tree//lib/syntax_tree/node.rb#4312 -class SyntaxTree::BlockNode < ::SyntaxTree::Node - # @return [BlockNode] a new instance of BlockNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#4347 - def initialize(opening:, block_var:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4420 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4355 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4429 - def arity; end - - # [nil | BlockVar] the optional variable declaration within this block - # - # source://syntax_tree//lib/syntax_tree/node.rb#4339 - def block_var; end - - # [BodyStmt | Statements] the expressions to be executed within this block - # - # source://syntax_tree//lib/syntax_tree/node.rb#4342 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4359 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4345 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4363 - def copy(opening: T.unsafe(nil), block_var: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4359 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4378 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4388 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4425 - def keywords?; end - - # [LBrace | Kw] the left brace or the do keyword that opens this block - # - # source://syntax_tree//lib/syntax_tree/node.rb#4336 - def opening; end - - private - - # If we're the predicate of a loop or conditional, then we're going to have - # to go with the {..} bounds. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4471 - def forced_brace_bounds?(q); end - - # If we're a sibling of a control-flow keyword, then we're going to have to - # use the do..end bounds. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4460 - def forced_do_end_bounds?(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4487 - def format_break(q, break_opening, break_closing); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4507 - def format_flat(q, flat_opening, flat_closing); end - - # If this is nested anywhere inside certain nodes, then we can't change - # which operators/keywords we're using for the bounds of the block. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4442 - def unchangeable_bounds?(q); end -end - -# Formats the opening brace or keyword of a block. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4314 -class SyntaxTree::BlockNode::BlockOpenFormatter - # @return [BlockOpenFormatter] a new instance of BlockOpenFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#4321 - def initialize(text, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4326 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4330 - def format(q); end - - # [LBrace | Keyword] the node that is being represented - # - # source://syntax_tree//lib/syntax_tree/node.rb#4319 - def node; end - - # [String] the actual output that should be printed - # - # source://syntax_tree//lib/syntax_tree/node.rb#4316 - def text; end -end - -# BlockVar represents the parameters being declared for a block. Effectively -# this node is everything contained within the pipes. This includes all of the -# various parameter types, as well as block-local variable declarations. -# -# method do |positional, optional = value, keyword:, █ local| -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#2141 -class SyntaxTree::BlockVar < ::SyntaxTree::Node - # @return [BlockVar] a new instance of BlockVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#2151 - def initialize(params:, locals:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2209 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2158 - def accept(visitor); end - - # When a single required parameter is declared for a block, it gets - # automatically expanded if the values being yielded into it are an array. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2216 - def arg0?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2162 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2149 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2166 - def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2162 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2180 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2196 - def format(q); end - - # [Array[ Ident ]] the list of block-local variable declarations - # - # source://syntax_tree//lib/syntax_tree/node.rb#2146 - def locals; end - - # [Params] the parameters being declared with the block - # - # source://syntax_tree//lib/syntax_tree/node.rb#2143 - def params; end -end - -# We'll keep a single instance of this separator around for all block vars -# to cut down on allocations. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2194 -SyntaxTree::BlockVar::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::BlockVar::Separator) - -# Within the pipes of the block declaration, we don't want any spaces. So -# we'll separate the parameters with a comma and space but no breakables. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2186 -class SyntaxTree::BlockVar::Separator - # source://syntax_tree//lib/syntax_tree/node.rb#2187 - def call(q); end -end - -# bodystmt can't actually determine its bounds appropriately because it -# doesn't necessarily know where it started. So the parent node needs to -# report back down into this one where it goes. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2278 -class SyntaxTree::BodyStmt < ::SyntaxTree::Node - # @return [BodyStmt] a new instance of BodyStmt - # - # source://syntax_tree//lib/syntax_tree/node.rb#2297 - def initialize(statements:, rescue_clause:, else_keyword:, else_clause:, ensure_clause:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2428 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2352 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2314 - def bind(parser, start_char, start_column, end_char, end_column); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2356 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2295 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2360 - def copy(statements: T.unsafe(nil), rescue_clause: T.unsafe(nil), else_keyword: T.unsafe(nil), else_clause: T.unsafe(nil), ensure_clause: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2356 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2384 - def deconstruct_keys(_keys); end - - # [nil | Statements] the optional set of statements inside the else clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2289 - def else_clause; end - - # [nil | Kw] the optional else keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#2286 - def else_keyword; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2348 - def empty?; end - - # [nil | Ensure] the optional ensure clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2292 - def ensure_clause; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2396 - def format(q); end - - # [nil | Rescue] the optional rescue chain attached to the begin clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2283 - def rescue_clause; end - - # [Statements] the list of statements inside the begin clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#2280 - def statements; end -end - -# Break represents using the +break+ keyword. -# -# break -# -# It can also optionally accept arguments, as in: -# -# break 1 -# -# source://syntax_tree//lib/syntax_tree/node.rb#2634 -class SyntaxTree::Break < ::SyntaxTree::Node - # @return [Break] a new instance of Break - # - # source://syntax_tree//lib/syntax_tree/node.rb#2641 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2676 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2647 - def accept(visitor); end - - # [Args] the arguments being sent to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#2636 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2651 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2639 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2655 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2651 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2668 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2672 - def format(q); end -end - -# CHAR irepresents a single codepoint in the script encoding. -# -# ?a -# -# In the example above, the CHAR node represents the string literal "a". You -# can use control characters with this as well, as in ?\C-a. -# -# source://syntax_tree//lib/syntax_tree/node.rb#248 -class SyntaxTree::CHAR < ::SyntaxTree::Node - # @return [CHAR] a new instance of CHAR - # - # source://syntax_tree//lib/syntax_tree/node.rb#255 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#296 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#261 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#265 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#253 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#269 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#265 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#282 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#286 - def format(q); end - - # [String] the value of the character literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#250 - def value; end -end - -# CVar represents the use of a class variable. -# -# @@variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#4046 -class SyntaxTree::CVar < ::SyntaxTree::Node - # @return [CVar] a new instance of CVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#4053 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4088 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4059 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4063 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4051 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4067 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4063 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4080 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4084 - def format(q); end - - # [String] the name of the class variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#4048 - def value; end -end - -# This is probably the most complicated formatter in this file. It's -# responsible for formatting chains of method calls, with or without arguments -# or blocks. In general, we want to go from something like -# -# foo.bar.baz -# -# to -# -# foo -# .bar -# .baz -# -# Of course there are a lot of caveats to that, including trailing operators -# when necessary, where comments are places, how blocks are aligned, etc. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2721 -class SyntaxTree::CallChainFormatter - # @return [CallChainFormatter] a new instance of CallChainFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#2725 - def initialize(node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2729 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2795 - def format_chain(q, children); end - - # [CallNode | MethodAddBlock] the top of the call chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#2723 - def node; end - - private - - # For certain nodes, we want to attach directly to the end and don't - # want to indent the first call. So we'll pop off the first children and - # format it separately here. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2898 - def attach_directly?(node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2908 - def format_child(q, child, skip_comments: T.unsafe(nil), skip_operator: T.unsafe(nil), skip_attached: T.unsafe(nil)); end - - class << self - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2879 - def chained?(node); end - end -end - -# CallNode represents a method call. -# -# receiver.message -# -# source://syntax_tree//lib/syntax_tree/node.rb#2946 -class SyntaxTree::CallNode < ::SyntaxTree::Node - # @return [CallNode] a new instance of CallNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#2962 - def initialize(receiver:, operator:, message:, arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3057 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2971 - def accept(visitor); end - - # [nil | ArgParen | Args] the arguments to the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#2957 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3103 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2975 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#2960 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2984 - def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2975 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3006 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3017 - def format(q); end - - # Print out the arguments to this call. If there are no arguments, then do - # nothing. - # - # source://syntax_tree//lib/syntax_tree/node.rb#3065 - def format_arguments(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3075 - def format_contents(q); end - - # [:call | Backtick | Const | Ident | Op] the message being sent - # - # source://syntax_tree//lib/syntax_tree/node.rb#2954 - def message; end - - # [nil | :"::" | Op | Period] the operator being used to send the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#2951 - def operator; end - - # [nil | Node] the receiver of the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#2948 - def receiver; end -end - -# Wraps a call operator (which can be a string literal :: or an Op node or a -# Period node) and formats it when called. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2683 -class SyntaxTree::CallOperatorFormatter - # @return [CallOperatorFormatter] a new instance of CallOperatorFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#2687 - def initialize(operator); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2691 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#2695 - def format(q); end - - # [:"::" | Op | Period] the operator being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#2685 - def operator; end -end - -# Case represents the beginning of a case chain. -# -# case value -# when 1 -# "one" -# when 2 -# "two" -# else -# "number" -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#3119 -class SyntaxTree::Case < ::SyntaxTree::Node - # @return [Case] a new instance of Case - # - # source://syntax_tree//lib/syntax_tree/node.rb#3132 - def initialize(keyword:, value:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3190 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3140 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3144 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3130 - def comments; end - - # [In | When] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#3127 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3148 - def copy(keyword: T.unsafe(nil), value: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3144 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3163 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3173 - def format(q); end - - # [Kw] the keyword that opens this expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#3121 - def keyword; end - - # [nil | Node] optional value being switched on - # - # source://syntax_tree//lib/syntax_tree/node.rb#3124 - def value; end -end - -# Class represents defining a class using the +class+ keyword. -# -# class Container -# end -# -# Classes can have path names as their class name in case it's being nested -# under a namespace, as in: -# -# class Namespace::Container -# end -# -# Classes can also be defined as a top-level path, in the case that it's -# already in a namespace but you want to define it at the top-level instead, -# as in: -# -# module OtherNamespace -# class ::Namespace::Container -# end -# end -# -# All of these declarations can also have an optional superclass reference, as -# in: -# -# class Child < Parent -# end -# -# That superclass can actually be any Ruby expression, it doesn't necessarily -# need to be a constant, as in: -# -# class Child < method -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#3315 -class SyntaxTree::ClassDeclaration < ::SyntaxTree::Node - # @return [ClassDeclaration] a new instance of ClassDeclaration - # - # source://syntax_tree//lib/syntax_tree/node.rb#3329 - def initialize(constant:, superclass:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3392 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3337 - def accept(visitor); end - - # [BodyStmt] the expressions to execute within the context of the class - # - # source://syntax_tree//lib/syntax_tree/node.rb#3324 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3341 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3327 - def comments; end - - # [ConstPathRef | ConstRef | TopConstRef] the name of the class being - # defined - # - # source://syntax_tree//lib/syntax_tree/node.rb#3318 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3345 - def copy(constant: T.unsafe(nil), superclass: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3341 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3360 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3370 - def format(q); end - - # [nil | Node] the optional superclass declaration - # - # source://syntax_tree//lib/syntax_tree/node.rb#3321 - def superclass; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#3399 - def format_declaration(q); end -end - -# Comma represents the use of the , operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#3413 -class SyntaxTree::Comma < ::SyntaxTree::Node - # @return [Comma] a new instance of Comma - # - # source://syntax_tree//lib/syntax_tree/node.rb#3417 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3440 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3422 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3426 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3430 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3426 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3436 - def deconstruct_keys(_keys); end - - # [String] the comma in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#3415 - def value; end -end - -# Command represents a method call with arguments and no parentheses. Note -# that Command nodes only happen when there is no explicit receiver for this -# method. -# -# method argument -# -# source://syntax_tree//lib/syntax_tree/node.rb#3451 -class SyntaxTree::Command < ::SyntaxTree::Node - # @return [Command] a new instance of Command - # - # source://syntax_tree//lib/syntax_tree/node.rb#3464 - def initialize(message:, arguments:, block:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3514 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3472 - def accept(visitor); end - - # [Args] the arguments being sent with the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3456 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3519 - def arity; end - - # [nil | BlockNode] the optional block being passed to the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#3459 - def block; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3476 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3462 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3480 - def copy(message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3476 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3495 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3505 - def format(q); end - - # [Const | Ident] the message being sent to the implicit receiver - # - # source://syntax_tree//lib/syntax_tree/node.rb#3453 - def message; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#3525 - def align(q, node, &block); end -end - -# CommandCall represents a method call on an object with arguments and no -# parentheses. -# -# object.method argument -# -# source://syntax_tree//lib/syntax_tree/node.rb#3563 -class SyntaxTree::CommandCall < ::SyntaxTree::Node - # @return [CommandCall] a new instance of CommandCall - # - # source://syntax_tree//lib/syntax_tree/node.rb#3582 - def initialize(receiver:, operator:, message:, arguments:, block:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3686 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3599 - def accept(visitor); end - - # [nil | Args | ArgParen] the arguments going along with the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3574 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3692 - def arity; end - - # [nil | BlockNode] the block associated with this method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#3577 - def block; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3603 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3580 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3607 - def copy(receiver: T.unsafe(nil), operator: T.unsafe(nil), message: T.unsafe(nil), arguments: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3603 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3631 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3643 - def format(q); end - - # [:call | Const | Ident | Op] the message being send - # - # source://syntax_tree//lib/syntax_tree/node.rb#3571 - def message; end - - # [nil | :"::" | Op | Period] the operator used to send the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3568 - def operator; end - - # [nil | Node] the receiver of the message - # - # source://syntax_tree//lib/syntax_tree/node.rb#3565 - def receiver; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#3698 - def argument_alignment(q, doc); end -end - -# Comment represents a comment in the source. -# -# # comment -# -# source://syntax_tree//lib/syntax_tree/node.rb#3725 -class SyntaxTree::Comment < ::SyntaxTree::Node - # @return [Comment] a new instance of Comment - # - # source://syntax_tree//lib/syntax_tree/node.rb#3734 - def initialize(value:, inline:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3793 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3767 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3771 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3763 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3775 - def copy(value: T.unsafe(nil), inline: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3771 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3785 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3789 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#3759 - def ignore?; end - - # [boolean] whether or not there is code on the same line as this comment. - # If there is, then inline will be true. - # - # source://syntax_tree//lib/syntax_tree/node.rb#3731 - def inline; end - - # [boolean] whether or not there is code on the same line as this comment. - # If there is, then inline will be true. - # - # source://syntax_tree//lib/syntax_tree/node.rb#3731 - def inline?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3743 - def leading!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#3747 - def leading?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3751 - def trailing!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#3755 - def trailing?; end - - # [String] the contents of the comment - # - # source://syntax_tree//lib/syntax_tree/node.rb#3727 - def value; end -end - -# Formats an If or Unless node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6317 -class SyntaxTree::ConditionalFormatter - # @return [ConditionalFormatter] a new instance of ConditionalFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6324 - def initialize(keyword, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6329 - def format(q); end - - # [String] the keyword associated with this conditional - # - # source://syntax_tree//lib/syntax_tree/node.rb#6319 - def keyword; end - - # [If | Unless] the node that is being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#6322 - def node; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#6453 - def contains_conditional?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6388 - def format_break(q, force:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6380 - def format_flat(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6408 - def format_ternary(q); end -end - -# Const represents a literal value that _looks_ like a constant. This could -# actually be a reference to a constant: -# -# Constant -# -# It could also be something that looks like a constant in another context, as -# in a method call to a capitalized method: -# -# object.Constant -# -# or a symbol that starts with a capital letter: -# -# :Constant -# -# source://syntax_tree//lib/syntax_tree/node.rb#3812 -class SyntaxTree::Const < ::SyntaxTree::Node - # @return [Const] a new instance of Const - # - # source://syntax_tree//lib/syntax_tree/node.rb#3819 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3854 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3825 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3829 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3817 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3833 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3829 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3846 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3850 - def format(q); end - - # [String] the name of the constant - # - # source://syntax_tree//lib/syntax_tree/node.rb#3814 - def value; end -end - -# ConstPathField represents the child node of some kind of assignment. It -# represents when you're assigning to a constant that is being referenced as -# a child of another variable. -# -# object::Const = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#3865 -class SyntaxTree::ConstPathField < ::SyntaxTree::Node - # @return [ConstPathField] a new instance of ConstPathField - # - # source://syntax_tree//lib/syntax_tree/node.rb#3875 - def initialize(parent:, constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3919 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3882 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3886 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3873 - def comments; end - - # [Const] the constant itself - # - # source://syntax_tree//lib/syntax_tree/node.rb#3870 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3890 - def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3886 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3904 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3913 - def format(q); end - - # [Node] the source of the constant - # - # source://syntax_tree//lib/syntax_tree/node.rb#3867 - def parent; end -end - -# ConstPathRef represents referencing a constant by a path. -# -# object::Const -# -# source://syntax_tree//lib/syntax_tree/node.rb#3929 -class SyntaxTree::ConstPathRef < ::SyntaxTree::Node - # @return [ConstPathRef] a new instance of ConstPathRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#3939 - def initialize(parent:, constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3983 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3946 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3950 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3937 - def comments; end - - # [Const] the constant itself - # - # source://syntax_tree//lib/syntax_tree/node.rb#3934 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3954 - def copy(parent: T.unsafe(nil), constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3950 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3968 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3977 - def format(q); end - - # [Node] the source of the constant - # - # source://syntax_tree//lib/syntax_tree/node.rb#3931 - def parent; end -end - -# ConstRef represents the name of the constant being used in a class or module -# declaration. -# -# class Container -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#3995 -class SyntaxTree::ConstRef < ::SyntaxTree::Node - # @return [ConstRef] a new instance of ConstRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#4002 - def initialize(constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4037 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4008 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4012 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4000 - def comments; end - - # [Const] the constant itself - # - # source://syntax_tree//lib/syntax_tree/node.rb#3997 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4016 - def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4012 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4029 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4033 - def format(q); end -end - -# If the predicate of a conditional or loop contains an assignment (in which -# case we can't know for certain that that assignment doesn't impact the -# statements inside the conditional) then we can't use the modifier form -# and we must use the block form. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6232 -module SyntaxTree::ContainsAssignment - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#6233 - def call(parent); end - end -end - -# The default indentation level for formatting. We allow changing this so -# that Syntax Tree can format arbitrary parts of a document. -# -# source://syntax_tree//lib/syntax_tree.rb#57 -SyntaxTree::DEFAULT_INDENTATION = T.let(T.unsafe(nil), Integer) - -# This is the default print width when formatting. It can be overridden in the -# CLI by passing the --print-width option or here in the API by passing the -# optional second argument to ::format. -# -# source://syntax_tree//lib/syntax_tree.rb#49 -SyntaxTree::DEFAULT_PRINT_WIDTH = T.let(T.unsafe(nil), Integer) - -# This is the default ruby version that we're going to target for formatting. -# It shouldn't really be changed except in very niche circumstances. -# -# source://syntax_tree//lib/syntax_tree.rb#53 -SyntaxTree::DEFAULT_RUBY_VERSION = T.let(T.unsafe(nil), SyntaxTree::Formatter::SemanticVersion) - -# This module provides shortcuts for creating AST nodes. -# -# source://syntax_tree//lib/syntax_tree/dsl.rb#5 -module SyntaxTree::DSL - # Create a new ARef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#40 - def ARef(collection, index); end - - # Create a new ARefField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#45 - def ARefField(collection, index); end - - # Create a new AliasNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#35 - def AliasNode(left, right); end - - # Create a new ArgBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#64 - def ArgBlock(value); end - - # Create a new ArgParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#54 - def ArgParen(arguments); end - - # Create a new ArgStar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#69 - def ArgStar(value); end - - # Create a new Args node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#59 - def Args(parts); end - - # Create a new ArgsForward node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#74 - def ArgsForward; end - - # Create a new ArrayLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#79 - def ArrayLiteral(lbracket, contents); end - - # Create a new AryPtn node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#88 - def AryPtn(constant, requireds, rest, posts); end - - # Create a new Assign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#99 - def Assign(target, value); end - - # Create a new Assoc node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#104 - def Assoc(key, value); end - - # Create a new AssocSplat node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#109 - def AssocSplat(value); end - - # Create a new BEGINBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#7 - def BEGINBlock(lbrace, statements); end - - # Create a new Backref node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#114 - def Backref(value); end - - # Create a new Backtick node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#119 - def Backtick(value); end - - # Create a new BareAssocHash node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#124 - def BareAssocHash(assocs); end - - # Create a new Begin node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#129 - def Begin(bodystmt); end - - # Create a new Binary node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#139 - def Binary(left, operator, right); end - - # Create a new BlockArg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#154 - def BlockArg(name); end - - # Create a new BlockNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#317 - def BlockNode(opening, block_var, bodystmt); end - - # Create a new BlockVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#149 - def BlockVar(params, locals); end - - # Create a new BodyStmt node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#159 - def BodyStmt(statements, rescue_clause, else_keyword, else_clause, ensure_clause); end - - # Create a new Break node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#177 - def Break(arguments); end - - # Create a new CHAR node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#16 - def CHAR(value); end - - # Create a new CVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#288 - def CVar(value); end - - # Create a new CallNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#182 - def CallNode(receiver, operator, message, arguments); end - - # Create a new Case node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#193 - def Case(keyword, value, consequent); end - - # Create a new ClassDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#213 - def ClassDeclaration(constant, superclass, bodystmt, location = T.unsafe(nil)); end - - # Create a new Comma node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#228 - def Comma(value); end - - # Create a new Command node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#233 - def Command(message, arguments, block, location = T.unsafe(nil)); end - - # Create a new CommandCall node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#243 - def CommandCall(receiver, operator, message, arguments, block); end - - # Create a new Comment node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#255 - def Comment(value, inline, location = T.unsafe(nil)); end - - # Create a new Const node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#260 - def Const(value); end - - # Create a new ConstPathField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#265 - def ConstPathField(parent, constant); end - - # Create a new ConstPathRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#274 - def ConstPathRef(parent, constant); end - - # Create a new ConstRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#283 - def ConstRef(constant); end - - # Create a new DefNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#293 - def DefNode(target, operator, name, params, bodystmt, location = T.unsafe(nil)); end - - # Create a new Defined node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#312 - def Defined(value); end - - # Create a new DynaSymbol node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#337 - def DynaSymbol(parts, quote); end - - # Create a new ENDBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#21 - def ENDBlock(lbrace, statements); end - - # Create a new Else node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#342 - def Else(keyword, statements); end - - # Create a new Elsif node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#351 - def Elsif(predicate, statements, consequent); end - - # Create a new EmbDoc node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#361 - def EmbDoc(value); end - - # Create a new EmbExprBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#366 - def EmbExprBeg(value); end - - # Create a new EmbExprEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#371 - def EmbExprEnd(value); end - - # Create a new EmbVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#376 - def EmbVar(value); end - - # Create a new EndContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#30 - def EndContent(value); end - - # Create a new Ensure node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#381 - def Ensure(keyword, statements); end - - # Create a new ExcessedComma node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#390 - def ExcessedComma(value); end - - # Create a new Field node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#395 - def Field(parent, operator, name); end - - # Create a new FloatLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#405 - def FloatLiteral(value); end - - # Create a new FndPtn node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#410 - def FndPtn(constant, left, values, right); end - - # Create a new For node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#421 - def For(index, collection, statements); end - - # Create a new GVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#431 - def GVar(value); end - - # Create a new HashLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#436 - def HashLiteral(lbrace, assocs); end - - # Create a new Heredoc node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#445 - def Heredoc(beginning, ending, dedent, parts); end - - # Create a new HeredocBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#456 - def HeredocBeg(value); end - - # Create a new HeredocEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#461 - def HeredocEnd(value); end - - # Create a new HshPtn node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#466 - def HshPtn(constant, keywords, keyword_rest); end - - # Create a new IVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#521 - def IVar(value); end - - # Create a new Ident node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#476 - def Ident(value); end - - # Create a new IfNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#481 - def IfNode(predicate, statements, consequent); end - - # Create a new IfOp node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#491 - def IfOp(predicate, truthy, falsy); end - - # Create a new Imaginary node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#501 - def Imaginary(value); end - - # Create a new In node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#506 - def In(pattern, statements, consequent); end - - # Create a new Int node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#516 - def Int(value); end - - # Create a new Kw node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#526 - def Kw(value); end - - # Create a new KwRestParam node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#531 - def KwRestParam(name); end - - # Create a new LBrace node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#560 - def LBrace(value); end - - # Create a new LBracket node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#565 - def LBracket(value); end - - # Create a new LParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#570 - def LParen(value); end - - # Create a new Label node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#536 - def Label(value); end - - # Create a new LabelEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#541 - def LabelEnd(value); end - - # Create a new Lambda node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#546 - def Lambda(params, statements); end - - # Create a new LambdaVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#555 - def LambdaVar(params, locals); end - - # Create a new MAssign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#575 - def MAssign(target, value); end - - # Create a new MLHS node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#585 - def MLHS(parts, comma); end - - # Create a new MLHSParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#590 - def MLHSParen(contents, comma); end - - # Create a new MRHS node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#608 - def MRHS(parts); end - - # Create a new MethodAddBlock node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#580 - def MethodAddBlock(call, block, location = T.unsafe(nil)); end - - # Create a new ModuleDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#599 - def ModuleDeclaration(constant, bodystmt); end - - # Create a new Next node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#613 - def Next(arguments); end - - # Create a new Not node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#892 - def Not(statement, parentheses); end - - # Create a new Op node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#618 - def Op(value); end - - # Create a new OpAssign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#623 - def OpAssign(target, operator, value); end - - # Create a new Params node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#633 - def Params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end - - # Create a new Paren node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#647 - def Paren(lparen, contents); end - - # Create a new Period node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#652 - def Period(value); end - - # Create a new PinnedBegin node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#134 - def PinnedBegin(statement); end - - # Create a new PinnedVarRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#944 - def PinnedVarRef(value); end - - # Create a new Program node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#657 - def Program(statements); end - - # Create a new QSymbols node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#662 - def QSymbols(beginning, elements); end - - # Create a new QSymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#671 - def QSymbolsBeg(value); end - - # Create a new QWords node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#676 - def QWords(beginning, elements); end - - # Create a new QWordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#685 - def QWordsBeg(value); end - - # Create a new RAssign node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#203 - def RAssign(value, operator, pattern); end - - # Create a new RBrace node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#695 - def RBrace(value); end - - # Create a new RBracket node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#700 - def RBracket(value); end - - # Create a new RParen node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#783 - def RParen(value); end - - # Create a new RangeNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#327 - def RangeNode(left, operator, right); end - - # Create a new RationalLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#690 - def RationalLiteral(value); end - - # Create a new Redo node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#705 - def Redo; end - - # Create a new RegexpBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#719 - def RegexpBeg(value); end - - # Create a new RegexpContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#710 - def RegexpContent(beginning, parts); end - - # Create a new RegexpEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#724 - def RegexpEnd(value); end - - # Create a new RegexpLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#729 - def RegexpLiteral(beginning, ending, parts); end - - # Create a new Rescue node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#748 - def Rescue(keyword, exception, statements, consequent); end - - # Create a new RescueEx node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#739 - def RescueEx(exceptions, variable); end - - # Create a new RescueMod node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#759 - def RescueMod(statement, value); end - - # Create a new RestParam node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#768 - def RestParam(name); end - - # Create a new Retry node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#773 - def Retry; end - - # Create a new ReturnNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#778 - def ReturnNode(arguments); end - - # Create a new SClass node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#788 - def SClass(target, bodystmt); end - - # Create a new Statements node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#793 - def Statements(body); end - - # Create a new StringConcat node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#803 - def StringConcat(left, right); end - - # Create a new StringContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#798 - def StringContent(parts); end - - # Create a new StringDVar node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#808 - def StringDVar(variable); end - - # Create a new StringEmbExpr node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#813 - def StringEmbExpr(statements); end - - # Create a new StringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#818 - def StringLiteral(parts, quote); end - - # Create a new Super node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#823 - def Super(arguments); end - - # Create a new SymBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#828 - def SymBeg(value); end - - # Create a new SymbolContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#833 - def SymbolContent(value); end - - # Create a new SymbolLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#838 - def SymbolLiteral(value); end - - # Create a new Symbols node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#843 - def Symbols(beginning, elements); end - - # Create a new SymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#852 - def SymbolsBeg(value); end - - # Create a new TLamBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#862 - def TLamBeg(value); end - - # Create a new TLambda node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#857 - def TLambda(value); end - - # Create a new TStringBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#877 - def TStringBeg(value); end - - # Create a new TStringContent node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#882 - def TStringContent(value); end - - # Create a new TStringEnd node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#887 - def TStringEnd(value); end - - # Create a new TopConstField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#867 - def TopConstField(constant); end - - # Create a new TopConstRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#872 - def TopConstRef(constant); end - - # Create a new Unary node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#901 - def Unary(operator, statement); end - - # Create a new Undef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#910 - def Undef(symbols); end - - # Create a new UnlessNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#915 - def UnlessNode(predicate, statements, consequent); end - - # Create a new UntilNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#925 - def UntilNode(predicate, statements); end - - # Create a new VCall node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#949 - def VCall(value); end - - # Create a new VarField node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#934 - def VarField(value); end - - # Create a new VarRef node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#939 - def VarRef(value); end - - # Create a new VoidStmt node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#954 - def VoidStmt; end - - # Create a new When node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#959 - def When(arguments, statements, consequent); end - - # Create a new WhileNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#969 - def WhileNode(predicate, statements); end - - # Create a new Word node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#978 - def Word(parts); end - - # Create a new Words node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#983 - def Words(beginning, elements); end - - # Create a new WordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#992 - def WordsBeg(value); end - - # Create a new XString node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#997 - def XString(parts); end - - # Create a new XStringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#1002 - def XStringLiteral(parts); end - - # Create a new YieldNode node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#1007 - def YieldNode(arguments); end - - # Create a new ZSuper node. - # - # source://syntax_tree//lib/syntax_tree/dsl.rb#1012 - def ZSuper; end -end - -# Provides the ability to index source files into a database, then query for -# the nodes. -# -# source://syntax_tree//lib/syntax_tree/database.rb#6 -module SyntaxTree::Database; end - -# Query for the attributes of a node, optionally also filtering by type. -# -# source://syntax_tree//lib/syntax_tree/database.rb#99 -class SyntaxTree::Database::AttrQuery - # @return [AttrQuery] a new instance of AttrQuery - # - # source://syntax_tree//lib/syntax_tree/database.rb#102 - def initialize(type, attrs); end - - # Returns the value of attribute attrs. - # - # source://syntax_tree//lib/syntax_tree/database.rb#100 - def attrs; end - - # source://syntax_tree//lib/syntax_tree/database.rb#107 - def each(database, &block); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/database.rb#100 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/database.rb#276 -class SyntaxTree::Database::Connection - # @return [Connection] a new instance of Connection - # - # source://syntax_tree//lib/syntax_tree/database.rb#279 - def initialize(raw_connection); end - - # source://syntax_tree//lib/syntax_tree/database.rb#283 - def execute(query, binds = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/database.rb#287 - def index_file(filepath); end - - # source://syntax_tree//lib/syntax_tree/database.rb#292 - def last_insert_row_id; end - - # source://syntax_tree//lib/syntax_tree/database.rb#296 - def prepare; end - - # Returns the value of attribute raw_connection. - # - # source://syntax_tree//lib/syntax_tree/database.rb#277 - def raw_connection; end - - # source://syntax_tree//lib/syntax_tree/database.rb#326 - def search(query); end -end - -# source://syntax_tree//lib/syntax_tree/database.rb#7 -class SyntaxTree::Database::IndexingVisitor < ::SyntaxTree::FieldVisitor - # @return [IndexingVisitor] a new instance of IndexingVisitor - # - # source://syntax_tree//lib/syntax_tree/database.rb#10 - def initialize(database, filepath); end - - # Returns the value of attribute database. - # - # source://syntax_tree//lib/syntax_tree/database.rb#8 - def database; end - - # Returns the value of attribute filepath. - # - # source://syntax_tree//lib/syntax_tree/database.rb#8 - def filepath; end - - # Returns the value of attribute node_id. - # - # source://syntax_tree//lib/syntax_tree/database.rb#8 - def node_id; end - - private - - # source://syntax_tree//lib/syntax_tree/database.rb#18 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/database.rb#21 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/database.rb#31 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/database.rb#41 - def node(node, _name); end - - # source://syntax_tree//lib/syntax_tree/database.rb#67 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/database.rb#64 - def text(name, value); end -end - -# Query for the results of either query. -# -# source://syntax_tree//lib/syntax_tree/database.rb#136 -class SyntaxTree::Database::OrQuery - # @return [OrQuery] a new instance of OrQuery - # - # source://syntax_tree//lib/syntax_tree/database.rb#139 - def initialize(left, right); end - - # source://syntax_tree//lib/syntax_tree/database.rb#144 - def each(database, &block); end - - # Returns the value of attribute left. - # - # source://syntax_tree//lib/syntax_tree/database.rb#137 - def left; end - - # Returns the value of attribute right. - # - # source://syntax_tree//lib/syntax_tree/database.rb#137 - def right; end -end - -# A pattern matching expression that will be compiled into a query. -# -# source://syntax_tree//lib/syntax_tree/database.rb#166 -class SyntaxTree::Database::Pattern - # @return [Pattern] a new instance of Pattern - # - # source://syntax_tree//lib/syntax_tree/database.rb#172 - def initialize(query); end - - # source://syntax_tree//lib/syntax_tree/database.rb#176 - def compile; end - - # Returns the value of attribute query. - # - # source://syntax_tree//lib/syntax_tree/database.rb#170 - def query; end - - private - - # Shortcut for combining two queries into one that returns the results of - # if either query matches. - # - # source://syntax_tree//lib/syntax_tree/database.rb#195 - def combine_or(left, right); end - - # in foo | bar - # - # source://syntax_tree//lib/syntax_tree/database.rb#200 - def compile_binary(node); end - - # in Ident - # - # source://syntax_tree//lib/syntax_tree/database.rb#207 - def compile_const(node); end - - # in SyntaxTree::Ident - # - # source://syntax_tree//lib/syntax_tree/database.rb#219 - def compile_const_path_ref(node); end - - # @raise [CompilationError] - # - # source://syntax_tree//lib/syntax_tree/database.rb#189 - def compile_error(node); end - - # in Ident[value: String] - # - # source://syntax_tree//lib/syntax_tree/database.rb#234 - def compile_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/database.rb#258 - def compile_node(node); end - - # in Foo - # - # source://syntax_tree//lib/syntax_tree/database.rb#248 - def compile_var_ref(node); end -end - -# source://syntax_tree//lib/syntax_tree/database.rb#167 -class SyntaxTree::Database::Pattern::CompilationError < ::StandardError; end - -# A lazy query result. -# -# source://syntax_tree//lib/syntax_tree/database.rb#151 -class SyntaxTree::Database::QueryResult - # @return [QueryResult] a new instance of QueryResult - # - # source://syntax_tree//lib/syntax_tree/database.rb#154 - def initialize(database, query); end - - # Returns the value of attribute database. - # - # source://syntax_tree//lib/syntax_tree/database.rb#152 - def database; end - - # source://syntax_tree//lib/syntax_tree/database.rb#159 - def each(&block); end - - # Returns the value of attribute query. - # - # source://syntax_tree//lib/syntax_tree/database.rb#152 - def query; end -end - -# Query for a specific type of node. -# -# source://syntax_tree//lib/syntax_tree/database.rb#85 -class SyntaxTree::Database::TypeQuery - # @return [TypeQuery] a new instance of TypeQuery - # - # source://syntax_tree//lib/syntax_tree/database.rb#88 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/database.rb#92 - def each(database, &block); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/database.rb#86 - def type; end -end - -# Def represents defining a regular method on the current self object. -# -# def method(param) result end -# def object.method(param) result end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4098 -class SyntaxTree::DefNode < ::SyntaxTree::Node - # @return [DefNode] a new instance of DefNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#4117 - def initialize(target:, operator:, name:, params:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4217 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4127 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4230 - def arity; end - - # [BodyStmt | Node] the expressions to be executed by the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4112 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4131 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4115 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4135 - def copy(target: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), params: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4131 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4159 - def deconstruct_keys(_keys); end - - # Returns true if the method was found in the source in the "endless" form, - # i.e. where the method body is defined using the `=` operator after the - # method name and parameters. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4226 - def endless?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4171 - def format(q); end - - # [Backtick | Const | Ident | Kw | Op] the name of the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4106 - def name; end - - # [nil | Op | Period] the operator being used to declare the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4103 - def operator; end - - # [nil | Params | Paren] the parameter declaration for the method - # - # source://syntax_tree//lib/syntax_tree/node.rb#4109 - def params; end - - # [nil | Node] the target where the method is being defined - # - # source://syntax_tree//lib/syntax_tree/node.rb#4100 - def target; end -end - -# Defined represents the use of the +defined?+ operator. It can be used with -# and without parentheses. -# -# defined?(variable) -# -# source://syntax_tree//lib/syntax_tree/node.rb#4249 -class SyntaxTree::Defined < ::SyntaxTree::Node - # @return [Defined] a new instance of Defined - # - # source://syntax_tree//lib/syntax_tree/node.rb#4256 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4299 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4262 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4266 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4254 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4270 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4266 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4283 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4287 - def format(q); end - - # [Node] the value being sent to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#4251 - def value; end -end - -# DynaSymbol represents a symbol literal that uses quotes to dynamically -# define its value. -# -# :"#{variable}" -# -# They can also be used as a special kind of dynamic hash key, as in: -# -# { "#{key}": value } -# -# source://syntax_tree//lib/syntax_tree/node.rb#4663 -class SyntaxTree::DynaSymbol < ::SyntaxTree::Node - # @return [DynaSymbol] a new instance of DynaSymbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#4674 - def initialize(parts:, quote:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4736 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4681 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4685 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4672 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4689 - def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4685 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4703 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4707 - def format(q); end - - # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the - # dynamic symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#4666 - def parts; end - - # [nil | String] the quote used to delimit the dynamic symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#4669 - def quote; end - - private - - # Here we determine the quotes to use for a dynamic symbol. It's bound by a - # lot of rules because it could be in many different contexts with many - # different kinds of escaping. - # - # source://syntax_tree//lib/syntax_tree/node.rb#4746 - def quotes(q); end -end - -# ENDBlock represents the use of the +END+ keyword, which hooks into the -# lifecycle of the interpreter. Whatever is inside the block will get executed -# when the program ends. -# -# END { -# } -# -# Interestingly, the END keyword doesn't allow the do and end keywords for the -# block. Only braces are permitted. -# -# source://syntax_tree//lib/syntax_tree/node.rb#310 -class SyntaxTree::ENDBlock < ::SyntaxTree::Node - # @return [ENDBlock] a new instance of ENDBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#320 - def initialize(lbrace:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#371 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#327 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#331 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#318 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#335 - def copy(lbrace: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#331 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#349 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#358 - def format(q); end - - # [LBrace] the left brace that is seen after the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#312 - def lbrace; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#315 - def statements; end -end - -# Else represents the end of an +if+, +unless+, or +case+ chain. -# -# if variable -# else -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4792 -class SyntaxTree::Else < ::SyntaxTree::Node - # @return [Else] a new instance of Else - # - # source://syntax_tree//lib/syntax_tree/node.rb#4802 - def initialize(keyword:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4853 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4809 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4813 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4800 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4817 - def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4813 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4831 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4840 - def format(q); end - - # [Kw] the else keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#4794 - def keyword; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#4797 - def statements; end -end - -# Elsif represents another clause in an +if+ or +unless+ chain. -# -# if variable -# elsif other_variable -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4865 -class SyntaxTree::Elsif < ::SyntaxTree::Node - # @return [Elsif] a new instance of Elsif - # - # source://syntax_tree//lib/syntax_tree/node.rb#4878 - def initialize(predicate:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4942 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4886 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4890 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4876 - def comments; end - - # [nil | Elsif | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#4873 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4894 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4890 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4909 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4919 - def format(q); end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#4867 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#4870 - def statements; end -end - -# EmbDoc represents a multi-line comment. -# -# =begin -# first line -# second line -# =end -# -# source://syntax_tree//lib/syntax_tree/node.rb#4955 -class SyntaxTree::EmbDoc < ::SyntaxTree::Node - # @return [EmbDoc] a new instance of EmbDoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#4959 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5027 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4995 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4999 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4991 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5003 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4999 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5012 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5016 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4987 - def ignore?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4983 - def inline?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4967 - def leading!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4971 - def leading?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4975 - def trailing!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4979 - def trailing?; end - - # [String] the contents of the comment - # - # source://syntax_tree//lib/syntax_tree/node.rb#4957 - def value; end -end - -# EmbExprBeg represents the beginning token for using interpolation inside of -# a parent node that accepts string content (like a string or regular -# expression). -# -# "Hello, #{person}!" -# -# source://syntax_tree//lib/syntax_tree/node.rb#5038 -class SyntaxTree::EmbExprBeg < ::SyntaxTree::Node - # @return [EmbExprBeg] a new instance of EmbExprBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#5042 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5068 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5047 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5051 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5055 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5051 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5064 - def deconstruct_keys(_keys); end - - # [String] the #{ used in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#5040 - def value; end -end - -# EmbExprEnd represents the ending token for using interpolation inside of a -# parent node that accepts string content (like a string or regular -# expression). -# -# "Hello, #{person}!" -# -# source://syntax_tree//lib/syntax_tree/node.rb#5079 -class SyntaxTree::EmbExprEnd < ::SyntaxTree::Node - # @return [EmbExprEnd] a new instance of EmbExprEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#5083 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5109 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5088 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5092 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5096 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5092 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5105 - def deconstruct_keys(_keys); end - - # [String] the } used in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#5081 - def value; end -end - -# EmbVar represents the use of shorthand interpolation for an instance, class, -# or global variable into a parent node that accepts string content (like a -# string or regular expression). -# -# "#@variable" -# -# In the example above, an EmbVar node represents the # because it forces -# -# source://syntax_tree//lib/syntax_tree/node.rb#5122 -class SyntaxTree::EmbVar < ::SyntaxTree::Node - # @return [EmbVar] a new instance of EmbVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#5126 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5152 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5131 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5135 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5139 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5135 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5148 - def deconstruct_keys(_keys); end - - # [String] the # used in the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#5124 - def value; end -end - -# EndContent represents the use of __END__ syntax, which allows individual -# scripts to keep content after the main ruby code that can be read through -# the DATA constant. -# -# puts DATA.read -# -# __END__ -# some other content that is not executed by the program -# -# source://syntax_tree//lib/syntax_tree/node.rb#386 -class SyntaxTree::EndContent < ::SyntaxTree::Node - # @return [EndContent] a new instance of EndContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#393 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#442 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#399 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#403 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#391 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#407 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#403 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#420 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#424 - def format(q); end - - # [String] the content after the script - # - # source://syntax_tree//lib/syntax_tree/node.rb#388 - def value; end -end - -# Ensure represents the use of the +ensure+ keyword and its subsequent -# statements. -# -# begin -# ensure -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5164 -class SyntaxTree::Ensure < ::SyntaxTree::Node - # @return [Ensure] a new instance of Ensure - # - # source://syntax_tree//lib/syntax_tree/node.rb#5174 - def initialize(keyword:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5223 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5181 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5185 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5172 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5189 - def copy(keyword: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5185 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5203 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5212 - def format(q); end - - # [Kw] the ensure keyword that began this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5166 - def keyword; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#5169 - def statements; end -end - -# ExcessedComma represents a trailing comma in a list of block parameters. It -# changes the block parameters such that they will destructure. -# -# [[1, 2, 3], [2, 3, 4]].each do |first, second,| -# end -# -# In the above example, an ExcessedComma node would appear in the third -# position of the Params node that is used to declare that block. The third -# position typically represents a rest-type parameter, but in this case is -# used to indicate that a trailing comma was used. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5239 -class SyntaxTree::ExcessedComma < ::SyntaxTree::Node - # @return [ExcessedComma] a new instance of ExcessedComma - # - # source://syntax_tree//lib/syntax_tree/node.rb#5246 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5281 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5252 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5256 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5244 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5260 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5256 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5273 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5277 - def format(q); end - - # [String] the comma - # - # source://syntax_tree//lib/syntax_tree/node.rb#5241 - def value; end -end - -# Field is always the child of an assignment. It represents assigning to a -# “field” on an object. -# -# object.variable = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#5291 -class SyntaxTree::Field < ::SyntaxTree::Node - # @return [Field] a new instance of Field - # - # source://syntax_tree//lib/syntax_tree/node.rb#5304 - def initialize(parent:, operator:, name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5354 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5312 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5316 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5302 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5321 - def copy(parent: T.unsafe(nil), operator: T.unsafe(nil), name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5316 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5336 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5346 - def format(q); end - - # [Const | Ident] the name of the field being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#5299 - def name; end - - # [:"::" | Op | Period] the operator being used for the assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#5296 - def operator; end - - # [Node] the parent object that owns the field being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#5293 - def parent; end -end - -# This is the parent class of a lot of built-in visitors for Syntax Tree. It -# reflects visiting each of the fields on every node in turn. It itself does -# not do anything with these fields, it leaves that behavior up to the -# subclass to implement. -# -# In order to properly use this class, you will need to subclass it and -# implement #comments, #field, #list, #node, #pairs, and #text. Those are -# documented here. -# -# == comments(node) -# -# This accepts the node that is being visited and does something depending on -# the comments attached to the node. -# -# == field(name, value) -# -# This accepts the name of the field being visited as a string (like "value") -# and the actual value of that field. The value can be a subclass of Node or -# any other type that can be held within the tree. -# -# == list(name, values) -# -# This accepts the name of the field being visited as well as a list of -# values. This is used, for example, when visiting something like the body of -# a Statements node. -# -# == node(name, node) -# -# This is the parent serialization method for each node. It is called with the -# node itself, as well as the type of the node as a string. The type is an -# internally used value that usually resembles the name of the ripper event -# that generated the node. The method should yield to the given block which -# then calls through to visit each of the fields on the node. -# -# == text(name, value) -# -# This accepts the name of the field being visited as well as a string value -# representing the value of the field. -# -# == pairs(name, values) -# -# This accepts the name of the field being visited as well as a list of pairs -# that represent the value of the field. It is used only in a couple of -# circumstances, like when visiting the list of optional parameters defined on -# a method. -# -# source://syntax_tree//lib/syntax_tree/field_visitor.rb#50 -class SyntaxTree::FieldVisitor < ::SyntaxTree::BasicVisitor - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#163 - def visit_BEGIN(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#245 - def visit_CHAR(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#342 - def visit_END(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1018 - def visit___end__(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#68 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#52 - def visit_aref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#60 - def visit_aref_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#76 - def visit_arg_block(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#83 - def visit_arg_paren(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#90 - def visit_arg_star(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#97 - def visit_args(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#104 - def visit_args_forward(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#108 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#115 - def visit_aryptn(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#125 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#133 - def visit_assoc(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#141 - def visit_assoc_splat(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#148 - def visit_backref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#152 - def visit_backtick(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#156 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#170 - def visit_begin(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#177 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#186 - def visit_block(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#201 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#194 - def visit_blockarg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#209 - def visit_bodystmt(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#219 - def visit_break(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#226 - def visit_call(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#236 - def visit_case(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#249 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#258 - def visit_comma(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#262 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#271 - def visit_command_call(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#282 - def visit_comment(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#286 - def visit_const(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#290 - def visit_const_path_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#298 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#306 - def visit_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#313 - def visit_cvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#317 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#328 - def visit_defined(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#335 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#349 - def visit_else(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#356 - def visit_elsif(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#365 - def visit_embdoc(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#369 - def visit_embexpr_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#373 - def visit_embexpr_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#377 - def visit_embvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#381 - def visit_ensure(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#388 - def visit_excessed_comma(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#392 - def visit_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#401 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#405 - def visit_fndptn(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#415 - def visit_for(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#424 - def visit_gvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#428 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#435 - def visit_heredoc(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#442 - def visit_heredoc_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#446 - def visit_heredoc_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#450 - def visit_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#459 - def visit_ident(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#463 - def visit_if(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#472 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#481 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#485 - def visit_in(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#494 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#498 - def visit_ivar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#502 - def visit_kw(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#506 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#513 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#517 - def visit_label_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#521 - def visit_lambda(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#529 - def visit_lambda_var(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#537 - def visit_lbrace(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#541 - def visit_lbracket(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#545 - def visit_lparen(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#549 - def visit_massign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#557 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#565 - def visit_mlhs(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#572 - def visit_mlhs_paren(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#579 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#587 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#594 - def visit_next(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#601 - def visit_not(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#608 - def visit_op(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#612 - def visit_opassign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#621 - def visit_params(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#634 - def visit_paren(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#641 - def visit_period(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#645 - def visit_pinned_begin(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#652 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#659 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#666 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#673 - def visit_qsymbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#677 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#684 - def visit_qwords_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#688 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#697 - def visit_rassign(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#706 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#710 - def visit_rbrace(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#714 - def visit_rbracket(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#718 - def visit_redo(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#722 - def visit_regexp_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#726 - def visit_regexp_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#730 - def visit_regexp_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#734 - def visit_regexp_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#742 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#751 - def visit_rescue_ex(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#759 - def visit_rescue_mod(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#767 - def visit_rest_param(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#774 - def visit_retry(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#778 - def visit_return(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#785 - def visit_rparen(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#789 - def visit_sclass(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#797 - def visit_statements(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#804 - def visit_string_concat(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#812 - def visit_string_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#816 - def visit_string_dvar(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#823 - def visit_string_embexpr(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#830 - def visit_string_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#837 - def visit_super(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#844 - def visit_symbeg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#848 - def visit_symbol_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#852 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#859 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#866 - def visit_symbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#870 - def visit_tlambda(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#874 - def visit_tlambeg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#878 - def visit_top_const_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#885 - def visit_top_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#892 - def visit_tstring_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#896 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#900 - def visit_tstring_end(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#904 - def visit_unary(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#912 - def visit_undef(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#919 - def visit_unless(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#928 - def visit_until(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#936 - def visit_var_field(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#943 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#950 - def visit_vcall(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#957 - def visit_void_stmt(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#961 - def visit_when(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#970 - def visit_while(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#978 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#985 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#992 - def visit_words_beg(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#996 - def visit_xstring(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1000 - def visit_xstring_literal(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1007 - def visit_yield(node); end - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1014 - def visit_zsuper(node); end - - private - - # source://syntax_tree//lib/syntax_tree/field_visitor.rb#1025 - def visit_token(node, type); end -end - -# FloatLiteral represents a floating point number literal. -# -# 1.0 -# -# source://syntax_tree//lib/syntax_tree/node.rb#5364 -class SyntaxTree::FloatLiteral < ::SyntaxTree::Node - # @return [FloatLiteral] a new instance of FloatLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#5371 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5406 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5377 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5381 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5369 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5385 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5381 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5398 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5402 - def format(q); end - - # [String] the value of the floating point number literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#5366 - def value; end -end - -# Formats either a Break, Next, or Return node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#2438 -class SyntaxTree::FlowControlFormatter - # @return [FlowControlFormatter] a new instance of FlowControlFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#2445 - def initialize(keyword, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2450 - def format(q); end - - # [String] the keyword to print - # - # source://syntax_tree//lib/syntax_tree/node.rb#2440 - def keyword; end - - # [Break | Next | Return] the node being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#2443 - def node; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#2599 - def format_arguments(q, opening, closing); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2589 - def format_array_contents(q, array); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#2609 - def skip_parens?(node); end -end - -# FndPtn represents matching against a pattern where you find a pattern in an -# array using the Ruby 3.0+ pattern matching syntax. -# -# case value -# in [*, 7, *] -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5418 -class SyntaxTree::FndPtn < ::SyntaxTree::Node - # @return [FndPtn] a new instance of FndPtn - # - # source://syntax_tree//lib/syntax_tree/node.rb#5435 - def initialize(constant:, left:, values:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5504 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5444 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5448 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5433 - def comments; end - - # [nil | VarRef | ConstPathRef] the optional constant wrapper - # - # source://syntax_tree//lib/syntax_tree/node.rb#5420 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5452 - def copy(constant: T.unsafe(nil), left: T.unsafe(nil), values: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5448 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5468 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5479 - def format(q); end - - # [VarField] the splat on the left-hand side - # - # source://syntax_tree//lib/syntax_tree/node.rb#5423 - def left; end - - # [VarField] the splat on the right-hand side - # - # source://syntax_tree//lib/syntax_tree/node.rb#5430 - def right; end - - # [Array[ Node ]] the list of positional expressions in the pattern that - # are being matched - # - # source://syntax_tree//lib/syntax_tree/node.rb#5427 - def values; end -end - -# For represents using a +for+ loop. -# -# for value in list do -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5516 -class SyntaxTree::For < ::SyntaxTree::Node - # @return [For] a new instance of For - # - # source://syntax_tree//lib/syntax_tree/node.rb#5530 - def initialize(index:, collection:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5590 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5538 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5542 - def child_nodes; end - - # [Node] the object being enumerated in the loop - # - # source://syntax_tree//lib/syntax_tree/node.rb#5522 - def collection; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5528 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5546 - def copy(index: T.unsafe(nil), collection: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5542 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5561 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5571 - def format(q); end - - # [MLHS | VarField] the variable declaration being used to - # pull values out of the object being enumerated - # - # source://syntax_tree//lib/syntax_tree/node.rb#5519 - def index; end - - # [Statements] the statements to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#5525 - def statements; end -end - -# A slightly enhanced PP that knows how to format recursively including -# comments. -# -# source://syntax_tree//lib/syntax_tree/formatter.rb#6 -class SyntaxTree::Formatter < ::PrettierPrint - # @return [Formatter] a new instance of Formatter - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#95 - def initialize(source, *args, options: T.unsafe(nil)); end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def disable_auto_ternary; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def disable_auto_ternary?; end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#115 - def format(node, stackable: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#175 - def format_each(nodes); end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#179 - def grandparent; end - - # This is a simplified version of prettyprint's group. It doesn't provide - # any of the more advanced options because we don't need them and they take - # up expensive computation time. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#194 - def group; end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#183 - def parent; end - - # source://syntax_tree//lib/syntax_tree/formatter.rb#187 - def parents; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def quote; end - - # A similar version to the super, except that it calls back into the - # separator proc with the instance of `self`. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#208 - def seplist(list, sep = T.unsafe(nil), iter_method = T.unsafe(nil)); end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#83 - def source; end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#83 - def stack; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def target_ruby_version; end - - # This is a much simplified version of prettyprint's text. It avoids - # calculating width by pushing the string directly onto the target. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#224 - def text(string); end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def trailing_comma; end - - # These options are overridden in plugins to we need to make sure they are - # available here. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#87 - def trailing_comma?; end - - class << self - # source://syntax_tree//lib/syntax_tree/formatter.rb#108 - def format(source, node, base_indentation = T.unsafe(nil)); end - end -end - -# source://syntax_tree//lib/syntax_tree/formatter.rb#80 -SyntaxTree::Formatter::COMMENT_PRIORITY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/formatter.rb#81 -SyntaxTree::Formatter::HEREDOC_PRIORITY = T.let(T.unsafe(nil), Integer) - -# We want to minimize as much as possible the number of options that are -# available in syntax tree. For the most part, if users want non-default -# formatting, they should override the format methods on the specific nodes -# themselves. However, because of some history with prettier and the fact -# that folks have become entrenched in their ways, we decided to provide a -# small amount of configurability. -# -# source://syntax_tree//lib/syntax_tree/formatter.rb#23 -class SyntaxTree::Formatter::Options - # @return [Options] a new instance of Options - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#29 - def initialize(quote: T.unsafe(nil), trailing_comma: T.unsafe(nil), disable_auto_ternary: T.unsafe(nil), target_ruby_version: T.unsafe(nil)); end - - # Returns the value of attribute disable_auto_ternary. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def disable_auto_ternary; end - - # Returns the value of attribute quote. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def quote; end - - # Returns the value of attribute target_ruby_version. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def target_ruby_version; end - - # Returns the value of attribute trailing_comma. - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#24 - def trailing_comma; end -end - -# Unfortunately, Gem::Version.new is not ractor-safe because it performs -# global caching using a class variable. This works around that by just -# setting the instance variables directly. -# -# source://syntax_tree//lib/syntax_tree/formatter.rb#10 -class SyntaxTree::Formatter::SemanticVersion < ::Gem::Version - # @return [SemanticVersion] a new instance of SemanticVersion - # - # source://syntax_tree//lib/syntax_tree/formatter.rb#11 - def initialize(version); end -end - -# GVar represents a global variable literal. -# -# $variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#5600 -class SyntaxTree::GVar < ::SyntaxTree::Node - # @return [GVar] a new instance of GVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#5607 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5642 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5613 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5617 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5605 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5621 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5617 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5634 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5638 - def format(q); end - - # [String] the name of the global variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#5602 - def value; end -end - -# This holds references to objects that respond to both #parse and #format -# so that we can use them in the CLI. -# -# source://syntax_tree//lib/syntax_tree.rb#43 -SyntaxTree::HANDLERS = T.let(T.unsafe(nil), Hash) - -# This module is responsible for formatting the assocs contained within a -# hash or bare hash. It first determines if every key in the hash can use -# labels. If it can, it uses labels. Otherwise it uses hash rockets. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1728 -module SyntaxTree::HashKeyFormatter - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#1786 - def for(container); end - end -end - -# When formatting a single assoc node without the context of the parent -# hash, this formatter is used. It uses whatever is present in the node, -# because there is nothing to be consistent with. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1775 -class SyntaxTree::HashKeyFormatter::Identity - # source://syntax_tree//lib/syntax_tree/node.rb#1776 - def format_key(q, key); end -end - -# Formats the keys of a hash literal using labels. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1730 -class SyntaxTree::HashKeyFormatter::Labels - # source://syntax_tree//lib/syntax_tree/node.rb#1733 - def format_key(q, key); end -end - -# source://syntax_tree//lib/syntax_tree/node.rb#1731 -SyntaxTree::HashKeyFormatter::Labels::LABEL = T.let(T.unsafe(nil), Regexp) - -# Formats the keys of a hash literal using hash rockets. -# -# source://syntax_tree//lib/syntax_tree/node.rb#1756 -class SyntaxTree::HashKeyFormatter::Rockets - # source://syntax_tree//lib/syntax_tree/node.rb#1757 - def format_key(q, key); end -end - -# HashLiteral represents a hash literal. -# -# { key => value } -# -# source://syntax_tree//lib/syntax_tree/node.rb#5651 -class SyntaxTree::HashLiteral < ::SyntaxTree::Node - # @return [HashLiteral] a new instance of HashLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#5687 - def initialize(lbrace:, assocs:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5728 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5694 - def accept(visitor); end - - # [Array[ Assoc | AssocSplat ]] the optional contents of the hash - # - # source://syntax_tree//lib/syntax_tree/node.rb#5682 - def assocs; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5698 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5685 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5702 - def copy(lbrace: T.unsafe(nil), assocs: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5698 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5716 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5720 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5733 - def format_key(q, key); end - - # [LBrace] the left brace that opens this hash - # - # source://syntax_tree//lib/syntax_tree/node.rb#5679 - def lbrace; end - - private - - # If we have an empty hash that contains only comments, then we're going - # to do some special printing to ensure they get indented correctly. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#5741 - def empty_with_comments?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5745 - def format_contents(q); end -end - -# This is a special formatter used if the hash literal contains no values -# but _does_ contain comments. In this case we do some special formatting to -# make sure the comments gets indented properly. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5655 -class SyntaxTree::HashLiteral::EmptyWithCommentsFormatter - # @return [EmptyWithCommentsFormatter] a new instance of EmptyWithCommentsFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#5659 - def initialize(lbrace); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5663 - def format(q); end - - # [LBrace] the opening brace - # - # source://syntax_tree//lib/syntax_tree/node.rb#5657 - def lbrace; end -end - -# Heredoc represents a heredoc string literal. -# -# <<~DOC -# contents -# DOC -# -# source://syntax_tree//lib/syntax_tree/node.rb#5774 -class SyntaxTree::Heredoc < ::SyntaxTree::Node - # @return [Heredoc] a new instance of Heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5791 - def initialize(beginning:, location:, ending: T.unsafe(nil), dedent: T.unsafe(nil), parts: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5873 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5800 - def accept(visitor); end - - # [HeredocBeg] the opening of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5776 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5804 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5789 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5808 - def copy(beginning: T.unsafe(nil), location: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5804 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5823 - def deconstruct_keys(_keys); end - - # [Integer] how far to dedent the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5782 - def dedent; end - - # [HeredocEnd] the ending of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5779 - def ending; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5838 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # heredoc string literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#5786 - def parts; end -end - -# This is a very specific behavior where you want to force a newline, but -# don't want to force the break parent. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5835 -SyntaxTree::Heredoc::SEPARATOR = T.let(T.unsafe(nil), PrettierPrint::Breakable) - -# HeredocBeg represents the beginning declaration of a heredoc. -# -# <<~DOC -# contents -# DOC -# -# In the example above the HeredocBeg node represents <<~DOC. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5886 -class SyntaxTree::HeredocBeg < ::SyntaxTree::Node - # @return [HeredocBeg] a new instance of HeredocBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#5893 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5928 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5899 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5903 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5891 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5907 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5903 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5920 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5924 - def format(q); end - - # [String] the opening declaration of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5888 - def value; end -end - -# HeredocEnd represents the closing declaration of a heredoc. -# -# <<~DOC -# contents -# DOC -# -# In the example above the HeredocEnd node represents the closing DOC. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5940 -class SyntaxTree::HeredocEnd < ::SyntaxTree::Node - # @return [HeredocEnd] a new instance of HeredocEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#5947 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5982 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5953 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5957 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#5945 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5961 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5957 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#5974 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#5978 - def format(q); end - - # [String] the closing declaration of the heredoc - # - # source://syntax_tree//lib/syntax_tree/node.rb#5942 - def value; end -end - -# HshPtn represents matching against a hash pattern using the Ruby 2.7+ -# pattern matching syntax. -# -# case value -# in { key: } -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#5994 -class SyntaxTree::HshPtn < ::SyntaxTree::Node - # @return [HshPtn] a new instance of HshPtn - # - # source://syntax_tree//lib/syntax_tree/node.rb#6054 - def initialize(constant:, keywords:, keyword_rest:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6147 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6062 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6066 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6052 - def comments; end - - # [nil | VarRef | ConstPathRef] the optional constant wrapper - # - # source://syntax_tree//lib/syntax_tree/node.rb#6042 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6070 - def copy(constant: T.unsafe(nil), keywords: T.unsafe(nil), keyword_rest: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6066 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6085 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6095 - def format(q); end - - # [nil | VarField] an optional parameter to gather up all remaining keywords - # - # source://syntax_tree//lib/syntax_tree/node.rb#6049 - def keyword_rest; end - - # [Array[ [DynaSymbol | Label, nil | Node] ]] the set of tuples - # representing the keywords that should be matched against in the pattern - # - # source://syntax_tree//lib/syntax_tree/node.rb#6046 - def keywords; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#6158 - def format_contents(q, parts, nested); end -end - -# Formats a key-value pair in a hash pattern. The value is optional. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5996 -class SyntaxTree::HshPtn::KeywordFormatter - # @return [KeywordFormatter] a new instance of KeywordFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6003 - def initialize(key, value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6008 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6012 - def format(q); end - - # [Label] the keyword being used - # - # source://syntax_tree//lib/syntax_tree/node.rb#5998 - def key; end - - # [Node] the optional value for the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#6001 - def value; end -end - -# Formats the optional double-splat from the pattern. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6023 -class SyntaxTree::HshPtn::KeywordRestFormatter - # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6027 - def initialize(keyword_rest); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6031 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6035 - def format(q); end - - # [VarField] the parameter that matches the remaining keywords - # - # source://syntax_tree//lib/syntax_tree/node.rb#6025 - def keyword_rest; end -end - -# IVar represents an instance variable literal. -# -# @variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#6878 -class SyntaxTree::IVar < ::SyntaxTree::Node - # @return [IVar] a new instance of IVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#6885 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6920 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6891 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6895 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6883 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6899 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6895 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6912 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6916 - def format(q); end - - # [String] the name of the instance variable - # - # source://syntax_tree//lib/syntax_tree/node.rb#6880 - def value; end -end - -# Ident represents an identifier anywhere in code. It can represent a very -# large number of things, depending on where it is in the syntax tree. -# -# value -# -# source://syntax_tree//lib/syntax_tree/node.rb#6181 -class SyntaxTree::Ident < ::SyntaxTree::Node - # @return [Ident] a new instance of Ident - # - # source://syntax_tree//lib/syntax_tree/node.rb#6188 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6223 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6194 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6198 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6186 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6202 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6198 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6215 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6219 - def format(q); end - - # [String] the value of the identifier - # - # source://syntax_tree//lib/syntax_tree/node.rb#6183 - def value; end -end - -# If represents the first clause in an +if+ chain. -# -# if predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#6471 -class SyntaxTree::IfNode < ::SyntaxTree::Node - # @return [IfNode] a new instance of IfNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#6484 - def initialize(predicate:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6529 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6492 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6496 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6482 - def comments; end - - # [nil | Elsif | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#6479 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6500 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6496 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6515 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6525 - def format(q); end - - # Checks if the node was originally found in the modifier form. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#6535 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#6473 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#6476 - def statements; end -end - -# IfOp represents a ternary clause. -# -# predicate ? truthy : falsy -# -# source://syntax_tree//lib/syntax_tree/node.rb#6544 -class SyntaxTree::IfOp < ::SyntaxTree::Node - # @return [IfOp] a new instance of IfOp - # - # source://syntax_tree//lib/syntax_tree/node.rb#6557 - def initialize(predicate:, truthy:, falsy:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6631 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6565 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6569 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6555 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6573 - def copy(predicate: T.unsafe(nil), truthy: T.unsafe(nil), falsy: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6569 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6588 - def deconstruct_keys(_keys); end - - # [Node] the expression to be executed if the predicate is falsy - # - # source://syntax_tree//lib/syntax_tree/node.rb#6552 - def falsy; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6598 - def format(q); end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#6546 - def predicate; end - - # [Node] the expression to be executed if the predicate is truthy - # - # source://syntax_tree//lib/syntax_tree/node.rb#6549 - def truthy; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#6638 - def format_break(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6661 - def format_flat(q); end -end - -# Imaginary represents an imaginary number literal. -# -# 1i -# -# source://syntax_tree//lib/syntax_tree/node.rb#6680 -class SyntaxTree::Imaginary < ::SyntaxTree::Node - # @return [Imaginary] a new instance of Imaginary - # - # source://syntax_tree//lib/syntax_tree/node.rb#6687 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6722 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6693 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6697 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6685 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6701 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6697 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6714 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6718 - def format(q); end - - # [String] the value of the imaginary number literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#6682 - def value; end -end - -# In represents using the +in+ keyword within the Ruby 2.7+ pattern matching -# syntax. -# -# case value -# in pattern -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#6734 -class SyntaxTree::In < ::SyntaxTree::Node - # @return [In] a new instance of In - # - # source://syntax_tree//lib/syntax_tree/node.rb#6747 - def initialize(pattern:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6812 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6755 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6759 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6745 - def comments; end - - # [nil | In | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#6742 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6763 - def copy(pattern: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6759 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6778 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6788 - def format(q); end - - # [Node] the pattern to check against - # - # source://syntax_tree//lib/syntax_tree/node.rb#6736 - def pattern; end - - # [Statements] the expressions to execute if the pattern matched - # - # source://syntax_tree//lib/syntax_tree/node.rb#6739 - def statements; end -end - -# This class can be used to build an index of the structure of Ruby files. We -# define an index as the list of constants and methods defined within a file. -# -# This index strives to be as fast as possible to better support tools like -# IDEs. Because of that, it has different backends depending on what -# functionality is available. -# -# source://syntax_tree//lib/syntax_tree/index.rb#10 -module SyntaxTree::Index - class << self - # This method accepts source code and then indexes it. - # - # source://syntax_tree//lib/syntax_tree/index.rb#674 - def index(source, backend: T.unsafe(nil)); end - - # This method accepts a filepath and then indexes it. - # - # source://syntax_tree//lib/syntax_tree/index.rb#679 - def index_file(filepath, backend: T.unsafe(nil)); end - end -end - -# This entry represents a method definition that was created using the alias -# keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#85 -class SyntaxTree::Index::AliasMethodDefinition - # @return [AliasMethodDefinition] a new instance of AliasMethodDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#88 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#86 - def nesting; end -end - -# This entry represents a class definition using the class keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#22 -class SyntaxTree::Index::ClassDefinition - # @return [ClassDefinition] a new instance of ClassDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#25 - def initialize(nesting, name, superclass, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def nesting; end - - # Returns the value of attribute superclass. - # - # source://syntax_tree//lib/syntax_tree/index.rb#23 - def superclass; end -end - -# This entry represents a constant assignment. -# -# source://syntax_tree//lib/syntax_tree/index.rb#35 -class SyntaxTree::Index::ConstantDefinition - # @return [ConstantDefinition] a new instance of ConstantDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#38 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#36 - def nesting; end -end - -# This class handles parsing comments from Ruby source code in the case that -# we use the instruction sequence backend. Because the instruction sequence -# backend doesn't provide comments (since they are dropped) we provide this -# interface to lazily parse them out. -# -# source://syntax_tree//lib/syntax_tree/index.rb#152 -class SyntaxTree::Index::EntryComments - include ::Enumerable - - # @return [EntryComments] a new instance of EntryComments - # - # source://syntax_tree//lib/syntax_tree/index.rb#156 - def initialize(file_comments, location); end - - # source://syntax_tree//lib/syntax_tree/index.rb#161 - def each(&block); end - - # Returns the value of attribute file_comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#154 - def file_comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#154 - def location; end -end - -# When you're using the instruction sequence backend, this class is used to -# lazily parse comments out of the source code. -# -# source://syntax_tree//lib/syntax_tree/index.rb#98 -class SyntaxTree::Index::FileComments - # @return [FileComments] a new instance of FileComments - # - # source://syntax_tree//lib/syntax_tree/index.rb#139 - def initialize(source); end - - # source://syntax_tree//lib/syntax_tree/index.rb#143 - def comments; end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/index.rb#137 - def source; end -end - -# This represents the Ruby source in the form of a file. When it needs to -# be read we'll read the file. -# -# source://syntax_tree//lib/syntax_tree/index.rb#115 -class SyntaxTree::Index::FileComments::FileSource - # @return [FileSource] a new instance of FileSource - # - # source://syntax_tree//lib/syntax_tree/index.rb#118 - def initialize(filepath); end - - # Returns the value of attribute filepath. - # - # source://syntax_tree//lib/syntax_tree/index.rb#116 - def filepath; end - - # source://syntax_tree//lib/syntax_tree/index.rb#122 - def source; end -end - -# We use the ripper library to pull out source comments. -# -# source://syntax_tree//lib/syntax_tree/index.rb#100 -class SyntaxTree::Index::FileComments::Parser < ::Ripper - # @return [Parser] a new instance of Parser - # - # source://syntax_tree//lib/syntax_tree/index.rb#103 - def initialize(*_arg0); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#101 - def comments; end - - # source://syntax_tree//lib/syntax_tree/index.rb#108 - def on_comment(value); end -end - -# This represents the Ruby source in the form of a string. When it needs -# to be read the string is returned. -# -# source://syntax_tree//lib/syntax_tree/index.rb#129 -class SyntaxTree::Index::FileComments::StringSource - # @return [StringSource] a new instance of StringSource - # - # source://syntax_tree//lib/syntax_tree/index.rb#132 - def initialize(source); end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/index.rb#130 - def source; end -end - -# The class defined here is used to perform the indexing, depending on what -# functionality is available from the runtime. -# -# source://syntax_tree//lib/syntax_tree/index.rb#670 -SyntaxTree::Index::INDEX_BACKEND = SyntaxTree::Index::ISeqBackend - -# This backend creates the index using RubyVM::InstructionSequence, which is -# faster than using the Syntax Tree parser, but is not available on all -# runtimes. -# -# source://syntax_tree//lib/syntax_tree/index.rb#177 -class SyntaxTree::Index::ISeqBackend - # source://syntax_tree//lib/syntax_tree/index.rb#184 - def index(source); end - - # source://syntax_tree//lib/syntax_tree/index.rb#191 - def index_file(filepath); end - - private - - # source://syntax_tree//lib/syntax_tree/index.rb#242 - def find_attr_arguments(insns, index); end - - # source://syntax_tree//lib/syntax_tree/index.rb#205 - def find_constant_path(insns, index); end - - # source://syntax_tree//lib/syntax_tree/index.rb#273 - def index_iseq(iseq, file_comments); end - - # source://syntax_tree//lib/syntax_tree/index.rb#200 - def location_for(iseq); end - - # source://syntax_tree//lib/syntax_tree/index.rb#258 - def method_definition(nesting, name, location, file_comments); end -end - -# source://syntax_tree//lib/syntax_tree/index.rb#182 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#181 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_FLAG_SCOPED = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#178 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_CLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#180 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_MODULE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/index.rb#179 -SyntaxTree::Index::ISeqBackend::VM_DEFINECLASS_TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) - -# This is a location for an index entry. -# -# source://syntax_tree//lib/syntax_tree/index.rb#12 -class SyntaxTree::Index::Location - # @return [Location] a new instance of Location - # - # source://syntax_tree//lib/syntax_tree/index.rb#15 - def initialize(line, column); end - - # Returns the value of attribute column. - # - # source://syntax_tree//lib/syntax_tree/index.rb#13 - def column; end - - # Returns the value of attribute line. - # - # source://syntax_tree//lib/syntax_tree/index.rb#13 - def line; end -end - -# This entry represents a method definition using the def keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#59 -class SyntaxTree::Index::MethodDefinition - # @return [MethodDefinition] a new instance of MethodDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#62 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#60 - def nesting; end -end - -# This entry represents a module definition using the module keyword. -# -# source://syntax_tree//lib/syntax_tree/index.rb#47 -class SyntaxTree::Index::ModuleDefinition - # @return [ModuleDefinition] a new instance of ModuleDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#50 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#48 - def nesting; end -end - -# This backend creates the index using the Syntax Tree parser and a visitor. -# It is not as fast as using the instruction sequences directly, but is -# supported on all runtimes. -# -# source://syntax_tree//lib/syntax_tree/index.rb#452 -class SyntaxTree::Index::ParserBackend - # source://syntax_tree//lib/syntax_tree/index.rb#659 - def index(source); end - - # source://syntax_tree//lib/syntax_tree/index.rb#663 - def index_file(filepath); end -end - -# source://syntax_tree//lib/syntax_tree/index.rb#453 -class SyntaxTree::Index::ParserBackend::ConstantNameVisitor < ::SyntaxTree::Visitor - # source://syntax_tree//lib/syntax_tree/index.rb#458 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#454 - def visit_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#462 - def visit_var_ref(node); end -end - -# source://syntax_tree//lib/syntax_tree/index.rb#467 -class SyntaxTree::Index::ParserBackend::IndexVisitor < ::SyntaxTree::Visitor - # @return [IndexVisitor] a new instance of IndexVisitor - # - # source://syntax_tree//lib/syntax_tree/index.rb#470 - def initialize; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#468 - def nesting; end - - # Returns the value of attribute results. - # - # source://syntax_tree//lib/syntax_tree/index.rb#468 - def results; end - - # Returns the value of attribute statements. - # - # source://syntax_tree//lib/syntax_tree/index.rb#468 - def statements; end - - # source://syntax_tree//lib/syntax_tree/index.rb#477 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#496 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#515 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#547 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#584 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#608 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#626 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/index.rb#631 - def visit_statements(node); end - - private - - # source://syntax_tree//lib/syntax_tree/index.rb#639 - def comments_for(node); end -end - -# This entry represents a singleton method definition using the def keyword -# with a specified target. -# -# source://syntax_tree//lib/syntax_tree/index.rb#72 -class SyntaxTree::Index::SingletonMethodDefinition - # @return [SingletonMethodDefinition] a new instance of SingletonMethodDefinition - # - # source://syntax_tree//lib/syntax_tree/index.rb#75 - def initialize(nesting, name, location, comments); end - - # Returns the value of attribute comments. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def comments; end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def location; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def name; end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/index.rb#73 - def nesting; end -end - -# Int represents an integer number literal. -# -# 1 -# -# source://syntax_tree//lib/syntax_tree/node.rb#6822 -class SyntaxTree::Int < ::SyntaxTree::Node - # @return [Int] a new instance of Int - # - # source://syntax_tree//lib/syntax_tree/node.rb#6829 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6869 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6835 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6839 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6827 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6843 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6839 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6853 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6857 - def format(q); end - - # [String] the value of the integer - # - # source://syntax_tree//lib/syntax_tree/node.rb#6824 - def value; end -end - -# This visitor transforms the AST into a hash that contains only primitives -# that can be easily serialized into JSON. -# -# source://syntax_tree//lib/syntax_tree/json_visitor.rb#8 -class SyntaxTree::JSONVisitor < ::SyntaxTree::FieldVisitor - # @return [JSONVisitor] a new instance of JSONVisitor - # - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#11 - def initialize; end - - # Returns the value of attribute target. - # - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#9 - def target; end - - private - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#17 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#21 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#25 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#29 - def node(node, type); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#38 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#42 - def text(name, value); end - - # source://syntax_tree//lib/syntax_tree/json_visitor.rb#46 - def visit_location(location); end -end - -# Kw represents the use of a keyword. It can be almost anywhere in the syntax -# tree, so you end up seeing it quite a lot. -# -# if value -# end -# -# In the above example, there would be two Kw nodes: one for the if and one -# for the end. Note that anything that matches the list of keywords in Ruby -# will use a Kw, so if you use a keyword in a symbol literal for instance: -# -# :if -# -# then the contents of the symbol node will contain a Kw node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6938 -class SyntaxTree::Kw < ::SyntaxTree::Node - # @return [Kw] a new instance of Kw - # - # source://syntax_tree//lib/syntax_tree/node.rb#6948 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6981 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6955 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6959 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6946 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6963 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6959 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#6973 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#6977 - def format(q); end - - # [Symbol] the symbol version of the value - # - # source://syntax_tree//lib/syntax_tree/node.rb#6943 - def name; end - - # [String] the value of the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#6940 - def value; end -end - -# KwRestParam represents defining a parameter in a method definition that -# accepts all remaining keyword parameters. -# -# def method(**kwargs) end -# -# source://syntax_tree//lib/syntax_tree/node.rb#6991 -class SyntaxTree::KwRestParam < ::SyntaxTree::Node - # @return [KwRestParam] a new instance of KwRestParam - # - # source://syntax_tree//lib/syntax_tree/node.rb#6998 - def initialize(name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7034 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7004 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7008 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#6996 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7012 - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7008 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7025 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7029 - def format(q); end - - # [nil | Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#6993 - def name; end -end - -# LBrace represents the use of a left brace, i.e., {. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7316 -class SyntaxTree::LBrace < ::SyntaxTree::Node - # @return [LBrace] a new instance of LBrace - # - # source://syntax_tree//lib/syntax_tree/node.rb#7323 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7358 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7329 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7333 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7321 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7337 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7333 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7350 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7354 - def format(q); end - - # [String] the left brace - # - # source://syntax_tree//lib/syntax_tree/node.rb#7318 - def value; end - - class << self - # Because some nodes keep around a { token so that comments can be attached - # to it if they occur in the source, oftentimes an LBrace is a child of - # another node. This means it's required at initialization time. To make it - # easier to create LBrace nodes without any specific value, this method - # provides a default node. - # - # source://syntax_tree//lib/syntax_tree/node.rb#7367 - def default; end - end -end - -# LBracket represents the use of a left bracket, i.e., [. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7373 -class SyntaxTree::LBracket < ::SyntaxTree::Node - # @return [LBracket] a new instance of LBracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#7380 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7415 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7386 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7390 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7378 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7394 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7390 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7407 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7411 - def format(q); end - - # [String] the left bracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#7375 - def value; end - - class << self - # Because some nodes keep around a [ token so that comments can be attached - # to it if they occur in the source, oftentimes an LBracket is a child of - # another node. This means it's required at initialization time. To make it - # easier to create LBracket nodes without any specific value, this method - # provides a default node. - # - # source://syntax_tree//lib/syntax_tree/node.rb#7424 - def default; end - end -end - -# LParen represents the use of a left parenthesis, i.e., (. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7430 -class SyntaxTree::LParen < ::SyntaxTree::Node - # @return [LParen] a new instance of LParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#7437 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7472 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7443 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7447 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7435 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7451 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7447 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7464 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7468 - def format(q); end - - # [String] the left parenthesis - # - # source://syntax_tree//lib/syntax_tree/node.rb#7432 - def value; end - - class << self - # Because some nodes keep around a ( token so that comments can be attached - # to it if they occur in the source, oftentimes an LParen is a child of - # another node. This means it's required at initialization time. To make it - # easier to create LParen nodes without any specific value, this method - # provides a default node. - # - # source://syntax_tree//lib/syntax_tree/node.rb#7481 - def default; end - end -end - -# Label represents the use of an identifier to associate with an object. You -# can find it in a hash key, as in: -# -# { key: value } -# -# In this case "key:" would be the body of the label. You can also find it in -# pattern matching, as in: -# -# case value -# in key: -# end -# -# In this case "key:" would be the body of the label. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7052 -class SyntaxTree::Label < ::SyntaxTree::Node - # @return [Label] a new instance of Label - # - # source://syntax_tree//lib/syntax_tree/node.rb#7059 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7094 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7065 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7069 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7057 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7073 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7069 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7086 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7090 - def format(q); end - - # [String] the value of the label - # - # source://syntax_tree//lib/syntax_tree/node.rb#7054 - def value; end -end - -# LabelEnd represents the end of a dynamic symbol. -# -# { "key": value } -# -# In the example above, LabelEnd represents the "\":" token at the end of the -# hash key. This node is important for determining the type of quote being -# used by the label. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7106 -class SyntaxTree::LabelEnd < ::SyntaxTree::Node - # @return [LabelEnd] a new instance of LabelEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#7110 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7136 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7115 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7119 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7123 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7119 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7132 - def deconstruct_keys(_keys); end - - # [String] the end of the label - # - # source://syntax_tree//lib/syntax_tree/node.rb#7108 - def value; end -end - -# Lambda represents using a lambda literal (not the lambda method call). -# -# ->(value) { value * 2 } -# -# source://syntax_tree//lib/syntax_tree/node.rb#7145 -class SyntaxTree::Lambda < ::SyntaxTree::Node - # @return [Lambda] a new instance of Lambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#7155 - def initialize(params:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7239 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7162 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7166 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7153 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7170 - def copy(params: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7166 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7184 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7193 - def format(q); end - - # [LambdaVar | Paren] the parameter declaration for this lambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#7147 - def params; end - - # [BodyStmt | Statements] the expressions to be executed in this lambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#7150 - def statements; end -end - -# LambdaVar represents the parameters being declared for a lambda. Effectively -# this node is everything contained within the parentheses. This includes all -# of the various parameter types, as well as block-local variable -# declarations. -# -# -> (positional, optional = value, keyword:, █ local) do -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#7253 -class SyntaxTree::LambdaVar < ::SyntaxTree::Node - # @return [LambdaVar] a new instance of LambdaVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#7263 - def initialize(params:, locals:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7309 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7270 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7274 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7261 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7278 - def copy(params: T.unsafe(nil), locals: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7274 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7292 - def deconstruct_keys(_keys); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#7296 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7300 - def format(q); end - - # [Array[ Ident ]] the list of block-local variable declarations - # - # source://syntax_tree//lib/syntax_tree/node.rb#7258 - def locals; end - - # [Params] the parameters being declared with the block - # - # source://syntax_tree//lib/syntax_tree/node.rb#7255 - def params; end -end - -# Syntax Tree additionally ships with a language server conforming to the -# language server protocol. It can be invoked through the CLI by running: -# -# stree lsp -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#14 -class SyntaxTree::LanguageServer - # @return [LanguageServer] a new instance of LanguageServer - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#217 - def initialize(input: T.unsafe(nil), output: T.unsafe(nil), print_width: T.unsafe(nil)); end - - # Returns the value of attribute input. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#215 - def input; end - - # Returns the value of attribute output. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#215 - def output; end - - # Returns the value of attribute print_width. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#215 - def print_width; end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#228 - def run; end - - private - - # source://syntax_tree//lib/syntax_tree/language_server.rb#280 - def capabilities; end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#293 - def format(source, extension); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#317 - def inlay_hints(source); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#333 - def log(message); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#327 - def write(value); end -end - -# This class provides inlay hints for the language server. For more -# information, see the spec here: -# https://github.com/microsoft/language-server-protocol/issues/956. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#18 -class SyntaxTree::LanguageServer::InlayHints < ::SyntaxTree::Visitor - # @return [InlayHints] a new instance of InlayHints - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#43 - def initialize; end - - # Returns the value of attribute hints. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#41 - def hints; end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#41 - def stack; end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#48 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#67 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#81 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#102 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#124 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#145 - def visit_unary(node); end - - private - - # source://syntax_tree//lib/syntax_tree/language_server.rb#156 - def parentheses(location); end -end - -# This represents a hint that is going to be displayed in the editor. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#20 -class SyntaxTree::LanguageServer::InlayHints::Hint - # @return [Hint] a new instance of Hint - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#23 - def initialize(line:, character:, label:); end - - # Returns the value of attribute character. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#21 - def character; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#21 - def label; end - - # Returns the value of attribute line. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#21 - def line; end - - # This is the shape that the LSP expects. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#30 - def to_json(*opts); end -end - -# This is a small module that effectively mirrors pattern matching. We're -# using it so that we can support truffleruby without having to ignore the -# language server. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#174 -module SyntaxTree::LanguageServer::Request - class << self - # source://syntax_tree//lib/syntax_tree/language_server.rb#203 - def [](value); end - end -end - -# Represents a hash pattern. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#176 -class SyntaxTree::LanguageServer::Request::Shape - # @return [Shape] a new instance of Shape - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#179 - def initialize(values); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#183 - def ===(other); end - - # Returns the value of attribute values. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#177 - def values; end -end - -# Represents an array pattern. -# -# source://syntax_tree//lib/syntax_tree/language_server.rb#191 -class SyntaxTree::LanguageServer::Request::Tuple - # @return [Tuple] a new instance of Tuple - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#194 - def initialize(values); end - - # source://syntax_tree//lib/syntax_tree/language_server.rb#198 - def ===(other); end - - # Returns the value of attribute values. - # - # source://syntax_tree//lib/syntax_tree/language_server.rb#192 - def values; end -end - -# Represents the location of a node in the tree from the source code. -# -# source://syntax_tree//lib/syntax_tree/node.rb#5 -class SyntaxTree::Location - # @return [Location] a new instance of Location - # - # source://syntax_tree//lib/syntax_tree/node.rb#13 - def initialize(start_line:, start_char:, start_column:, end_line:, end_char:, end_column:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#33 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#50 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#54 - def deconstruct_keys(_keys); end - - # Returns the value of attribute end_char. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def end_char; end - - # Returns the value of attribute end_column. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def end_column; end - - # Returns the value of attribute end_line. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def end_line; end - - # source://syntax_tree//lib/syntax_tree/node.rb#29 - def lines; end - - # Returns the value of attribute start_char. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def start_char; end - - # Returns the value of attribute start_column. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def start_column; end - - # Returns the value of attribute start_line. - # - # source://syntax_tree//lib/syntax_tree/node.rb#6 - def start_line; end - - # source://syntax_tree//lib/syntax_tree/node.rb#39 - def to(other); end - - class << self - # A convenience method that is typically used when you don't care about the - # location of a node, but need to create a Location instance to pass to a - # constructor. - # - # source://syntax_tree//lib/syntax_tree/node.rb#90 - def default; end - - # source://syntax_tree//lib/syntax_tree/node.rb#76 - def fixed(line:, char:, column:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#65 - def token(line:, char:, column:, size:); end - end -end - -# Formats an Until or While node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11378 -class SyntaxTree::LoopFormatter - # @return [LoopFormatter] a new instance of LoopFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#11385 - def initialize(keyword, node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11390 - def format(q); end - - # [String] the name of the keyword used for this loop - # - # source://syntax_tree//lib/syntax_tree/node.rb#11380 - def keyword; end - - # [Until | While] the node that is being formatted - # - # source://syntax_tree//lib/syntax_tree/node.rb#11383 - def node; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#11437 - def format_break(q); end -end - -# MAssign is a parent node of any kind of multiple assignment. This includes -# splitting out variables on the left like: -# -# first, second, third = value -# -# as well as splitting out variables on the right, as in: -# -# value = first, second, third -# -# Both sides support splats, as well as variables following them. There's also -# destructuring behavior that you can achieve with the following: -# -# first, = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#7500 -class SyntaxTree::MAssign < ::SyntaxTree::Node - # @return [MAssign] a new instance of MAssign - # - # source://syntax_tree//lib/syntax_tree/node.rb#7510 - def initialize(target:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7554 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7517 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7521 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7508 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7525 - def copy(target: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7521 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7539 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7543 - def format(q); end - - # [MLHS | MLHSParen] the target of the multiple assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#7502 - def target; end - - # [Node] the value being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#7505 - def value; end -end - -# MLHS represents a list of values being destructured on the left-hand side -# of a multiple assignment. -# -# first, second, third = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#7638 -class SyntaxTree::MLHS < ::SyntaxTree::Node - # @return [MLHS] a new instance of MLHS - # - # source://syntax_tree//lib/syntax_tree/node.rb#7655 - def initialize(parts:, location:, comma: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7693 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7662 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7666 - def child_nodes; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7650 - def comma; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7650 - def comma=(_arg0); end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7653 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7670 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil), comma: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7666 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7684 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7688 - def format(q); end - - # [ - # Array[ - # ARefField | ArgStar | ConstPathField | Field | Ident | MLHSParen | - # TopConstField | VarField - # ] - # ] the parts of the left-hand side of a multiple assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#7645 - def parts; end -end - -# MLHSParen represents parentheses being used to destruct values in a multiple -# assignment on the left hand side. -# -# (left, right) = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#7704 -class SyntaxTree::MLHSParen < ::SyntaxTree::Node - # @return [MLHSParen] a new instance of MLHSParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#7716 - def initialize(contents:, location:, comma: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7769 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7723 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7727 - def child_nodes; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7711 - def comma; end - - # [boolean] whether or not there is a trailing comma at the end of this - # list, which impacts destructuring. It's an attr_accessor so that while - # the syntax tree is being built it can be set by its parent node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7711 - def comma=(_arg0); end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7714 - def comments; end - - # [MLHS | MLHSParen] the contents inside of the parentheses - # - # source://syntax_tree//lib/syntax_tree/node.rb#7706 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7731 - def copy(contents: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7727 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7744 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7748 - def format(q); end -end - -# MRHS represents the values that are being assigned on the right-hand side of -# a multiple assignment. -# -# values = first, second, third -# -# source://syntax_tree//lib/syntax_tree/node.rb#7869 -class SyntaxTree::MRHS < ::SyntaxTree::Node - # @return [MRHS] a new instance of MRHS - # - # source://syntax_tree//lib/syntax_tree/node.rb#7876 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7911 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7882 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7886 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7874 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7890 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7886 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7903 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7907 - def format(q); end - - # [Array[Node]] the parts that are being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#7871 - def parts; end -end - -# This visitor transforms the AST into a Ruby pattern matching expression that -# would match correctly against the AST. -# -# source://syntax_tree//lib/syntax_tree/match_visitor.rb#6 -class SyntaxTree::MatchVisitor < ::SyntaxTree::FieldVisitor - # @return [MatchVisitor] a new instance of MatchVisitor - # - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#9 - def initialize(q); end - - # Returns the value of attribute q. - # - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#7 - def q; end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#13 - def visit(node); end - - private - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#30 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#44 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#52 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#65 - def node(node, _type); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#86 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/match_visitor.rb#112 - def text(name, value); end -end - -# This module is responsible for rendering mermaid (https://mermaid.js.org/) -# flow charts. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#9 -module SyntaxTree::Mermaid - class << self - # Escape a label to be used in the mermaid syntax. This is used to escape - # HTML entities such that they render properly within the quotes. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#158 - def escape(label); end - - # Create a new flowchart. If a block is given, it will be yielded to and - # the flowchart will be rendered. Otherwise, the flowchart will be - # returned. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#165 - def flowchart; end - end -end - -# This is the main class that handles rendering a flowchart. It keeps track -# of its nodes and links and renders them according to the mermaid syntax. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#12 -class SyntaxTree::Mermaid::FlowChart - # @return [FlowChart] a new instance of FlowChart - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#15 - def initialize; end - - # Retrieve a node that has already been added to the flowchart by its id. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#25 - def fetch(id); end - - # Add a link to the flowchart between two nodes with an optional label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#30 - def link(from, to, label = T.unsafe(nil), type: T.unsafe(nil), color: T.unsafe(nil)); end - - # Returns the value of attribute links. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def links; end - - # Add a node to the flowchart with an optional label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#39 - def node(id, label = T.unsafe(nil), shape: T.unsafe(nil)); end - - # Returns the value of attribute nodes. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def nodes; end - - # Returns the value of attribute output. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def output; end - - # Returns the value of attribute prefix. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#13 - def prefix; end - - # Return the rendered flowchart. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#64 - def render; end - - # Add a subgraph to the flowchart. Within the given block, all of the - # nodes will be rendered within the subgraph. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#49 - def subgraph(label); end -end - -# This class represents a link between two nodes in a flowchart. It is not -# meant to be interacted with directly, but rather used as a data structure -# by the FlowChart class. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#78 -class SyntaxTree::Mermaid::Link - # @return [Link] a new instance of Link - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#84 - def initialize(from, to, label, type, color); end - - # Returns the value of attribute color. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def color; end - - # Returns the value of attribute from. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def from; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def label; end - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#95 - def render; end - - # Returns the value of attribute to. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def to; end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#82 - def type; end - - private - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#108 - def sides; end -end - -# source://syntax_tree//lib/syntax_tree/mermaid.rb#80 -SyntaxTree::Mermaid::Link::COLORS = T.let(T.unsafe(nil), Array) - -# source://syntax_tree//lib/syntax_tree/mermaid.rb#79 -SyntaxTree::Mermaid::Link::TYPES = T.let(T.unsafe(nil), Array) - -# This class represents a node in a flowchart. Unlike the Link class, it can -# be used directly. It is the return value of the #node method, and is meant -# to be passed around to #link methods to create links between nodes. -# -# source://syntax_tree//lib/syntax_tree/mermaid.rb#121 -class SyntaxTree::Mermaid::Node - # @return [Node] a new instance of Node - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#126 - def initialize(id, label, shape); end - - # Returns the value of attribute id. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 - def id; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 - def label; end - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#134 - def render; end - - # Returns the value of attribute shape. - # - # source://syntax_tree//lib/syntax_tree/mermaid.rb#124 - def shape; end - - private - - # source://syntax_tree//lib/syntax_tree/mermaid.rb#141 - def bounds; end -end - -# source://syntax_tree//lib/syntax_tree/mermaid.rb#122 -SyntaxTree::Mermaid::Node::SHAPES = T.let(T.unsafe(nil), Array) - -# This visitor transforms the AST into a mermaid flow chart. -# -# source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#5 -class SyntaxTree::MermaidVisitor < ::SyntaxTree::FieldVisitor - # @return [MermaidVisitor] a new instance of MermaidVisitor - # - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#8 - def initialize; end - - # Returns the value of attribute flowchart. - # - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 - def flowchart; end - - # Returns the value of attribute target. - # - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#6 - def target; end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#13 - def visit_program(node); end - - private - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#20 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#24 - def field(name, value); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#37 - def list(name, values); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#43 - def node(node, type); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#55 - def pairs(name, values); end - - # source://syntax_tree//lib/syntax_tree/mermaid_visitor.rb#65 - def text(name, value); end -end - -# MethodAddBlock represents a method call with a block argument. -# -# method {} -# -# source://syntax_tree//lib/syntax_tree/node.rb#7563 -class SyntaxTree::MethodAddBlock < ::SyntaxTree::Node - # @return [MethodAddBlock] a new instance of MethodAddBlock - # - # source://syntax_tree//lib/syntax_tree/node.rb#7573 - def initialize(call:, block:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7622 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7580 - def accept(visitor); end - - # [BlockNode] the block being sent with the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#7568 - def block; end - - # [ARef | CallNode | Command | CommandCall | Super | ZSuper] the method call - # - # source://syntax_tree//lib/syntax_tree/node.rb#7565 - def call; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7584 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7571 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7588 - def copy(call: T.unsafe(nil), block: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7584 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7602 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7606 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7627 - def format_contents(q); end -end - -# ModuleDeclaration represents defining a module using the +module+ keyword. -# -# module Namespace -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#7779 -class SyntaxTree::ModuleDeclaration < ::SyntaxTree::Node - # @return [ModuleDeclaration] a new instance of ModuleDeclaration - # - # source://syntax_tree//lib/syntax_tree/node.rb#7789 - def initialize(constant:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7849 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7796 - def accept(visitor); end - - # [BodyStmt] the expressions to be executed in the context of the module - # - # source://syntax_tree//lib/syntax_tree/node.rb#7784 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7800 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7787 - def comments; end - - # [ConstPathRef | ConstRef | TopConstRef] the name of the module - # - # source://syntax_tree//lib/syntax_tree/node.rb#7781 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7804 - def copy(constant: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7800 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7818 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7827 - def format(q); end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#7856 - def format_declaration(q); end -end - -# This visitor walks through the tree and copies each node as it is being -# visited. This is useful for mutating the tree before it is formatted. -# -# source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#6 -class SyntaxTree::MutationVisitor < ::SyntaxTree::BasicVisitor - # @return [MutationVisitor] a new instance of MutationVisitor - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#9 - def initialize; end - - # Create a new mutation based on the given query that will mutate the node - # using the given block. The block should return a new node that will take - # the place of the given node in the tree. These blocks frequently make use - # of the `copy` method on nodes to create a new node with the same - # properties as the original node. - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#18 - def mutate(query, &block); end - - # Returns the value of attribute mutations. - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#7 - def mutations; end - - # This is the base visit method for each node in the tree. It first creates - # a copy of the node using the visit_* methods defined below. Then it checks - # each mutation in sequence and calls it if it finds a match. - # - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#25 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#38 - def visit_BEGIN(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#46 - def visit_CHAR(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#51 - def visit_END(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#59 - def visit___end__(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#64 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#69 - def visit_aref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#74 - def visit_aref_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#89 - def visit_arg_block(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#79 - def visit_arg_paren(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#94 - def visit_arg_star(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#84 - def visit_args(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#99 - def visit_args_forward(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#104 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#112 - def visit_aryptn(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#122 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#127 - def visit_assoc(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#132 - def visit_assoc_splat(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#137 - def visit_backref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#142 - def visit_backtick(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#147 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#152 - def visit_begin(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#162 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#295 - def visit_block(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#167 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#172 - def visit_blockarg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#177 - def visit_bodystmt(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#187 - def visit_break(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#192 - def visit_call(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#202 - def visit_case(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#216 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#225 - def visit_comma(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#230 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#239 - def visit_command_call(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#249 - def visit_comment(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#254 - def visit_const(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#259 - def visit_const_path_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#264 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#269 - def visit_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#274 - def visit_cvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#279 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#290 - def visit_defined(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#313 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#318 - def visit_else(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#326 - def visit_elsif(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#334 - def visit_embdoc(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#339 - def visit_embexpr_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#344 - def visit_embexpr_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#349 - def visit_embvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#354 - def visit_ensure(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#362 - def visit_excessed_comma(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#367 - def visit_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#375 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#380 - def visit_fndptn(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#390 - def visit_for(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#395 - def visit_gvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#400 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#405 - def visit_heredoc(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#414 - def visit_heredoc_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#419 - def visit_heredoc_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#424 - def visit_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#434 - def visit_ident(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#439 - def visit_if(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#448 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#453 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#458 - def visit_in(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#466 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#471 - def visit_ivar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#476 - def visit_kw(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#481 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#486 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#491 - def visit_label_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#496 - def visit_lambda(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#504 - def visit_lambda_var(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#509 - def visit_lbrace(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#514 - def visit_lbracket(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#519 - def visit_lparen(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#524 - def visit_massign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#529 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#534 - def visit_mlhs(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#539 - def visit_mlhs_paren(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#544 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#552 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#557 - def visit_next(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#812 - def visit_not(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#562 - def visit_op(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#567 - def visit_opassign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#572 - def visit_params(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#588 - def visit_paren(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#593 - def visit_period(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#157 - def visit_pinned_begin(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#854 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#598 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#603 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#611 - def visit_qsymbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#616 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#624 - def visit_qwords_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#304 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#211 - def visit_rassign(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#629 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#634 - def visit_rbrace(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#639 - def visit_rbracket(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#644 - def visit_redo(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#654 - def visit_regexp_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#649 - def visit_regexp_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#659 - def visit_regexp_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#664 - def visit_regexp_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#674 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#669 - def visit_rescue_ex(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#684 - def visit_rescue_mod(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#689 - def visit_rest_param(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#694 - def visit_retry(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#699 - def visit_return(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#704 - def visit_rparen(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#709 - def visit_sclass(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#714 - def visit_statements(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#724 - def visit_string_concat(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#719 - def visit_string_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#729 - def visit_string_dvar(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#734 - def visit_string_embexpr(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#739 - def visit_string_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#744 - def visit_super(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#749 - def visit_symbeg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#754 - def visit_symbol_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#759 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#764 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#772 - def visit_symbols_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#777 - def visit_tlambda(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#782 - def visit_tlambeg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#787 - def visit_top_const_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#792 - def visit_top_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#797 - def visit_tstring_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#802 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#807 - def visit_tstring_end(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#817 - def visit_unary(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#822 - def visit_undef(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#827 - def visit_unless(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#836 - def visit_until(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#844 - def visit_var_field(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#849 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#859 - def visit_vcall(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#864 - def visit_void_stmt(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#869 - def visit_when(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#878 - def visit_while(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#886 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#891 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#899 - def visit_words_beg(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#904 - def visit_xstring(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#909 - def visit_xstring_literal(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#914 - def visit_yield(node); end - - # source://syntax_tree//lib/syntax_tree/mutation_visitor.rb#919 - def visit_zsuper(node); end -end - -# Next represents using the +next+ keyword. -# -# next -# -# The +next+ keyword can also optionally be called with an argument: -# -# next value -# -# +next+ can even be called with multiple arguments, but only if parentheses -# are omitted, as in: -# -# next first, second, third -# -# If a single value is being given, parentheses can be used, as in: -# -# next(value) -# -# source://syntax_tree//lib/syntax_tree/node.rb#7933 -class SyntaxTree::Next < ::SyntaxTree::Node - # @return [Next] a new instance of Next - # - # source://syntax_tree//lib/syntax_tree/node.rb#7940 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7975 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7946 - def accept(visitor); end - - # [Args] the arguments passed to the next keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#7935 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7950 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7938 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7954 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7950 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#7967 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#7971 - def format(q); end -end - -# This is the parent node of all of the syntax tree nodes. It's pretty much -# exclusively here to make it easier to operate with the tree in cases where -# you're trying to monkey-patch or strictly type. -# -# source://syntax_tree//lib/syntax_tree/node.rb#105 -class SyntaxTree::Node - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#109 - def accept(visitor); end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#113 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#149 - def construct_keys; end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#117 - def deconstruct; end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#121 - def deconstruct_keys(keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#133 - def end_char; end - - # @raise [NotImplementedError] - # - # source://syntax_tree//lib/syntax_tree/node.rb#125 - def format(q); end - - # [Location] the location of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#107 - def location; end - - # source://syntax_tree//lib/syntax_tree/node.rb#137 - def pretty_print(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#129 - def start_char; end - - # source://syntax_tree//lib/syntax_tree/node.rb#141 - def to_json(*opts); end - - # source://syntax_tree//lib/syntax_tree/node.rb#145 - def to_mermaid; end -end - -# Not represents the unary +not+ method being called on an expression. -# -# not value -# -# source://syntax_tree//lib/syntax_tree/node.rb#11077 -class SyntaxTree::Not < ::SyntaxTree::Node - # @return [Not] a new instance of Not - # - # source://syntax_tree//lib/syntax_tree/node.rb#11088 - def initialize(statement:, parentheses:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11150 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11095 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11099 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11086 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11103 - def copy(statement: T.unsafe(nil), parentheses: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11099 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11117 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11126 - def format(q); end - - # [boolean] whether or not parentheses were used - # - # source://syntax_tree//lib/syntax_tree/node.rb#11082 - def parentheses; end - - # [boolean] whether or not parentheses were used - # - # source://syntax_tree//lib/syntax_tree/node.rb#11082 - def parentheses?; end - - # [nil | Node] the statement on which to operate - # - # source://syntax_tree//lib/syntax_tree/node.rb#11079 - def statement; end -end - -# Op represents an operator literal in the source. -# -# 1 + 2 -# -# In the example above, the Op node represents the + operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#7985 -class SyntaxTree::Op < ::SyntaxTree::Node - # @return [Op] a new instance of Op - # - # source://syntax_tree//lib/syntax_tree/node.rb#7995 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8028 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8002 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8006 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#7993 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8010 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8006 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8020 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8024 - def format(q); end - - # [Symbol] the symbol version of the value - # - # source://syntax_tree//lib/syntax_tree/node.rb#7990 - def name; end - - # [String] the operator - # - # source://syntax_tree//lib/syntax_tree/node.rb#7987 - def value; end -end - -# OpAssign represents assigning a value to a variable or constant using an -# operator like += or ||=. -# -# variable += value -# -# source://syntax_tree//lib/syntax_tree/node.rb#8038 -class SyntaxTree::OpAssign < ::SyntaxTree::Node - # @return [OpAssign] a new instance of OpAssign - # - # source://syntax_tree//lib/syntax_tree/node.rb#8052 - def initialize(target:, operator:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8111 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8060 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8064 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8050 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8068 - def copy(target: T.unsafe(nil), operator: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8064 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8083 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8093 - def format(q); end - - # [Op] the operator being used for the assignment - # - # source://syntax_tree//lib/syntax_tree/node.rb#8044 - def operator; end - - # [ARefField | ConstPathField | Field | TopConstField | VarField] the target - # to assign the result of the expression to - # - # source://syntax_tree//lib/syntax_tree/node.rb#8041 - def target; end - - # [Node] the expression to be assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#8047 - def value; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#8118 - def skip_indent?; end -end - -# The list of nodes that represent patterns inside of pattern matching so that -# when a pattern is being printed it knows if it's nested. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6174 -SyntaxTree::PATTERNS = T.let(T.unsafe(nil), Array) - -# Params represents defining parameters on a method or lambda. -# -# def method(param) end -# -# source://syntax_tree//lib/syntax_tree/node.rb#8196 -class SyntaxTree::Params < ::SyntaxTree::Node - # @return [Params] a new instance of Params - # - # source://syntax_tree//lib/syntax_tree/node.rb#8298 - def initialize(location:, 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 - - # source://syntax_tree//lib/syntax_tree/node.rb#8428 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8328 - def accept(visitor); end - - # Returns a range representing the possible number of arguments accepted - # by this params node not including the block. For example: - # - # def foo(a, b = 1, c:, d: 2, &block) - # ... - # end - # - # has arity 2..4. - # - # source://syntax_tree//lib/syntax_tree/node.rb#8451 - def arity; end - - # [nil | BlockArg] the optional block parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8293 - def block; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8332 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8296 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8346 - def copy(location: 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 - - # source://syntax_tree//lib/syntax_tree/node.rb#8332 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8374 - def deconstruct_keys(_keys); end - - # Params nodes are the most complicated in the tree. Occasionally you want - # to know if they are "empty", which means not having any parameters - # declared. This logic accesses every kind of parameter and determines if - # it's missing. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#8323 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8388 - def format(q); end - - # [nil | :nil | ArgsForward | KwRestParam] the optional keyword rest - # parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8290 - def keyword_rest; end - - # [Array[ [ Label, nil | Node ] ]] any keyword parameters and their - # optional default values - # - # source://syntax_tree//lib/syntax_tree/node.rb#8286 - def keywords; end - - # [Array[ [ Ident, Node ] ]] any optional parameters and their default - # values - # - # source://syntax_tree//lib/syntax_tree/node.rb#8274 - def optionals; end - - # [Array[ Ident | MLHSParen ]] any positional parameters that exist after a - # rest parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8282 - def posts; end - - # [Array[ Ident | MLHSParen ]] any required parameters - # - # source://syntax_tree//lib/syntax_tree/node.rb#8270 - def requireds; end - - # [nil | ArgsForward | ExcessedComma | RestParam] the optional rest - # parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8278 - def rest; end - - private - - # source://syntax_tree//lib/syntax_tree/node.rb#8467 - def format_contents(q, parts); end -end - -# Formats the keyword position of the parameters. This includes the label, -# as well as an optional default value. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8224 -class SyntaxTree::Params::KeywordFormatter - # @return [KeywordFormatter] a new instance of KeywordFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8231 - def initialize(name, value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8236 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8240 - def format(q); end - - # [Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8226 - def name; end - - # [nil | Node] the value of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8229 - def value; end -end - -# Formats the keyword_rest position of the parameters. This can be the **nil -# syntax, the ... syntax, or the ** syntax. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8252 -class SyntaxTree::Params::KeywordRestFormatter - # @return [KeywordRestFormatter] a new instance of KeywordRestFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8256 - def initialize(value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8260 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8264 - def format(q); end - - # [:nil | ArgsForward | KwRestParam] the value of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8254 - def value; end -end - -# Formats the optional position of the parameters. This includes the label, -# as well as the default value. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8199 -class SyntaxTree::Params::OptionalFormatter - # @return [OptionalFormatter] a new instance of OptionalFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8206 - def initialize(name, value); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8211 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8215 - def format(q); end - - # [Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8201 - def name; end - - # [Node] the value of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#8204 - def value; end -end - -# Paren represents using balanced parentheses in a couple places in a Ruby -# program. In general parentheses can be used anywhere a Ruby expression can -# be used. -# -# (1 + 2) -# -# source://syntax_tree//lib/syntax_tree/node.rb#8479 -class SyntaxTree::Paren < ::SyntaxTree::Node - # @return [Paren] a new instance of Paren - # - # source://syntax_tree//lib/syntax_tree/node.rb#8489 - def initialize(lparen:, contents:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8545 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8496 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8500 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8487 - def comments; end - - # [nil | Node] the expression inside the parentheses - # - # source://syntax_tree//lib/syntax_tree/node.rb#8484 - def contents; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8504 - def copy(lparen: T.unsafe(nil), contents: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8500 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8518 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8527 - def format(q); end - - # [LParen] the left parenthesis that opened this statement - # - # source://syntax_tree//lib/syntax_tree/node.rb#8481 - def lparen; end -end - -# If you have a modifier statement (for instance a modifier if statement or a -# modifier while loop) there are times when you need to wrap the entire -# statement in parentheses. This occurs when you have something like: -# -# foo[:foo] = -# if bar? -# baz -# end -# -# Normally we would shorten this to an inline version, which would result in: -# -# foo[:foo] = baz if bar? -# -# but this actually has different semantic meaning. The first example will -# result in a nil being inserted into the hash for the :foo key, whereas the -# second example will result in an empty hash because the if statement applies -# to the entire assignment. -# -# We can fix this in a couple of ways. We can use the then keyword, as in: -# -# foo[:foo] = if bar? then baz end -# -# But this isn't used very often. We can also just leave it as is with the -# multi-line version, but for a short predicate and short value it looks -# verbose. The last option and the one used here is to add parentheses on -# both sides of the expression, as in: -# -# foo[:foo] = (baz if bar?) -# -# This approach maintains the nice conciseness of the inline version, while -# keeping the correct semantic meaning. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8155 -module SyntaxTree::Parentheses - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#8175 - def break(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8167 - def flat(q); end - end -end - -# source://syntax_tree//lib/syntax_tree/node.rb#8156 -SyntaxTree::Parentheses::NODES = T.let(T.unsafe(nil), Array) - -# Parser is a subclass of the Ripper library that subscribes to the stream of -# tokens and nodes coming from the parser and builds up a syntax tree. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#6 -class SyntaxTree::Parser < ::Ripper - # @return [Parser] a new instance of Parser - # - # source://syntax_tree//lib/syntax_tree/parser.rb#116 - def initialize(source, *_arg1); end - - # [Array[ Comment | EmbDoc ]] the list of comments that have been found - # while parsing the source. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#114 - def comments; end - - # [Array[ SingleByteString | MultiByteString ]] the list of objects that - # represent the start of each line in character offsets - # - # source://syntax_tree//lib/syntax_tree/parser.rb#105 - def line_counts; end - - # [String] the source being parsed - # - # source://syntax_tree//lib/syntax_tree/parser.rb#101 - def source; end - - # [Array[ untyped ]] a running list of tokens that have been found in the - # source. This list changes a lot as certain nodes will "consume" these - # tokens to determine their bounds. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#110 - def tokens; end - - private - - # Attaches comments to the nodes in the tree that most closely correspond to - # the location of the comments. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2911 - def attach_comments(program, comments); end - - # This represents the current place in the source string that we've gotten - # to so far. We have a memoized line_counts object that we can use to get - # the number of characters that we've had to go through to get to the - # beginning of this line, then we add the number of columns into this line - # that we've gone through. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#197 - def char_pos; end - - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#295 - def consume_error(name, location); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#312 - def consume_keyword(name); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#318 - def consume_operator(name); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#300 - def consume_token(type); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#306 - def consume_tstring_end(location); end - - # This represents the current column we're in relative to the beginning of - # the current line. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#203 - def current_column; end - - # A helper function to find a :: operator. We do special handling instead of - # using find_token here because we don't pop off all of the :: operators so - # you could end up getting the wrong information if you have for instance - # ::X::Y::Z. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#328 - def find_colon2_before(const); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#272 - def find_keyword(name); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#277 - def find_keyword_between(name, left, right); end - - # Finds the next position in the source string that begins a statement. This - # is used to bind statements lists and make sure they don't include a - # preceding comment. For example, we want the following comment to be - # attached to the class node and not the statement node: - # - # ... - # end - # - # By finding the next non-space character, we can make sure that the bounds - # of the statement list are correct. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#349 - def find_next_statement_start(position); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#290 - def find_operator(name); end - - # As we build up a list of tokens, we'll periodically need to go backwards - # and find the ones that we've already hit in order to determine the - # location information for nodes that use them. For example, if you have a - # module node then you'll look backward for a kw token to determine your - # start location. - # - # This works with nesting since we're deleting tokens from the list once - # they've been used up. For example if you had nested module declarations - # then the innermost declaration would grab the last kw node that matches - # "module" (which would happen to be the innermost keyword). Then the outer - # one would only be able to grab the first one. In this way all of the - # tokens act as their own stack. - # - # If we're expecting to be able to find a token and consume it, but can't - # actually find it, then we need to raise an error. This is _usually_ caused - # by a syntax error in the source that we're printing. It could also be - # caused by accidentally attempting to consume a token twice by two - # different parser event handlers. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#254 - def find_token(type); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#259 - def find_token_between(type, left, right); end - - # Returns the current location that is being looked at for the parser for - # the purpose of locating the error. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#210 - def find_token_error(location); end - - # Ripper doesn't support capturing lambda local variables until 3.2. To - # mitigate this, we have to parse that code for ourselves. We use the range - # from the parentheses to find where we _should_ be looking. Then we check - # if the resulting tokens match a pattern that we determine means that the - # declaration has block-local variables. Once it does, we parse those out - # and convert them into Ident nodes. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2362 - def lambda_locals(source); end - - # Responsible for finding the nearest nodes to the given comment within the - # context of the given encapsulating node. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2946 - def nearest_nodes(node, comment); end - - # :call-seq: - # on_BEGIN: (Statements statements) -> BEGINBlock - # - # source://syntax_tree//lib/syntax_tree/parser.rb#371 - def on_BEGIN(statements); end - - # :call-seq: - # on_CHAR: (String value) -> CHAR - # - # source://syntax_tree//lib/syntax_tree/parser.rb#395 - def on_CHAR(value); end - - # :call-seq: - # on_END: (Statements statements) -> ENDBlock - # - # source://syntax_tree//lib/syntax_tree/parser.rb#410 - def on_END(statements); end - - # :call-seq: - # on___end__: (String value) -> EndContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#434 - def on___end__(value); end - - # :call-seq: - # on_alias: ( - # (DynaSymbol | SymbolLiteral) left, - # (DynaSymbol | SymbolLiteral) right - # ) -> AliasNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#453 - def on_alias(left, right); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_alias_error(error, *_arg1); end - - # :call-seq: - # on_aref: (untyped collection, (nil | Args) index) -> ARef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#465 - def on_aref(collection, index); end - - # :call-seq: - # on_aref_field: ( - # untyped collection, - # (nil | Args) index - # ) -> ARefField - # - # source://syntax_tree//lib/syntax_tree/parser.rb#481 - def on_aref_field(collection, index); end - - # :call-seq: - # on_arg_paren: ( - # (nil | Args | ArgsForward) arguments - # ) -> ArgParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#500 - def on_arg_paren(arguments); end - - # :call-seq: - # on_args_add: (Args arguments, untyped argument) -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#522 - def on_args_add(arguments, argument); end - - # :call-seq: - # on_args_add_block: ( - # Args arguments, - # (false | untyped) block - # ) -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#543 - def on_args_add_block(arguments, block); end - - # :call-seq: - # on_args_add_star: (Args arguments, untyped star) -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#581 - def on_args_add_star(arguments, argument); end - - # :call-seq: - # on_args_forward: () -> ArgsForward - # - # source://syntax_tree//lib/syntax_tree/parser.rb#603 - def on_args_forward; end - - # :call-seq: - # on_args_new: () -> Args - # - # source://syntax_tree//lib/syntax_tree/parser.rb#611 - def on_args_new; end - - # :call-seq: - # on_array: ((nil | Args) contents) -> - # ArrayLiteral | QSymbols | QWords | Symbols | Words - # - # source://syntax_tree//lib/syntax_tree/parser.rb#622 - def on_array(contents); end - - # :call-seq: - # on_aryptn: ( - # (nil | VarRef) constant, - # (nil | Array[untyped]) requireds, - # (nil | VarField) rest, - # (nil | Array[untyped]) posts - # ) -> AryPtn - # - # source://syntax_tree//lib/syntax_tree/parser.rb#701 - def on_aryptn(constant, requireds, rest, posts); end - - # :call-seq: - # on_assign: ( - # ( - # ARefField | - # ConstPathField | - # Field | - # TopConstField | - # VarField - # ) target, - # untyped value - # ) -> Assign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#756 - def on_assign(target, value); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_assign_error(error, *_arg1); end - - # :call-seq: - # on_assoc_new: (untyped key, untyped value) -> Assoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#766 - def on_assoc_new(key, value); end - - # :call-seq: - # on_assoc_splat: (untyped value) -> AssocSplat - # - # source://syntax_tree//lib/syntax_tree/parser.rb#775 - def on_assoc_splat(value); end - - # :call-seq: - # on_backref: (String value) -> Backref - # - # source://syntax_tree//lib/syntax_tree/parser.rb#790 - def on_backref(value); end - - # :call-seq: - # on_backtick: (String value) -> Backtick - # - # source://syntax_tree//lib/syntax_tree/parser.rb#805 - def on_backtick(value); end - - # :call-seq: - # on_bare_assoc_hash: ( - # Array[AssocNew | AssocSplat] assocs - # ) -> BareAssocHash - # - # source://syntax_tree//lib/syntax_tree/parser.rb#826 - def on_bare_assoc_hash(assocs); end - - # :call-seq: - # on_begin: (untyped bodystmt) -> Begin | PinnedBegin - # - # source://syntax_tree//lib/syntax_tree/parser.rb#835 - def on_begin(bodystmt); end - - # :call-seq: - # on_binary: ( - # untyped left, - # (Op | Symbol) operator, - # untyped right - # ) -> Binary - # - # source://syntax_tree//lib/syntax_tree/parser.rb#874 - def on_binary(left, operator, right); end - - # :call-seq: - # on_block_var: (Params params, (nil | Array[Ident]) locals) -> BlockVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#906 - def on_block_var(params, locals); end - - # :call-seq: - # on_blockarg: (Ident name) -> BlockArg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#946 - def on_blockarg(name); end - - # :call-seq: - # on_bodystmt: ( - # Statements statements, - # (nil | Rescue) rescue_clause, - # (nil | Statements) else_clause, - # (nil | Ensure) ensure_clause - # ) -> BodyStmt - # - # source://syntax_tree//lib/syntax_tree/parser.rb#962 - def on_bodystmt(statements, rescue_clause, else_clause, ensure_clause); end - - # :call-seq: - # on_brace_block: ( - # (nil | BlockVar) block_var, - # Statements statements - # ) -> BlockNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#988 - def on_brace_block(block_var, statements); end - - # :call-seq: - # on_break: (Args arguments) -> Break - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1025 - def on_break(arguments); end - - # :call-seq: - # on_call: ( - # untyped receiver, - # (:"::" | Op | Period) operator, - # (:call | Backtick | Const | Ident | Op) message - # ) -> CallNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1040 - def on_call(receiver, operator, message); end - - # :call-seq: - # on_case: (untyped value, untyped consequent) -> Case | RAssign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1061 - def on_case(value, consequent); end - - # :call-seq: - # on_class: ( - # (ConstPathRef | ConstRef | TopConstRef) constant, - # untyped superclass, - # BodyStmt bodystmt - # ) -> ClassDeclaration - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1096 - def on_class(constant, superclass, bodystmt); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_class_name_error(error, *_arg1); end - - # :call-seq: - # on_comma: (String value) -> Comma - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1120 - def on_comma(value); end - - # :call-seq: - # on_command: ((Const | Ident) message, Args arguments) -> Command - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1139 - def on_command(message, arguments); end - - # :call-seq: - # on_command_call: ( - # untyped receiver, - # (:"::" | Op | Period) operator, - # (Const | Ident | Op) message, - # (nil | Args) arguments - # ) -> CommandCall - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1155 - def on_command_call(receiver, operator, message, arguments); end - - # :call-seq: - # on_comment: (String value) -> Comment - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1170 - def on_comment(value); end - - # :call-seq: - # on_const: (String value) -> Const - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1208 - def on_const(value); end - - # :call-seq: - # on_const_path_field: (untyped parent, Const constant) -> - # ConstPathField | Field - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1224 - def on_const_path_field(parent, constant); end - - # :call-seq: - # on_const_path_ref: (untyped parent, Const constant) -> ConstPathRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1243 - def on_const_path_ref(parent, constant); end - - # :call-seq: - # on_const_ref: (Const constant) -> ConstRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1253 - def on_const_ref(constant); end - - # :call-seq: - # on_cvar: (String value) -> CVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1259 - def on_cvar(value); end - - # :call-seq: - # on_def: ( - # (Backtick | Const | Ident | Kw | Op) name, - # (nil | Params | Paren) params, - # untyped bodystmt - # ) -> DefNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1278 - def on_def(name, params, bodystmt); end - - # :call-seq: - # on_defined: (untyped value) -> Defined - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1346 - def on_defined(value); end - - # :call-seq: - # on_defs: ( - # untyped target, - # (Op | Period) operator, - # (Backtick | Const | Ident | Kw | Op) name, - # (Params | Paren) params, - # BodyStmt bodystmt - # ) -> DefNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1370 - def on_defs(target, operator, name, params, bodystmt); end - - # :call-seq: - # on_do_block: (BlockVar block_var, BodyStmt bodystmt) -> BlockNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1435 - def on_do_block(block_var, bodystmt); end - - # :call-seq: - # on_dot2: ((nil | untyped) left, (nil | untyped) right) -> RangeNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1459 - def on_dot2(left, right); end - - # :call-seq: - # on_dot3: ((nil | untyped) left, (nil | untyped) right) -> RangeNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1475 - def on_dot3(left, right); end - - # :call-seq: - # on_dyna_symbol: (StringContent string_content) -> DynaSymbol - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1491 - def on_dyna_symbol(string_content); end - - # :call-seq: - # on_else: (Statements statements) -> Else - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1517 - def on_else(statements); end - - # :call-seq: - # on_elsif: ( - # untyped predicate, - # Statements statements, - # (nil | Elsif | Else) consequent - # ) -> Elsif - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1558 - def on_elsif(predicate, statements, consequent); end - - # :call-seq: - # on_embdoc: (String value) -> EmbDoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1588 - def on_embdoc(value); end - - # :call-seq: - # on_embdoc_beg: (String value) -> EmbDoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1595 - def on_embdoc_beg(value); end - - # :call-seq: - # on_embdoc_end: (String value) -> EmbDoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1606 - def on_embdoc_end(value); end - - # :call-seq: - # on_embexpr_beg: (String value) -> EmbExprBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1630 - def on_embexpr_beg(value); end - - # :call-seq: - # on_embexpr_end: (String value) -> EmbExprEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1649 - def on_embexpr_end(value); end - - # :call-seq: - # on_embvar: (String value) -> EmbVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1668 - def on_embvar(value); end - - # :call-seq: - # on_ensure: (Statements statements) -> Ensure - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1687 - def on_ensure(statements); end - - # The handler for this event accepts no parameters (though in previous - # versions of Ruby it accepted a string literal with a value of ","). - # - # :call-seq: - # on_excessed_comma: () -> ExcessedComma - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1714 - def on_excessed_comma(*_arg0); end - - # :call-seq: - # on_fcall: ((Const | Ident) value) -> CallNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1722 - def on_fcall(value); end - - # :call-seq: - # on_field: ( - # untyped parent, - # (:"::" | Op | Period) operator - # (Const | Ident) name - # ) -> Field - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1738 - def on_field(parent, operator, name); end - - # :call-seq: - # on_float: (String value) -> FloatLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1749 - def on_float(value); end - - # :call-seq: - # on_fndptn: ( - # (nil | untyped) constant, - # VarField left, - # Array[untyped] values, - # VarField right - # ) -> FndPtn - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1769 - def on_fndptn(constant, left, values, right); end - - # :call-seq: - # on_for: ( - # (MLHS | VarField) value, - # untyped collection, - # Statements statements - # ) -> For - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1821 - def on_for(index, collection, statements); end - - # :call-seq: - # on_gvar: (String value) -> GVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1859 - def on_gvar(value); end - - # :call-seq: - # on_hash: ((nil | Array[AssocNew | AssocSplat]) assocs) -> HashLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1874 - def on_hash(assocs); end - - # :call-seq: - # on_heredoc_beg: (String value) -> HeredocBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1887 - def on_heredoc_beg(value); end - - # :call-seq: - # on_heredoc_dedent: (StringContent string, Integer width) -> Heredoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1906 - def on_heredoc_dedent(string, width); end - - # :call-seq: - # on_heredoc_end: (String value) -> Heredoc - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1920 - def on_heredoc_end(value); end - - # :call-seq: - # on_hshptn: ( - # (nil | untyped) constant, - # Array[[Label | StringContent, untyped]] keywords, - # (nil | VarField) keyword_rest - # ) -> HshPtn - # - # source://syntax_tree//lib/syntax_tree/parser.rb#1956 - def on_hshptn(constant, keywords, keyword_rest); end - - # :call-seq: - # on_ident: (String value) -> Ident - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2026 - def on_ident(value); end - - # :call-seq: - # on_if: ( - # untyped predicate, - # Statements statements, - # (nil | Elsif | Else) consequent - # ) -> IfNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2045 - def on_if(predicate, statements, consequent); end - - # :call-seq: - # on_if_mod: (untyped predicate, untyped statement) -> IfNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2085 - def on_if_mod(predicate, statement); end - - # :call-seq: - # on_ifop: (untyped predicate, untyped truthy, untyped falsy) -> IfOp - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2074 - def on_ifop(predicate, truthy, falsy); end - - # :call-seq: - # on_imaginary: (String value) -> Imaginary - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2107 - def on_imaginary(value); end - - # :call-seq: - # on_in: (RAssign pattern, nil statements, nil consequent) -> RAssign - # | ( - # untyped pattern, - # Statements statements, - # (nil | In | Else) consequent - # ) -> In - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2127 - def on_in(pattern, statements, consequent); end - - # :call-seq: - # on_int: (String value) -> Int - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2172 - def on_int(value); end - - # :call-seq: - # on_ivar: (String value) -> IVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2187 - def on_ivar(value); end - - # :call-seq: - # on_kw: (String value) -> Kw - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2202 - def on_kw(value); end - - # :call-seq: - # on_kwrest_param: ((nil | Ident) name) -> KwRestParam - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2221 - def on_kwrest_param(name); end - - # :call-seq: - # on_label: (String value) -> Label - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2230 - def on_label(value); end - - # :call-seq: - # on_label_end: (String value) -> LabelEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2245 - def on_label_end(value); end - - # :call-seq: - # on_lambda: ( - # (Params | Paren) params, - # (BodyStmt | Statements) statements - # ) -> Lambda - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2267 - def on_lambda(params, statements); end - - # :call-seq: - # on_lambda_var: (Params params, Array[ Ident ] locals) -> LambdaVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2349 - def on_lambda_var(params, locals); end - - # :call-seq: - # on_lbrace: (String value) -> LBrace - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2432 - def on_lbrace(value); end - - # :call-seq: - # on_lbracket: (String value) -> LBracket - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2451 - def on_lbracket(value); end - - # :call-seq: - # on_lparen: (String value) -> LParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2470 - def on_lparen(value); end - - # :call-seq: - # on_massign: ((MLHS | MLHSParen) target, untyped value) -> MAssign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2493 - def on_massign(target, value); end - - # :call-seq: - # on_method_add_arg: ( - # CallNode call, - # (ArgParen | Args) arguments - # ) -> CallNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2509 - def on_method_add_arg(call, arguments); end - - # :call-seq: - # on_method_add_block: ( - # (Break | Call | Command | CommandCall, Next) call, - # Block block - # ) -> Break | MethodAddBlock - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2527 - def on_method_add_block(call, block); end - - # :call-seq: - # on_mlhs_add: ( - # MLHS mlhs, - # (ARefField | Field | Ident | MLHSParen | VarField) part - # ) -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2556 - def on_mlhs_add(mlhs, part); end - - # :call-seq: - # on_mlhs_add_post: (MLHS left, MLHS right) -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2565 - def on_mlhs_add_post(left, right); end - - # :call-seq: - # on_mlhs_add_star: ( - # MLHS mlhs, - # (nil | ARefField | Field | Ident | VarField) part - # ) -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2577 - def on_mlhs_add_star(mlhs, part); end - - # :call-seq: - # on_mlhs_new: () -> MLHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2590 - def on_mlhs_new; end - - # :call-seq: - # on_mlhs_paren: ((MLHS | MLHSParen) contents) -> MLHSParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2600 - def on_mlhs_paren(contents); end - - # :call-seq: - # on_module: ( - # (ConstPathRef | ConstRef | TopConstRef) constant, - # BodyStmt bodystmt - # ) -> ModuleDeclaration - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2618 - def on_module(constant, bodystmt); end - - # :call-seq: - # on_mrhs_add: (MRHS mrhs, untyped part) -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2650 - def on_mrhs_add(mrhs, part); end - - # :call-seq: - # on_mrhs_add_star: (MRHS mrhs, untyped value) -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2659 - def on_mrhs_add_star(mrhs, value); end - - # :call-seq: - # on_mrhs_new: () -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2640 - def on_mrhs_new; end - - # :call-seq: - # on_mrhs_new_from_args: (Args arguments) -> MRHS - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2681 - def on_mrhs_new_from_args(arguments); end - - # :call-seq: - # on_next: (Args arguments) -> Next - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2687 - def on_next(arguments); end - - # :call-seq: - # on_op: (String value) -> Op - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2706 - def on_op(value); end - - # :call-seq: - # on_opassign: ( - # ( - # ARefField | - # ConstPathField | - # Field | - # TopConstField | - # VarField - # ) target, - # Op operator, - # untyped value - # ) -> OpAssign - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2735 - def on_opassign(target, operator, value); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_param_error(error, *_arg1); end - - # :call-seq: - # on_params: ( - # (nil | Array[Ident]) requireds, - # (nil | Array[[Ident, untyped]]) optionals, - # (nil | ArgsForward | ExcessedComma | RestParam) rest, - # (nil | Array[Ident]) posts, - # (nil | Array[[Ident, nil | untyped]]) keywords, - # (nil | :nil | ArgsForward | KwRestParam) keyword_rest, - # (nil | :& | BlockArg) block - # ) -> Params - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2758 - def on_params(requireds, optionals, rest, posts, keywords, keyword_rest, block); end - - # :call-seq: - # on_paren: (untyped contents) -> Paren - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2823 - def on_paren(contents); end - - # If we encounter a parse error, just immediately bail out so that our - # runner can catch it. - # - # @raise [ParseError] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2863 - def on_parse_error(error, *_arg1); end - - # :call-seq: - # on_period: (String value) -> Period - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2873 - def on_period(value); end - - # :call-seq: - # on_program: (Statements statements) -> Program - # - # source://syntax_tree//lib/syntax_tree/parser.rb#2888 - def on_program(statements); end - - # :call-seq: - # on_qsymbols_add: (QSymbols qsymbols, TStringContent element) -> QSymbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3000 - def on_qsymbols_add(qsymbols, element); end - - # :call-seq: - # on_qsymbols_beg: (String value) -> QSymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3010 - def on_qsymbols_beg(value); end - - # :call-seq: - # on_qsymbols_new: () -> QSymbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3029 - def on_qsymbols_new; end - - # :call-seq: - # on_qwords_add: (QWords qwords, TStringContent element) -> QWords - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3041 - def on_qwords_add(qwords, element); end - - # :call-seq: - # on_qwords_beg: (String value) -> QWordsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3051 - def on_qwords_beg(value); end - - # :call-seq: - # on_qwords_new: () -> QWords - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3070 - def on_qwords_new; end - - # :call-seq: - # on_rational: (String value) -> RationalLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3082 - def on_rational(value); end - - # :call-seq: - # on_rbrace: (String value) -> RBrace - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3097 - def on_rbrace(value); end - - # :call-seq: - # on_rbracket: (String value) -> RBracket - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3116 - def on_rbracket(value); end - - # :call-seq: - # on_redo: () -> Redo - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3135 - def on_redo; end - - # :call-seq: - # on_regexp_add: ( - # RegexpContent regexp_content, - # (StringDVar | StringEmbExpr | TStringContent) part - # ) -> RegexpContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3146 - def on_regexp_add(regexp_content, part); end - - # :call-seq: - # on_regexp_beg: (String value) -> RegexpBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3156 - def on_regexp_beg(value); end - - # :call-seq: - # on_regexp_end: (String value) -> RegexpEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3175 - def on_regexp_end(value); end - - # :call-seq: - # on_regexp_literal: ( - # RegexpContent regexp_content, - # (nil | RegexpEnd) ending - # ) -> RegexpLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3193 - def on_regexp_literal(regexp_content, ending); end - - # :call-seq: - # on_regexp_new: () -> RegexpContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3211 - def on_regexp_new; end - - # :call-seq: - # on_rescue: ( - # (nil | [untyped] | MRHS | MRHSAddStar) exceptions, - # (nil | Field | VarField) variable, - # Statements statements, - # (nil | Rescue) consequent - # ) -> Rescue - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3228 - def on_rescue(exceptions, variable, statements, consequent); end - - # :call-seq: - # on_rescue_mod: (untyped statement, untyped value) -> RescueMod - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3281 - def on_rescue_mod(statement, value); end - - # :call-seq: - # on_rest_param: ((nil | Ident) name) -> RestParam - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3293 - def on_rest_param(name); end - - # :call-seq: - # on_retry: () -> Retry - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3302 - def on_retry; end - - # :call-seq: - # on_return: (Args arguments) -> ReturnNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3310 - def on_return(arguments); end - - # :call-seq: - # on_return0: () -> ReturnNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3321 - def on_return0; end - - # :call-seq: - # on_rparen: (String value) -> RParen - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3329 - def on_rparen(value); end - - # :call-seq: - # on_sclass: (untyped target, BodyStmt bodystmt) -> SClass - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3348 - def on_sclass(target, bodystmt); end - - # :call-seq: - # on_semicolon: (String value) -> Semicolon - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3381 - def on_semicolon(value); end - - # stmts_add is a parser event that represents a single statement inside a - # list of statements within any lexical block. It accepts as arguments the - # parent stmts node as well as an stmt which can be any expression in - # Ruby. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3400 - def on_stmts_add(statements, statement); end - - # :call-seq: - # on_stmts_new: () -> Statements - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3413 - def on_stmts_new; end - - # :call-seq: - # on_string_add: ( - # String string, - # (StringEmbExpr | StringDVar | TStringContent) part - # ) -> StringContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3426 - def on_string_add(string, part); end - - # :call-seq: - # on_string_concat: ( - # (StringConcat | StringLiteral) left, - # StringLiteral right - # ) -> StringConcat - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3443 - def on_string_concat(left, right); end - - # :call-seq: - # on_string_content: () -> StringContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3453 - def on_string_content; end - - # :call-seq: - # on_string_dvar: ((Backref | VarRef) variable) -> StringDVar - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3463 - def on_string_dvar(variable); end - - # :call-seq: - # on_string_embexpr: (Statements statements) -> StringEmbExpr - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3474 - def on_string_embexpr(statements); end - - # :call-seq: - # on_string_literal: (String string) -> Heredoc | StringLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3504 - def on_string_literal(string); end - - # :call-seq: - # on_super: ((ArgParen | Args) arguments) -> Super - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3544 - def on_super(arguments); end - - # symbeg is a token that represents the beginning of a symbol literal. In - # most cases it will contain just ":" as in the value, but if its a dynamic - # symbol being defined it will contain ":'" or ":\"". - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3556 - def on_symbeg(value); end - - # :call-seq: - # on_symbol: ( - # (Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op) value - # ) -> SymbolContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3577 - def on_symbol(value); end - - # :call-seq: - # on_symbol_literal: ( - # ( - # Backtick | Const | CVar | GVar | Ident | - # IVar | Kw | Op | SymbolContent - # ) value - # ) -> SymbolLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3590 - def on_symbol_literal(value); end - - # :call-seq: - # on_symbols_add: (Symbols symbols, Word word) -> Symbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3606 - def on_symbols_add(symbols, word); end - - # :call-seq: - # on_symbols_beg: (String value) -> SymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3616 - def on_symbols_beg(value); end - - # :call-seq: - # on_symbols_new: () -> Symbols - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3635 - def on_symbols_new; end - - # :call-seq: - # on_tlambda: (String value) -> TLambda - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3647 - def on_tlambda(value); end - - # :call-seq: - # on_tlambeg: (String value) -> TLamBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3666 - def on_tlambeg(value); end - - # :call-seq: - # on_top_const_field: (Const constant) -> TopConstRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3685 - def on_top_const_field(constant); end - - # :call-seq: - # on_top_const_ref: (Const constant) -> TopConstRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3696 - def on_top_const_ref(constant); end - - # :call-seq: - # on_tstring_beg: (String value) -> TStringBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3707 - def on_tstring_beg(value); end - - # :call-seq: - # on_tstring_content: (String value) -> TStringContent - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3726 - def on_tstring_content(value); end - - # :call-seq: - # on_tstring_end: (String value) -> TStringEnd - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3741 - def on_tstring_end(value); end - - # :call-seq: - # on_unary: (:not operator, untyped statement) -> Not - # | (Symbol operator, untyped statement) -> Unary - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3761 - def on_unary(operator, statement); end - - # :call-seq: - # on_undef: (Array[DynaSymbol | SymbolLiteral] symbols) -> Undef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3804 - def on_undef(symbols); end - - # :call-seq: - # on_unless: ( - # untyped predicate, - # Statements statements, - # ((nil | Elsif | Else) consequent) - # ) -> UnlessNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3819 - def on_unless(predicate, statements, consequent); end - - # :call-seq: - # on_unless_mod: (untyped predicate, untyped statement) -> UnlessNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3848 - def on_unless_mod(predicate, statement); end - - # :call-seq: - # on_until: (untyped predicate, Statements statements) -> UntilNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3862 - def on_until(predicate, statements); end - - # :call-seq: - # on_until_mod: (untyped predicate, untyped statement) -> UntilNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3893 - def on_until_mod(predicate, statement); end - - # :call-seq: - # on_var_alias: (GVar left, (Backref | GVar) right) -> AliasNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3906 - def on_var_alias(left, right); end - - # :call-seq: - # on_var_field: ( - # (nil | Const | CVar | GVar | Ident | IVar) value - # ) -> VarField - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3920 - def on_var_field(value); end - - # :call-seq: - # on_var_ref: ((Const | CVar | GVar | Ident | IVar | Kw) value) -> VarRef - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3935 - def on_var_ref(value); end - - # :call-seq: - # on_vcall: (Ident ident) -> VCall - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3941 - def on_vcall(ident); end - - # :call-seq: - # on_void_stmt: () -> VoidStmt - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3947 - def on_void_stmt; end - - # :call-seq: - # on_when: ( - # Args arguments, - # Statements statements, - # (nil | Else | When) consequent - # ) -> When - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3960 - def on_when(arguments, statements, consequent); end - - # :call-seq: - # on_while: (untyped predicate, Statements statements) -> WhileNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3992 - def on_while(predicate, statements); end - - # :call-seq: - # on_while_mod: (untyped predicate, untyped statement) -> WhileNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4023 - def on_while_mod(predicate, statement); end - - # :call-seq: - # on_word_add: ( - # Word word, - # (StringEmbExpr | StringDVar | TStringContent) part - # ) -> Word - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4039 - def on_word_add(word, part); end - - # :call-seq: - # on_word_new: () -> Word - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4048 - def on_word_new; end - - # :call-seq: - # on_words_add: (Words words, Word word) -> Words - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4058 - def on_words_add(words, word); end - - # :call-seq: - # on_words_beg: (String value) -> WordsBeg - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4068 - def on_words_beg(value); end - - # :call-seq: - # on_words_new: () -> Words - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4087 - def on_words_new; end - - # :call-seq: - # on_xstring_add: ( - # XString xstring, - # (StringEmbExpr | StringDVar | TStringContent) part - # ) -> XString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4106 - def on_xstring_add(xstring, part); end - - # :call-seq: - # on_xstring_literal: (XString xstring) -> Heredoc | XStringLiteral - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4130 - def on_xstring_literal(xstring); end - - # :call-seq: - # on_xstring_new: () -> XString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4115 - def on_xstring_new; end - - # :call-seq: - # on_yield: ((Args | Paren) arguments) -> YieldNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4153 - def on_yield(arguments); end - - # :call-seq: - # on_yield0: () -> YieldNode - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4164 - def on_yield0; end - - # :call-seq: - # on_zsuper: () -> ZSuper - # - # source://syntax_tree//lib/syntax_tree/parser.rb#4172 - def on_zsuper; end -end - -# Represents a line in the source. If this class is being used, it means -# that there are characters in the string that are multi-byte, so we will -# build up an array of indices, such that array[byteindex] will be equal to -# the index of the character within the string. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#38 -class SyntaxTree::Parser::MultiByteString - # @return [MultiByteString] a new instance of MultiByteString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#41 - def initialize(start, line); end - - # Technically it's possible for the column index to be a negative value if - # there's a BOM at the beginning of the file, which is the reason we need - # to compare it to 0 here. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#55 - def [](byteindex); end - - # Returns the value of attribute indices. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#39 - def indices; end - - # Returns the value of attribute start. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#39 - def start; end -end - -# A special parser error so that we can get nice syntax displays on the -# error message when prettier prints out the results. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#9 -class SyntaxTree::Parser::ParseError < ::StandardError - # @return [ParseError] a new instance of ParseError - # - # source://syntax_tree//lib/syntax_tree/parser.rb#12 - def initialize(error, lineno, column); end - - # Returns the value of attribute column. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#10 - def column; end - - # Returns the value of attribute lineno. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#10 - def lineno; end -end - -# Ugh... I really do not like this class. Basically, ripper doesn't provide -# enough information about where pins are located in the tree. It only gives -# events for ^ ops and var_ref nodes. You have to piece it together -# yourself. -# -# Note that there are edge cases here that we straight up do not address, -# because I honestly think it's going to be faster to write a new parser -# than to address them. For example, this will not work properly: -# -# foo in ^((bar = 0; bar; baz)) -# -# If someone actually does something like that, we'll have to find another -# way to make this work. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#656 -class SyntaxTree::Parser::PinVisitor < ::SyntaxTree::Visitor - # @return [PinVisitor] a new instance of PinVisitor - # - # source://syntax_tree//lib/syntax_tree/parser.rb#659 - def initialize(pins); end - - # Returns the value of attribute pins. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#657 - def pins; end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#657 - def stack; end - - # source://syntax_tree//lib/syntax_tree/parser.rb#664 - def visit(node); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#672 - def visit_var_ref(node); end - - class << self - # source://syntax_tree//lib/syntax_tree/parser.rb#677 - def visit(node, tokens); end - end -end - -# Semicolons are tokens that get added to the token list but never get -# attached to the AST. Because of this they only need to track their -# associated location so they can be used for computing bounds. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#3371 -class SyntaxTree::Parser::Semicolon - # @return [Semicolon] a new instance of Semicolon - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3374 - def initialize(location); end - - # Returns the value of attribute location. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#3372 - def location; end -end - -# Represents a line in the source. If this class is being used, it means -# that every character in the string is 1 byte in length, so we can just -# return the start of the line + the index. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#22 -class SyntaxTree::Parser::SingleByteString - # @return [SingleByteString] a new instance of SingleByteString - # - # source://syntax_tree//lib/syntax_tree/parser.rb#25 - def initialize(start); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#29 - def [](byteindex); end - - # Returns the value of attribute start. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#23 - def start; end -end - -# This represents all of the tokens coming back from the lexer. It is -# replacing a simple array because it keeps track of the last deleted token -# from the list for better error messages. -# -# source://syntax_tree//lib/syntax_tree/parser.rb#63 -class SyntaxTree::Parser::TokenList - # @return [TokenList] a new instance of TokenList - # - # source://syntax_tree//lib/syntax_tree/parser.rb#66 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/parser.rb#71 - def <<(token); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#75 - def [](index); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/parser.rb#79 - def any?(&block); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#91 - def delete(value); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#95 - def delete_at(index); end - - # Returns the value of attribute last_deleted. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#64 - def last_deleted; end - - # source://syntax_tree//lib/syntax_tree/parser.rb#83 - def reverse_each(&block); end - - # source://syntax_tree//lib/syntax_tree/parser.rb#87 - def rindex(&block); end - - # Returns the value of attribute tokens. - # - # source://syntax_tree//lib/syntax_tree/parser.rb#64 - def tokens; end -end - -# A pattern is an object that wraps a Ruby pattern matching expression. The -# expression would normally be passed to an `in` clause within a `case` -# expression or a rightward assignment expression. For example, in the -# following snippet: -# -# case node -# in Const[value: "SyntaxTree"] -# end -# -# the pattern is the `Const[value: "SyntaxTree"]` expression. Within Syntax -# Tree, every node generates these kinds of expressions using the -# #construct_keys method. -# -# The pattern gets compiled into an object that responds to call by running -# the #compile method. This method itself will run back through Syntax Tree to -# parse the expression into a tree, then walk the tree to generate the -# necessary callable objects. For example, if you wanted to compile the -# expression above into a callable, you would: -# -# callable = SyntaxTree::Pattern.new("Const[value: 'SyntaxTree']").compile -# callable.call(node) -# -# The callable object returned by #compile is guaranteed to respond to #call -# with a single argument, which is the node to match against. It also is -# guaranteed to respond to #===, which means it itself can be used in a `case` -# expression, as in: -# -# case node -# when callable -# end -# -# If the query given to the initializer cannot be compiled into a valid -# matcher (either because of a syntax error or because it is using syntax we -# do not yet support) then a SyntaxTree::Pattern::CompilationError will be -# raised. -# -# source://syntax_tree//lib/syntax_tree/pattern.rb#39 -class SyntaxTree::Pattern - # @return [Pattern] a new instance of Pattern - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#61 - def initialize(query); end - - # source://syntax_tree//lib/syntax_tree/pattern.rb#65 - def compile; end - - # Returns the value of attribute query. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#59 - def query; end - - private - - # Shortcut for combining two procs into one that returns true if both return - # true. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#80 - def combine_and(left, right); end - - # Shortcut for combining two procs into one that returns true if either - # returns true. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#86 - def combine_or(left, right); end - - # in [foo, bar, baz] - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#109 - def compile_aryptn(node); end - - # in foo | bar - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#134 - def compile_binary(node); end - - # in Ident - # in String - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#142 - def compile_const(node); end - - # in SyntaxTree::Ident - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#159 - def compile_const_path_ref(node); end - - # in :"" - # in :"foo" - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#172 - def compile_dyna_symbol(node); end - - # Raise an error because the given node is not supported. - # - # @raise [CompilationError] - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#91 - def compile_error(node); end - - # in Ident[value: String] - # in { value: String } - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#188 - def compile_hshptn(node); end - - # Compile any kind of node. Dispatch out to the individual compilation - # methods based on the type of node. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#260 - def compile_node(node); end - - # in /foo/ - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#214 - def compile_regexp_literal(node); end - - # in "" - # in "foo" - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#226 - def compile_string_literal(node); end - - # in :+ - # in :foo - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#238 - def compile_symbol_literal(node); end - - # in Foo - # in nil - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#246 - def compile_var_ref(node); end - - # There are a couple of nodes (string literals, dynamic symbols, and regexp) - # that contain list of parts. This can include plain string content, - # interpolated expressions, and interpolated variables. We only support - # plain string content, so this method will extract out the plain string - # content if it is the only element in the list. - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#100 - def extract_string(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://syntax_tree//lib/syntax_tree/pattern.rb#42 -class SyntaxTree::Pattern::CompilationError < ::StandardError - # @return [CompilationError] a new instance of CompilationError - # - # source://syntax_tree//lib/syntax_tree/pattern.rb#43 - def initialize(repr); end -end - -# Period represents the use of the +.+ operator. It is usually found in method -# calls. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8553 -class SyntaxTree::Period < ::SyntaxTree::Node - # @return [Period] a new instance of Period - # - # source://syntax_tree//lib/syntax_tree/node.rb#8560 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8595 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8566 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8570 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8558 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8574 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8570 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8587 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8591 - def format(q); end - - # [String] the period - # - # source://syntax_tree//lib/syntax_tree/node.rb#8555 - def value; end -end - -# PinnedBegin represents a pinning a nested statement within pattern matching. -# -# case value -# in ^(statement) -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#1962 -class SyntaxTree::PinnedBegin < ::SyntaxTree::Node - # @return [PinnedBegin] a new instance of PinnedBegin - # - # source://syntax_tree//lib/syntax_tree/node.rb#1969 - def initialize(statement:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2014 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1975 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1979 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#1967 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1983 - def copy(statement: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#1979 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#1996 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#2000 - def format(q); end - - # [Node] the expression being pinned - # - # source://syntax_tree//lib/syntax_tree/node.rb#1964 - def statement; end -end - -# PinnedVarRef represents a pinned variable reference within a pattern -# matching pattern. -# -# case value -# in ^variable -# end -# -# This can be a plain local variable like the example above. It can also be a -# a class variable, a global variable, or an instance variable. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11661 -class SyntaxTree::PinnedVarRef < ::SyntaxTree::Node - # @return [PinnedVarRef] a new instance of PinnedVarRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#11668 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11706 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11674 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11678 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11666 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11682 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11678 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11695 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11699 - def format(q); end - - # [Const | CVar | GVar | Ident | IVar] the value of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11663 - def value; end -end - -# This visitor pretty-prints the AST into an equivalent s-expression. -# -# source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#5 -class SyntaxTree::PrettyPrintVisitor < ::SyntaxTree::FieldVisitor - # @return [PrettyPrintVisitor] a new instance of PrettyPrintVisitor - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#8 - def initialize(q); end - - # Returns the value of attribute q. - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#6 - def q; end - - # This is here because we need to make sure the operator is cast to a string - # before we print it out. - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#14 - def visit_binary(node); end - - # This is here to make it a little nicer to look at labels since they - # typically have their : at the end of the value. - # - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#25 - def visit_label(node); end - - private - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#36 - def comments(node); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#45 - def field(_name, value); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#50 - def list(_name, values); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#55 - def node(_node, type); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#62 - def pairs(_name, values); end - - # source://syntax_tree//lib/syntax_tree/pretty_print_visitor.rb#78 - def text(_name, value); end -end - -# Program represents the overall syntax tree. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8601 -class SyntaxTree::Program < ::SyntaxTree::Node - # @return [Program] a new instance of Program - # - # source://syntax_tree//lib/syntax_tree/node.rb#8608 - def initialize(statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8648 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8614 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8618 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8606 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8622 - def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8618 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8635 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8639 - def format(q); end - - # [Statements] the top-level expressions of the program - # - # source://syntax_tree//lib/syntax_tree/node.rb#8603 - def statements; end -end - -# QSymbols represents a symbol literal array without interpolation. -# -# %i[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#8657 -class SyntaxTree::QSymbols < ::SyntaxTree::Node - # @return [QSymbols] a new instance of QSymbols - # - # source://syntax_tree//lib/syntax_tree/node.rb#8667 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8727 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8674 - def accept(visitor); end - - # [QSymbolsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8659 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8678 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8665 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8682 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8678 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8696 - def deconstruct_keys(_keys); end - - # [Array[ TStringContent ]] the elements of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#8662 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8705 - def format(q); end -end - -# QSymbolsBeg represents the beginning of a symbol literal array. -# -# %i[one two three] -# -# In the snippet above, QSymbolsBeg represents the "%i[" token. Note that -# these kinds of arrays can start with a lot of different delimiter types -# (e.g., %i| or %i<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#8740 -class SyntaxTree::QSymbolsBeg < ::SyntaxTree::Node - # @return [QSymbolsBeg] a new instance of QSymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#8744 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8770 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8749 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8753 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8757 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8753 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8766 - def deconstruct_keys(_keys); end - - # [String] the beginning of the array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8742 - def value; end -end - -# QWords represents a string literal array without interpolation. -# -# %w[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#8779 -class SyntaxTree::QWords < ::SyntaxTree::Node - # @return [QWords] a new instance of QWords - # - # source://syntax_tree//lib/syntax_tree/node.rb#8789 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8845 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8796 - def accept(visitor); end - - # [QWordsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8781 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8800 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8787 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8804 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8800 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8814 - def deconstruct_keys(_keys); end - - # [Array[ TStringContent ]] the elements of the array - # - # source://syntax_tree//lib/syntax_tree/node.rb#8784 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8823 - def format(q); end -end - -# QWordsBeg represents the beginning of a string literal array. -# -# %w[one two three] -# -# In the snippet above, QWordsBeg represents the "%w[" token. Note that these -# kinds of arrays can start with a lot of different delimiter types (e.g., -# %w| or %w<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#8858 -class SyntaxTree::QWordsBeg < ::SyntaxTree::Node - # @return [QWordsBeg] a new instance of QWordsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#8862 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8888 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8867 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8871 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8875 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8871 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8884 - def deconstruct_keys(_keys); end - - # [String] the beginning of the array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8860 - def value; end -end - -# Responsible for providing information about quotes to be used for strings -# and dynamic symbols. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4615 -module SyntaxTree::Quotes - class << self - # If there is some part of this string that matches an escape sequence or - # that contains the interpolation pattern ("#{"), then we are locked into - # whichever quote the user chose. (If they chose single quotes, then double - # quoting would activate the escape sequence, and if they chose double - # quotes, then single quotes would deactivate it.) - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#4624 - def locked?(node, quote); end - - # Find the matching closing quote for the given opening quote. - # - # source://syntax_tree//lib/syntax_tree/node.rb#4631 - def matching(quote); end - - # Escape and unescape single and double quotes as needed to be able to - # enclose +content+ with +enclosing+. - # - # source://syntax_tree//lib/syntax_tree/node.rb#4637 - def normalize(content, enclosing); end - end -end - -# The matching pairs of quotes that can be used with % literals. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4617 -SyntaxTree::Quotes::PAIRS = T.let(T.unsafe(nil), Hash) - -# RAssign represents a single-line pattern match. -# -# value in pattern -# value => pattern -# -# source://syntax_tree//lib/syntax_tree/node.rb#3201 -class SyntaxTree::RAssign < ::SyntaxTree::Node - # @return [RAssign] a new instance of RAssign - # - # source://syntax_tree//lib/syntax_tree/node.rb#3215 - def initialize(value:, operator:, pattern:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3277 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3223 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3227 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#3213 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3231 - def copy(value: T.unsafe(nil), operator: T.unsafe(nil), pattern: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3227 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#3246 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#3256 - def format(q); end - - # [Kw | Op] the operator being used to match against the pattern, which is - # either => or in - # - # source://syntax_tree//lib/syntax_tree/node.rb#3207 - def operator; end - - # [Node] the pattern on the right-hand side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#3210 - def pattern; end - - # [Node] the left-hand expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#3203 - def value; end -end - -# RBrace represents the use of a right brace, i.e., +++. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8945 -class SyntaxTree::RBrace < ::SyntaxTree::Node - # @return [RBrace] a new instance of RBrace - # - # source://syntax_tree//lib/syntax_tree/node.rb#8949 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8975 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8954 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8958 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8962 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8958 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8971 - def deconstruct_keys(_keys); end - - # [String] the right brace - # - # source://syntax_tree//lib/syntax_tree/node.rb#8947 - def value; end -end - -# RBracket represents the use of a right bracket, i.e., +]+. -# -# source://syntax_tree//lib/syntax_tree/node.rb#8981 -class SyntaxTree::RBracket < ::SyntaxTree::Node - # @return [RBracket] a new instance of RBracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#8985 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9011 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8990 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8994 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8998 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8994 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9007 - def deconstruct_keys(_keys); end - - # [String] the right bracket - # - # source://syntax_tree//lib/syntax_tree/node.rb#8983 - def value; end -end - -# RParen represents the use of a right parenthesis, i.e., +)+. -# -# source://syntax_tree//lib/syntax_tree/node.rb#9751 -class SyntaxTree::RParen < ::SyntaxTree::Node - # @return [RParen] a new instance of RParen - # - # source://syntax_tree//lib/syntax_tree/node.rb#9755 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9781 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9760 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9764 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9768 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9764 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9777 - def deconstruct_keys(_keys); end - - # [String] the parenthesis - # - # source://syntax_tree//lib/syntax_tree/node.rb#9753 - def value; end -end - -# RangeNode represents using the .. or the ... operator between two -# expressions. Usually this is to create a range object. -# -# 1..2 -# -# Sometimes this operator is used to create a flip-flop. -# -# if value == 5 .. value == 10 -# end -# -# One of the sides of the expression may be nil, but not both. -# -# source://syntax_tree//lib/syntax_tree/node.rb#4540 -class SyntaxTree::RangeNode < ::SyntaxTree::Node - # @return [RangeNode] a new instance of RangeNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#4553 - def initialize(left:, operator:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4607 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4561 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4565 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#4551 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4569 - def copy(left: T.unsafe(nil), operator: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4565 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#4584 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#4594 - def format(q); end - - # [nil | Node] the left side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#4542 - def left; end - - # [Op] the operator used for this range - # - # source://syntax_tree//lib/syntax_tree/node.rb#4545 - def operator; end - - # [nil | Node] the right side of the expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#4548 - def right; end -end - -# RationalLiteral represents the use of a rational number literal. -# -# 1r -# -# source://syntax_tree//lib/syntax_tree/node.rb#8897 -class SyntaxTree::RationalLiteral < ::SyntaxTree::Node - # @return [RationalLiteral] a new instance of RationalLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#8904 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8939 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8910 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8914 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#8902 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8918 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8914 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#8931 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#8935 - def format(q); end - - # [String] the rational number literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#8899 - def value; end -end - -# Redo represents the use of the +redo+ keyword. -# -# redo -# -# source://syntax_tree//lib/syntax_tree/node.rb#9020 -class SyntaxTree::Redo < ::SyntaxTree::Node - # @return [Redo] a new instance of Redo - # - # source://syntax_tree//lib/syntax_tree/node.rb#9024 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9054 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9029 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9033 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9022 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9037 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9033 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9046 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9050 - def format(q); end -end - -# RegexpBeg represents the start of a regular expression literal. -# -# /.+/ -# -# In the example above, RegexpBeg represents the first / token. Regular -# expression literals can also be declared using the %r syntax, as in: -# -# %r{.+} -# -# source://syntax_tree//lib/syntax_tree/node.rb#9116 -class SyntaxTree::RegexpBeg < ::SyntaxTree::Node - # @return [RegexpBeg] a new instance of RegexpBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#9120 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9146 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9125 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9129 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9133 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9129 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9142 - def deconstruct_keys(_keys); end - - # [String] the beginning of the regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9118 - def value; end -end - -# RegexpContent represents the body of a regular expression. -# -# /.+ #{pattern} .+/ -# -# In the example above, a RegexpContent node represents everything contained -# within the forward slashes. -# -# source://syntax_tree//lib/syntax_tree/node.rb#9065 -class SyntaxTree::RegexpContent < ::SyntaxTree::Node - # @return [RegexpContent] a new instance of RegexpContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#9073 - def initialize(beginning:, parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9101 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9079 - def accept(visitor); end - - # [String] the opening of the regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9067 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9083 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9087 - def copy(beginning: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9083 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9097 - def deconstruct_keys(_keys); end - - # [Array[ StringDVar | StringEmbExpr | TStringContent ]] the parts of the - # regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9071 - def parts; end -end - -# RegexpEnd represents the end of a regular expression literal. -# -# /.+/m -# -# In the example above, the RegexpEnd event represents the /m at the end of -# the regular expression literal. You can also declare regular expression -# literals using %r, as in: -# -# %r{.+}m -# -# source://syntax_tree//lib/syntax_tree/node.rb#9161 -class SyntaxTree::RegexpEnd < ::SyntaxTree::Node - # @return [RegexpEnd] a new instance of RegexpEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#9165 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9191 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9170 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9174 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9178 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9174 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9187 - def deconstruct_keys(_keys); end - - # [String] the end of the regular expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#9163 - def value; end -end - -# RegexpLiteral represents a regular expression literal. -# -# /.+/ -# -# source://syntax_tree//lib/syntax_tree/node.rb#9200 -class SyntaxTree::RegexpLiteral < ::SyntaxTree::Node - # @return [RegexpLiteral] a new instance of RegexpLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#9214 - def initialize(beginning:, ending:, parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9296 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9222 - def accept(visitor); end - - # [String] the beginning of the regular expression literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#9202 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9226 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9212 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9230 - def copy(beginning: T.unsafe(nil), ending: T.unsafe(nil), parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9226 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9245 - def deconstruct_keys(_keys); end - - # [String] the ending of the regular expression literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#9205 - def ending; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9256 - def format(q); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9302 - def options; end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # regular expression literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#9209 - def parts; end - - private - - # If the first part of this regex is plain string content, we have a space - # or an =, and we're contained within a command or command_call node, then - # we want to use braces because otherwise we could end up with an ambiguous - # operator, e.g. foo / bar/ or foo /=bar/ - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#9318 - def ambiguous?(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#9308 - def include?(pattern); end -end - -# Rescue represents the use of the rescue keyword inside of a BodyStmt node. -# -# begin -# rescue -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9408 -class SyntaxTree::Rescue < ::SyntaxTree::Node - # @return [Rescue] a new instance of Rescue - # - # source://syntax_tree//lib/syntax_tree/node.rb#9424 - def initialize(keyword:, exception:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9520 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9455 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9433 - def bind_end(end_char, end_column); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9459 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9422 - def comments; end - - # [nil | Rescue] the optional next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#9419 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9463 - def copy(keyword: T.unsafe(nil), exception: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9459 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9485 - def deconstruct_keys(_keys); end - - # [nil | RescueEx] the exceptions being rescued - # - # source://syntax_tree//lib/syntax_tree/node.rb#9413 - def exception; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9496 - def format(q); end - - # [Kw] the rescue keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#9410 - def keyword; end - - # [Statements] the expressions to evaluate when an error is rescued - # - # source://syntax_tree//lib/syntax_tree/node.rb#9416 - def statements; end -end - -# RescueEx represents the list of exceptions being rescued in a rescue clause. -# -# begin -# rescue Exception => exception -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9333 -class SyntaxTree::RescueEx < ::SyntaxTree::Node - # @return [RescueEx] a new instance of RescueEx - # - # source://syntax_tree//lib/syntax_tree/node.rb#9344 - def initialize(exceptions:, variable:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9396 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9351 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9355 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9342 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9359 - def copy(exceptions: T.unsafe(nil), variable: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9355 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9373 - def deconstruct_keys(_keys); end - - # [nil | Node] the list of exceptions being rescued - # - # source://syntax_tree//lib/syntax_tree/node.rb#9335 - def exceptions; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9382 - def format(q); end - - # [nil | Field | VarField] the expression being used to capture the raised - # exception - # - # source://syntax_tree//lib/syntax_tree/node.rb#9339 - def variable; end -end - -# RescueMod represents the use of the modifier form of a +rescue+ clause. -# -# expression rescue value -# -# source://syntax_tree//lib/syntax_tree/node.rb#9531 -class SyntaxTree::RescueMod < ::SyntaxTree::Node - # @return [RescueMod] a new instance of RescueMod - # - # source://syntax_tree//lib/syntax_tree/node.rb#9541 - def initialize(statement:, value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9597 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9548 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9552 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9539 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9556 - def copy(statement: T.unsafe(nil), value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9552 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9570 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9579 - def format(q); end - - # [Node] the expression to execute - # - # source://syntax_tree//lib/syntax_tree/node.rb#9533 - def statement; end - - # [Node] the value to use if the executed expression raises an error - # - # source://syntax_tree//lib/syntax_tree/node.rb#9536 - def value; end -end - -# RestParam represents defining a parameter in a method definition that -# accepts all remaining positional parameters. -# -# def method(*rest) end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9608 -class SyntaxTree::RestParam < ::SyntaxTree::Node - # @return [RestParam] a new instance of RestParam - # - # source://syntax_tree//lib/syntax_tree/node.rb#9615 - def initialize(name:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9651 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9621 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9625 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9613 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9629 - def copy(name: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9625 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9642 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9646 - def format(q); end - - # [nil | Ident] the name of the parameter - # - # source://syntax_tree//lib/syntax_tree/node.rb#9610 - def name; end -end - -# Retry represents the use of the +retry+ keyword. -# -# retry -# -# source://syntax_tree//lib/syntax_tree/node.rb#9660 -class SyntaxTree::Retry < ::SyntaxTree::Node - # @return [Retry] a new instance of Retry - # - # source://syntax_tree//lib/syntax_tree/node.rb#9664 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9694 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9669 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9673 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9662 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9677 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9673 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9686 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9690 - def format(q); end -end - -# Return represents using the +return+ keyword with arguments. -# -# return value -# -# source://syntax_tree//lib/syntax_tree/node.rb#9703 -class SyntaxTree::ReturnNode < ::SyntaxTree::Node - # @return [ReturnNode] a new instance of ReturnNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#9710 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9745 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9716 - def accept(visitor); end - - # [nil | Args] the arguments being passed to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#9705 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9720 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9708 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9724 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9720 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9737 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9741 - def format(q); end -end - -# SClass represents a block of statements that should be evaluated within the -# context of the singleton class of an object. It's frequently used to define -# singleton methods. -# -# class << self -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#9793 -class SyntaxTree::SClass < ::SyntaxTree::Node - # @return [SClass] a new instance of SClass - # - # source://syntax_tree//lib/syntax_tree/node.rb#9803 - def initialize(target:, bodystmt:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9854 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9810 - def accept(visitor); end - - # [BodyStmt] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#9798 - def bodystmt; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9814 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9801 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9818 - def copy(target: T.unsafe(nil), bodystmt: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9814 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9832 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9841 - def format(q); end - - # [Node] the target of the singleton class to enter - # - # source://syntax_tree//lib/syntax_tree/node.rb#9795 - def target; end -end - -# Provides an interface for searching for a pattern of nodes against a -# subtree of an AST. -# -# source://syntax_tree//lib/syntax_tree/search.rb#6 -class SyntaxTree::Search - # @return [Search] a new instance of Search - # - # source://syntax_tree//lib/syntax_tree/search.rb#9 - def initialize(pattern); end - - # Returns the value of attribute pattern. - # - # source://syntax_tree//lib/syntax_tree/search.rb#7 - def pattern; end - - # source://syntax_tree//lib/syntax_tree/search.rb#13 - def scan(root); end -end - -# Everything that has a block of code inside of it has a list of statements. -# Normally we would just track those as a node that has an array body, but we -# have some special handling in order to handle empty statement lists. They -# need to have the right location information, so all of the parent node of -# stmts nodes will report back down the location information. We then -# propagate that onto void_stmt nodes inside the stmts in order to make sure -# all comments get printed appropriately. -# -# source://syntax_tree//lib/syntax_tree/node.rb#9867 -class SyntaxTree::Statements < ::SyntaxTree::Node - # @return [Statements] a new instance of Statements - # - # source://syntax_tree//lib/syntax_tree/node.rb#9874 - def initialize(body:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10000 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9927 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9880 - def bind(parser, start_char, start_column, end_char, end_column); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9909 - def bind_end(end_char, end_column); end - - # [Array[ Node ]] the list of expressions contained within this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9869 - def body; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9931 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#9872 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9935 - def copy(body: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#9931 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9948 - def deconstruct_keys(_keys); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#9921 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#9952 - def format(q); end - - private - - # As efficiently as possible, gather up all of the comments that have been - # found while this statements list was being parsed and add them into the - # body. - # - # source://syntax_tree//lib/syntax_tree/node.rb#10009 - def attach_comments(parser, start_char, end_char); end -end - -# StringConcat represents concatenating two strings together using a backward -# slash. -# -# "first" \ -# "second" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10124 -class SyntaxTree::StringConcat < ::SyntaxTree::Node - # @return [StringConcat] a new instance of StringConcat - # - # source://syntax_tree//lib/syntax_tree/node.rb#10135 - def initialize(left:, right:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10179 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10142 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10146 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10133 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10150 - def copy(left: T.unsafe(nil), right: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10146 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10164 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10168 - def format(q); end - - # [Heredoc | StringConcat | StringLiteral] the left side of the - # concatenation - # - # source://syntax_tree//lib/syntax_tree/node.rb#10127 - def left; end - - # [StringLiteral] the right side of the concatenation - # - # source://syntax_tree//lib/syntax_tree/node.rb#10130 - def right; end -end - -# StringContent represents the contents of a string-like value. -# -# "string" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10051 -class SyntaxTree::StringContent < ::SyntaxTree::Node - # @return [StringContent] a new instance of StringContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#10059 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10086 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10065 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10069 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10057 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10073 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10069 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10082 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10090 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # string - # - # source://syntax_tree//lib/syntax_tree/node.rb#10054 - def parts; end -end - -# StringDVar represents shorthand interpolation of a variable into a string. -# It allows you to take an instance variable, class variable, or global -# variable and omit the braces when interpolating. -# -# "#@variable" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10190 -class SyntaxTree::StringDVar < ::SyntaxTree::Node - # @return [StringDVar] a new instance of StringDVar - # - # source://syntax_tree//lib/syntax_tree/node.rb#10197 - def initialize(variable:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10234 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10203 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10207 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10195 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10211 - def copy(variable: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10207 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10224 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10228 - def format(q); end - - # [Backref | VarRef] the variable being interpolated - # - # source://syntax_tree//lib/syntax_tree/node.rb#10192 - def variable; end -end - -# StringEmbExpr represents interpolated content. It can be contained within a -# couple of different parent nodes, including regular expressions, strings, -# and dynamic symbols. -# -# "string #{expression}" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10245 -class SyntaxTree::StringEmbExpr < ::SyntaxTree::Node - # @return [StringEmbExpr] a new instance of StringEmbExpr - # - # source://syntax_tree//lib/syntax_tree/node.rb#10252 - def initialize(statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10309 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10258 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10262 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10250 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10266 - def copy(statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10262 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10279 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10283 - def format(q); end - - # [Statements] the expressions to be interpolated - # - # source://syntax_tree//lib/syntax_tree/node.rb#10247 - def statements; end -end - -# StringLiteral represents a string literal. -# -# "string" -# -# source://syntax_tree//lib/syntax_tree/node.rb#10318 -class SyntaxTree::StringLiteral < ::SyntaxTree::Node - # @return [StringLiteral] a new instance of StringLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#10329 - def initialize(parts:, quote:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10403 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10336 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10340 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10327 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10344 - def copy(parts: T.unsafe(nil), quote: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10340 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10358 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10362 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # string literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10321 - def parts; end - - # [nil | String] which quote was used by the string literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10324 - def quote; end -end - -# Super represents using the +super+ keyword with arguments. It can optionally -# use parentheses. -# -# super(value) -# -# source://syntax_tree//lib/syntax_tree/node.rb#10414 -class SyntaxTree::Super < ::SyntaxTree::Node - # @return [Super] a new instance of Super - # - # source://syntax_tree//lib/syntax_tree/node.rb#10421 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10465 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10427 - def accept(visitor); end - - # [ArgParen | Args] the arguments to the keyword - # - # source://syntax_tree//lib/syntax_tree/node.rb#10416 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10431 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10419 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10435 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10431 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10448 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10452 - def format(q); end -end - -# SymBeg represents the beginning of a symbol literal. -# -# :symbol -# -# SymBeg is also used for dynamic symbols, as in: -# -# :"symbol" -# -# Finally, SymBeg is also used for symbols using the %s syntax, as in: -# -# %s[symbol] -# -# The value of this node is a string. In most cases (as in the first example -# above) it will contain just ":". In the case of dynamic symbols it will -# contain ":'" or ":\"". In the case of %s symbols, it will contain the start -# of the symbol including the %s and the delimiter. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10486 -class SyntaxTree::SymBeg < ::SyntaxTree::Node - # @return [SymBeg] a new instance of SymBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10490 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10516 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10495 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10499 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10503 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10499 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10512 - def deconstruct_keys(_keys); end - - # [String] the beginning of the symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#10488 - def value; end -end - -# SymbolContent represents symbol contents and is always the child of a -# SymbolLiteral node. -# -# :symbol -# -# source://syntax_tree//lib/syntax_tree/node.rb#10526 -class SyntaxTree::SymbolContent < ::SyntaxTree::Node - # @return [SymbolContent] a new instance of SymbolContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#10531 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10557 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10536 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10540 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10544 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10540 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10553 - def deconstruct_keys(_keys); end - - # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op] the value of the - # symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#10529 - def value; end -end - -# SymbolLiteral represents a symbol in the system with no interpolation -# (as opposed to a DynaSymbol which has interpolation). -# -# :symbol -# -# source://syntax_tree//lib/syntax_tree/node.rb#10567 -class SyntaxTree::SymbolLiteral < ::SyntaxTree::Node - # @return [SymbolLiteral] a new instance of SymbolLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#10575 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10612 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10581 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10585 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10573 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10589 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10585 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10602 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10606 - def format(q); end - - # [Backtick | Const | CVar | GVar | Ident | IVar | Kw | Op | TStringContent] - # the value of the symbol - # - # source://syntax_tree//lib/syntax_tree/node.rb#10570 - def value; end -end - -# Symbols represents a symbol array literal with interpolation. -# -# %I[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#10621 -class SyntaxTree::Symbols < ::SyntaxTree::Node - # @return [Symbols] a new instance of Symbols - # - # source://syntax_tree//lib/syntax_tree/node.rb#10631 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10687 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10638 - def accept(visitor); end - - # [SymbolsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10623 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10642 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10629 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10646 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10642 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10656 - def deconstruct_keys(_keys); end - - # [Array[ Word ]] the words in the symbol array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10626 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10665 - def format(q); end -end - -# SymbolsBeg represents the start of a symbol array literal with -# interpolation. -# -# %I[one two three] -# -# In the snippet above, SymbolsBeg represents the "%I[" token. Note that these -# kinds of arrays can start with a lot of different delimiter types -# (e.g., %I| or %I<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#10701 -class SyntaxTree::SymbolsBeg < ::SyntaxTree::Node - # @return [SymbolsBeg] a new instance of SymbolsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10705 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10731 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10710 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10714 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10718 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10714 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10727 - def deconstruct_keys(_keys); end - - # [String] the beginning of the symbol literal array - # - # source://syntax_tree//lib/syntax_tree/node.rb#10703 - def value; end -end - -# TLamBeg represents the beginning of the body of a lambda literal using -# braces. -# -# -> { value } -# -# In the example above the TLamBeg represents the +{+ operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10782 -class SyntaxTree::TLamBeg < ::SyntaxTree::Node - # @return [TLamBeg] a new instance of TLamBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10786 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10812 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10791 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10795 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10799 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10795 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10808 - def deconstruct_keys(_keys); end - - # [String] the beginning of the body of the lambda literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10784 - def value; end -end - -# TLambda represents the beginning of a lambda literal. -# -# -> { value } -# -# In the example above the TLambda represents the +->+ operator. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10741 -class SyntaxTree::TLambda < ::SyntaxTree::Node - # @return [TLambda] a new instance of TLambda - # - # source://syntax_tree//lib/syntax_tree/node.rb#10745 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10771 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10750 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10754 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10758 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10754 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10767 - def deconstruct_keys(_keys); end - - # [String] the beginning of the lambda literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#10743 - def value; end -end - -# TStringBeg represents the beginning of a string literal. -# -# "string" -# -# In the example above, TStringBeg represents the first set of quotes. Strings -# can also use single quotes. They can also be declared using the +%q+ and -# +%Q+ syntax, as in: -# -# %q{string} -# -# source://syntax_tree//lib/syntax_tree/node.rb#10934 -class SyntaxTree::TStringBeg < ::SyntaxTree::Node - # @return [TStringBeg] a new instance of TStringBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#10938 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10964 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10943 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10947 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10951 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10947 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10960 - def deconstruct_keys(_keys); end - - # [String] the beginning of the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#10936 - def value; end -end - -# TStringContent represents plain characters inside of an entity that accepts -# string content like a string, heredoc, command string, or regular -# expression. -# -# "string" -# -# In the example above, TStringContent represents the +string+ token contained -# within the string. -# -# source://syntax_tree//lib/syntax_tree/node.rb#10977 -class SyntaxTree::TStringContent < ::SyntaxTree::Node - # @return [TStringContent] a new instance of TStringContent - # - # source://syntax_tree//lib/syntax_tree/node.rb#10984 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11023 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10994 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10998 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10982 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11002 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10998 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11015 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11019 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#10990 - def match?(pattern); end - - # [String] the content of the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#10979 - def value; end -end - -# TStringEnd represents the end of a string literal. -# -# "string" -# -# In the example above, TStringEnd represents the second set of quotes. -# Strings can also use single quotes. They can also be declared using the +%q+ -# and +%Q+ syntax, as in: -# -# %q{string} -# -# source://syntax_tree//lib/syntax_tree/node.rb#11038 -class SyntaxTree::TStringEnd < ::SyntaxTree::Node - # @return [TStringEnd] a new instance of TStringEnd - # - # source://syntax_tree//lib/syntax_tree/node.rb#11042 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11068 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11047 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11051 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11055 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11051 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11064 - def deconstruct_keys(_keys); end - - # [String] the end of the string - # - # source://syntax_tree//lib/syntax_tree/node.rb#11040 - def value; end -end - -# In order for an `if` or `unless` expression to be shortened to a ternary, -# there has to be one and only one consequent clause which is an Else. Both -# the body of the main node and the body of the Else node must have only one -# statement, and that statement must not be on the denied list of potential -# statements. -# -# source://syntax_tree//lib/syntax_tree/node.rb#6254 -module SyntaxTree::Ternaryable - class << self - # source://syntax_tree//lib/syntax_tree/node.rb#6256 - def call(q, node); end - - private - - # Certain expressions cannot be reduced to a ternary without adding - # parentheses around them. In this case we say they cannot be ternaried - # and default instead to breaking them into multiple lines. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#6294 - def ternaryable?(statement); end - end -end - -# TopConstField is always the child node of some kind of assignment. It -# represents when you're assigning to a constant that is being referenced at -# the top level. -# -# ::Constant = value -# -# source://syntax_tree//lib/syntax_tree/node.rb#10823 -class SyntaxTree::TopConstField < ::SyntaxTree::Node - # @return [TopConstField] a new instance of TopConstField - # - # source://syntax_tree//lib/syntax_tree/node.rb#10830 - def initialize(constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10866 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10836 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10840 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10828 - def comments; end - - # [Const] the constant being assigned - # - # source://syntax_tree//lib/syntax_tree/node.rb#10825 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10844 - def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10840 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10857 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10861 - def format(q); end -end - -# TopConstRef is very similar to TopConstField except that it is not involved -# in an assignment. -# -# ::Constant -# -# source://syntax_tree//lib/syntax_tree/node.rb#10876 -class SyntaxTree::TopConstRef < ::SyntaxTree::Node - # @return [TopConstRef] a new instance of TopConstRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#10883 - def initialize(constant:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10919 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10889 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10893 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#10881 - def comments; end - - # [Const] the constant being referenced - # - # source://syntax_tree//lib/syntax_tree/node.rb#10878 - def constant; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10897 - def copy(constant: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10893 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#10910 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#10914 - def format(q); end -end - -# This module is responsible for translating the Syntax Tree syntax tree into -# other representations. -# -# source://syntax_tree//lib/syntax_tree/translation.rb#6 -module SyntaxTree::Translation - class << self - # This method translates the given node into the representation defined by - # the whitequark/parser gem. We don't explicitly list it as a dependency - # because it's not required for the core functionality of Syntax Tree. - # - # source://syntax_tree//lib/syntax_tree/translation.rb#10 - def to_parser(node, buffer); end - - # This method translates the given node into the representation defined by - # the rubocop/rubocop-ast gem. We don't explicitly list it as a dependency - # because it's not required for the core functionality of Syntax Tree. - # - # source://syntax_tree//lib/syntax_tree/translation.rb#20 - def to_rubocop_ast(node, buffer); end - end -end - -# Unary represents a unary method being called on an expression, as in +!+ or -# +~+. -# -# !value -# -# source://syntax_tree//lib/syntax_tree/node.rb#11161 -class SyntaxTree::Unary < ::SyntaxTree::Node - # @return [Unary] a new instance of Unary - # - # source://syntax_tree//lib/syntax_tree/node.rb#11171 - def initialize(operator:, statement:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11214 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11178 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11182 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11169 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11186 - def copy(operator: T.unsafe(nil), statement: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11182 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11200 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11209 - def format(q); end - - # [String] the operator being used - # - # source://syntax_tree//lib/syntax_tree/node.rb#11163 - def operator; end - - # [Node] the statement on which to operate - # - # source://syntax_tree//lib/syntax_tree/node.rb#11166 - def statement; end -end - -# Undef represents the use of the +undef+ keyword. -# -# undef method -# -# source://syntax_tree//lib/syntax_tree/node.rb#11224 -class SyntaxTree::Undef < ::SyntaxTree::Node - # @return [Undef] a new instance of Undef - # - # source://syntax_tree//lib/syntax_tree/node.rb#11255 - def initialize(symbols:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11298 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11261 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11265 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11253 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11269 - def copy(symbols: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11265 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11282 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11286 - def format(q); end - - # [Array[ DynaSymbol | SymbolLiteral ]] the symbols to undefine - # - # source://syntax_tree//lib/syntax_tree/node.rb#11250 - def symbols; end -end - -# Undef accepts a variable number of arguments that can be either DynaSymbol -# or SymbolLiteral objects. For SymbolLiteral objects we descend directly -# into the value in order to have it come out as bare words. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11228 -class SyntaxTree::Undef::UndefArgumentFormatter - # @return [UndefArgumentFormatter] a new instance of UndefArgumentFormatter - # - # source://syntax_tree//lib/syntax_tree/node.rb#11232 - def initialize(node); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11236 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11244 - def format(q); end - - # [DynaSymbol | SymbolLiteral] the symbol to undefine - # - # source://syntax_tree//lib/syntax_tree/node.rb#11230 - def node; end -end - -# Unless represents the first clause in an +unless+ chain. -# -# unless predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11308 -class SyntaxTree::UnlessNode < ::SyntaxTree::Node - # @return [UnlessNode] a new instance of UnlessNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#11321 - def initialize(predicate:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11366 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11329 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11333 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11319 - def comments; end - - # [nil | Elsif | Else] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#11316 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11337 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11333 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11352 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11362 - def format(q); end - - # Checks if the node was originally found in the modifier form. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11372 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#11310 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11313 - def statements; end -end - -# Until represents an +until+ loop. -# -# until predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11454 -class SyntaxTree::UntilNode < ::SyntaxTree::Node - # @return [UntilNode] a new instance of UntilNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#11464 - def initialize(predicate:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11506 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11471 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11475 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11462 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11479 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11475 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11493 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11502 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11511 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#11456 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11459 - def statements; end -end - -# VCall represent any plain named object with Ruby that could be either a -# local variable or a method call. -# -# variable -# -# source://syntax_tree//lib/syntax_tree/node.rb#11716 -class SyntaxTree::VCall < ::SyntaxTree::Node - # @return [VCall] a new instance of VCall - # - # source://syntax_tree//lib/syntax_tree/node.rb#11723 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11758 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11729 - def accept(visitor); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11762 - def access_control?; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11766 - def arity; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11733 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11721 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11737 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11733 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11750 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11754 - def format(q); end - - # [Ident] the value of this expression - # - # source://syntax_tree//lib/syntax_tree/node.rb#11718 - def value; end -end - -# source://syntax_tree//lib/syntax_tree/version.rb#4 -SyntaxTree::VERSION = T.let(T.unsafe(nil), String) - -# VarField represents a variable that is being assigned a value. As such, it -# is always a child of an assignment type node. -# -# variable = value -# -# In the example above, the VarField node represents the +variable+ token. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11522 -class SyntaxTree::VarField < ::SyntaxTree::Node - # @return [VarField] a new instance of VarField - # - # source://syntax_tree//lib/syntax_tree/node.rb#11529 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11568 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11535 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11539 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11527 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11543 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11539 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11556 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11560 - def format(q); end - - # [nil | :nil | Const | CVar | GVar | Ident | IVar] the target of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11524 - def value; end -end - -# VarRef represents a variable reference. -# -# true -# -# This can be a plain local variable like the example above. It can also be a -# constant, a class variable, a global variable, an instance variable, a -# keyword (like +self+, +nil+, +true+, or +false+), or a numbered block -# variable. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11581 -class SyntaxTree::VarRef < ::SyntaxTree::Node - # @return [VarRef] a new instance of VarRef - # - # source://syntax_tree//lib/syntax_tree/node.rb#11588 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11623 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11594 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11598 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11586 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11602 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11598 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11615 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11619 - def format(q); end - - # Oh man I hate this so much. Basically, ripper doesn't provide enough - # functionality to actually know where pins are within an expression. So we - # have to walk the tree ourselves and insert more information. In doing so, - # we have to replace this node by a pinned node when necessary. - # - # To be clear, this method should just not exist. It's not good. It's a - # place of shame. But it's necessary for now, so I'm keeping it. - # - # source://syntax_tree//lib/syntax_tree/node.rb#11634 - def pin(parent, pin); end - - # [Const | CVar | GVar | Ident | IVar | Kw] the value of this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11583 - def value; end -end - -# Visitor is a parent class that provides the ability to walk down the tree -# and handle a subset of nodes. By defining your own subclass, you can -# explicitly handle a node type by defining a visit_* method. -# -# source://syntax_tree//lib/syntax_tree/visitor.rb#7 -class SyntaxTree::Visitor < ::SyntaxTree::BasicVisitor - # Visit a BEGINBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_BEGIN(node); end - - # Visit a CHAR node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_CHAR(node); end - - # Visit an ENDBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_END(node); end - - # Visit an EndContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit___end__(node); end - - # Visit an AliasNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_alias(node); end - - # Visit an ARef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_aref(node); end - - # Visit an ARefField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_aref_field(node); end - - # Visit an ArgBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_arg_block(node); end - - # Visit an ArgParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_arg_paren(node); end - - # Visit an ArgStar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_arg_star(node); end - - # Visit an Args node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_args(node); end - - # Visit an ArgsForward node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_args_forward(node); end - - # Visit an ArrayLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_array(node); end - - # Visit an AryPtn node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_aryptn(node); end - - # Visit an Assign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_assign(node); end - - # Visit an Assoc node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_assoc(node); end - - # Visit an AssocSplat node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_assoc_splat(node); end - - # Visit a Backref node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_backref(node); end - - # Visit a Backtick node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_backtick(node); end - - # Visit a BareAssocHash node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_bare_assoc_hash(node); end - - # Visit a Begin node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_begin(node); end - - # Visit a Binary node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_binary(node); end - - # Visit a Block node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_block(node); end - - # Visit a BlockVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_block_var(node); end - - # Visit a BlockArg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_blockarg(node); end - - # Visit a BodyStmt node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_bodystmt(node); end - - # Visit a Break node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_break(node); end - - # Visit a Call node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_call(node); end - - # Visit a Case node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_case(node); end - - # Visit a ClassDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_class(node); end - - # Visit a Comma node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_comma(node); end - - # Visit a Command node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_command(node); end - - # Visit a CommandCall node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_command_call(node); end - - # Visit a Comment node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_comment(node); end - - # Visit a Const node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const(node); end - - # Visit a ConstPathField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const_path_field(node); end - - # Visit a ConstPathRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const_path_ref(node); end - - # Visit a ConstRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_const_ref(node); end - - # Visit a CVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_cvar(node); end - - # Visit a Def node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_def(node); end - - # Visit a Defined node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_defined(node); end - - # Visit a DynaSymbol node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_dyna_symbol(node); end - - # Visit an Else node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_else(node); end - - # Visit an Elsif node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_elsif(node); end - - # Visit an EmbDoc node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embdoc(node); end - - # Visit an EmbExprBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embexpr_beg(node); end - - # Visit an EmbExprEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embexpr_end(node); end - - # Visit an EmbVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_embvar(node); end - - # Visit an Ensure node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_ensure(node); end - - # Visit an ExcessedComma node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_excessed_comma(node); end - - # Visit a Field node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_field(node); end - - # Visit a FloatLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_float(node); end - - # Visit a FndPtn node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_fndptn(node); end - - # Visit a For node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_for(node); end - - # Visit a GVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_gvar(node); end - - # Visit a HashLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_hash(node); end - - # Visit a Heredoc node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_heredoc(node); end - - # Visit a HeredocBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_heredoc_beg(node); end - - # Visit a HeredocEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_heredoc_end(node); end - - # Visit a HshPtn node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_hshptn(node); end - - # Visit an Ident node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_ident(node); end - - # Visit an IfNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_if(node); end - - # Visit an IfOp node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_if_op(node); end - - # Visit an Imaginary node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_imaginary(node); end - - # Visit an In node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_in(node); end - - # Visit an Int node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_int(node); end - - # Visit an IVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_ivar(node); end - - # Visit a Kw node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_kw(node); end - - # Visit a KwRestParam node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_kwrest_param(node); end - - # Visit a Label node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_label(node); end - - # Visit a LabelEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_label_end(node); end - - # Visit a Lambda node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lambda(node); end - - # Visit a LambdaVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lambda_var(node); end - - # Visit a LBrace node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lbrace(node); end - - # Visit a LBracket node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lbracket(node); end - - # Visit a LParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_lparen(node); end - - # Visit a MAssign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_massign(node); end - - # Visit a MethodAddBlock node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_method_add_block(node); end - - # Visit a MLHS node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_mlhs(node); end - - # Visit a MLHSParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_mlhs_paren(node); end - - # Visit a ModuleDeclaration node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_module(node); end - - # Visit a MRHS node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_mrhs(node); end - - # Visit a Next node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_next(node); end - - # Visit a Not node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_not(node); end - - # Visit an Op node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_op(node); end - - # Visit an OpAssign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_opassign(node); end - - # Visit a Params node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_params(node); end - - # Visit a Paren node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_paren(node); end - - # Visit a Period node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_period(node); end - - # Visit a PinnedBegin node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_pinned_begin(node); end - - # Visit a PinnedVarRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_pinned_var_ref(node); end - - # Visit a Program node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_program(node); end - - # Visit a QSymbols node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qsymbols(node); end - - # Visit a QSymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qsymbols_beg(node); end - - # Visit a QWords node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qwords(node); end - - # Visit a QWordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_qwords_beg(node); end - - # Visit a RangeNode node - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_range(node); end - - # Visit a RAssign node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rassign(node); end - - # Visit a RationalLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rational(node); end - - # Visit a RBrace node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rbrace(node); end - - # Visit a RBracket node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rbracket(node); end - - # Visit a Redo node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_redo(node); end - - # Visit a RegexpBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_beg(node); end - - # Visit a RegexpContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_content(node); end - - # Visit a RegexpEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_end(node); end - - # Visit a RegexpLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_regexp_literal(node); end - - # Visit a Rescue node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rescue(node); end - - # Visit a RescueEx node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rescue_ex(node); end - - # Visit a RescueMod node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rescue_mod(node); end - - # Visit a RestParam node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rest_param(node); end - - # Visit a Retry node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_retry(node); end - - # Visit a Return node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_return(node); end - - # Visit a RParen node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_rparen(node); end - - # Visit a SClass node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_sclass(node); end - - # Visit a Statements node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_statements(node); end - - # Visit a StringConcat node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_concat(node); end - - # Visit a StringContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_content(node); end - - # Visit a StringDVar node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_dvar(node); end - - # Visit a StringEmbExpr node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_embexpr(node); end - - # Visit a StringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_string_literal(node); end - - # Visit a Super node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_super(node); end - - # Visit a SymBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbeg(node); end - - # Visit a SymbolContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbol_content(node); end - - # Visit a SymbolLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbol_literal(node); end - - # Visit a Symbols node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbols(node); end - - # Visit a SymbolsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_symbols_beg(node); end - - # Visit a TLambda node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tlambda(node); end - - # Visit a TLamBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tlambeg(node); end - - # Visit a TopConstField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_top_const_field(node); end - - # Visit a TopConstRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_top_const_ref(node); end - - # Visit a TStringBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tstring_beg(node); end - - # Visit a TStringContent node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tstring_content(node); end - - # Visit a TStringEnd node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_tstring_end(node); end - - # Visit an Unary node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_unary(node); end - - # Visit an Undef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_undef(node); end - - # Visit an UnlessNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_unless(node); end - - # Visit an UntilNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_until(node); end - - # Visit a VarField node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_var_field(node); end - - # Visit a VarRef node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_var_ref(node); end - - # Visit a VCall node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_vcall(node); end - - # Visit a VoidStmt node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_void_stmt(node); end - - # Visit a When node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_when(node); end - - # Visit a WhileNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_while(node); end - - # Visit a Word node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_word(node); end - - # Visit a Words node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_words(node); end - - # Visit a WordsBeg node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_words_beg(node); end - - # Visit a XString node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_xstring(node); end - - # Visit a XStringLiteral node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_xstring_literal(node); end - - # Visit a YieldNode node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_yield(node); end - - # Visit a ZSuper node. - # - # source://syntax_tree//lib/syntax_tree/basic_visitor.rb#113 - def visit_zsuper(node); end -end - -# VoidStmt represents an empty lexical block of code. -# -# ;; -# -# source://syntax_tree//lib/syntax_tree/node.rb#11775 -class SyntaxTree::VoidStmt < ::SyntaxTree::Node - # @return [VoidStmt] a new instance of VoidStmt - # - # source://syntax_tree//lib/syntax_tree/node.rb#11779 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11808 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11784 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11788 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11777 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11792 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11788 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11801 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11805 - def format(q); end -end - -# When represents a +when+ clause in a +case+ chain. -# -# case value -# when predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11819 -class SyntaxTree::When < ::SyntaxTree::Node - # @return [When] a new instance of When - # - # source://syntax_tree//lib/syntax_tree/node.rb#11832 - def initialize(arguments:, statements:, consequent:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11924 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11840 - def accept(visitor); end - - # [Args] the arguments to the when clause - # - # source://syntax_tree//lib/syntax_tree/node.rb#11821 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11844 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11830 - def comments; end - - # [nil | Else | When] the next clause in the chain - # - # source://syntax_tree//lib/syntax_tree/node.rb#11827 - def consequent; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11848 - def copy(arguments: T.unsafe(nil), statements: T.unsafe(nil), consequent: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11844 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11863 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11889 - def format(q); end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11824 - def statements; end -end - -# We're going to keep a single instance of this separator around so we don't -# have to allocate a new one every time we format a when clause. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11887 -SyntaxTree::When::SEPARATOR = T.let(T.unsafe(nil), SyntaxTree::When::Separator) - -# We have a special separator here for when clauses which causes them to -# fill as much of the line as possible as opposed to everything breaking -# into its own line as soon as you hit the print limit. -# -# source://syntax_tree//lib/syntax_tree/node.rb#11876 -class SyntaxTree::When::Separator - # source://syntax_tree//lib/syntax_tree/node.rb#11877 - def call(q); end -end - -# While represents a +while+ loop. -# -# while predicate -# end -# -# source://syntax_tree//lib/syntax_tree/node.rb#11935 -class SyntaxTree::WhileNode < ::SyntaxTree::Node - # @return [WhileNode] a new instance of WhileNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#11945 - def initialize(predicate:, statements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11987 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11952 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11956 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#11943 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11960 - def copy(predicate: T.unsafe(nil), statements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11956 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#11974 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#11983 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#11992 - def modifier?; end - - # [Node] the expression to be checked - # - # source://syntax_tree//lib/syntax_tree/node.rb#11937 - def predicate; end - - # [Statements] the expressions to be executed - # - # source://syntax_tree//lib/syntax_tree/node.rb#11940 - def statements; end -end - -# WithScope is a module intended to be included in classes inheriting from -# Visitor. The module overrides a few visit methods to automatically keep -# track of local variables and arguments defined in the current scope. -# Example usage: -# -# class MyVisitor < Visitor -# include WithScope -# -# def visit_ident(node) -# # Check if we're visiting an identifier for an argument, a local -# # variable or something else -# local = current_scope.find_local(node) -# -# if local.type == :argument -# # handle identifiers for arguments -# elsif local.type == :variable -# # handle identifiers for variables -# else -# # handle other identifiers, such as method names -# end -# end -# end -# -# source://syntax_tree//lib/syntax_tree/with_scope.rb#27 -module SyntaxTree::WithScope - # source://syntax_tree//lib/syntax_tree/with_scope.rb#122 - def initialize(*args, **kwargs, &block); end - - # Returns the value of attribute current_scope. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#120 - def current_scope; end - - # Visit for capturing local variables defined in regex named capture groups - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#236 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#182 - def visit_blockarg(node); end - - # Visits for nodes that create new scopes, such as classes, modules - # and method definitions. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#131 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#147 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#175 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#189 - def visit_lambda_var(node); end - - # When we find a method invocation with a block, only the code that happens - # inside of the block needs a fresh scope. The method invocation - # itself happens in the same scope. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#142 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#135 - def visit_module(node); end - - # Visit for keeping track of local arguments, such as method and block - # arguments. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#153 - def visit_params(node); end - - # Visit for keeping track of local variable definitions - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#207 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#168 - def visit_rest_param(node); end - - # Visit for keeping track of local variable definitions - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#199 - def visit_var_field(node); end - - # Visits for keeping track of variable and argument usages - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#215 - def visit_var_ref(node); end - - # When using regex named capture groups, vcalls might actually be a variable - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#227 - def visit_vcall(node); end - - private - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#285 - def add_argument_definitions(list); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#299 - def next_scope_id; end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#303 - def with_scope(parent_scope = T.unsafe(nil)); end -end - -# The scope class is used to keep track of local variables and arguments -# inside a particular scope. -# -# source://syntax_tree//lib/syntax_tree/with_scope.rb#30 -class SyntaxTree::WithScope::Scope - # @return [Scope] a new instance of Scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#68 - def initialize(id, parent = T.unsafe(nil)); end - - # Adding a local definition will either insert a new entry in the locals - # hash or append a new definition location to an existing local. Notice - # that it's not possible to change the type of a local after it has been - # registered. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#78 - def add_local_definition(identifier, type); end - - # Adding a local usage will either insert a new entry in the locals - # hash or append a new usage location to an existing local. Notice that - # it's not possible to change the type of a local after it has been - # registered. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#95 - def add_local_usage(identifier, type); end - - # Try to find the local given its name in this scope or any of its - # parents. - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#102 - def find_local(name); end - - # [Integer] a unique identifier for this scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#59 - def id; end - - # [Hash[String, Local]] The local variables and arguments defined in this - # scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#66 - def locals; end - - # [scope | nil] The parent scope - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#62 - def parent; end - - private - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#108 - def resolve_local(name, type); end -end - -# This class tracks the occurrences of a local variable or argument. -# -# source://syntax_tree//lib/syntax_tree/with_scope.rb#32 -class SyntaxTree::WithScope::Scope::Local - # @return [Local] a new instance of Local - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#43 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#49 - def add_definition(location); end - - # source://syntax_tree//lib/syntax_tree/with_scope.rb#53 - def add_usage(location); end - - # [Array[Location]] The locations of all definitions and assignments of - # this local - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#38 - def definitions; end - - # [Symbol] The type of the local (e.g. :argument, :variable) - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#34 - def type; end - - # [Array[Location]] The locations of all usages of this local - # - # source://syntax_tree//lib/syntax_tree/with_scope.rb#41 - def usages; end -end - -# Word represents an element within a special array literal that accepts -# interpolation. -# -# %W[a#{b}c xyz] -# -# In the example above, there would be two Word nodes within a parent Words -# node. -# -# source://syntax_tree//lib/syntax_tree/node.rb#12004 -class SyntaxTree::Word < ::SyntaxTree::Node - # @return [Word] a new instance of Word - # - # source://syntax_tree//lib/syntax_tree/node.rb#12012 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12051 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12022 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12026 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12010 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12030 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12026 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12043 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12047 - def format(q); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/node.rb#12018 - def match?(pattern); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # word - # - # source://syntax_tree//lib/syntax_tree/node.rb#12007 - def parts; end -end - -# Words represents a string literal array with interpolation. -# -# %W[one two three] -# -# source://syntax_tree//lib/syntax_tree/node.rb#12060 -class SyntaxTree::Words < ::SyntaxTree::Node - # @return [Words] a new instance of Words - # - # source://syntax_tree//lib/syntax_tree/node.rb#12070 - def initialize(beginning:, elements:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12126 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12077 - def accept(visitor); end - - # [WordsBeg] the token that opens this array literal - # - # source://syntax_tree//lib/syntax_tree/node.rb#12062 - def beginning; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12081 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12068 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12085 - def copy(beginning: T.unsafe(nil), elements: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12081 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12095 - def deconstruct_keys(_keys); end - - # [Array[ Word ]] the elements of this array - # - # source://syntax_tree//lib/syntax_tree/node.rb#12065 - def elements; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12104 - def format(q); end -end - -# WordsBeg represents the beginning of a string literal array with -# interpolation. -# -# %W[one two three] -# -# In the snippet above, a WordsBeg would be created with the value of "%W[". -# Note that these kinds of arrays can start with a lot of different delimiter -# types (e.g., %W| or %W<). -# -# source://syntax_tree//lib/syntax_tree/node.rb#12140 -class SyntaxTree::WordsBeg < ::SyntaxTree::Node - # @return [WordsBeg] a new instance of WordsBeg - # - # source://syntax_tree//lib/syntax_tree/node.rb#12144 - def initialize(value:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12170 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12149 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12153 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12157 - def copy(value: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12153 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12166 - def deconstruct_keys(_keys); end - - # [String] the start of the word literal array - # - # source://syntax_tree//lib/syntax_tree/node.rb#12142 - def value; end -end - -# XString represents the contents of an XStringLiteral. -# -# `ls` -# -# source://syntax_tree//lib/syntax_tree/node.rb#12179 -class SyntaxTree::XString < ::SyntaxTree::Node - # @return [XString] a new instance of XString - # - # source://syntax_tree//lib/syntax_tree/node.rb#12184 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12210 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12189 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12193 - def child_nodes; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12197 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12193 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12206 - def deconstruct_keys(_keys); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # xstring - # - # source://syntax_tree//lib/syntax_tree/node.rb#12182 - def parts; end -end - -# XStringLiteral represents a string that gets executed. -# -# `ls` -# -# source://syntax_tree//lib/syntax_tree/node.rb#12219 -class SyntaxTree::XStringLiteral < ::SyntaxTree::Node - # @return [XStringLiteral] a new instance of XStringLiteral - # - # source://syntax_tree//lib/syntax_tree/node.rb#12227 - def initialize(parts:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12264 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12233 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12237 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12225 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12241 - def copy(parts: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12237 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12254 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12258 - def format(q); end - - # [Array[ StringEmbExpr | StringDVar | TStringContent ]] the parts of the - # xstring - # - # source://syntax_tree//lib/syntax_tree/node.rb#12222 - def parts; end -end - -# This module provides an object representation of the YARV bytecode. -# -# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#4 -module SyntaxTree::YARV - class << self - # A convenience method for creating a CallData object. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#88 - def calldata(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end - - # Compile the given source into a YARV instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv.rb#25 - def compile(source, options = T.unsafe(nil)); end - - # Compile and interpret the given source. - # - # source://syntax_tree//lib/syntax_tree/yarv.rb#30 - def interpret(source, options = T.unsafe(nil)); end - end -end - -# ### Summary -# -# `adjuststack` accepts a single integer argument and removes that many -# elements from the top of the stack. -# -# ### Usage -# -# ~~~ruby -# x = [true] -# x[0] ||= nil -# x[0] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#69 -class SyntaxTree::YARV::AdjustStack < ::SyntaxTree::YARV::Instruction - # @return [AdjustStack] a new instance of AdjustStack - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#72 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#88 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#100 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#84 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#76 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#92 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#70 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#96 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#80 - def to_a(_iseq); end -end - -# ### Summary -# -# `anytostring` ensures that the value on top of the stack is a string. -# -# It pops two values off the stack. If the first value is a string it -# pushes it back on the stack. If the first value is not a string, it uses -# Ruby's built in string coercion to coerce the second value to a string -# and then pushes that back on the stack. -# -# This is used in conjunction with `objtostring` as a fallback for when an -# object's `to_s` method does not return a string. -# -# ### Usage -# -# ~~~ruby -# "#{5}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#123 -class SyntaxTree::YARV::AnyToString < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#136 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#148 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#132 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#124 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#140 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#144 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#128 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#5 -class SyntaxTree::YARV::Assembler - # @return [Assembler] a new instance of Assembler - # - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#66 - def initialize(lines); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#70 - def assemble; end - - # Returns the value of attribute lines. - # - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#64 - def lines; end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#88 - def assemble_iseq(iseq, lines); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#408 - def find_local(iseq, operands); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#417 - def parse(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#449 - def parse_calldata(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#444 - def parse_nested(lines); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#432 - def parse_number(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#424 - def parse_options(value, options); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#436 - def parse_string(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#440 - def parse_symbol(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#428 - def parse_type(value, type); end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#78 - def assemble(source); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#82 - def assemble_file(filepath); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#28 -SyntaxTree::YARV::Assembler::CALLDATA_FLAGS = T.let(T.unsafe(nil), Hash) - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#43 -SyntaxTree::YARV::Assembler::DEFINED_TYPES = T.let(T.unsafe(nil), Array) - -# source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#6 -class SyntaxTree::YARV::Assembler::ObjectVisitor < ::SyntaxTree::YARV::Compiler::RubyVisitor - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#7 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/assembler.rb#15 - def visit_string_literal(node); end -end - -# This object represents a single basic block, wherein all contained -# instructions do not branch except for the last one. -# -# source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#7 -class SyntaxTree::YARV::BasicBlock - # @return [BasicBlock] a new instance of BasicBlock - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#23 - def initialize(block_start, insns); end - - # This is the index into the list of instructions where this block starts. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#12 - def block_start; end - - # Yield each instruction in this basic block along with its index from the - # original instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#35 - def each_with_length; end - - # This is the unique identifier for this basic block. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#9 - def id; end - - # This is an array of basic blocks that lead into this block. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#18 - def incoming_blocks; end - - # This is the set of instructions that this block contains. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#15 - def insns; end - - # This is an array of basic blocks that this block leads into. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#21 - def outgoing_blocks; end - - # This method is used to verify that the basic block is well formed. It - # checks that the only instruction in this basic block that branches is - # the last instruction. - # - # source://syntax_tree//lib/syntax_tree/yarv/basic_block.rb#48 - def verify; end -end - -# Parses the given source code into a syntax tree, compiles that syntax tree -# into YARV bytecode. -# -# source://syntax_tree//lib/syntax_tree/yarv/bf.rb#7 -class SyntaxTree::YARV::Bf - # @return [Bf] a new instance of Bf - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#10 - def initialize(source); end - - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#14 - def compile; end - - # Returns the value of attribute source. - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#8 - def source; end - - private - - # $tape[$cursor] += value - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#84 - def change_by(iseq, value); end - - # $tape[$cursor] = $stdin.getc.ord - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#133 - def input_char(iseq); end - - # Jump back to the start of the loop. - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#163 - def loop_end(iseq, start_label, end_label); end - - # unless $tape[$cursor] == 0 - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#146 - def loop_start(iseq); end - - # $stdout.putc($tape[$cursor].chr) - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#120 - def output_char(iseq); end - - # $cursor += value - # - # source://syntax_tree//lib/syntax_tree/yarv/bf.rb#105 - def shift_by(iseq, value); end -end - -# ### Summary -# -# `branchif` has one argument: the jump index. It pops one value off the -# stack: the jump condition. -# -# If the value popped off the stack is true, `branchif` jumps to -# the jump index and continues executing there. -# -# ### Usage -# -# ~~~ruby -# x = true -# x ||= "foo" -# puts x -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#175 -class SyntaxTree::YARV::BranchIf < ::SyntaxTree::YARV::Instruction - # @return [BranchIf] a new instance of BranchIf - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#178 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#194 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#210 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#206 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#190 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#182 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#214 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#176 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#198 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#202 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#186 - def to_a(_iseq); end -end - -# ### Summary -# -# `branchnil` has one argument: the jump index. It pops one value off the -# stack: the jump condition. -# -# If the value popped off the stack is nil, `branchnil` jumps to -# the jump index and continues executing there. -# -# ### Usage -# -# ~~~ruby -# x = nil -# if x&.to_s -# puts "hi" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#236 -class SyntaxTree::YARV::BranchNil < ::SyntaxTree::YARV::Instruction - # @return [BranchNil] a new instance of BranchNil - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#239 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#255 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#271 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#267 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#251 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#243 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#275 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#237 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#259 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#263 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#247 - def to_a(_iseq); end -end - -# ### Summary -# -# `branchunless` has one argument: the jump index. It pops one value off -# the stack: the jump condition. -# -# If the value popped off the stack is false or nil, `branchunless` jumps -# to the jump index and continues executing there. -# -# ### Usage -# -# ~~~ruby -# if 2 + 3 -# puts "foo" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#296 -class SyntaxTree::YARV::BranchUnless < ::SyntaxTree::YARV::Instruction - # @return [BranchUnless] a new instance of BranchUnless - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#299 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#315 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#331 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#327 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#311 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#303 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#335 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#297 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#319 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#323 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#307 - def to_a(_iseq); end -end - -# This is an operand to various YARV instructions that represents the -# information about a specific call site. -# -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#7 -class SyntaxTree::YARV::CallData - # @return [CallData] a new instance of CallData - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#31 - def initialize(method, argc = T.unsafe(nil), flags = T.unsafe(nil), kw_arg = T.unsafe(nil)); end - - # Returns the value of attribute argc. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def argc; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#43 - def flag?(mask); end - - # Returns the value of attribute flags. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def flags; end - - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#53 - def inspect; end - - # Returns the value of attribute kw_arg. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def kw_arg; end - - # Returns the value of attribute method. - # - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#29 - def method; end - - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#47 - def to_h; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#77 - def from(serialized); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ARGS_BLOCKARG = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ARGS_SIMPLE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ARGS_SPLAT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_FCALL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_KWARG = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_KW_SPLAT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_KW_SPLAT_MUT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_OPT_SEND = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_SUPER = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_TAILCALL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_VCALL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/calldata.rb#27 -SyntaxTree::YARV::CallData::CALL_ZSUPER = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `checkkeyword` checks if a keyword was passed at the callsite that -# called into the method represented by the instruction sequence. It has -# two arguments: the index of the local variable that stores the keywords -# metadata and the index of the keyword within that metadata. It pushes -# a boolean onto the stack indicating whether or not the keyword was -# given. -# -# ### Usage -# -# ~~~ruby -# def evaluate(value: rand) -# value -# end -# -# evaluate(value: 3) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#359 -class SyntaxTree::YARV::CheckKeyword < ::SyntaxTree::YARV::Instruction - # @return [CheckKeyword] a new instance of CheckKeyword - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#362 - def initialize(keyword_bits_index, keyword_index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#386 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#400 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#382 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#367 - def disasm(fmt); end - - # Returns the value of attribute keyword_bits_index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 - def keyword_bits_index; end - - # Returns the value of attribute keyword_index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#360 - def keyword_index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#392 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#396 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#374 - def to_a(iseq); end -end - -# ### Summary -# -# `checkmatch` checks if the current pattern matches the current value. It -# pops the target and the pattern off the stack and pushes a boolean onto -# the stack if it matches or not. -# -# ### Usage -# -# ~~~ruby -# foo in Foo -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#417 -class SyntaxTree::YARV::CheckMatch < ::SyntaxTree::YARV::Instruction - # @return [CheckMatch] a new instance of CheckMatch - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#426 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#442 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#458 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#438 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#430 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#446 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#450 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#454 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#434 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#424 - def type; end - - private - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#472 - def check?(pattern, target); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#422 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_ARRAY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#419 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_CASE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#421 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_MASK = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#420 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_RESCUE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#418 -SyntaxTree::YARV::CheckMatch::VM_CHECKMATCH_TYPE_WHEN = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `checktype` checks if the value on top of the stack is of a certain type. -# The type is the only argument. It pops the value off the stack and pushes -# a boolean onto the stack indicating whether or not the value is of the -# given type. -# -# ### Usage -# -# ~~~ruby -# foo in [bar] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#501 -class SyntaxTree::YARV::CheckType < ::SyntaxTree::YARV::Instruction - # @return [CheckType] a new instance of CheckType - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#526 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#588 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#608 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#584 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#530 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#592 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#596 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#600 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#580 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#524 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#508 -SyntaxTree::YARV::CheckType::TYPE_ARRAY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#511 -SyntaxTree::YARV::CheckType::TYPE_BIGNUM = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#503 -SyntaxTree::YARV::CheckType::TYPE_CLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#515 -SyntaxTree::YARV::CheckType::TYPE_COMPLEX = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#513 -SyntaxTree::YARV::CheckType::TYPE_DATA = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#519 -SyntaxTree::YARV::CheckType::TYPE_FALSE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#512 -SyntaxTree::YARV::CheckType::TYPE_FILE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#521 -SyntaxTree::YARV::CheckType::TYPE_FIXNUM = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#505 -SyntaxTree::YARV::CheckType::TYPE_FLOAT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#509 -SyntaxTree::YARV::CheckType::TYPE_HASH = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#514 -SyntaxTree::YARV::CheckType::TYPE_MATCH = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#504 -SyntaxTree::YARV::CheckType::TYPE_MODULE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#517 -SyntaxTree::YARV::CheckType::TYPE_NIL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#502 -SyntaxTree::YARV::CheckType::TYPE_OBJECT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#516 -SyntaxTree::YARV::CheckType::TYPE_RATIONAL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#507 -SyntaxTree::YARV::CheckType::TYPE_REGEXP = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#506 -SyntaxTree::YARV::CheckType::TYPE_STRING = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#510 -SyntaxTree::YARV::CheckType::TYPE_STRUCT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#520 -SyntaxTree::YARV::CheckType::TYPE_SYMBOL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#518 -SyntaxTree::YARV::CheckType::TYPE_TRUE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#522 -SyntaxTree::YARV::CheckType::TYPE_UNDEF = T.let(T.unsafe(nil), Integer) - -# This class is an experiment in transforming Syntax Tree nodes into their -# corresponding YARV instruction sequences. It attempts to mirror the -# behavior of RubyVM::InstructionSequence.compile. -# -# You use this as with any other visitor. First you parse code into a tree, -# then you visit it with this compiler. Visiting the root node of the tree -# will return a SyntaxTree::YARV::Compiler::InstructionSequence object. -# With that object you can call #to_a on it, which will return a serialized -# form of the instruction sequence as an array. This array _should_ mirror -# the array given by RubyVM::InstructionSequence#to_a. -# -# As an example, here is how you would compile a single expression: -# -# program = SyntaxTree.parse("1 + 2") -# program.accept(SyntaxTree::YARV::Compiler.new).to_a -# -# [ -# "YARVInstructionSequence/SimpleDataFormat", -# 3, -# 1, -# 1, -# {:arg_size=>0, :local_size=>0, :stack_max=>2}, -# "", -# "", -# "", -# 1, -# :top, -# [], -# {}, -# [], -# [ -# [:putobject_INT2FIX_1_], -# [:putobject, 2], -# [:opt_plus, {:mid=>:+, :flag=>16, :orig_argc=>1}], -# [:leave] -# ] -# ] -# -# Note that this is the same output as calling: -# -# RubyVM::InstructionSequence.compile("1 + 2").to_a -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#47 -class SyntaxTree::YARV::Compiler < ::SyntaxTree::BasicVisitor - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#293 - def initialize(options = T.unsafe(nil)); end - - # The current instruction sequence that is being compiled. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#286 - def iseq; end - - # A boolean to track if we're currently compiling the last statement - # within a set of statements. This information is necessary to determine - # if we need to return the value of the last statement. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#291 - def last_statement; end - - # These options mirror the compilation options that we currently support - # that can be also passed to RubyVM::InstructionSequence.compile. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#283 - def options; end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#299 - def visit_BEGIN(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#303 - def visit_CHAR(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#311 - def visit_END(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#339 - def visit_alias(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#347 - def visit_aref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#369 - def visit_arg_block(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#373 - def visit_arg_paren(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#377 - def visit_arg_star(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#382 - def visit_args(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#386 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#421 - def visit_aryptn(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#424 - def visit_assign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#522 - def visit_assoc(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#527 - def visit_assoc_splat(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#531 - def visit_backref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#535 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#543 - def visit_begin(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#546 - def visit_binary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#575 - def visit_block(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#585 - def visit_block_var(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#599 - def visit_blockarg(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#605 - def visit_bodystmt(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#609 - def visit_break(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#612 - def visit_call(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#712 - def visit_case(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#757 - def visit_class(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#792 - def visit_command(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#805 - def visit_command_call(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#818 - def visit_const_path_field(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#822 - def visit_const_path_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#827 - def visit_def(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#850 - def visit_defined(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#907 - def visit_dyna_symbol(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#913 - def visit_else(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#918 - def visit_elsif(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#929 - def visit_ensure(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#932 - def visit_field(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#936 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#940 - def visit_fndptn(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#943 - def visit_for(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#976 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#988 - def visit_heredoc(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#985 - def visit_hshptn(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#999 - def visit_if(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1053 - def visit_if_op(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1074 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1078 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1082 - def visit_kwrest_param(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1088 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1092 - def visit_lambda(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1106 - def visit_lambda_var(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1110 - def visit_massign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1116 - def visit_method_add_block(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1129 - def visit_mlhs(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1142 - def visit_module(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1171 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1180 - def visit_next(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1183 - def visit_not(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1188 - def visit_opassign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1254 - def visit_params(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1360 - def visit_paren(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1364 - def visit_pinned_begin(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1367 - def visit_pinned_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1370 - def visit_program(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1421 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1425 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1434 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1444 - def visit_rassign(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1521 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1525 - def visit_redo(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1528 - def visit_regexp_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1538 - def visit_rescue(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1541 - def visit_rescue_ex(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1544 - def visit_rescue_mod(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1547 - def visit_rest_param(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1553 - def visit_retry(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1556 - def visit_return(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1559 - def visit_sclass(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1580 - def visit_statements(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1594 - def visit_string_concat(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1606 - def visit_string_embexpr(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1610 - def visit_string_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1619 - def visit_super(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1633 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1637 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1656 - def visit_top_const_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1660 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1668 - def visit_unary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1689 - def visit_undef(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1699 - def visit_unless(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1725 - def visit_until(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1744 - def visit_var_field(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1761 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1796 - def visit_vcall(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1808 - def visit_when(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1812 - def visit_while(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1831 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1840 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1850 - def visit_xstring_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1863 - def visit_yield(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1869 - def visit_zsuper(_node); end - - private - - # This is a helper that is used in places where arguments may be present - # or they may be wrapped in parentheses. It's meant to descend down the - # tree and return an array of argument nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1887 - def argument_parts(node); end - - # Constant names when they are being assigned or referenced come in as a - # tree, but it's more convenient to work with them as an array. This - # method converts them into that array. This is nice because it's the - # operand that goes to opt_getconstant_path in Ruby 3.2. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1908 - def constant_names(node); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2196 - def last_statement?; end - - # For the most part when an OpAssign (operator assignment) node with a ||= - # operator is being compiled it's a matter of reading the target, checking - # if the value should be evaluated, evaluating it if so, and then writing - # the result back to the target. - # - # However, in certain kinds of assignments (X, ::X, X::Y, @@x, and $x) we - # first check if the value is defined using the defined instruction. I - # don't know why it is necessary, and suspect that it isn't. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#1936 - def opassign_defined(node); end - - # Whenever a value is interpolated into a string-like structure, these - # three instructions are pushed. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2016 - def push_interpolate; end - - # Visit a type of pattern in a pattern match. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2029 - def visit_pattern(node, end_label); end - - # There are a lot of nodes in the AST that act as contains of parts of - # strings. This includes things like string literals, regular expressions, - # heredocs, etc. This method will visit all the parts of a string within - # those containers. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2137 - def visit_string_parts(node); end - - # The current instruction sequence that we're compiling is always stored - # on the compiler. When we descend into a node that has its own - # instruction sequence, this method can be called to temporarily set the - # new value of the instruction sequence, yield, and then set it back. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2167 - def with_child_iseq(child_iseq); end - - # When we're compiling the last statement of a set of statements within a - # scope, the instructions sometimes change from pops to leaves. These - # kinds of peephole optimizations can reduce the overall number of - # instructions. Therefore, we keep track of whether we're compiling the - # last statement of a scope and allow visit methods to query that - # information. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2185 - def with_last_statement; end - - # OpAssign nodes can have a number of different kinds of nodes as their - # "target" (i.e., the left-hand side of the assignment). When compiling - # these nodes we typically need to first fetch the current value of the - # variable, then perform some kind of action, then store the result back - # into the variable. This method handles that by first fetching the value, - # then yielding to the block, then storing the result. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#2206 - def with_opassign(node); end -end - -# This represents a set of options that can be passed to the compiler to -# control how it compiles the code. It mirrors the options that can be -# passed to RubyVM::InstructionSequence.compile, except it only includes -# options that actually change the behavior. -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#52 -class SyntaxTree::YARV::Compiler::Options - # @return [Options] a new instance of Options - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#53 - def initialize(frozen_string_literal: T.unsafe(nil), inline_const_cache: T.unsafe(nil), operands_unification: T.unsafe(nil), peephole_optimization: T.unsafe(nil), specialized_instruction: T.unsafe(nil), tailcall_optimization: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#80 - def frozen_string_literal!; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#84 - def frozen_string_literal?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#88 - def inline_const_cache?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#92 - def operands_unification?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#96 - def peephole_optimization?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#100 - def specialized_instruction?; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#104 - def tailcall_optimization?; end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#69 - def to_hash; end -end - -# This visitor is responsible for converting Syntax Tree nodes into their -# corresponding Ruby structures. This is used to convert the operands of -# some instructions like putobject that push a Ruby object directly onto -# the stack. It is only used when the entire structure can be represented -# at compile-time, as opposed to constructed at run-time. -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#114 -class SyntaxTree::YARV::Compiler::RubyVisitor < ::SyntaxTree::BasicVisitor - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_BEGIN(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_CHAR(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_END(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit___end__(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_alias(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_aref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_aref_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_arg_block(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_arg_paren(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_arg_star(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_args(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_args_forward(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#128 - def visit_array(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_aryptn(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_assign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_assoc(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_assoc_splat(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_backref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_backtick(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 - def visit_bare_assoc_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_begin(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_binary(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_block(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_block_var(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_blockarg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_bodystmt(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_break(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_call(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_case(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_class(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_comma(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_command(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_command_call(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_comment(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const_path_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const_path_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_const_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_cvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_def(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_defined(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_dyna_symbol(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_else(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_elsif(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embdoc(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embexpr_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embexpr_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_embvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_ensure(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_excessed_comma(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#141 - def visit_float(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_fndptn(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_for(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_gvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#132 - def visit_hash(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_heredoc(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_heredoc_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_heredoc_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_hshptn(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_ident(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_if(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_if_op(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#147 - def visit_imaginary(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_in(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#151 - def visit_int(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_ivar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_kw(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_kwrest_param(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#166 - def visit_label(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_label_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lambda(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lambda_var(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lbrace(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lbracket(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_lparen(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_massign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_method_add_block(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_mlhs(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_mlhs_paren(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_module(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#170 - def visit_mrhs(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_next(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_not(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_op(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_opassign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_params(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_paren(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_period(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_pinned_begin(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_pinned_var_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_program(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#174 - def visit_qsymbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_qsymbols_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#178 - def visit_qwords(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_qwords_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#182 - def visit_range(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rassign(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#187 - def visit_rational(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rbrace(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rbracket(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_redo(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_regexp_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_regexp_content(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_regexp_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#191 - def visit_regexp_literal(node); end - - # This isn't actually a visit method, though maybe it should be. It is - # responsible for converting the set of string options on a regular - # expression into its equivalent integer. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#249 - def visit_regexp_literal_flags(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rescue(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rescue_ex(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rescue_mod(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rest_param(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_retry(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_return(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_rparen(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_sclass(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_statements(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_concat(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_content(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_dvar(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_embexpr(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_string_literal(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_super(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_symbeg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_symbol_content(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#204 - def visit_symbol_literal(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#208 - def visit_symbols(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_symbols_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tlambda(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tlambeg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_top_const_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_top_const_ref(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tstring_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#212 - def visit_tstring_content(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_tstring_end(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_unary(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_undef(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_unless(_node); end - - # @raise [CompilationError] - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_unsupported(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_until(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_var_field(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#216 - def visit_var_ref(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_vcall(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_void_stmt(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_when(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_while(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#231 - def visit_word(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#241 - def visit_words(node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_words_beg(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_xstring(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_xstring_literal(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_yield(_node); end - - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#268 - def visit_zsuper(_node); end - - class << self - # This will attempt to compile the given node. If it's possible, then - # it will return the compiled object. Otherwise it will return nil. - # - # source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#122 - def compile(node); end - end -end - -# This error is raised whenever a node cannot be converted into a Ruby -# object at compile-time. -# -# source://syntax_tree//lib/syntax_tree/yarv/compiler.rb#117 -class SyntaxTree::YARV::Compiler::RubyVisitor::CompilationError < ::StandardError; end - -# ### Summary -# -# `concatarray` concatenates the two Arrays on top of the stack. -# -# It coerces the two objects at the top of the stack into Arrays by -# calling `to_a` if necessary, and makes sure to `dup` the first Array if -# it was already an Array, to avoid mutating it when concatenating. -# -# ### Usage -# -# ~~~ruby -# [1, *2] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#674 -class SyntaxTree::YARV::ConcatArray < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#687 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#699 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#683 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#675 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#691 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#695 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#679 - def to_a(_iseq); end -end - -# ### Summary -# -# `concatstrings` pops a number of strings from the stack joins them -# together into a single string and pushes that string back on the stack. -# -# This does no coercion and so is always used in conjunction with -# `objtostring` and `anytostring` to ensure the stack contents are always -# strings. -# -# ### Usage -# -# ~~~ruby -# "#{5}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#720 -class SyntaxTree::YARV::ConcatStrings < ::SyntaxTree::YARV::Instruction - # @return [ConcatStrings] a new instance of ConcatStrings - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#723 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#739 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#755 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#735 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#727 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#743 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#721 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#747 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#751 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#731 - def to_a(_iseq); end -end - -# This class represents a control flow graph of a YARV instruction sequence. -# It constructs a graph of basic blocks that hold subsets of the list of -# instructions from the instruction sequence. -# -# You can use this class by calling the ::compile method and passing it a -# YARV instruction sequence. It will return a control flow graph object. -# -# iseq = RubyVM::InstructionSequence.compile("1 + 2") -# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) -# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) -# -# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#16 -class SyntaxTree::YARV::ControlFlowGraph - # @return [ControlFlowGraph] a new instance of ControlFlowGraph - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#173 - def initialize(iseq, insns, blocks); end - - # This is the set of basic blocks that this control-flow graph contains. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#171 - def blocks; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#179 - def disasm; end - - # This is the list of instructions that this control flow graph contains. - # It is effectively the same as the list of instructions in the - # instruction sequence but with line numbers and events filtered out. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#168 - def insns; end - - # This is the instruction sequence that this control flow graph - # corresponds to. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#163 - def iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#202 - def to_dfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#210 - def to_mermaid; end - - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#206 - def to_son; end - - # This method is used to verify that the control flow graph is well - # formed. It does this by checking that each basic block is itself well - # formed. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#248 - def verify; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#252 - def compile(iseq); end - end -end - -# This class is responsible for creating a control flow graph from the -# given instruction sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#19 -class SyntaxTree::YARV::ControlFlowGraph::Compiler - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#34 - def initialize(iseq); end - - # This method is used to compile the instruction sequence into a control - # flow graph. It returns an instance of ControlFlowGraph. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#54 - def compile; end - - # This is a hash of indices in the YARV instruction sequence that point - # to their corresponding instruction. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#25 - def insns; end - - # This is the instruction sequence that is being compiled. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#21 - def iseq; end - - # This is a hash of labels that point to their corresponding index into - # the YARV instruction sequence. Note that this is not the same as the - # index into the list of instructions on the instruction sequence - # object. Instead, this is the index into the C array, so it includes - # operands. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#32 - def labels; end - - private - - # Builds up a set of basic blocks by iterating over the starts of each - # block. They are keyed by the index of their first instruction. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#92 - def build_basic_blocks; end - - # Connect the blocks by letting them know which blocks are incoming and - # outgoing from each block. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#123 - def connect_basic_blocks(blocks); end - - # Finds the indices of the instructions that start a basic block because - # they're either: - # - # * the start of an instruction sequence - # * the target of a branch - # * fallen through to from a branch - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#72 - def find_basic_block_starts; end - - # If there are blocks that are unreachable, we can remove them from the - # graph entirely at this point. - # - # source://syntax_tree//lib/syntax_tree/yarv/control_flow_graph.rb#145 - def prune_basic_blocks(blocks); end -end - -# Constructs a data-flow-graph of a YARV instruction sequence, via a -# control-flow-graph. Data flow is discovered locally and then globally. The -# graph only considers data flow through the stack - local variables and -# objects are considered fully escaped in this analysis. -# -# You can use this class by calling the ::compile method and passing it a -# control flow graph. It will return a data flow graph object. -# -# iseq = RubyVM::InstructionSequence.compile("1 + 2") -# iseq = SyntaxTree::YARV::InstructionSequence.from(iseq.to_a) -# cfg = SyntaxTree::YARV::ControlFlowGraph.compile(iseq) -# dfg = SyntaxTree::YARV::DataFlowGraph.compile(cfg) -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#18 -class SyntaxTree::YARV::DataFlowGraph - # @return [DataFlowGraph] a new instance of DataFlowGraph - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#68 - def initialize(cfg, insn_flows, block_flows); end - - # Returns the value of attribute block_flows. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 - def block_flows; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#74 - def blocks; end - - # Returns the value of attribute cfg. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 - def cfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#78 - def disasm; end - - # Returns the value of attribute insn_flows. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#66 - def insn_flows; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#127 - def to_mermaid; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#123 - def to_son; end - - # Verify that we constructed the data flow graph correctly. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#179 - def verify; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#204 - def compile(cfg); end - end -end - -# This represents an object that goes on the stack that is passed between -# basic blocks. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#32 -class SyntaxTree::YARV::DataFlowGraph::BlockArgument - # @return [BlockArgument] a new instance of BlockArgument - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#35 - def initialize(name); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#39 - def local?; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#33 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#43 - def to_str; end -end - -# This class is responsible for creating a data flow graph from the given -# control flow graph. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#210 -class SyntaxTree::YARV::DataFlowGraph::Compiler - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#221 - def initialize(cfg); end - - # This data structure will hold the data flow between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#219 - def block_flows; end - - # This is the control flow graph that is being compiled. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#212 - def cfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#227 - def compile; end - - # This data structure will hold the data flow between instructions - # within individual basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#216 - def insn_flows; end - - private - - # Find the data that flows between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#304 - def find_external_flow; end - - # Find the data flow within each basic block. Using an abstract stack, - # connect from consumers of data to the producers of that data. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#237 - def find_internal_flow; end -end - -# This object represents the flow of data between instructions. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#20 -class SyntaxTree::YARV::DataFlowGraph::DataFlow - # @return [DataFlow] a new instance of DataFlow - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#24 - def initialize; end - - # Returns the value of attribute in. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#21 - def in; end - - # Returns the value of attribute out. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#22 - def out; end -end - -# This represents an object that goes on the stack that is passed between -# instructions within a basic block. -# -# source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#50 -class SyntaxTree::YARV::DataFlowGraph::LocalArgument - # @return [LocalArgument] a new instance of LocalArgument - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#53 - def initialize(length); end - - # Returns the value of attribute length. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 - def length; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#57 - def local?; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#51 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/data_flow_graph.rb#61 - def to_str; end -end - -# This class is responsible for taking a compiled instruction sequence and -# walking through it to generate equivalent Ruby code. -# -# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#7 -class SyntaxTree::YARV::Decompiler - include ::SyntaxTree::DSL - - # @return [Decompiler] a new instance of Decompiler - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#32 - def initialize(iseq); end - - # Returns the value of attribute block_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 - def block_label; end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#30 - def iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#37 - def to_ruby; end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#52 - def decompile(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#256 - def local_name(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#43 - def node_for(value); end -end - -# When we're decompiling, we use a looped case statement to emulate -# jumping around in the same way the virtual machine would. This class -# provides convenience methods for generating the AST nodes that have to -# do with that label. -# -# source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#12 -class SyntaxTree::YARV::Decompiler::BlockLabel - include ::SyntaxTree::DSL - - # @return [BlockLabel] a new instance of BlockLabel - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#16 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#20 - def field; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#14 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/decompiler.rb#24 - def ref; end -end - -# ### Summary -# -# `defineclass` defines a class. First it pops the superclass off the -# stack, then it pops the object off the stack that the class should be -# defined under. It has three arguments: the name of the constant, the -# instruction sequence associated with the class, and various flags that -# indicate if it is a singleton class, a module, or a regular class. -# -# ### Usage -# -# ~~~ruby -# class Foo -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#775 -class SyntaxTree::YARV::DefineClass < ::SyntaxTree::YARV::Instruction - # @return [DefineClass] a new instance of DefineClass - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#784 - def initialize(name, class_iseq, flags); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#806 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#823 - def call(vm); end - - # Returns the value of attribute class_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 - def class_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#802 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#790 - def disasm(fmt); end - - # Returns the value of attribute flags. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 - def flags; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#811 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#782 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#815 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#819 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#798 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#780 -SyntaxTree::YARV::DefineClass::FLAG_HAS_SUPERCLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#779 -SyntaxTree::YARV::DefineClass::FLAG_SCOPED = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#776 -SyntaxTree::YARV::DefineClass::TYPE_CLASS = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#778 -SyntaxTree::YARV::DefineClass::TYPE_MODULE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#777 -SyntaxTree::YARV::DefineClass::TYPE_SINGLETON_CLASS = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `definemethod` defines a method on the class of the current value of -# `self`. It accepts two arguments. The first is the name of the method -# being defined. The second is the instruction sequence representing the -# body of the method. -# -# ### Usage -# -# ~~~ruby -# def value = "value" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1068 -class SyntaxTree::YARV::DefineMethod < ::SyntaxTree::YARV::Instruction - # @return [DefineMethod] a new instance of DefineMethod - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1071 - def initialize(method_name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1092 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1101 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1088 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1076 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1097 - def length; end - - # Returns the value of attribute method_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 - def method_iseq; end - - # Returns the value of attribute method_name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1069 - def method_name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1084 - def to_a(_iseq); end -end - -# ### Summary -# -# `definesmethod` defines a method on the singleton class of the current -# value of `self`. It accepts two arguments. The first is the name of the -# method being defined. The second is the instruction sequence representing -# the body of the method. It pops the object off the stack that the method -# should be defined on. -# -# ### Usage -# -# ~~~ruby -# def self.value = "value" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1137 -class SyntaxTree::YARV::DefineSMethod < ::SyntaxTree::YARV::Instruction - # @return [DefineSMethod] a new instance of DefineSMethod - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1140 - def initialize(method_name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1161 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1174 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1157 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1145 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1166 - def length; end - - # Returns the value of attribute method_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 - def method_iseq; end - - # Returns the value of attribute method_name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1138 - def method_name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1170 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1153 - def to_a(_iseq); end -end - -# ### Summary -# -# `defined` checks if the top value of the stack is defined. If it is, it -# pushes its value onto the stack. Otherwise it pushes `nil`. -# -# ### Usage -# -# ~~~ruby -# defined?(x) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#859 -class SyntaxTree::YARV::Defined < ::SyntaxTree::YARV::Instruction - # @return [Defined] a new instance of Defined - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#880 - def initialize(type, name, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#939 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#956 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#935 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#886 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#944 - def length; end - - # Returns the value of attribute message. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 - def message; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#948 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#952 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#931 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#878 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#872 -SyntaxTree::YARV::Defined::TYPE_ASGN = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#865 -SyntaxTree::YARV::Defined::TYPE_CONST = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#876 -SyntaxTree::YARV::Defined::TYPE_CONST_FROM = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#864 -SyntaxTree::YARV::Defined::TYPE_CVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#873 -SyntaxTree::YARV::Defined::TYPE_EXPR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#871 -SyntaxTree::YARV::Defined::TYPE_FALSE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#875 -SyntaxTree::YARV::Defined::TYPE_FUNC = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#863 -SyntaxTree::YARV::Defined::TYPE_GVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#861 -SyntaxTree::YARV::Defined::TYPE_IVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#862 -SyntaxTree::YARV::Defined::TYPE_LVAR = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#866 -SyntaxTree::YARV::Defined::TYPE_METHOD = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#860 -SyntaxTree::YARV::Defined::TYPE_NIL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#874 -SyntaxTree::YARV::Defined::TYPE_REF = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#869 -SyntaxTree::YARV::Defined::TYPE_SELF = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#870 -SyntaxTree::YARV::Defined::TYPE_TRUE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#867 -SyntaxTree::YARV::Defined::TYPE_YIELD = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#868 -SyntaxTree::YARV::Defined::TYPE_ZSUPER = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `definedivar` checks if an instance variable is defined. It is a -# specialization of the `defined` instruction. It accepts three arguments: -# the name of the instance variable, an inline cache, and the string that -# should be pushed onto the stack in the event that the instance variable -# is defined. -# -# ### Usage -# -# ~~~ruby -# defined?(@value) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1011 -class SyntaxTree::YARV::DefinedIVar < ::SyntaxTree::YARV::Instruction - # @return [DefinedIVar] a new instance of DefinedIVar - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1014 - def initialize(name, cache, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1035 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1048 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1031 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1020 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1040 - def length; end - - # Returns the value of attribute message. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 - def message; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1012 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1044 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1027 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#5 -class SyntaxTree::YARV::Disassembler - # @return [Disassembler] a new instance of Disassembler - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#46 - def initialize(current_iseq = T.unsafe(nil)); end - - # Helpers for various instructions - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#58 - def calldata(value); end - - # Returns the value of attribute current_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 - def current_iseq; end - - # Sets the attribute current_iseq - # - # @param value the value to set the attribute current_iseq to. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#44 - def current_iseq=(_arg0); end - - # Returns the value of attribute current_prefix. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#43 - def current_prefix; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#62 - def enqueue(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#66 - def event(name); end - - # Entrypoints - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#116 - def format!; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#123 - def format_insns!(insns, length = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#87 - def inline_storage(cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#91 - def instruction(name, operands = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#95 - def label(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#99 - def local(index, explicit: T.unsafe(nil), implicit: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#108 - def object(value); end - - # Returns the value of attribute output. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 - def output; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#167 - def print(string); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#171 - def puts(string); end - - # Returns the value of attribute queue. - # - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#41 - def queue; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#175 - def string; end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#179 - def with_prefix(value); end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#192 - def format_iseq(iseq); end -end - -# This class is another object that handles disassembling a YARV -# instruction sequence but it renders it without any of the extra spacing -# or alignment. -# -# source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#9 -class SyntaxTree::YARV::Disassembler::Squished - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#10 - def calldata(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#14 - def enqueue(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#17 - def event(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#20 - def inline_storage(cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#24 - def instruction(name, operands = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#28 - def label(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#32 - def local(index, **_arg1); end - - # source://syntax_tree//lib/syntax_tree/yarv/disassembler.rb#36 - def object(value); end -end - -# ### Summary -# -# `dup` copies the top value of the stack and pushes it onto the stack. -# -# ### Usage -# -# ~~~ruby -# $global = 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1206 -class SyntaxTree::YARV::Dup < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1219 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1231 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1215 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1207 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1223 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1227 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1235 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1211 - def to_a(_iseq); end -end - -# ### Summary -# -# `duparray` dups an Array literal and pushes it onto the stack. -# -# ### Usage -# -# ~~~ruby -# [true] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1250 -class SyntaxTree::YARV::DupArray < ::SyntaxTree::YARV::Instruction - # @return [DupArray] a new instance of DupArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1253 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1269 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1281 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1265 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1257 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1273 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1251 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1277 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1261 - def to_a(_iseq); end -end - -# ### Summary -# -# `duphash` dups a Hash literal and pushes it onto the stack. -# -# ### Usage -# -# ~~~ruby -# { a: 1 } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1296 -class SyntaxTree::YARV::DupHash < ::SyntaxTree::YARV::Instruction - # @return [DupHash] a new instance of DupHash - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1299 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1315 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1327 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1311 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1303 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1319 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1297 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1323 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1307 - def to_a(_iseq); end -end - -# ### Summary -# -# `dupn` duplicates the top `n` stack elements. -# -# ### Usage -# -# ~~~ruby -# Object::X ||= true -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1342 -class SyntaxTree::YARV::DupN < ::SyntaxTree::YARV::Instruction - # @return [DupN] a new instance of DupN - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1345 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1361 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1373 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1357 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1349 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1365 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1343 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1369 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1353 - def to_a(_iseq); end -end - -# ### Summary -# -# `expandarray` looks at the top of the stack, and if the value is an array -# it replaces it on the stack with `number` elements of the array, or `nil` -# if the elements are missing. -# -# ### Usage -# -# ~~~ruby -# x, = [true, false, nil] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1392 -class SyntaxTree::YARV::ExpandArray < ::SyntaxTree::YARV::Instruction - # @return [ExpandArray] a new instance of ExpandArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1395 - def initialize(number, flags); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1412 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1429 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1408 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1400 - def disasm(fmt); end - - # Returns the value of attribute flags. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 - def flags; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1417 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1393 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1421 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1425 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1404 - def to_a(_iseq); end -end - -# ### Summary -# -# `getblockparam` is a similar instruction to `getlocal` in that it looks -# for a local variable in the current instruction sequence's local table and -# walks recursively up the parent instruction sequences until it finds it. -# The local it retrieves, however, is a special block local that was passed -# to the current method. It pushes the value of the block local onto the -# stack. -# -# ### Usage -# -# ~~~ruby -# def foo(&block) -# block -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1486 -class SyntaxTree::YARV::GetBlockParam < ::SyntaxTree::YARV::Instruction - # @return [GetBlockParam] a new instance of GetBlockParam - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1489 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1508 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1521 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1504 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1494 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1513 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1487 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1517 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1498 - def to_a(iseq); end -end - -# ### Summary -# -# `getblockparamproxy` is almost the same as `getblockparam` except that it -# pushes a proxy object onto the stack instead of the actual value of the -# block local. This is used when a method is being called on the block -# local. -# -# ### Usage -# -# ~~~ruby -# def foo(&block) -# block.call -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1541 -class SyntaxTree::YARV::GetBlockParamProxy < ::SyntaxTree::YARV::Instruction - # @return [GetBlockParamProxy] a new instance of GetBlockParamProxy - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1544 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1566 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1579 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1562 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1549 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1571 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1542 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1575 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1556 - def to_a(iseq); end -end - -# ### Summary -# -# `getclassvariable` looks for a class variable in the current class and -# pushes its value onto the stack. It uses an inline cache to reduce the -# need to lookup the class variable in the class hierarchy every time. -# -# ### Usage -# -# ~~~ruby -# @@class_variable -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1596 -class SyntaxTree::YARV::GetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [GetClassVariable] a new instance of GetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1599 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1619 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1632 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1615 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1604 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1624 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1597 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1628 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1611 - def to_a(_iseq); end -end - -# ### Summary -# -# `getconstant` performs a constant lookup and pushes the value of the -# constant onto the stack. It pops both the class it should look in and -# whether or not it should look globally as well. -# -# ### Usage -# -# ~~~ruby -# Constant -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1651 -class SyntaxTree::YARV::GetConstant < ::SyntaxTree::YARV::Instruction - # @return [GetConstant] a new instance of GetConstant - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1654 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1670 - def ==(other); end - - # @raise [NameError] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1686 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1666 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1658 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1674 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1652 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1678 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1682 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1662 - def to_a(_iseq); end -end - -# ### Summary -# -# `getglobal` pushes the value of a global variables onto the stack. -# -# ### Usage -# -# ~~~ruby -# $$ -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1717 -class SyntaxTree::YARV::GetGlobal < ::SyntaxTree::YARV::Instruction - # @return [GetGlobal] a new instance of GetGlobal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1720 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1736 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1748 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1732 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1724 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1740 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1718 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1744 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1728 - def to_a(_iseq); end -end - -# ### Summary -# -# `getinstancevariable` pushes the value of an instance variable onto the -# stack. It uses an inline cache to avoid having to look up the instance -# variable in the class hierarchy every time. -# -# This instruction has two forms, but both have the same structure. Before -# Ruby 3.2, the inline cache corresponded to both the get and set -# instructions and could be shared. Since Ruby 3.2, it uses object shapes -# instead so the caches are unique per instruction. -# -# ### Usage -# -# ~~~ruby -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1772 -class SyntaxTree::YARV::GetInstanceVariable < ::SyntaxTree::YARV::Instruction - # @return [GetInstanceVariable] a new instance of GetInstanceVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1775 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1795 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1808 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1791 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1780 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1800 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1773 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1804 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1787 - def to_a(_iseq); end -end - -# ### Summary -# -# `getlocal` fetches the value of a local variable from a frame determined -# by the level and index arguments. The level is the number of frames back -# to look and the index is the index in the local table. It pushes the value -# it finds onto the stack. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# tap { tap { value } } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1828 -class SyntaxTree::YARV::GetLocal < ::SyntaxTree::YARV::Instruction - # @return [GetLocal] a new instance of GetLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1831 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1850 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1862 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1846 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1836 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1854 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1829 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1858 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1840 - def to_a(iseq); end -end - -# ### Summary -# -# `getlocal_WC_0` is a specialized version of the `getlocal` instruction. It -# fetches the value of a local variable from the current frame determined by -# the index given as its only argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# value -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1880 -class SyntaxTree::YARV::GetLocalWC0 < ::SyntaxTree::YARV::Instruction - # @return [GetLocalWC0] a new instance of GetLocalWC0 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1883 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1899 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1915 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1911 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1895 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1887 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1881 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1903 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1907 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1891 - def to_a(iseq); end -end - -# ### Summary -# -# `getlocal_WC_1` is a specialized version of the `getlocal` instruction. It -# fetches the value of a local variable from the parent frame determined by -# the index given as its only argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# self.then { value } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1933 -class SyntaxTree::YARV::GetLocalWC1 < ::SyntaxTree::YARV::Instruction - # @return [GetLocalWC1] a new instance of GetLocalWC1 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1936 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1952 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1968 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1964 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1948 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1940 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1934 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1956 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1960 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1944 - def to_a(iseq); end -end - -# ### Summary -# -# `getspecial` pushes the value of a special local variable onto the stack. -# -# ### Usage -# -# ~~~ruby -# 1 if (a == 1) .. (b == 2) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1983 -class SyntaxTree::YARV::GetSpecial < ::SyntaxTree::YARV::Instruction - # @return [GetSpecial] a new instance of GetSpecial - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1990 - def initialize(key, type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2007 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2019 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2003 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1995 - def disasm(fmt); end - - # Returns the value of attribute key. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 - def key; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2011 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2015 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1999 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1988 - def type; end -end - -# $~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1985 -SyntaxTree::YARV::GetSpecial::SVAR_BACKREF = T.let(T.unsafe(nil), Integer) - -# flipflop -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1986 -SyntaxTree::YARV::GetSpecial::SVAR_FLIPFLOP_START = T.let(T.unsafe(nil), Integer) - -# $_ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#1984 -SyntaxTree::YARV::GetSpecial::SVAR_LASTLINE = T.let(T.unsafe(nil), Integer) - -# This is a base class for all YARV instructions. It provides a few -# convenience methods for working with instructions. -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#7 -class SyntaxTree::YARV::Instruction - # This returns an array of labels. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#33 - def branch_targets; end - - # This method creates an instruction that represents the canonical - # (non-specialized) form of this instruction. If this instruction is not - # a specialized instruction, then this method returns `self`. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#11 - def canonical; end - - # Whether or not this instruction falls through to the next instruction if - # its branching fails. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#44 - def falls_through?; end - - # Whether or not this instruction leaves the current frame. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#38 - def leaves?; end - - # This returns the size of the instruction in terms of the number of slots - # it occupies in the instruction sequence. Effectively this is 1 plus the - # number of operands. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#18 - def length; end - - # This returns the number of values that are popped off the stack. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#28 - def pops; end - - # This returns the number of values that are pushed onto the stack. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#23 - def pushes; end - - # Does the instruction have side effects? Control-flow counts as a - # side-effect, as do some special-case instructions like Leave. By default - # every instruction is marked as having side effects. - # - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#51 - def side_effects?; end -end - -# This class is meant to mirror RubyVM::InstructionSequence. It contains a -# list of instructions along with the metadata pertaining to them. It also -# functions as a builder for the instruction sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#9 -class SyntaxTree::YARV::InstructionSequence - # @return [InstructionSequence] a new instance of InstructionSequence - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#168 - def initialize(name, file, line, type, parent_iseq = T.unsafe(nil), options = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#652 - def adjuststack(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#656 - def anytostring; end - - # Returns the value of attribute argument_options. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#143 - def argument_options; end - - # This is the list of information about the arguments to this - # instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 - def argument_size; end - - # This is the list of information about the arguments to this - # instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#142 - def argument_size=(_arg0); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#472 - def block_child_iseq(line); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#660 - def branchif(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#664 - def branchnil(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#668 - def branchunless(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#565 - def catch_break(iseq, begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#575 - def catch_ensure(iseq, begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#585 - def catch_next(begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#595 - def catch_redo(begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#605 - def catch_rescue(iseq, begin_label, end_label, exit_label, restore_sp); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#615 - def catch_retry(begin_label, end_label, exit_label, restore_sp); end - - # The catch table for this instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#146 - def catch_table; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#672 - def checkkeyword(keyword_bits_index, keyword_index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#676 - def checkmatch(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#680 - def checktype(type); end - - # Child instruction sequence methods - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#468 - def child_iseq(name, line, type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#478 - def class_child_iseq(name, line); end - - # This method converts our linked list of instructions into a final array - # and performs any other compilation steps necessary. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#305 - def compile!; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#684 - def concatarray; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#688 - def concatstrings(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#692 - def defineclass(name, class_iseq, flags); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#696 - def defined(type, name, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#700 - def definedivar(name, cache, message); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#709 - def definemethod(name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#713 - def definesmethod(name, method_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#292 - def disasm; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#717 - def dup; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#721 - def duparray(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#725 - def duphash(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#729 - def dupn(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#232 - def eval; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#648 - def event(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#733 - def expandarray(length, flags); end - - # The source location of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 - def file; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#737 - def getblockparam(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#741 - def getblockparamproxy(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#745 - def getclassvariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#753 - def getconstant(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#757 - def getglobal(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#761 - def getinstancevariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#769 - def getlocal(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#788 - def getspecial(key, type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#207 - def inline_storage; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#213 - def inline_storage_for(name); end - - # The hash of names of instance and class variables pointing to the - # index of their associated inline storage. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#156 - def inline_storages; end - - # The list of instructions for this instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#149 - def insns; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#299 - def inspect; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#792 - def intern; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#796 - def invokeblock(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#800 - def invokesuper(calldata, block_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#804 - def jump(label); end - - # Instruction push methods - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#629 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#808 - def leave; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#219 - def length; end - - # The source location of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#132 - def line; end - - # The table of local variables. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#152 - def local_table; end - - # Query methods - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#199 - def local_variable(name, level = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#482 - def method_child_iseq(name, line); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#486 - def module_child_iseq(name, line); end - - # The name of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#129 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#812 - def newarray(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#816 - def newarraykwsplat(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#820 - def newhash(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#824 - def newrange(exclude_end); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#828 - def nop; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#832 - def objtostring(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#836 - def once(iseq, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#840 - def opt_aref_with(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#844 - def opt_aset_with(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#848 - def opt_case_dispatch(case_dispatch_hash, else_label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#852 - def opt_getconstant_path(names); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#888 - def opt_getinlinecache(label, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#892 - def opt_setinlinecache(cache); end - - # These are various compilation options provided. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#166 - def options; end - - # The parent instruction sequence, if there is one. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#138 - def parent_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#896 - def pop; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#633 - def push(value); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#900 - def putnil; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#904 - def putobject(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#922 - def putself; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#926 - def putspecialobject(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#930 - def putstring(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#934 - def send(calldata, block_iseq = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#938 - def setblockparam(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#942 - def setclassvariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#950 - def setconstant(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#954 - def setglobal(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#958 - def setinstancevariable(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#966 - def setlocal(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#985 - def setn(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#989 - def setspecial(key); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#490 - def singleton_class_child_iseq(line); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#341 - def specialize_instructions!; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#993 - def splatarray(flag); end - - # An object that will track the current size of the stack and the - # maximum size of the stack for this instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#163 - def stack; end - - # The index of the next inline storage that will be created. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#159 - def storage_index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#997 - def swap; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1001 - def throw(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#236 - def to_a; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#280 - def to_cfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#284 - def to_dfg; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#288 - def to_son; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1005 - def topn(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1009 - def toregexp(options, length); end - - # The type of the instruction sequence. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#135 - def type; end - - class << self - # This method will create a new instruction sequence from a serialized - # RubyVM::InstructionSequence object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#1015 - def from(source, options = T.unsafe(nil), parent_iseq = T.unsafe(nil)); end - - # This provides a handle to the rb_iseq_load function, which allows you - # to pass a serialized iseq to Ruby and have it return a - # RubyVM::InstructionSequence object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#13 - def iseq_load(iseq); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#510 -class SyntaxTree::YARV::InstructionSequence::CatchBreak < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#511 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#523 -class SyntaxTree::YARV::InstructionSequence::CatchEnsure < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#524 - def to_a; end -end - -# Catch table methods -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#498 -class SyntaxTree::YARV::InstructionSequence::CatchEntry - # @return [CatchEntry] a new instance of CatchEntry - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#501 - def initialize(iseq, begin_label, end_label, exit_label, restore_sp); end - - # Returns the value of attribute begin_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def begin_label; end - - # Returns the value of attribute end_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def end_label; end - - # Returns the value of attribute exit_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def exit_label; end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def iseq; end - - # Returns the value of attribute restore_sp. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#499 - def restore_sp; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#535 -class SyntaxTree::YARV::InstructionSequence::CatchNext < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#536 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#541 -class SyntaxTree::YARV::InstructionSequence::CatchRedo < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#542 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#547 -class SyntaxTree::YARV::InstructionSequence::CatchRescue < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#548 - def to_a; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#559 -class SyntaxTree::YARV::InstructionSequence::CatchRetry < ::SyntaxTree::YARV::InstructionSequence::CatchEntry - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#560 - def to_a; end -end - -# When the list of instructions is first being created, it's stored as a -# linked list. This is to make it easier to perform peephole optimizations -# and other transformations like instruction specialization. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#35 -class SyntaxTree::YARV::InstructionSequence::InstructionList - include ::Enumerable - - # @return [InstructionList] a new instance of InstructionList - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#48 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#53 - def each(&_blk); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#58 - def each_node; end - - # Returns the value of attribute head_node. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 - def head_node; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#68 - def push(instruction); end - - # Returns the value of attribute tail_node. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#46 - def tail_node; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#36 -class SyntaxTree::YARV::InstructionSequence::InstructionList::Node - # @return [Node] a new instance of Node - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#39 - def initialize(value, next_node = T.unsafe(nil)); end - - # Returns the value of attribute next_node. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def next_node; end - - # Sets the attribute next_node - # - # @param value the value to set the attribute next_node to. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def next_node=(_arg0); end - - # Returns the value of attribute value. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def value; end - - # Sets the attribute value - # - # @param value the value to set the attribute value to. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#37 - def value=(_arg0); end -end - -# This represents the destination of instructions that jump. Initially it -# does not track its position so that when we perform optimizations the -# indices don't get messed up. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#107 -class SyntaxTree::YARV::InstructionSequence::Label - # @return [Label] a new instance of Label - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#115 - def initialize(name = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#123 - def inspect; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#108 - def name; end - - # When we're serializing the instruction sequence, we need to be able to - # look up the label from the branch instructions and then access the - # subsequent node. So we'll store the reference here. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 - def node; end - - # When we're serializing the instruction sequence, we need to be able to - # look up the label from the branch instructions and then access the - # subsequent node. So we'll store the reference here. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#113 - def node=(_arg0); end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#119 - def patch!(name); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#83 -SyntaxTree::YARV::InstructionSequence::MAGIC = T.let(T.unsafe(nil), String) - -# This object is used to track the size of the stack at any given time. It -# is effectively a mini symbolic interpreter. It's necessary because when -# instruction sequences get serialized they include a :stack_max field on -# them. This field is used to determine how much stack space to allocate -# for the instruction sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#90 -class SyntaxTree::YARV::InstructionSequence::Stack - # @return [Stack] a new instance of Stack - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#93 - def initialize; end - - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#98 - def change_by(value); end - - # Returns the value of attribute current_size. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 - def current_size; end - - # Returns the value of attribute maximum_size. - # - # source://syntax_tree//lib/syntax_tree/yarv/instruction_sequence.rb#91 - def maximum_size; end -end - -# ### Summary -# -# `intern` converts the top element of the stack to a symbol and pushes the -# symbol onto the stack. -# -# ### Usage -# -# ~~~ruby -# :"#{"foo"}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2042 -class SyntaxTree::YARV::Intern < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2055 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2067 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2051 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2043 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2059 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2063 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2047 - def to_a(_iseq); end -end - -# ### Summary -# -# `invokeblock` invokes the block given to the current method. It pops the -# arguments for the block off the stack and pushes the result of running the -# block onto the stack. -# -# ### Usage -# -# ~~~ruby -# def foo -# yield -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2086 -class SyntaxTree::YARV::InvokeBlock < ::SyntaxTree::YARV::Instruction - # @return [InvokeBlock] a new instance of InvokeBlock - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2089 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2105 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2121 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2087 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2101 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2093 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2109 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2113 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2117 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2097 - def to_a(_iseq); end -end - -# ### Summary -# -# `invokesuper` is similar to the `send` instruction, except that it calls -# the super method. It pops the receiver and arguments off the stack and -# pushes the return value onto the stack. -# -# ### Usage -# -# ~~~ruby -# def foo -# super -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2140 -class SyntaxTree::YARV::InvokeSuper < ::SyntaxTree::YARV::Instruction - # @return [InvokeSuper] a new instance of InvokeSuper - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2143 - def initialize(calldata, block_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2164 - def ==(other); end - - # Returns the value of attribute block_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 - def block_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2178 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2141 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2160 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2148 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2169 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2174 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2156 - def to_a(_iseq); end -end - -# ### Summary -# -# `jump` unconditionally jumps to the label given as its only argument. -# -# ### Usage -# -# ~~~ruby -# x = 0 -# if x == 0 -# puts "0" -# else -# puts "2" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2217 -class SyntaxTree::YARV::Jump < ::SyntaxTree::YARV::Instruction - # @return [Jump] a new instance of Jump - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2220 - def initialize(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2236 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2248 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2244 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2232 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2224 - def disasm(fmt); end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2218 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2240 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2228 - def to_a(_iseq); end -end - -# ### Summary -# -# `leave` exits the current frame. -# -# ### Usage -# -# ~~~ruby -# ;; -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2263 -class SyntaxTree::YARV::Leave < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2276 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2290 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2272 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2264 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2294 - def leaves?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2280 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2284 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2268 - def to_a(_iseq); end -end - -# This module contains the instructions that used to be a part of YARV but -# have been replaced or removed in more recent versions. -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#7 -module SyntaxTree::YARV::Legacy; end - -# ### Summary -# -# `getclassvariable` looks for a class variable in the current class and -# pushes its value onto the stack. -# -# This version of the `getclassvariable` instruction is no longer used -# since in Ruby 3.0 it gained an inline cache.` -# -# ### Usage -# -# ~~~ruby -# @@class_variable -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#22 -class SyntaxTree::YARV::Legacy::GetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [GetClassVariable] a new instance of GetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#25 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#41 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#57 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#53 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#37 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#29 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#45 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#23 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#49 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#33 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_getinlinecache` is a wrapper around a series of `putobject` and -# `getconstant` instructions that allows skipping past them if the inline -# cache is currently set. It pushes the value of the cache onto the stack -# if it is set, otherwise it pushes `nil`. -# -# This instruction is no longer used since in Ruby 3.2 it was replaced by -# the consolidated `opt_getconstant_path` instruction. -# -# ### Usage -# -# ~~~ruby -# Constant -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#78 -class SyntaxTree::YARV::Legacy::OptGetInlineCache < ::SyntaxTree::YARV::Instruction - # @return [OptGetInlineCache] a new instance of OptGetInlineCache - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#81 - def initialize(label, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#101 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#118 - def branch_targets; end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#114 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#97 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#86 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#122 - def falls_through?; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#79 - def label; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#106 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#110 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#93 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_newarray_max` is a specialization that occurs when the `max` method -# is called on an array literal. It pops the values of the array off the -# stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# [a, b, c].max -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#139 -class SyntaxTree::YARV::Legacy::OptNewArrayMax < ::SyntaxTree::YARV::Instruction - # @return [OptNewArrayMax] a new instance of OptNewArrayMax - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#142 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#158 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#174 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#154 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#146 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#162 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#140 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#166 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#170 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#150 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_newarray_min` is a specialization that occurs when the `min` method -# is called on an array literal. It pops the values of the array off the -# stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# [a, b, c].min -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#191 -class SyntaxTree::YARV::Legacy::OptNewArrayMin < ::SyntaxTree::YARV::Instruction - # @return [OptNewArrayMin] a new instance of OptNewArrayMin - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#194 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#210 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#226 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#206 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#198 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#214 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#192 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#218 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#222 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#202 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_setinlinecache` sets an inline cache for a constant lookup. It pops -# the value it should set off the top of the stack. It uses this value to -# set the cache. It then pushes that value back onto the top of the stack. -# -# This instruction is no longer used since in Ruby 3.2 it was replaced by -# the consolidated `opt_getconstant_path` instruction. -# -# ### Usage -# -# ~~~ruby -# Constant -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#246 -class SyntaxTree::YARV::Legacy::OptSetInlineCache < ::SyntaxTree::YARV::Instruction - # @return [OptSetInlineCache] a new instance of OptSetInlineCache - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#249 - def initialize(cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#265 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#247 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#281 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#261 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#253 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#269 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#273 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#277 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#257 - def to_a(_iseq); end -end - -# ### Summary -# -# `setclassvariable` looks for a class variable in the current class and -# sets its value to the value it pops off the top of the stack. -# -# This version of the `setclassvariable` instruction is no longer used -# since in Ruby 3.0 it gained an inline cache. -# -# ### Usage -# -# ~~~ruby -# @@class_variable = 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#299 -class SyntaxTree::YARV::Legacy::SetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [SetClassVariable] a new instance of SetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#302 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#318 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#334 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#330 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#314 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#306 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#322 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#300 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#326 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/legacy.rb#310 - def to_a(_iseq); end -end - -# This represents every local variable associated with an instruction -# sequence. There are two kinds of locals: plain locals that are what you -# expect, and block proxy locals, which represent local variables -# associated with blocks that were passed into the current instruction -# sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#10 -class SyntaxTree::YARV::LocalTable - # @return [LocalTable] a new instance of LocalTable - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#43 - def initialize; end - - # Add a BlockLocal to the local table. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#73 - def block(name); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#47 - def empty?; end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#51 - def find(name, level = T.unsafe(nil)); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#56 - def has?(name); end - - # Returns the value of attribute locals. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#41 - def locals; end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#64 - def name_at(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#60 - def names; end - - # This is the offset from the top of the stack where this local variable - # lives. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#84 - def offset(index); end - - # Add a PlainLocal to the local table. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#78 - def plain(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#68 - def size; end -end - -# A local representing a block passed into the current instruction -# sequence. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#13 -class SyntaxTree::YARV::LocalTable::BlockLocal - # @return [BlockLocal] a new instance of BlockLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#16 - def initialize(name); end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#14 - def name; end -end - -# The result of looking up a local variable in the current local table. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#31 -class SyntaxTree::YARV::LocalTable::Lookup - # @return [Lookup] a new instance of Lookup - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#34 - def initialize(local, index, level); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 - def index; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 - def level; end - - # Returns the value of attribute local. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#32 - def local; end -end - -# A regular local variable. -# -# source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#22 -class SyntaxTree::YARV::LocalTable::PlainLocal - # @return [PlainLocal] a new instance of PlainLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#25 - def initialize(name); end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/local_table.rb#23 - def name; end -end - -# ### Summary -# -# `newarray` puts a new array initialized with `number` values from the -# stack. It pops `number` values off the stack and pushes the array onto the -# stack. -# -# ### Usage -# -# ~~~ruby -# ["string"] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2311 -class SyntaxTree::YARV::NewArray < ::SyntaxTree::YARV::Instruction - # @return [NewArray] a new instance of NewArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2314 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2330 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2346 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2326 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2318 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2334 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2312 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2338 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2342 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2322 - def to_a(_iseq); end -end - -# ### Summary -# -# `newarraykwsplat` is a specialized version of `newarray` that takes a ** -# splat argument. It pops `number` values off the stack and pushes the array -# onto the stack. -# -# ### Usage -# -# ~~~ruby -# ["string", **{ foo: "bar" }] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2363 -class SyntaxTree::YARV::NewArrayKwSplat < ::SyntaxTree::YARV::Instruction - # @return [NewArrayKwSplat] a new instance of NewArrayKwSplat - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2366 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2382 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2398 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2378 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2370 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2386 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2364 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2390 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2394 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2374 - def to_a(_iseq); end -end - -# ### Summary -# -# `newhash` puts a new hash onto the stack, using `number` elements from the -# stack. `number` needs to be even. It pops `number` elements off the stack -# and pushes a hash onto the stack. -# -# ### Usage -# -# ~~~ruby -# def foo(key, value) -# { key => value } -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2417 -class SyntaxTree::YARV::NewHash < ::SyntaxTree::YARV::Instruction - # @return [NewHash] a new instance of NewHash - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2420 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2436 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2452 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2432 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2424 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2440 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2418 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2444 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2448 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2428 - def to_a(_iseq); end -end - -# ### Summary -# -# `newrange` creates a new range object from the top two values on the -# stack. It pops both of them off, and then pushes on the new range. It -# takes one argument which is 0 if the end is included or 1 if the end value -# is excluded. -# -# ### Usage -# -# ~~~ruby -# x = 0 -# y = 1 -# p (x..y), (x...y) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2472 -class SyntaxTree::YARV::NewRange < ::SyntaxTree::YARV::Instruction - # @return [NewRange] a new instance of NewRange - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2475 - def initialize(exclude_end); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2491 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2507 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2487 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2479 - def disasm(fmt); end - - # Returns the value of attribute exclude_end. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2473 - def exclude_end; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2495 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2499 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2503 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2483 - def to_a(_iseq); end -end - -# ### Summary -# -# `nop` is a no-operation instruction. It is used to pad the instruction -# sequence so there is a place for other instructions to jump to. -# -# ### Usage -# -# ~~~ruby -# raise rescue true -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2523 -class SyntaxTree::YARV::Nop < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2536 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2540 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2532 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2524 - def disasm(fmt); end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2543 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2528 - def to_a(_iseq); end -end - -# ### Summary -# -# `objtostring` pops a value from the stack, calls `to_s` on that value and -# then pushes the result back to the stack. -# -# It has various fast paths for classes like String, Symbol, Module, Class, -# etc. For everything else it calls `to_s`. -# -# ### Usage -# -# ~~~ruby -# "#{5}" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2562 -class SyntaxTree::YARV::ObjToString < ::SyntaxTree::YARV::Instruction - # @return [ObjToString] a new instance of ObjToString - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2565 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2581 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2597 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2563 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2577 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2569 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2585 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2589 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2593 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2573 - def to_a(_iseq); end -end - -# ### Summary -# -# `once` is an instruction that wraps an instruction sequence and ensures -# that is it only ever executed once for the lifetime of the program. It -# uses a cache to ensure that it is only executed once. It pushes the result -# of running the instruction sequence onto the stack. -# -# ### Usage -# -# ~~~ruby -# END { puts "END" } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2615 -class SyntaxTree::YARV::Once < ::SyntaxTree::YARV::Instruction - # @return [Once] a new instance of Once - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2618 - def initialize(iseq, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2636 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2648 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2632 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2623 - def disasm(fmt); end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2616 - def iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2640 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2644 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2628 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_and` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `&` operator is used. There is a fast path for if -# both operands are integers. It pops both the receiver and the argument off -# the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 & 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2668 -class SyntaxTree::YARV::OptAnd < ::SyntaxTree::YARV::Instruction - # @return [OptAnd] a new instance of OptAnd - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2671 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2687 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2707 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2669 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2703 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2683 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2675 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2691 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2695 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2699 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2679 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aref` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `[]` operator is used. There are fast paths if the -# receiver is an integer, array, or hash. -# -# ### Usage -# -# ~~~ruby -# 7[2] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2724 -class SyntaxTree::YARV::OptAref < ::SyntaxTree::YARV::Instruction - # @return [OptAref] a new instance of OptAref - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2727 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2743 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2763 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2725 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2759 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2739 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2731 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2747 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2751 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2755 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2735 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aref_with` is a specialization of the `opt_aref` instruction that -# occurs when the `[]` operator is used with a string argument known at -# compile time. There are fast paths if the receiver is a hash. It pops the -# receiver off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# { 'test' => true }['test'] -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2781 -class SyntaxTree::YARV::OptArefWith < ::SyntaxTree::YARV::Instruction - # @return [OptArefWith] a new instance of OptArefWith - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2784 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2804 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2821 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2800 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2789 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2809 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2782 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2813 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2817 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2796 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aset` is an instruction for setting the hash value by the key in -# the `recv[obj] = set` format. It is a specialization of the -# `opt_send_without_block` instruction. It pops the receiver, the key, and -# the value off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# {}[:key] = value -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2839 -class SyntaxTree::YARV::OptAset < ::SyntaxTree::YARV::Instruction - # @return [OptAset] a new instance of OptAset - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2842 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2858 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2878 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2840 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2874 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2854 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2846 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2862 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2866 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2870 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2850 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_aset_with` is an instruction for setting the hash value by the known -# string key in the `recv[obj] = set` format. It pops the receiver and the -# value off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# {}["key"] = value -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2895 -class SyntaxTree::YARV::OptAsetWith < ::SyntaxTree::YARV::Instruction - # @return [OptAsetWith] a new instance of OptAsetWith - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2898 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2918 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2935 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2914 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2903 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2923 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2896 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2927 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2931 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2910 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_case_dispatch` is a branch instruction that moves the control flow -# for case statements that have clauses where they can all be used as hash -# keys for an internal hash. -# -# It has two arguments: the `case_dispatch_hash` and an `else_label`. It -# pops one value off the stack: a hash key. `opt_case_dispatch` looks up the -# key in the `case_dispatch_hash` and jumps to the corresponding label if -# there is one. If there is no value in the `case_dispatch_hash`, -# `opt_case_dispatch` jumps to the `else_label` index. -# -# ### Usage -# -# ~~~ruby -# case 1 -# when 1 -# puts "foo" -# else -# puts "bar" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2964 -class SyntaxTree::YARV::OptCaseDispatch < ::SyntaxTree::YARV::Instruction - # @return [OptCaseDispatch] a new instance of OptCaseDispatch - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2967 - def initialize(case_dispatch_hash, else_label); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2991 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3009 - def branch_targets; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3005 - def call(vm); end - - # Returns the value of attribute case_dispatch_hash. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 - def case_dispatch_hash; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2987 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2972 - def disasm(fmt); end - - # Returns the value of attribute else_label. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2965 - def else_label; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3013 - def falls_through?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2997 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3001 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#2979 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_div` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `/` operator is used. There are fast paths for if -# both operands are integers, or if both operands are floats. It pops both -# the receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 / 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3031 -class SyntaxTree::YARV::OptDiv < ::SyntaxTree::YARV::Instruction - # @return [OptDiv] a new instance of OptDiv - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3034 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3050 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3070 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3032 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3066 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3046 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3038 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3054 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3058 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3062 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3042 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_empty_p` is an optimization applied when the method `empty?` is -# called. It pops the receiver off the stack and pushes on the result of the -# method call. -# -# ### Usage -# -# ~~~ruby -# "".empty? -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3087 -class SyntaxTree::YARV::OptEmptyP < ::SyntaxTree::YARV::Instruction - # @return [OptEmptyP] a new instance of OptEmptyP - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3090 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3106 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3126 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3088 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3122 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3102 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3094 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3110 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3114 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3118 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3098 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_eq` is a specialization of the `opt_send_without_block` instruction -# that occurs when the == operator is used. Fast paths exist when both -# operands are integers, floats, symbols or strings. It pops both the -# receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 == 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3144 -class SyntaxTree::YARV::OptEq < ::SyntaxTree::YARV::Instruction - # @return [OptEq] a new instance of OptEq - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3147 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3163 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3183 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3145 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3179 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3159 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3151 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3167 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3171 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3175 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3155 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_ge` is a specialization of the `opt_send_without_block` instruction -# that occurs when the >= operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 4 >= 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3201 -class SyntaxTree::YARV::OptGE < ::SyntaxTree::YARV::Instruction - # @return [OptGE] a new instance of OptGE - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3204 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3220 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3240 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3202 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3236 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3216 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3208 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3224 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3228 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3232 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3212 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_gt` is a specialization of the `opt_send_without_block` instruction -# that occurs when the > operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 4 > 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3314 -class SyntaxTree::YARV::OptGT < ::SyntaxTree::YARV::Instruction - # @return [OptGT] a new instance of OptGT - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3317 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3333 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3353 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3315 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3349 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3329 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3321 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3337 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3341 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3345 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3325 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_getconstant_path` performs a constant lookup on a chain of constant -# names. It accepts as its argument an array of constant names, and pushes -# the value of the constant onto the stack. -# -# ### Usage -# -# ~~~ruby -# ::Object -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3257 -class SyntaxTree::YARV::OptGetConstantPath < ::SyntaxTree::YARV::Instruction - # @return [OptGetConstantPath] a new instance of OptGetConstantPath - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3260 - def initialize(names); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3277 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3289 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3273 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3264 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3281 - def length; end - - # Returns the value of attribute names. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3258 - def names; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3285 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3269 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_le` is a specialization of the `opt_send_without_block` instruction -# that occurs when the <= operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 3 <= 4 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3371 -class SyntaxTree::YARV::OptLE < ::SyntaxTree::YARV::Instruction - # @return [OptLE] a new instance of OptLE - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3374 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3390 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3410 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3372 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3406 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3386 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3378 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3394 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3398 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3402 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3382 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_lt` is a specialization of the `opt_send_without_block` instruction -# that occurs when the < operator is used. Fast paths exist when both -# operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 3 < 4 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3485 -class SyntaxTree::YARV::OptLT < ::SyntaxTree::YARV::Instruction - # @return [OptLT] a new instance of OptLT - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3488 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3504 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3524 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3486 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3520 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3500 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3492 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3508 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3512 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3516 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3496 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_ltlt` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `<<` operator is used. Fast paths exists when the -# receiver is either a String or an Array. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# "" << 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3542 -class SyntaxTree::YARV::OptLTLT < ::SyntaxTree::YARV::Instruction - # @return [OptLTLT] a new instance of OptLTLT - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3545 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3561 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3581 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3543 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3577 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3557 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3549 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3565 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3569 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3573 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3553 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_length` is a specialization of `opt_send_without_block`, when the -# `length` method is called. There are fast paths when the receiver is -# either a string, hash, or array. It pops the receiver off the stack and -# pushes on the result of the method call. -# -# ### Usage -# -# ~~~ruby -# "".length -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3428 -class SyntaxTree::YARV::OptLength < ::SyntaxTree::YARV::Instruction - # @return [OptLength] a new instance of OptLength - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3431 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3447 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3467 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3429 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3463 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3443 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3435 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3451 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3455 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3459 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3439 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_minus` is a specialization of the `opt_send_without_block` -# instruction that occurs when the `-` operator is used. There are fast -# paths for if both operands are integers or if both operands are floats. It -# pops both the receiver and the argument off the stack and pushes on the -# result. -# -# ### Usage -# -# ~~~ruby -# 3 - 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3600 -class SyntaxTree::YARV::OptMinus < ::SyntaxTree::YARV::Instruction - # @return [OptMinus] a new instance of OptMinus - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3603 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3619 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3639 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3601 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3635 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3615 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3607 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3623 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3627 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3631 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3611 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_mod` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `%` operator is used. There are fast paths for if -# both operands are integers or if both operands are floats. It pops both -# the receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 4 % 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3657 -class SyntaxTree::YARV::OptMod < ::SyntaxTree::YARV::Instruction - # @return [OptMod] a new instance of OptMod - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3660 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3676 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3696 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3658 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3692 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3672 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3664 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3680 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3684 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3688 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3668 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_mult` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `*` operator is used. There are fast paths for if -# both operands are integers or floats. It pops both the receiver and the -# argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 3 * 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3714 -class SyntaxTree::YARV::OptMult < ::SyntaxTree::YARV::Instruction - # @return [OptMult] a new instance of OptMult - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3717 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3733 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3753 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3715 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3749 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3729 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3721 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3737 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3741 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3745 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3725 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_neq` is an optimization that tests whether two values at the top of -# the stack are not equal by testing their equality and calling the `!` on -# the result. This allows `opt_neq` to use the fast paths optimized in -# `opt_eq` when both operands are Integers, Floats, Symbols, or Strings. It -# pops both the receiver and the argument off the stack and pushes on the -# result. -# -# ### Usage -# -# ~~~ruby -# 2 != 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3773 -class SyntaxTree::YARV::OptNEq < ::SyntaxTree::YARV::Instruction - # @return [OptNEq] a new instance of OptNEq - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3776 - def initialize(eq_calldata, neq_calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3796 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3813 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3792 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3781 - def disasm(fmt); end - - # Returns the value of attribute eq_calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 - def eq_calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3801 - def length; end - - # Returns the value of attribute neq_calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3774 - def neq_calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3805 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3809 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3788 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_newarray_send` is a specialization that occurs when a dynamic array -# literal is created and immediately sent the `min`, `max`, or `hash` -# methods. It pops the values of the array off the stack and pushes on the -# result of the method call. -# -# ### Usage -# -# ~~~ruby -# [a, b, c].max -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3832 -class SyntaxTree::YARV::OptNewArraySend < ::SyntaxTree::YARV::Instruction - # @return [OptNewArraySend] a new instance of OptNewArraySend - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3835 - def initialize(number, method); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3855 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3872 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3851 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3840 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3860 - def length; end - - # Returns the value of attribute method. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 - def method; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3833 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3864 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3868 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3847 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_nil_p` is an optimization applied when the method `nil?` is called. -# It returns true immediately when the receiver is `nil` and defers to the -# `nil?` method in other cases. It pops the receiver off the stack and -# pushes on the result. -# -# ### Usage -# -# ~~~ruby -# "".nil? -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3890 -class SyntaxTree::YARV::OptNilP < ::SyntaxTree::YARV::Instruction - # @return [OptNilP] a new instance of OptNilP - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3893 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3909 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3929 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3891 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3925 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3905 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3897 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3913 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3917 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3921 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3901 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_not` negates the value on top of the stack by calling the `!` method -# on it. It pops the receiver off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# !true -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3945 -class SyntaxTree::YARV::OptNot < ::SyntaxTree::YARV::Instruction - # @return [OptNot] a new instance of OptNot - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3948 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3964 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3984 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3946 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3980 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3960 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3952 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3968 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3972 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3976 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#3956 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_or` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `|` operator is used. There is a fast path for if -# both operands are integers. It pops both the receiver and the argument off -# the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 | 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4002 -class SyntaxTree::YARV::OptOr < ::SyntaxTree::YARV::Instruction - # @return [OptOr] a new instance of OptOr - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4005 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4021 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4041 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4003 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4037 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4017 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4009 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4025 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4029 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4033 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4013 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_plus` is a specialization of the `opt_send_without_block` instruction -# that occurs when the `+` operator is used. There are fast paths for if -# both operands are integers, floats, strings, or arrays. It pops both the -# receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# 2 + 3 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4059 -class SyntaxTree::YARV::OptPlus < ::SyntaxTree::YARV::Instruction - # @return [OptPlus] a new instance of OptPlus - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4062 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4078 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4098 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4060 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4094 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4074 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4066 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4082 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4086 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4090 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4070 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_regexpmatch2` is a specialization of the `opt_send_without_block` -# instruction that occurs when the `=~` operator is used. It pops both the -# receiver and the argument off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# /a/ =~ "a" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4115 -class SyntaxTree::YARV::OptRegExpMatch2 < ::SyntaxTree::YARV::Instruction - # @return [OptRegExpMatch2] a new instance of OptRegExpMatch2 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4118 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4134 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4154 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4116 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4150 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4130 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4122 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4138 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4142 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4146 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4126 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_send_without_block` is a specialization of the send instruction that -# occurs when a method is being called without a block. It pops the receiver -# and the arguments off the stack and pushes on the result. -# -# ### Usage -# -# ~~~ruby -# puts "Hello, world!" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4171 -class SyntaxTree::YARV::OptSendWithoutBlock < ::SyntaxTree::YARV::Instruction - # @return [OptSendWithoutBlock] a new instance of OptSendWithoutBlock - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4174 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4190 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4210 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4172 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4206 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4186 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4178 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4194 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4198 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4202 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4182 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_size` is a specialization of `opt_send_without_block`, when the -# `size` method is called. There are fast paths when the receiver is either -# a string, hash, or array. It pops the receiver off the stack and pushes on -# the result. -# -# ### Usage -# -# ~~~ruby -# "".size -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4228 -class SyntaxTree::YARV::OptSize < ::SyntaxTree::YARV::Instruction - # @return [OptSize] a new instance of OptSize - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4231 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4247 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4267 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4229 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4263 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4243 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4235 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4251 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4255 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4259 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4239 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_str_freeze` pushes a frozen known string value with no interpolation -# onto the stack using the #freeze method. If the method gets overridden, -# this will fall back to a send. -# -# ### Usage -# -# ~~~ruby -# "hello".freeze -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4284 -class SyntaxTree::YARV::OptStrFreeze < ::SyntaxTree::YARV::Instruction - # @return [OptStrFreeze] a new instance of OptStrFreeze - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4287 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4307 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4320 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4303 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4292 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4312 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4285 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4316 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4299 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_str_uminus` pushes a frozen known string value with no interpolation -# onto the stack. If the method gets overridden, this will fall back to a -# send. -# -# ### Usage -# -# ~~~ruby -# -"string" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4337 -class SyntaxTree::YARV::OptStrUMinus < ::SyntaxTree::YARV::Instruction - # @return [OptStrUMinus] a new instance of OptStrUMinus - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4340 - def initialize(object, calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4360 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4373 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4356 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4345 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4365 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4338 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4369 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4352 - def to_a(_iseq); end -end - -# ### Summary -# -# `opt_succ` is a specialization of the `opt_send_without_block` instruction -# when the method being called is `succ`. Fast paths exist when the receiver -# is either a String or a Fixnum. It pops the receiver off the stack and -# pushes on the result. -# -# ### Usage -# -# ~~~ruby -# "".succ -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4391 -class SyntaxTree::YARV::OptSucc < ::SyntaxTree::YARV::Instruction - # @return [OptSucc] a new instance of OptSucc - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4394 - def initialize(calldata); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4410 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4430 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4392 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4426 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4406 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4398 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4414 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4418 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4422 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4402 - def to_a(_iseq); end -end - -# ### Summary -# -# `pop` pops the top value off the stack. -# -# ### Usage -# -# ~~~ruby -# a ||= 2 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4445 -class SyntaxTree::YARV::Pop < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4458 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4466 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4454 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4446 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4462 - def pops; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4470 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4450 - def to_a(_iseq); end -end - -# ### Summary -# -# `putnil` pushes a global nil object onto the stack. -# -# ### Usage -# -# ~~~ruby -# nil -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4485 -class SyntaxTree::YARV::PutNil < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4498 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4510 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4506 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4494 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4486 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4502 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4514 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4490 - def to_a(_iseq); end -end - -# ### Summary -# -# `putobject` pushes a known value onto the stack. -# -# ### Usage -# -# ~~~ruby -# 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4529 -class SyntaxTree::YARV::PutObject < ::SyntaxTree::YARV::Instruction - # @return [PutObject] a new instance of PutObject - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4532 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4548 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4560 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4544 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4536 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4552 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4530 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4556 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4564 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4540 - def to_a(_iseq); end -end - -# ### Summary -# -# `putobject_INT2FIX_0_` pushes 0 on the stack. It is a specialized -# instruction resulting from the operand unification optimization. It is -# equivalent to `putobject 0`. -# -# ### Usage -# -# ~~~ruby -# 0 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4581 -class SyntaxTree::YARV::PutObjectInt2Fix0 < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4594 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4606 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4602 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4590 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4582 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4598 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4610 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4586 - def to_a(_iseq); end -end - -# ### Summary -# -# `putobject_INT2FIX_1_` pushes 1 on the stack. It is a specialized -# instruction resulting from the operand unification optimization. It is -# equivalent to `putobject 1`. -# -# ### Usage -# -# ~~~ruby -# 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4627 -class SyntaxTree::YARV::PutObjectInt2Fix1 < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4640 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4652 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4648 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4636 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4628 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4644 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4656 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4632 - def to_a(_iseq); end -end - -# ### Summary -# -# `putself` pushes the current value of self onto the stack. -# -# ### Usage -# -# ~~~ruby -# puts "Hello, world!" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4671 -class SyntaxTree::YARV::PutSelf < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4684 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4692 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4680 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4672 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4688 - def pushes; end - - # @return [Boolean] - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4696 - def side_effects?; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4676 - def to_a(_iseq); end -end - -# ### Summary -# -# `putspecialobject` pushes one of three special objects onto the stack. -# These are either the VM core special object, the class base special -# object, or the constant base special object. -# -# ### Usage -# -# ~~~ruby -# alias foo bar -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4713 -class SyntaxTree::YARV::PutSpecialObject < ::SyntaxTree::YARV::Instruction - # @return [PutSpecialObject] a new instance of PutSpecialObject - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4720 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4736 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4748 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4732 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4724 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4740 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4718 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4744 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4728 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4715 -SyntaxTree::YARV::PutSpecialObject::OBJECT_CBASE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4716 -SyntaxTree::YARV::PutSpecialObject::OBJECT_CONST_BASE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4714 -SyntaxTree::YARV::PutSpecialObject::OBJECT_VMCORE = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `putstring` pushes an unfrozen string literal onto the stack. -# -# ### Usage -# -# ~~~ruby -# "foo" -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4772 -class SyntaxTree::YARV::PutString < ::SyntaxTree::YARV::Instruction - # @return [PutString] a new instance of PutString - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4775 - def initialize(object); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4791 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4803 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4787 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4779 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4795 - def length; end - - # Returns the value of attribute object. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4773 - def object; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4799 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4783 - def to_a(_iseq); end -end - -# A sea of nodes is an intermediate representation used by a compiler to -# represent both control and data flow in the same graph. The way we use it -# allows us to have the vertices of the graph represent either an -# instruction in the instruction sequence or a synthesized node that we add -# to the graph. The edges of the graph represent either control flow or data -# flow. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#11 -class SyntaxTree::YARV::SeaOfNodes - # @return [SeaOfNodes] a new instance of SeaOfNodes - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#462 - def initialize(dfg, nodes, local_graphs); end - - # Returns the value of attribute dfg. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 - def dfg; end - - # Returns the value of attribute local_graphs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 - def local_graphs; end - - # Returns the value of attribute nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#460 - def nodes; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#468 - def to_mermaid; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#499 - def verify; end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#529 - def compile(dfg); end - end -end - -# The compiler is responsible for taking a data flow graph and turning it -# into a sea of nodes. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#100 -class SyntaxTree::YARV::SeaOfNodes::Compiler - # @return [Compiler] a new instance of Compiler - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#103 - def initialize(dfg); end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#113 - def compile; end - - # Returns the value of attribute dfg. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 - def dfg; end - - # Returns the value of attribute nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#101 - def nodes; end - - private - - # Eliminate as many unnecessary nodes as we can. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#339 - def cleanup_insn_nodes; end - - # We don't always build things in an optimal way. Go back and fix up - # some mess we left. Ideally we wouldn't create these problems in the - # first place. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#315 - def cleanup_phi_nodes; end - - # Connect one node to another. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#423 - def connect(from, to, type, label = T.unsafe(nil)); end - - # Connect control flow that flows between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#246 - def connect_local_graphs_control(local_graphs); end - - # Connect data flow that flows between basic blocks. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#271 - def connect_local_graphs_data(local_graphs); end - - # Connect all of the inputs to all of the outputs of a node. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#433 - def connect_over(node); end - - # Create a sub-graph for a single basic block - block block argument - # inputs and outputs will be left dangling, to be connected later. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#136 - def create_local_graph(block); end - - # Counter for synthetic nodes. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#130 - def id_counter; end - - # Remove a node from the graph. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#447 - def remove(node); end -end - -# The edge of a graph represents either control flow or data flow. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#67 -class SyntaxTree::YARV::SeaOfNodes::Edge - # @return [Edge] a new instance of Edge - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#75 - def initialize(from, to, type, label); end - - # Returns the value of attribute from. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#70 - def from; end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#73 - def label; end - - # Returns the value of attribute to. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#71 - def to; end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#72 - def type; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#68 -SyntaxTree::YARV::SeaOfNodes::Edge::TYPES = T.let(T.unsafe(nil), Array) - -# This object represents a node in the graph that holds a YARV -# instruction. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#14 -class SyntaxTree::YARV::SeaOfNodes::InsnNode - # @return [InsnNode] a new instance of InsnNode - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#17 - def initialize(insn, offset); end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#25 - def id; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def inputs; end - - # Returns the value of attribute insn. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def insn; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#29 - def label; end - - # Returns the value of attribute offset. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def offset; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#15 - def outputs; end -end - -# Merge nodes are present in any block that has multiple incoming blocks. -# It provides a place for Phi nodes to attach their results. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#52 -class SyntaxTree::YARV::SeaOfNodes::MergeNode - # @return [MergeNode] a new instance of MergeNode - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#55 - def initialize(id); end - - # Returns the value of attribute id. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 - def id; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 - def inputs; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#61 - def label; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#53 - def outputs; end -end - -# Phi nodes are used to represent the merging of data flow from multiple -# incoming blocks. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#36 -class SyntaxTree::YARV::SeaOfNodes::PhiNode - # @return [PhiNode] a new instance of PhiNode - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#39 - def initialize(id); end - - # Returns the value of attribute id. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 - def id; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 - def inputs; end - - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#45 - def label; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#37 - def outputs; end -end - -# A subgraph represents the local data and control flow of a single basic -# block. -# -# source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#87 -class SyntaxTree::YARV::SeaOfNodes::SubGraph - # @return [SubGraph] a new instance of SubGraph - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#90 - def initialize(first_fixed, last_fixed, inputs, outputs); end - - # Returns the value of attribute first_fixed. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def first_fixed; end - - # Returns the value of attribute inputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def inputs; end - - # Returns the value of attribute last_fixed. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def last_fixed; end - - # Returns the value of attribute outputs. - # - # source://syntax_tree//lib/syntax_tree/yarv/sea_of_nodes.rb#88 - def outputs; end -end - -# ### Summary -# -# `send` invokes a method with an optional block. It pops its receiver and -# the arguments for the method off the stack and pushes the return value -# onto the stack. It has two arguments: the calldata for the call site and -# the optional block instruction sequence. -# -# ### Usage -# -# ~~~ruby -# "hello".tap { |i| p i } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4821 -class SyntaxTree::YARV::Send < ::SyntaxTree::YARV::Instruction - # @return [Send] a new instance of Send - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4824 - def initialize(calldata, block_iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4845 - def ==(other); end - - # Returns the value of attribute block_iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 - def block_iseq; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4863 - def call(vm); end - - # Returns the value of attribute calldata. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4822 - def calldata; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4841 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4829 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4850 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4854 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4859 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4837 - def to_a(_iseq); end -end - -# ### Summary -# -# `setblockparam` sets the value of a block local variable on a frame -# determined by the level and index arguments. The level is the number of -# frames back to look and the index is the index in the local table. It pops -# the value it is setting off the stack. -# -# ### Usage -# -# ~~~ruby -# def foo(&bar) -# bar = baz -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4905 -class SyntaxTree::YARV::SetBlockParam < ::SyntaxTree::YARV::Instruction - # @return [SetBlockParam] a new instance of SetBlockParam - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4908 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4927 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4940 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4923 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4913 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4932 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4906 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4936 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4917 - def to_a(iseq); end -end - -# ### Summary -# -# `setclassvariable` looks for a class variable in the current class and -# sets its value to the value it pops off the top of the stack. It uses an -# inline cache to reduce the need to lookup the class variable in the class -# hierarchy every time. -# -# ### Usage -# -# ~~~ruby -# @@class_variable = 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4958 -class SyntaxTree::YARV::SetClassVariable < ::SyntaxTree::YARV::Instruction - # @return [SetClassVariable] a new instance of SetClassVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4961 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4981 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4994 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4977 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4966 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4986 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4959 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4990 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#4973 - def to_a(_iseq); end -end - -# ### Summary -# -# `setconstant` pops two values off the stack: the value to set the -# constant to and the constant base to set it in. -# -# ### Usage -# -# ~~~ruby -# Constant = 1 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5012 -class SyntaxTree::YARV::SetConstant < ::SyntaxTree::YARV::Instruction - # @return [SetConstant] a new instance of SetConstant - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5015 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5031 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5043 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5027 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5019 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5035 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5013 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5039 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5023 - def to_a(_iseq); end -end - -# ### Summary -# -# `setglobal` sets the value of a global variable to a value popped off the -# top of the stack. -# -# ### Usage -# -# ~~~ruby -# $global = 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5060 -class SyntaxTree::YARV::SetGlobal < ::SyntaxTree::YARV::Instruction - # @return [SetGlobal] a new instance of SetGlobal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5063 - def initialize(name); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5079 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5091 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5075 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5067 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5083 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5061 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5087 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5071 - def to_a(_iseq); end -end - -# ### Summary -# -# `setinstancevariable` pops a value off the top of the stack and then sets -# the instance variable associated with the instruction to that value. -# -# This instruction has two forms, but both have the same structure. Before -# Ruby 3.2, the inline cache corresponded to both the get and set -# instructions and could be shared. Since Ruby 3.2, it uses object shapes -# instead so the caches are unique per instruction. -# -# ### Usage -# -# ~~~ruby -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5114 -class SyntaxTree::YARV::SetInstanceVariable < ::SyntaxTree::YARV::Instruction - # @return [SetInstanceVariable] a new instance of SetInstanceVariable - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5117 - def initialize(name, cache); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5137 - def ==(other); end - - # Returns the value of attribute cache. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 - def cache; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5150 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5133 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5122 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5142 - def length; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5115 - def name; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5146 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5129 - def to_a(_iseq); end -end - -# ### Summary -# -# `setlocal` sets the value of a local variable on a frame determined by the -# level and index arguments. The level is the number of frames back to -# look and the index is the index in the local table. It pops the value it -# is setting off the stack. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# tap { tap { value = 10 } } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5170 -class SyntaxTree::YARV::SetLocal < ::SyntaxTree::YARV::Instruction - # @return [SetLocal] a new instance of SetLocal - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5173 - def initialize(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5192 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5204 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5188 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5178 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5196 - def length; end - - # Returns the value of attribute level. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5171 - def level; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5200 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5182 - def to_a(iseq); end -end - -# ### Summary -# -# `setlocal_WC_0` is a specialized version of the `setlocal` instruction. It -# sets the value of a local variable on the current frame to the value at -# the top of the stack as determined by the index given as its only -# argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5222 -class SyntaxTree::YARV::SetLocalWC0 < ::SyntaxTree::YARV::Instruction - # @return [SetLocalWC0] a new instance of SetLocalWC0 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5225 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5241 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5257 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5253 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5237 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5229 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5223 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5245 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5249 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5233 - def to_a(iseq); end -end - -# ### Summary -# -# `setlocal_WC_1` is a specialized version of the `setlocal` instruction. It -# sets the value of a local variable on the parent frame to the value at the -# top of the stack as determined by the index given as its only argument. -# -# ### Usage -# -# ~~~ruby -# value = 5 -# self.then { value = 10 } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5275 -class SyntaxTree::YARV::SetLocalWC1 < ::SyntaxTree::YARV::Instruction - # @return [SetLocalWC1] a new instance of SetLocalWC1 - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5278 - def initialize(index); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5294 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5310 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5306 - def canonical; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5290 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5282 - def disasm(fmt); end - - # Returns the value of attribute index. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5276 - def index; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5298 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5302 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5286 - def to_a(iseq); end -end - -# ### Summary -# -# `setn` sets a value in the stack to a value popped off the top of the -# stack. It then pushes that value onto the top of the stack as well. -# -# ### Usage -# -# ~~~ruby -# {}[:key] = 'val' -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5326 -class SyntaxTree::YARV::SetN < ::SyntaxTree::YARV::Instruction - # @return [SetN] a new instance of SetN - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5329 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5345 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5361 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5341 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5333 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5349 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5327 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5353 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5357 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5337 - def to_a(_iseq); end -end - -# ### Summary -# -# `setspecial` pops a value off the top of the stack and sets a special -# local variable to that value. The special local variable is determined by -# the key given as its only argument. -# -# ### Usage -# -# ~~~ruby -# baz if (foo == 1) .. (bar == 1) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5378 -class SyntaxTree::YARV::SetSpecial < ::SyntaxTree::YARV::Instruction - # @return [SetSpecial] a new instance of SetSpecial - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5381 - def initialize(key); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5397 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5409 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5393 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5385 - def disasm(fmt); end - - # Returns the value of attribute key. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5379 - def key; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5401 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5405 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5389 - def to_a(_iseq); end -end - -# ### Summary -# -# `splatarray` coerces the array object at the top of the stack into Array -# by calling `to_a`. It pushes a duplicate of the array if there is a flag, -# and the original array if there isn't one. -# -# ### Usage -# -# ~~~ruby -# x = *(5) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5433 -class SyntaxTree::YARV::SplatArray < ::SyntaxTree::YARV::Instruction - # @return [SplatArray] a new instance of SplatArray - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5436 - def initialize(flag); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5452 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5468 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5448 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5440 - def disasm(fmt); end - - # Returns the value of attribute flag. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5434 - def flag; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5456 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5460 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5464 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5444 - def to_a(_iseq); end -end - -# ### Summary -# -# `swap` swaps the top two elements in the stack. -# -# ### TracePoint -# -# `swap` does not dispatch any events. -# -# ### Usage -# -# ~~~ruby -# !!defined?([[]]) -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5507 -class SyntaxTree::YARV::Swap < ::SyntaxTree::YARV::Instruction - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5520 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5532 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5516 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5508 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5524 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5528 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5512 - def to_a(_iseq); end -end - -# ### Summary -# -# `throw` pops a value off the top of the stack and throws it. It is caught -# using the instruction sequence's (or an ancestor's) catch table. It pushes -# on the result of throwing the value. -# -# ### Usage -# -# ~~~ruby -# [1, 2, 3].map { break 2 } -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5550 -class SyntaxTree::YARV::Throw < ::SyntaxTree::YARV::Instruction - # @return [Throw] a new instance of Throw - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5566 - def initialize(type); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5582 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5598 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5578 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5570 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5586 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5590 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5594 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5574 - def to_a(_iseq); end - - # Returns the value of attribute type. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5564 - def type; end - - private - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5625 - def error_backtrace(vm); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5553 -SyntaxTree::YARV::Throw::RUBY_TAG_BREAK = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5559 -SyntaxTree::YARV::Throw::RUBY_TAG_FATAL = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5554 -SyntaxTree::YARV::Throw::RUBY_TAG_NEXT = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5551 -SyntaxTree::YARV::Throw::RUBY_TAG_NONE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5557 -SyntaxTree::YARV::Throw::RUBY_TAG_RAISE = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5556 -SyntaxTree::YARV::Throw::RUBY_TAG_REDO = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5555 -SyntaxTree::YARV::Throw::RUBY_TAG_RETRY = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5552 -SyntaxTree::YARV::Throw::RUBY_TAG_RETURN = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5558 -SyntaxTree::YARV::Throw::RUBY_TAG_THROW = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5561 -SyntaxTree::YARV::Throw::VM_THROW_NO_ESCAPE_FLAG = T.let(T.unsafe(nil), Integer) - -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5562 -SyntaxTree::YARV::Throw::VM_THROW_STATE_MASK = T.let(T.unsafe(nil), Integer) - -# ### Summary -# -# `toregexp` pops a number of values off the stack, combines them into a new -# regular expression, and pushes the new regular expression onto the stack. -# -# ### Usage -# -# ~~~ruby -# /foo #{bar}/ -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5700 -class SyntaxTree::YARV::ToRegExp < ::SyntaxTree::YARV::Instruction - # @return [ToRegExp] a new instance of ToRegExp - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5703 - def initialize(options, length); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5720 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5733 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5716 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5708 - def disasm(fmt); end - - # Returns the value of attribute length. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 - def length; end - - # Returns the value of attribute options. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5701 - def options; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5725 - def pops; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5729 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5712 - def to_a(_iseq); end -end - -# ### Summary -# -# `topn` pushes a single value onto the stack that is a copy of the value -# within the stack that is `number` of slots down from the top. -# -# ### Usage -# -# ~~~ruby -# case 3 -# when 1..5 -# puts "foo" -# end -# ~~~ -# -# source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5653 -class SyntaxTree::YARV::TopN < ::SyntaxTree::YARV::Instruction - # @return [TopN] a new instance of TopN - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5656 - def initialize(number); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5672 - def ==(other); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5684 - def call(vm); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5668 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5660 - def disasm(fmt); end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5676 - def length; end - - # Returns the value of attribute number. - # - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5654 - def number; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5680 - def pushes; end - - # source://syntax_tree//lib/syntax_tree/yarv/instructions.rb#5664 - def to_a(_iseq); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#8 -class SyntaxTree::YARV::VM - extend ::Forwardable - - # @return [VM] a new instance of VM - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#216 - def initialize(events = T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#623 - def catch(tag, &block); end - - # Helper methods for instructions - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#494 - def const_base; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#610 - def eval(source, binding = T.unsafe(nil), filename = T.unsafe(nil), lineno = T.unsafe(nil)); end - - # Returns the value of attribute events. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#209 - def events; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#344 - def find_catch_entry(frame, type); end - - # Returns the value of attribute frame. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#214 - def frame; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#498 - def frame_at(level); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#504 - def frame_svar; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#510 - def frame_yield; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#516 - def frozen_core; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#520 - def jump(label); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#524 - def leave; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#606 - def load(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#528 - def local_get(index, level); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#532 - def local_set(index, level, value); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def pop(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def push(*args, **_arg1, &block); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#598 - def require(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#549 - def require_internal(filepath, loading: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#602 - def require_relative(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#543 - def require_resolved(filepath); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#360 - def run_block_frame(iseq, frame, *args, **kwargs, &block); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#366 - def run_class_frame(iseq, clazz); end - - # Helper methods for frames - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#230 - def run_frame(frame); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#370 - def run_method_frame(name, nesting, iseq, _self, *args, **kwargs, &block); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#384 - def run_rescue_frame(iseq, frame, error); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#356 - def run_top_frame(iseq); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#391 - def setup_arguments(iseq, args, kwargs, block); end - - # Returns the value of attribute stack. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#211 - def stack; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#619 - def throw(tag, value = T.unsafe(nil)); end - - class << self - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#222 - def run(iseq); end - end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#48 -class SyntaxTree::YARV::VM::BlockFrame < ::SyntaxTree::YARV::VM::Frame - # @return [BlockFrame] a new instance of BlockFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#49 - def initialize(iseq, parent, stack_index); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#89 -class SyntaxTree::YARV::VM::BreakError < ::SyntaxTree::YARV::VM::ThrownError; end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#64 -class SyntaxTree::YARV::VM::ClassFrame < ::SyntaxTree::YARV::VM::Frame - # @return [ClassFrame] a new instance of ClassFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#65 - def initialize(iseq, parent, stack_index, _self); end -end - -# Methods for overriding runtime behavior -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#540 -SyntaxTree::YARV::VM::DLEXT = T.let(T.unsafe(nil), String) - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#205 -SyntaxTree::YARV::VM::FROZEN_CORE = T.let(T.unsafe(nil), SyntaxTree::YARV::VM::FrozenCore) - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#25 -class SyntaxTree::YARV::VM::Frame - # @return [Frame] a new instance of Frame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#29 - def initialize(iseq, parent, stack_index, _self, nesting); end - - # Returns the value of attribute _self. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def _self; end - - # Returns the value of attribute iseq. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def iseq; end - - # Returns the value of attribute line. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def line; end - - # Sets the attribute line - # - # @param value the value to set the attribute line to. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def line=(_arg0); end - - # Returns the value of attribute nesting. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def nesting; end - - # Returns the value of attribute parent. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def parent; end - - # Returns the value of attribute pc. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def pc; end - - # Sets the attribute pc - # - # @param value the value to set the attribute pc to. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#27 - def pc=(_arg0); end - - # Returns the value of attribute stack_index. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def stack_index; end - - # Returns the value of attribute svars. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#26 - def svars; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#95 -class SyntaxTree::YARV::VM::FrozenCore; end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#9 -class SyntaxTree::YARV::VM::Jump - # @return [Jump] a new instance of Jump - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#12 - def initialize(label); end - - # Returns the value of attribute label. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#10 - def label; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#17 -class SyntaxTree::YARV::VM::Leave - # @return [Leave] a new instance of Leave - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#20 - def initialize(value); end - - # Returns the value of attribute value. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#18 - def value; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#54 -class SyntaxTree::YARV::VM::MethodFrame < ::SyntaxTree::YARV::VM::Frame - # @return [MethodFrame] a new instance of MethodFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#57 - def initialize(iseq, nesting, parent, stack_index, _self, name, block); end - - # Returns the value of attribute block. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 - def block; end - - # Returns the value of attribute name. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#55 - def name; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#92 -class SyntaxTree::YARV::VM::NextError < ::SyntaxTree::YARV::VM::ThrownError; end - -# This is the main entrypoint for events firing in the VM, which allows -# us to implement tracing. -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#122 -class SyntaxTree::YARV::VM::NullEvents - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#123 - def publish_frame_change(frame); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#126 - def publish_instruction(iseq, insn); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#129 - def publish_stack_change(stack); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#132 - def publish_tracepoint(event); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#70 -class SyntaxTree::YARV::VM::RescueFrame < ::SyntaxTree::YARV::VM::Frame - # @return [RescueFrame] a new instance of RescueFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#71 - def initialize(iseq, parent, stack_index); end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#86 -class SyntaxTree::YARV::VM::ReturnError < ::SyntaxTree::YARV::VM::ThrownError; end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#541 -SyntaxTree::YARV::VM::SOEXT = T.let(T.unsafe(nil), String) - -# This is a simple implementation of tracing that prints to STDOUT. -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#137 -class SyntaxTree::YARV::VM::STDOUTEvents - # @return [STDOUTEvents] a new instance of STDOUTEvents - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#140 - def initialize; end - - # Returns the value of attribute disassembler. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#138 - def disassembler; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#144 - def publish_frame_change(frame); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#148 - def publish_instruction(iseq, insn); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#153 - def publish_stack_change(stack); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#157 - def publish_tracepoint(event); end -end - -# This represents the global VM stack. It effectively is an array, but -# wraps mutating functions with instrumentation. -# -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#164 -class SyntaxTree::YARV::VM::Stack - # @return [Stack] a new instance of Stack - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#167 - def initialize(events); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#196 - def [](*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#200 - def []=(*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#172 - def concat(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute events. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 - def events; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#176 - def last; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#180 - def length; end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#188 - def pop(*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#184 - def push(*_arg0, **_arg1, &_arg2); end - - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#192 - def slice!(*_arg0, **_arg1, &_arg2); end - - # Returns the value of attribute values. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#165 - def values; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#76 -class SyntaxTree::YARV::VM::ThrownError < ::StandardError - # @return [ThrownError] a new instance of ThrownError - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#79 - def initialize(value, backtrace); end - - # Returns the value of attribute value. - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#77 - def value; end -end - -# source://syntax_tree//lib/syntax_tree/yarv/vm.rb#42 -class SyntaxTree::YARV::VM::TopFrame < ::SyntaxTree::YARV::VM::Frame - # @return [TopFrame] a new instance of TopFrame - # - # source://syntax_tree//lib/syntax_tree/yarv/vm.rb#43 - def initialize(iseq); end -end - -# Yield represents using the +yield+ keyword with arguments. -# -# yield value -# -# source://syntax_tree//lib/syntax_tree/node.rb#12273 -class SyntaxTree::YieldNode < ::SyntaxTree::Node - # @return [YieldNode] a new instance of YieldNode - # - # source://syntax_tree//lib/syntax_tree/node.rb#12280 - def initialize(arguments:, location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12334 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12286 - def accept(visitor); end - - # [nil | Args | Paren] the arguments passed to the yield - # - # source://syntax_tree//lib/syntax_tree/node.rb#12275 - def arguments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12290 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12278 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12294 - def copy(arguments: T.unsafe(nil), location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12290 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12307 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12311 - def format(q); end -end - -# ZSuper represents the bare +super+ keyword with no arguments. -# -# super -# -# source://syntax_tree//lib/syntax_tree/node.rb#12343 -class SyntaxTree::ZSuper < ::SyntaxTree::Node - # @return [ZSuper] a new instance of ZSuper - # - # source://syntax_tree//lib/syntax_tree/node.rb#12347 - def initialize(location:); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12377 - def ===(other); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12352 - def accept(visitor); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12356 - def child_nodes; end - - # [Array[ Comment | EmbDoc ]] the comments attached to this node - # - # source://syntax_tree//lib/syntax_tree/node.rb#12345 - def comments; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12360 - def copy(location: T.unsafe(nil)); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12356 - def deconstruct; end - - # source://syntax_tree//lib/syntax_tree/node.rb#12369 - def deconstruct_keys(_keys); end - - # source://syntax_tree//lib/syntax_tree/node.rb#12373 - def format(q); end -end diff --git a/sorbet/rbi/gems/tapioca@0.12.0.rbi b/sorbet/rbi/gems/tapioca@0.16.3.rbi similarity index 87% rename from sorbet/rbi/gems/tapioca@0.12.0.rbi rename to sorbet/rbi/gems/tapioca@0.16.3.rbi index 2a9d5a892..7f775a5cd 100644 --- a/sorbet/rbi/gems/tapioca@0.12.0.rbi +++ b/sorbet/rbi/gems/tapioca@0.16.3.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `tapioca` gem. # Please instead update this file by running `bin/tapioca gem tapioca`. + class Bundler::Dependency < ::Gem::Dependency include ::Tapioca::BundlerExt::AutoRequireHook end @@ -54,7 +55,7 @@ module RBI; end # source://tapioca//lib/tapioca/rbi_ext/model.rb#5 class RBI::Tree < ::RBI::NodeWithComments - # source://rbi/0.1.9/lib/rbi/model.rb#119 + # source://rbi/0.2.1/lib/rbi/model.rb#121 sig do params( loc: T.nilable(::RBI::Loc), @@ -64,19 +65,15 @@ class RBI::Tree < ::RBI::NodeWithComments end def initialize(loc: T.unsafe(nil), comments: T.unsafe(nil), &block); end - # source://rbi/0.1.9/lib/rbi/model.rb#126 + # source://rbi/0.2.1/lib/rbi/model.rb#128 sig { params(node: ::RBI::Node).void } def <<(node); end - # source://rbi/0.1.9/lib/rbi/printer.rb#226 - sig { override.params(v: ::RBI::Printer).void } - def accept_printer(v); end - - # source://rbi/0.1.9/lib/rbi/rewriters/add_sig_templates.rb#66 + # source://rbi/0.2.1/lib/rbi/rewriters/add_sig_templates.rb#66 sig { params(with_todo_comment: T::Boolean).void } def add_sig_templates!(with_todo_comment: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/annotate.rb#49 + # source://rbi/0.2.1/lib/rbi/rewriters/annotate.rb#49 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 @@ -102,18 +99,19 @@ class RBI::Tree < ::RBI::NodeWithComments sig { params(name: ::String).void } def create_include(name); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#89 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#90 sig do params( name: ::String, parameters: T::Array[::RBI::TypedParam], - return_type: ::String, + return_type: T.nilable(::String), class_method: T::Boolean, visibility: ::RBI::Visibility, - comments: T::Array[::RBI::Comment] + 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)); 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//lib/tapioca/rbi_ext/model.rb#60 sig { params(name: ::String).void } @@ -140,27 +138,35 @@ class RBI::Tree < ::RBI::NodeWithComments end def create_type_variable(name, type:, variance: T.unsafe(nil), fixed: T.unsafe(nil), upper: T.unsafe(nil), lower: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/deannotate.rb#41 + # source://rbi/0.2.1/lib/rbi/rewriters/deannotate.rb#41 sig { params(annotation: ::String).void } def deannotate!(annotation); end - # source://rbi/0.1.9/lib/rbi/model.rb#132 + # source://rbi/0.2.1/lib/rbi/model.rb#134 sig { returns(T::Boolean) } def empty?; end - # source://rbi/0.1.9/lib/rbi/rewriters/filter_versions.rb#118 + # source://rbi/0.2.1/lib/rbi/rewriters/filter_versions.rb#118 sig { params(version: ::Gem::Version).void } def filter_versions!(version); end - # source://rbi/0.1.9/lib/rbi/rewriters/group_nodes.rb#38 + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_singleton_methods.rb#60 + sig { void } + def flatten_singleton_methods!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/flatten_visibilities.rb#60 + sig { void } + def flatten_visibilities!; end + + # source://rbi/0.2.1/lib/rbi/rewriters/group_nodes.rb#81 sig { void } def group_nodes!; end - # source://rbi/0.1.9/lib/rbi/index.rb#68 + # source://rbi/0.2.1/lib/rbi/index.rb#68 sig { returns(::RBI::Index) } def index; end - # source://rbi/0.1.9/lib/rbi/rewriters/merge_trees.rb#324 + # source://rbi/0.2.1/lib/rbi/rewriters/merge_trees.rb#324 sig do params( other: ::RBI::Tree, @@ -171,44 +177,48 @@ class RBI::Tree < ::RBI::NodeWithComments end def merge(other, left_name: T.unsafe(nil), right_name: T.unsafe(nil), keep: T.unsafe(nil)); end - # source://rbi/0.1.9/lib/rbi/rewriters/nest_non_public_methods.rb#46 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_non_public_members.rb#46 sig { void } - def nest_non_public_methods!; end + def nest_non_public_members!; end - # source://rbi/0.1.9/lib/rbi/rewriters/nest_singleton_methods.rb#36 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_singleton_methods.rb#36 sig { void } def nest_singleton_methods!; end - # source://rbi/0.1.9/lib/rbi/model.rb#110 + # source://rbi/0.2.1/lib/rbi/rewriters/nest_top_level_members.rb#63 + sig { void } + def nest_top_level_members!; end + + # source://rbi/0.2.1/lib/rbi/model.rb#112 sig { returns(T::Array[::RBI::Node]) } def nodes; end - # source://rbi/0.1.9/lib/rbi/printer.rb#233 - sig { override.returns(T::Boolean) } - def oneline?; end + # source://rbi/0.2.1/lib/rbi/rewriters/attr_to_methods.rb#53 + sig { void } + def replace_attributes_with_methods!; end - # source://rbi/0.1.9/lib/rbi/rewriters/sort_nodes.rb#119 + # source://rbi/0.2.1/lib/rbi/rewriters/sort_nodes.rb#119 sig { void } def sort_nodes!; end private - # source://tapioca//lib/tapioca/rbi_ext/model.rb#116 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#123 sig { params(node: ::RBI::Node).returns(::RBI::Node) } def create_node(node); end - # source://tapioca//lib/tapioca/rbi_ext/model.rb#111 + # source://tapioca//lib/tapioca/rbi_ext/model.rb#118 sig { returns(T::Hash[::String, ::RBI::Node]) } def nodes_cache; end end -# source://tapioca//lib/tapioca/rbi_ext/model.rb#126 +# source://tapioca//lib/tapioca/rbi_ext/model.rb#133 class RBI::TypedParam < ::T::Struct const :param, ::RBI::Param const :type, ::String class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -377,7 +387,7 @@ end # source://tapioca//lib/tapioca/runtime/trackers/autoload.rb#4 module Tapioca class << self - # source://tapioca//lib/tapioca.rb#19 + # source://tapioca//lib/tapioca.rb#20 sig do type_parameters(:Result) .params( @@ -388,7 +398,7 @@ module Tapioca end end -# source://tapioca//lib/tapioca.rb#37 +# source://tapioca//lib/tapioca.rb#39 Tapioca::BINARY_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/bundler_ext/auto_require_hook.rb#5 @@ -428,13 +438,13 @@ module Tapioca::BundlerExt::AutoRequireHook end end -# source://tapioca//lib/tapioca.rb#60 +# source://tapioca//lib/tapioca.rb#62 Tapioca::CENTRAL_REPO_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#59 +# source://tapioca//lib/tapioca.rb#61 Tapioca::CENTRAL_REPO_INDEX_PATH = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#58 +# source://tapioca//lib/tapioca.rb#60 Tapioca::CENTRAL_REPO_ROOT_URI = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/cli.rb#5 @@ -443,24 +453,24 @@ class Tapioca::Cli < ::Thor include ::Tapioca::ConfigHelper include ::Tapioca::EnvHelper - # source://tapioca//lib/tapioca/cli.rb#355 + # source://tapioca//lib/tapioca/cli.rb#366 def __print_version; end - # source://tapioca//lib/tapioca/cli.rb#337 + # source://tapioca//lib/tapioca/cli.rb#348 def annotations; end - # source://tapioca//lib/tapioca/cli.rb#309 + # source://tapioca//lib/tapioca/cli.rb#320 def check_shims; end # source://tapioca//lib/tapioca/cli.rb#46 def configure; end - # source://tapioca//lib/tapioca/cli.rb#138 + # source://tapioca//lib/tapioca/cli.rb#147 def dsl(*constant_or_paths); end # @raise [MalformattedArgumentError] # - # source://tapioca//lib/tapioca/cli.rb#253 + # source://tapioca//lib/tapioca/cli.rb#264 def gem(*gems); end # source://tapioca//lib/tapioca/cli.rb#27 @@ -474,11 +484,11 @@ class Tapioca::Cli < ::Thor private - # source://tapioca//lib/tapioca/cli.rb#369 + # source://tapioca//lib/tapioca/cli.rb#380 def print_init_next_steps; end class << self - # source://tapioca//lib/tapioca/cli.rb#361 + # source://tapioca//lib/tapioca/cli.rb#372 def exit_on_failure?; end end end @@ -515,7 +525,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke abstract! - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#31 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#33 sig do params( requested_constants: T::Array[::String], @@ -525,6 +535,7 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke exclude: T::Array[::String], file_header: T::Boolean, tapioca_path: ::String, + skip_constant: T::Array[::String], quiet: T::Boolean, verbose: T::Boolean, number_of_workers: T.nilable(::Integer), @@ -532,22 +543,23 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke gem_dir: ::String, rbi_formatter: ::Tapioca::RBIFormatter, app_root: ::String, - halt_upon_load_error: T::Boolean + halt_upon_load_error: T::Boolean, + compiler_options: T::Hash[::String, T.untyped] ).void end - def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end + def initialize(requested_constants:, requested_paths:, outpath:, only:, exclude:, file_header:, tapioca_path:, skip_constant: T.unsafe(nil), quiet: T.unsafe(nil), verbose: T.unsafe(nil), number_of_workers: T.unsafe(nil), auto_strictness: T.unsafe(nil), gem_dir: T.unsafe(nil), rbi_formatter: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil), compiler_options: T.unsafe(nil)); end private - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#94 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#100 sig { returns(T::Array[::String]) } def all_requested_constants; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#284 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#208 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#217 sig do params( constant_name: ::String, @@ -558,75 +570,75 @@ class Tapioca::Commands::AbstractDsl < ::Tapioca::Commands::CommandWithoutTracke end def compile_dsl_rbi(constant_name, rbi, outpath: T.unsafe(nil), quiet: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#146 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#154 sig { params(constant_names: T::Array[::String], ignore_missing: T::Boolean).returns(T::Array[::Module]) } def constantize(constant_names, ignore_missing: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#169 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#177 sig { params(compiler_names: T::Array[::String]).returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def constantize_compilers(compiler_names); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#344 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#353 sig { returns(T::Array[::String]) } def constants_from_requested_paths; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#117 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#123 sig { returns(::Tapioca::Dsl::Pipeline) } def create_pipeline; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#247 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#256 sig { params(constant_name: ::String).returns(::Pathname) } def dsl_rbi_filename(constant_name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#132 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#140 sig { params(requested_constants: T::Array[::String], path: ::Pathname).returns(T::Set[::Pathname]) } def existing_rbi_filenames(requested_constants, path: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#339 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#348 sig { params(constant: ::String).returns(::String) } def generate_command_for(constant); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#70 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#76 sig { params(outpath: ::Pathname, quiet: T::Boolean).returns(T::Set[::Pathname]) } def generate_dsl_rbi_files(outpath, quiet:); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#107 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#113 sig { void } def load_application; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#226 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 sig { params(dir: ::Pathname).void } def perform_dsl_verification(dir); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#102 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#108 sig { returns(::Tapioca::Dsl::Pipeline) } def pipeline; end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#235 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#244 sig { params(files: T::Set[::Pathname]).void } def purge_stale_dsl_rbi_files(files); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#334 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#343 sig { params(constant: ::String).returns(::String) } def rbi_filename_for(constant); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#315 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#324 sig { params(path: ::Pathname).returns(T::Array[::Pathname]) } def rbi_files_in(path); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#293 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#302 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#188 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#197 sig { params(name: ::String).returns(T.nilable(T.class_of(Tapioca::Dsl::Compiler))) } def resolve(name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#322 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#331 sig { params(class_name: ::String).returns(::String) } def underscore(class_name); end - # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#252 + # source://tapioca//lib/tapioca/commands/abstract_dsl.rb#261 sig { params(tmp_dir: ::Pathname).returns(T::Hash[::String, ::Symbol]) } def verify_dsl_rbi(tmp_dir:); end end @@ -665,11 +677,11 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command private - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#221 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#230 sig { returns(T::Array[::String]) } def added_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#282 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#291 sig { params(cause: ::Symbol, files: T::Array[::String]).returns(::String) } def build_error_for_files(cause, files); end @@ -677,19 +689,19 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command sig { params(gem: ::Tapioca::Gemfile::GemSpec).void } def compile_gem_rbi(gem); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#216 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#225 sig { params(gem_name: ::String).returns(::Pathname) } def existing_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#264 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#273 sig { returns(T::Hash[::String, ::String]) } def existing_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#228 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#237 sig { params(gem_name: ::String).returns(::Pathname) } def expected_rbi(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#270 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#279 sig { returns(T::Hash[::String, ::String]) } def expected_rbis; end @@ -702,11 +714,11 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command end def gem_dependencies(gem, dependencies = T.unsafe(nil)); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#233 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#242 sig { params(gem_name: ::String).returns(T::Boolean) } def gem_rbi_exists?(gem_name); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#277 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#286 sig { params(gem_name: ::String, version: ::String).returns(::Pathname) } def gem_rbi_filename(gem_name, version); end @@ -714,27 +726,27 @@ class Tapioca::Commands::AbstractGem < ::Tapioca::Commands::Command sig { params(gem_names: T::Array[::String]).returns(T::Array[::Tapioca::Gemfile::GemSpec]) } def gems_to_generate(gem_names); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#287 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#296 sig { params(gem: ::Tapioca::Gemfile::GemSpec, file: ::RBI::File).void } def merge_with_exported_rbi(gem, file); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#258 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#267 sig { params(old_filename: ::Pathname, new_filename: ::Pathname).void } def move(old_filename, new_filename); end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#168 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#177 sig { void } def perform_additions; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#141 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#150 sig { void } def perform_removals; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#211 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#220 sig { returns(T::Array[::String]) } def removed_rbis; end - # source://tapioca//lib/tapioca/commands/abstract_gem.rb#238 + # source://tapioca//lib/tapioca/commands/abstract_gem.rb#247 sig { params(diff: T::Hash[::String, ::Symbol], command: ::Symbol).void } def report_diff_and_exit_if_out_of_date(diff, command); end end @@ -755,11 +767,11 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke private - # source://tapioca//lib/tapioca/commands/annotations.rb#193 + # source://tapioca//lib/tapioca/commands/annotations.rb#197 sig { params(name: ::String, content: ::String).returns(::String) } def add_header(name, content); end - # source://tapioca//lib/tapioca/commands/annotations.rb#213 + # source://tapioca//lib/tapioca/commands/annotations.rb#217 sig { params(name: ::String, content: ::String).returns(::String) } def apply_typed_override(name, content); end @@ -768,18 +780,18 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke def execute; end # source://tapioca//lib/tapioca/commands/annotations.rb#136 - sig { params(repo_uris: T::Array[::String], gem_name: ::String).void } - def fetch_annotation(repo_uris, gem_name); end + sig { params(repo_uris: T::Array[::String], gem_info: ::Tapioca::GemInfo).void } + def fetch_annotation(repo_uris, gem_info); end # source://tapioca//lib/tapioca/commands/annotations.rb#113 - sig { params(gem_names: T::Array[::String]).returns(T::Array[::String]) } - def fetch_annotations(gem_names); end + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).returns(T::Array[::String]) } + def fetch_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#152 + # source://tapioca//lib/tapioca/commands/annotations.rb#156 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_file(repo_uri, path); end - # source://tapioca//lib/tapioca/commands/annotations.rb#169 + # source://tapioca//lib/tapioca/commands/annotations.rb#173 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_http_file(repo_uri, path); end @@ -791,31 +803,35 @@ class Tapioca::Commands::Annotations < ::Tapioca::Commands::CommandWithoutTracke sig { returns(T::Hash[::String, Tapioca::RepoIndex]) } def fetch_indexes; end - # source://tapioca//lib/tapioca/commands/annotations.rb#161 + # source://tapioca//lib/tapioca/commands/annotations.rb#165 sig { params(repo_uri: ::String, path: ::String).returns(T.nilable(::String)) } def fetch_local_file(repo_uri, path); end + # source://tapioca//lib/tapioca/commands/annotations.rb#229 + sig { params(gem_version: ::Gem::Version, content: ::String).returns(::String) } + def filter_versions(gem_version, content); end + # source://tapioca//lib/tapioca/commands/annotations.rb#50 - sig { returns(T::Array[::String]) } + sig { returns(T::Array[::Tapioca::GemInfo]) } def list_gemfile_gems; end - # source://tapioca//lib/tapioca/commands/annotations.rb#225 + # source://tapioca//lib/tapioca/commands/annotations.rb#237 sig { params(gem_name: ::String, contents: T::Array[::String]).returns(T.nilable(::String)) } def merge_files(gem_name, contents); end # source://tapioca//lib/tapioca/commands/annotations.rb#60 - sig { params(project_gems: T::Array[::String]).void } + sig { params(project_gems: T::Array[::Tapioca::GemInfo]).void } def remove_expired_annotations(project_gems); end - # source://tapioca//lib/tapioca/commands/annotations.rb#252 + # source://tapioca//lib/tapioca/commands/annotations.rb#264 sig { returns(T::Hash[::String, T.nilable(::String)]) } def repo_tokens; end - # source://tapioca//lib/tapioca/commands/annotations.rb#280 + # source://tapioca//lib/tapioca/commands/annotations.rb#292 sig { params(path: ::String, repo_uri: ::String, message: ::String).void } def say_http_error(path, repo_uri, message:); end - # source://tapioca//lib/tapioca/commands/annotations.rb#264 + # source://tapioca//lib/tapioca/commands/annotations.rb#276 sig { params(repo_uri: ::String).returns(T.nilable(::String)) } def token_for(repo_uri); end end @@ -863,7 +879,7 @@ class Tapioca::Commands::Command sig { void } def initialize; end - # source://thor/1.3.1/lib/thor/base.rb#155 + # source://thor/1.3.2/lib/thor/base.rb#155 sig { returns(::Thor::Actions) } def file_writer; end @@ -1077,11 +1093,11 @@ module Tapioca::ConfigHelper private - # source://tapioca//lib/tapioca/helpers/config_helper.rb#151 + # source://tapioca//lib/tapioca/helpers/config_helper.rb#153 sig { params(msg: ::String).returns(::Tapioca::ConfigHelper::ConfigError) } def build_error(msg); end - # source://tapioca//lib/tapioca/helpers/config_helper.rb#176 + # source://tapioca//lib/tapioca/helpers/config_helper.rb#178 sig { params(config_file: ::String, errors: T::Array[::Tapioca::ConfigHelper::ConfigError]).returns(::String) } def build_error_message(config_file, errors); end @@ -1097,7 +1113,7 @@ module Tapioca::ConfigHelper sig { params(options: T::Hash[::Symbol, ::Thor::Option]).void } def filter_defaults(options); end - # source://tapioca//lib/tapioca/helpers/config_helper.rb#194 + # source://tapioca//lib/tapioca/helpers/config_helper.rb#196 sig do params( options: T.nilable(::Thor::CoreExt::HashWithIndifferentAccess) @@ -1120,58 +1136,58 @@ module Tapioca::ConfigHelper def validate_config_options(command_options, config_key, config_options); end end -# source://tapioca//lib/tapioca/helpers/config_helper.rb#146 +# source://tapioca//lib/tapioca/helpers/config_helper.rb#148 class Tapioca::ConfigHelper::ConfigError < ::T::Struct const :message_parts, T::Array[::Tapioca::ConfigHelper::ConfigErrorMessagePart] class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca/helpers/config_helper.rb#141 +# source://tapioca//lib/tapioca/helpers/config_helper.rb#143 class Tapioca::ConfigHelper::ConfigErrorMessagePart < ::T::Struct const :message, ::String const :colors, T::Array[::Symbol] class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end -# source://tapioca//lib/tapioca.rb#44 +# source://tapioca//lib/tapioca.rb#46 Tapioca::DEFAULT_ANNOTATIONS_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#40 +# source://tapioca//lib/tapioca.rb#42 Tapioca::DEFAULT_DSL_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#56 +# source://tapioca//lib/tapioca.rb#58 Tapioca::DEFAULT_ENVIRONMENT = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#41 +# source://tapioca//lib/tapioca.rb#43 Tapioca::DEFAULT_GEM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#46 +# source://tapioca//lib/tapioca.rb#48 Tapioca::DEFAULT_OVERRIDES = T.let(T.unsafe(nil), Hash) -# source://tapioca//lib/tapioca.rb#38 +# source://tapioca//lib/tapioca.rb#40 Tapioca::DEFAULT_POSTREQUIRE_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#39 +# source://tapioca//lib/tapioca.rb#41 Tapioca::DEFAULT_RBI_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/rbi_formatter.rb#29 +# source://tapioca//lib/tapioca/rbi_formatter.rb#31 Tapioca::DEFAULT_RBI_FORMATTER = T.let(T.unsafe(nil), Tapioca::RBIFormatter) -# source://tapioca//lib/tapioca.rb#55 +# source://tapioca//lib/tapioca.rb#57 Tapioca::DEFAULT_RBI_MAX_LINE_LENGTH = T.let(T.unsafe(nil), Integer) -# source://tapioca//lib/tapioca.rb#42 +# source://tapioca//lib/tapioca.rb#44 Tapioca::DEFAULT_SHIM_DIR = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#43 +# source://tapioca//lib/tapioca.rb#45 Tapioca::DEFAULT_TODO_FILE = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/dsl/compilers.rb#5 @@ -1193,17 +1209,24 @@ class Tapioca::Dsl::Compiler ConstantType = type_member { { upper: Module } } - # source://tapioca//lib/tapioca/dsl/compiler.rb#64 - sig { params(pipeline: ::Tapioca::Dsl::Pipeline, root: ::RBI::Tree, constant: ConstantType).void } - def initialize(pipeline, root, constant); end + # source://tapioca//lib/tapioca/dsl/compiler.rb#107 + sig do + params( + pipeline: ::Tapioca::Dsl::Pipeline, + root: ::RBI::Tree, + constant: ConstantType, + options: T::Hash[::String, T.untyped] + ).void + end + def initialize(pipeline, root, constant, options = T.unsafe(nil)); end # NOTE: This should eventually accept an `Error` object or `Exception` rather than simply a `String`. # - # source://tapioca//lib/tapioca/dsl/compiler.rb#81 + # source://tapioca//lib/tapioca/dsl/compiler.rb#125 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#72 + # source://tapioca//lib/tapioca/dsl/compiler.rb#116 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end @@ -1213,58 +1236,75 @@ class Tapioca::Dsl::Compiler # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#77 + # source://tapioca//lib/tapioca/dsl/compiler.rb#121 sig { abstract.void } def decorate; end + # source://tapioca//lib/tapioca/dsl/compiler.rb#26 + sig { returns(T::Hash[::String, T.untyped]) } + def options; end + # source://tapioca//lib/tapioca/dsl/compiler.rb#23 sig { returns(::RBI::Tree) } def root; end private - # source://tapioca//lib/tapioca/dsl/compiler.rb#130 + # source://tapioca//lib/tapioca/dsl/compiler.rb#174 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(T::Array[::RBI::TypedParam]) } def compile_method_parameters_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#166 + # source://tapioca//lib/tapioca/dsl/compiler.rb#210 sig { params(method_def: T.any(::Method, ::UnboundMethod)).returns(::String) } def compile_method_return_type_to_rbi(method_def); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#120 + # source://tapioca//lib/tapioca/dsl/compiler.rb#164 sig { params(scope: ::RBI::Scope, method_def: T.any(::Method, ::UnboundMethod), class_method: T::Boolean).void } def create_method_from_def(scope, method_def, class_method: T.unsafe(nil)); end # Get the types of each parameter from a method signature # - # source://tapioca//lib/tapioca/dsl/compiler.rb#94 + # source://tapioca//lib/tapioca/dsl/compiler.rb#138 sig { params(method_def: T.any(::Method, ::UnboundMethod), signature: T.untyped).returns(T::Array[::String]) } def parameters_types_from_signature(method_def, signature); end class << self # @abstract # - # source://tapioca//lib/tapioca/dsl/compiler.rb#34 + # source://tapioca//lib/tapioca/dsl/compiler.rb#39 sig { abstract.returns(T::Enumerable[::Module]) } def gather_constants; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#29 + # source://tapioca//lib/tapioca/dsl/compiler.rb#34 sig { params(constant: ::Module).returns(T::Boolean) } def handles?(constant); end - # source://tapioca//lib/tapioca/dsl/compiler.rb#37 + # source://tapioca//lib/tapioca/dsl/compiler.rb#42 sig { returns(T::Set[::Module]) } def processable_constants; end + # source://tapioca//lib/tapioca/dsl/compiler.rb#50 + sig { params(constants: T::Array[::Module]).void } + def requested_constants=(constants); end + private - # source://tapioca//lib/tapioca/dsl/compiler.rb#47 + # source://tapioca//lib/tapioca/dsl/compiler.rb#75 sig { returns(T::Enumerable[T::Class[T.anything]]) } def all_classes; end - # source://tapioca//lib/tapioca/dsl/compiler.rb#55 + # source://tapioca//lib/tapioca/dsl/compiler.rb#87 sig { returns(T::Enumerable[::Module]) } def all_modules; end + + # source://tapioca//lib/tapioca/dsl/compiler.rb#61 + sig do + type_parameters(:U) + .params( + klass: T.all(T.type_parameter(:U), T::Class[T.anything]) + ).returns(T::Array[T.type_parameter(:U)]) + end + def descendants_of(klass); end end end @@ -1283,7 +1323,7 @@ Tapioca::Dsl::Compilers::NAMESPACES = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/dsl/pipeline.rb#6 class Tapioca::Dsl::Pipeline - # source://tapioca//lib/tapioca/dsl/pipeline.rb#34 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#39 sig do params( requested_constants: T::Array[::Module], @@ -1291,32 +1331,34 @@ class Tapioca::Dsl::Pipeline requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], excluded_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], error_handler: T.proc.params(error: ::String).void, - number_of_workers: T.nilable(::Integer) + skipped_constants: T::Array[::Module], + number_of_workers: T.nilable(::Integer), + compiler_options: T::Hash[::String, T.untyped] ).void end - def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), number_of_workers: T.unsafe(nil)); end + def initialize(requested_constants:, requested_paths: T.unsafe(nil), requested_compilers: T.unsafe(nil), excluded_compilers: T.unsafe(nil), error_handler: T.unsafe(nil), skipped_constants: T.unsafe(nil), number_of_workers: T.unsafe(nil), compiler_options: T.unsafe(nil)); end # source://tapioca//lib/tapioca/dsl/pipeline.rb#10 sig { returns(T::Enumerable[T.class_of(Tapioca::Dsl::Compiler)]) } def active_compilers; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#93 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#102 sig { params(error: ::String).void } def add_error(error); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#98 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 sig { params(compiler_name: ::String).returns(T::Boolean) } def compiler_enabled?(compiler_name); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#107 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#116 sig { returns(T::Array[T.class_of(Tapioca::Dsl::Compiler)]) } def compilers; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 sig { returns(T.proc.params(error: ::String).void) } def error_handler; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#22 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#25 sig { returns(T::Array[::String]) } def errors; end @@ -1328,7 +1370,7 @@ class Tapioca::Dsl::Pipeline sig { returns(T::Array[::Pathname]) } def requested_paths; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#58 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#67 sig do type_parameters(:T) .params( @@ -1337,17 +1379,21 @@ class Tapioca::Dsl::Pipeline end def run(&blk); end + # source://tapioca//lib/tapioca/dsl/pipeline.rb#19 + sig { returns(T::Array[::Module]) } + def skipped_constants; end + private - # source://tapioca//lib/tapioca/dsl/pipeline.rb#199 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#224 sig { void } def abort_if_pending_migrations!; end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#144 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#169 sig { params(constants: T::Set[::Module]).returns(T::Set[::Module]) } def filter_anonymous_and_reloaded_constants(constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#124 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#133 sig do params( requested_compilers: T::Array[T.class_of(Tapioca::Dsl::Compiler)], @@ -1356,20 +1402,21 @@ class Tapioca::Dsl::Pipeline end def gather_active_compilers(requested_compilers, excluded_compilers); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#132 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#147 sig do params( requested_constants: T::Array[::Module], - requested_paths: T::Array[::Pathname] + requested_paths: T::Array[::Pathname], + skipped_constants: T::Array[::Module] ).returns(T::Set[::Module]) end - def gather_constants(requested_constants, requested_paths); end + def gather_constants(requested_constants, requested_paths, skipped_constants); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#173 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#198 sig { params(constant: ::Module).returns(T.nilable(::RBI::File)) } def rbi_for_constant(constant); end - # source://tapioca//lib/tapioca/dsl/pipeline.rb#192 + # source://tapioca//lib/tapioca/dsl/pipeline.rb#217 sig { params(error: ::String).returns(T.noreturn) } def report_error(error); end end @@ -1573,6 +1620,10 @@ class Tapioca::Gem::Listeners::Methods < ::Tapioca::Gem::Listeners::Base sig { params(constant: ::Module).returns(T.nilable(::UnboundMethod)) } def initialize_method_for(constant); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#216 + sig { params(method: ::UnboundMethod).returns(T.untyped) } + def lookup_signature_of(method); end + # source://tapioca//lib/tapioca/gem/listeners/methods.rb#172 sig { params(mod: ::Module).returns(T::Hash[::Symbol, T::Array[::Symbol]]) } def method_names_by_visibility(mod); end @@ -1665,7 +1716,7 @@ end class Tapioca::Gem::Listeners::SorbetEnums < ::Tapioca::Gem::Listeners::Base private - # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#25 + # source://tapioca//lib/tapioca/gem/listeners/sorbet_enums.rb#28 sig { override.params(event: ::Tapioca::Gem::NodeAdded).returns(T::Boolean) } def ignore?(event); end @@ -1902,49 +1953,60 @@ class Tapioca::Gem::Pipeline include ::Tapioca::SorbetHelper include ::Tapioca::RBIHelper - # source://tapioca//lib/tapioca/gem/pipeline.rb#17 - sig { params(gem: ::Tapioca::Gemfile::GemSpec, include_doc: T::Boolean, include_loc: T::Boolean).void } - def initialize(gem, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end + # source://tapioca//lib/tapioca/gem/pipeline.rb#27 + sig do + params( + gem: ::Tapioca::Gemfile::GemSpec, + error_handler: T.proc.params(error: ::String).void, + include_doc: T::Boolean, + include_loc: T::Boolean + ).void + end + def initialize(gem, error_handler:, include_doc: T.unsafe(nil), include_loc: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#48 + # source://tapioca//lib/tapioca/gem/pipeline.rb#64 sig { returns(::RBI::Tree) } def compile; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#119 + # source://tapioca//lib/tapioca/gem/pipeline.rb#135 sig { params(name: T.any(::String, ::Symbol)).returns(T::Boolean) } def constant_in_gem?(name); end + # source://tapioca//lib/tapioca/gem/pipeline.rb#17 + sig { returns(T.proc.params(error: ::String).void) } + def error_handler; end + # source://tapioca//lib/tapioca/gem/pipeline.rb#14 sig { returns(::Tapioca::Gemfile::GemSpec) } def gem; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#137 + # source://tapioca//lib/tapioca/gem/pipeline.rb#153 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_in_gem?(method); end # Helpers # - # source://tapioca//lib/tapioca/gem/pipeline.rb#147 + # source://tapioca//lib/tapioca/gem/pipeline.rb#163 sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#71 + # source://tapioca//lib/tapioca/gem/pipeline.rb#87 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Const).void } def push_const(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#61 + # source://tapioca//lib/tapioca/gem/pipeline.rb#77 sig { params(symbol: ::String, constant: ::BasicObject).void } def push_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#66 + # source://tapioca//lib/tapioca/gem/pipeline.rb#82 sig { params(symbol: ::String, constant: ::Module).void } def push_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#85 + # source://tapioca//lib/tapioca/gem/pipeline.rb#101 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_foreign_scope(symbol, constant, node); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#99 + # source://tapioca//lib/tapioca/gem/pipeline.rb#115 sig do params( symbol: ::String, @@ -1957,137 +2019,137 @@ class Tapioca::Gem::Pipeline end def push_method(symbol, constant, method, node, signature, parameters); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#78 + # source://tapioca//lib/tapioca/gem/pipeline.rb#94 sig { params(symbol: ::String, constant: ::Module, node: ::RBI::Scope).void } def push_scope(symbol, constant, node); end # Events handling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#56 + # source://tapioca//lib/tapioca/gem/pipeline.rb#72 sig { params(symbol: ::String).void } def push_symbol(symbol); end # Constants and properties filtering # - # source://tapioca//lib/tapioca/gem/pipeline.rb#106 + # source://tapioca//lib/tapioca/gem/pipeline.rb#122 sig { params(symbol_name: ::String).returns(T::Boolean) } def symbol_in_payload?(symbol_name); end private - # source://tapioca//lib/tapioca/gem/pipeline.rb#440 + # source://tapioca//lib/tapioca/gem/pipeline.rb#456 sig { params(name: ::String).void } def add_to_alias_namespace(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#445 + # source://tapioca//lib/tapioca/gem/pipeline.rb#461 sig { params(name: ::String).returns(T::Boolean) } def alias_namespaced?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#244 + # source://tapioca//lib/tapioca/gem/pipeline.rb#260 sig { params(name: ::String, constant: ::Module).void } def compile_alias(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#230 + # source://tapioca//lib/tapioca/gem/pipeline.rb#246 sig { params(symbol: ::String, constant: ::BasicObject).void } def compile_constant(symbol, constant); end # Compiling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#219 + # source://tapioca//lib/tapioca/gem/pipeline.rb#235 sig { params(symbol: ::String, constant: ::Module).void } def compile_foreign_constant(symbol, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#298 + # source://tapioca//lib/tapioca/gem/pipeline.rb#314 sig { params(name: ::String, constant: ::Module).void } def compile_module(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#265 + # source://tapioca//lib/tapioca/gem/pipeline.rb#281 sig { params(name: ::String, value: ::BasicObject).void } def compile_object(name, value); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#309 + # source://tapioca//lib/tapioca/gem/pipeline.rb#325 sig { params(name: ::String, constant: ::Module).returns(::RBI::Scope) } def compile_scope(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#323 + # source://tapioca//lib/tapioca/gem/pipeline.rb#339 sig { params(constant: T::Class[T.anything]).returns(T.nilable(::String)) } def compile_superclass(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#421 + # source://tapioca//lib/tapioca/gem/pipeline.rb#437 sig { params(constant: ::Module, strict: T::Boolean).returns(T::Boolean) } def defined_in_gem?(constant, strict: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#177 + # source://tapioca//lib/tapioca/gem/pipeline.rb#193 sig { params(event: ::Tapioca::Gem::Event).void } def dispatch(event); end # Helpers # - # source://tapioca//lib/tapioca/gem/pipeline.rb#464 + # source://tapioca//lib/tapioca/gem/pipeline.rb#480 sig { params(constant: T.all(::Module, ::T::Generic)).returns(::String) } def generic_name_of(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#433 + # source://tapioca//lib/tapioca/gem/pipeline.rb#449 sig { params(constant: ::Module).returns(T::Set[::String]) } def get_file_candidates(constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#162 + # source://tapioca//lib/tapioca/gem/pipeline.rb#178 sig { params(gem: ::Tapioca::Gemfile::GemSpec).returns(T::Set[::String]) } def load_bootstrap_symbols(gem); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#480 + # source://tapioca//lib/tapioca/gem/pipeline.rb#496 sig { params(constant: ::Module, class_name: T.nilable(::String)).returns(T.nilable(::String)) } def name_of_proxy_target(constant, class_name); end # Events handling # - # source://tapioca//lib/tapioca/gem/pipeline.rb#172 + # source://tapioca//lib/tapioca/gem/pipeline.rb#188 sig { returns(::Tapioca::Gem::Event) } def next_event; end - # source://tapioca//lib/tapioca/gem/pipeline.rb#200 + # source://tapioca//lib/tapioca/gem/pipeline.rb#216 sig { params(event: ::Tapioca::Gem::ConstantFound).void } def on_constant(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#212 + # source://tapioca//lib/tapioca/gem/pipeline.rb#228 sig { params(event: ::Tapioca::Gem::NodeAdded).void } def on_node(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#191 + # source://tapioca//lib/tapioca/gem/pipeline.rb#207 sig { params(event: ::Tapioca::Gem::SymbolFound).void } def on_symbol(event); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#452 + # source://tapioca//lib/tapioca/gem/pipeline.rb#468 sig { params(name: ::String).void } def seen!(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#457 + # source://tapioca//lib/tapioca/gem/pipeline.rb#473 sig { params(name: ::String).returns(T::Boolean) } def seen?(name); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#391 + # source://tapioca//lib/tapioca/gem/pipeline.rb#407 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_alias?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#379 + # source://tapioca//lib/tapioca/gem/pipeline.rb#395 sig { params(name: ::String, constant: T.anything).returns(T::Boolean) } def skip_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#408 + # source://tapioca//lib/tapioca/gem/pipeline.rb#424 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_foreign_constant?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#413 + # source://tapioca//lib/tapioca/gem/pipeline.rb#429 sig { params(name: ::String, constant: ::Module).returns(T::Boolean) } def skip_module?(name, constant); end - # source://tapioca//lib/tapioca/gem/pipeline.rb#400 + # source://tapioca//lib/tapioca/gem/pipeline.rb#416 sig { params(name: ::String, constant: ::BasicObject).returns(T::Boolean) } def skip_object?(name, constant); end # Constants and properties filtering # - # source://tapioca//lib/tapioca/gem/pipeline.rb#374 + # source://tapioca//lib/tapioca/gem/pipeline.rb#390 sig { params(name: ::String).returns(T::Boolean) } def skip_symbol?(name); end end @@ -2096,7 +2158,7 @@ end # "(eval at /path/to/file.rb:123)" # and we are just interested in the "/path/to/file.rb" part # -# source://tapioca//lib/tapioca/gem/pipeline.rb#116 +# source://tapioca//lib/tapioca/gem/pipeline.rb#132 Tapioca::Gem::Pipeline::EVAL_SOURCE_FILE_PATTERN = T.let(T.unsafe(nil), Regexp) # source://tapioca//lib/tapioca/gem/pipeline.rb#11 @@ -2149,6 +2211,21 @@ module Tapioca::GemHelper def path_in_dir?(path, dir); end end +# source://tapioca//lib/tapioca/gem_info.rb#5 +class Tapioca::GemInfo < ::T::Struct + const :name, ::String + const :version, ::Gem::Version + + class << self + # source://tapioca//lib/tapioca/gem_info.rb#13 + sig { params(spec: ::Bundler::LazySpecification).returns(::Tapioca::GemInfo) } + def from_spec(spec); end + + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 + def inherited(s); end + end +end + # source://tapioca//lib/tapioca/gemfile.rb#7 class Tapioca::Gemfile # source://tapioca//lib/tapioca/gemfile.rb#27 @@ -2227,15 +2304,15 @@ class Tapioca::Gemfile::GemSpec sig { returns(T::Array[::Gem::Dependency]) } def dependencies; end - # source://tapioca//lib/tapioca/gemfile.rb#190 + # source://tapioca//lib/tapioca/gemfile.rb#201 sig { returns(T::Boolean) } def export_rbi_files?; end - # source://tapioca//lib/tapioca/gemfile.rb#185 + # source://tapioca//lib/tapioca/gemfile.rb#196 sig { returns(T::Array[::String]) } def exported_rbi_files; end - # source://tapioca//lib/tapioca/gemfile.rb#195 + # source://tapioca//lib/tapioca/gemfile.rb#206 sig { returns(::RBI::MergeTree) } def exported_rbi_tree; end @@ -2263,7 +2340,7 @@ class Tapioca::Gemfile::GemSpec sig { returns(::String) } def rbi_file_name; end - # source://tapioca//lib/tapioca/gemfile.rb#207 + # source://tapioca//lib/tapioca/gemfile.rb#218 sig { params(file: ::Pathname).returns(::Pathname) } def relative_path_for(file); end @@ -2274,31 +2351,31 @@ class Tapioca::Gemfile::GemSpec private - # source://tapioca//lib/tapioca/gemfile.rb#218 + # source://tapioca//lib/tapioca/gemfile.rb#229 sig { returns(T::Array[::Pathname]) } def collect_files; end - # source://tapioca//lib/tapioca/gemfile.rb#233 + # source://tapioca//lib/tapioca/gemfile.rb#244 sig { returns(T.nilable(T::Boolean)) } def default_gem?; end - # source://tapioca//lib/tapioca/gemfile.rb#292 + # source://tapioca//lib/tapioca/gemfile.rb#303 sig { returns(T::Boolean) } def gem_ignored?; end - # source://tapioca//lib/tapioca/gemfile.rb#271 + # source://tapioca//lib/tapioca/gemfile.rb#282 sig { params(path: ::String).returns(T::Boolean) } def has_parent_gemspec?(path); end - # source://tapioca//lib/tapioca/gemfile.rb#238 + # source://tapioca//lib/tapioca/gemfile.rb#249 sig { returns(::Regexp) } def require_paths_prefix_matcher; end - # source://tapioca//lib/tapioca/gemfile.rb#250 + # source://tapioca//lib/tapioca/gemfile.rb#261 sig { params(file: ::String).returns(::Pathname) } def resolve_to_ruby_lib_dir(file); end - # source://tapioca//lib/tapioca/gemfile.rb#264 + # source://tapioca//lib/tapioca/gemfile.rb#275 sig { returns(::String) } def version_string; end @@ -2315,6 +2392,9 @@ Tapioca::Gemfile::GemSpec::IGNORED_GEMS = T.let(T.unsafe(nil), Array) # source://tapioca//lib/tapioca/gemfile.rb#10 Tapioca::Gemfile::Spec = T.type_alias { T.any(::Bundler::StubSpecification, ::Gem::Specification) } +# source://tapioca//lib/tapioca.rb#33 +Tapioca::LIB_ROOT_DIR = T.let(T.unsafe(nil), String) + # source://tapioca//lib/tapioca/loaders/loader.rb#5 module Tapioca::Loaders; end @@ -2337,7 +2417,7 @@ class Tapioca::Loaders::Dsl < ::Tapioca::Loaders::Loader protected - # source://tapioca//lib/tapioca/loaders/dsl.rb#81 + # source://tapioca//lib/tapioca/loaders/dsl.rb#88 sig { void } def load_application; end @@ -2433,17 +2513,19 @@ class Tapioca::Loaders::Loader # engine paths. The following commit is the change: # https://github.com/rails/rails/commit/ebfca905db14020589c22e6937382e6f8f687664 # - # source://tapioca//lib/tapioca/loaders/loader.rb#233 - sig { params(engine: T.class_of(Rails::Engine)).returns(T::Array[::String]) } + # @param engine [T.class_of(Rails::Engine)] + # @return [Array] + # + # source://tapioca//lib/tapioca/loaders/loader.rb#234 def eager_load_paths(engine); end - # source://tapioca//lib/tapioca/loaders/loader.rb#198 + # source://tapioca//lib/tapioca/loaders/loader.rb#199 sig { void } def eager_load_rails_app; end # @return [Array] # - # source://tapioca//lib/tapioca/loaders/loader.rb#169 + # source://tapioca//lib/tapioca/loaders/loader.rb#178 def engines; end # source://tapioca//lib/tapioca/loaders/loader.rb#29 @@ -2457,11 +2539,11 @@ class Tapioca::Loaders::Loader end def load_bundle(gemfile, initialize_file, require_file, halt_upon_load_error); end - # source://tapioca//lib/tapioca/loaders/loader.rb#127 + # source://tapioca//lib/tapioca/loaders/loader.rb#136 sig { void } def load_engines_in_classic_mode; end - # source://tapioca//lib/tapioca/loaders/loader.rb#105 + # source://tapioca//lib/tapioca/loaders/loader.rb#114 sig { void } def load_engines_in_zeitwerk_mode; end @@ -2476,30 +2558,26 @@ class Tapioca::Loaders::Loader end def load_rails_application(environment_load: T.unsafe(nil), eager_load: T.unsafe(nil), app_root: T.unsafe(nil), halt_upon_load_error: T.unsafe(nil)); end - # source://tapioca//lib/tapioca/loaders/loader.rb#80 + # source://tapioca//lib/tapioca/loaders/loader.rb#89 sig { void } def load_rails_engines; end - # source://tapioca//lib/tapioca/loaders/loader.rb#219 + # source://tapioca//lib/tapioca/loaders/loader.rb#220 sig { params(file: T.nilable(::String)).void } def require_helper(file); end - # source://tapioca//lib/tapioca/loaders/loader.rb#94 + # source://tapioca//lib/tapioca/loaders/loader.rb#103 def run_initializers; end - # source://tapioca//lib/tapioca/loaders/loader.rb#183 + # source://tapioca//lib/tapioca/loaders/loader.rb#192 sig { params(path: ::String).void } def safe_require(path); end - # source://tapioca//lib/tapioca/loaders/loader.rb#190 - sig { void } - def silence_deprecations; end - - # source://tapioca//lib/tapioca/loaders/loader.rb#152 + # source://tapioca//lib/tapioca/loaders/loader.rb#161 sig { params(blk: T.proc.void).void } def with_rails_application(&blk); end - # source://tapioca//lib/tapioca/loaders/loader.rb#145 + # source://tapioca//lib/tapioca/loaders/loader.rb#154 sig { returns(T::Boolean) } def zeitwerk_mode?; end end @@ -2546,19 +2624,19 @@ module Tapioca::RBIFilesHelper private - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#209 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#223 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[::RBI::Scope]) } def extract_empty_scopes(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#214 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#228 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Attr, ::RBI::Method)]) } def extract_methods_and_attrs(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#224 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#238 sig { params(nodes: T::Array[::RBI::Node]).returns(T::Array[T.any(::RBI::Mixin, ::RBI::RequiresAncestor)]) } def extract_mixins(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#234 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#248 sig do params( nodes: T::Array[T.any(::RBI::Attr, ::RBI::Method)] @@ -2566,7 +2644,7 @@ module Tapioca::RBIFilesHelper end def extract_nodes_with_sigs(nodes); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#202 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#216 sig do params( nodes: T::Array[::RBI::Node], @@ -2576,7 +2654,7 @@ module Tapioca::RBIFilesHelper end def extract_shims_and_todos(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#266 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#280 sig { params(path: ::String).returns(::String) } def gem_name_from_rbi_path(path); end @@ -2588,14 +2666,14 @@ module Tapioca::RBIFilesHelper sig { params(nodes: T::Array[::RBI::Node], shim_rbi_dir: ::String, todo_rbi_file: ::String).returns(T::Boolean) } def shims_or_todos_have_duplicates?(nodes, shim_rbi_dir:, todo_rbi_file:); end - # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#239 + # source://tapioca//lib/tapioca/helpers/rbi_files_helper.rb#253 sig { params(errors: T::Array[::Spoom::Sorbet::Errors::Error], gem_dir: ::String).void } def update_gem_rbis_strictnesses(errors, gem_dir); end end # source://tapioca//lib/tapioca/rbi_formatter.rb#5 class Tapioca::RBIFormatter < ::RBI::Formatter - # source://tapioca//lib/tapioca/rbi_formatter.rb#22 + # source://tapioca//lib/tapioca/rbi_formatter.rb#24 sig { params(file: ::RBI::File).void } def write_empty_body_comment!(file); end @@ -2614,6 +2692,10 @@ module Tapioca::RBIHelper sig { params(type: ::String).returns(::String) } def as_nilable_type(type); end + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 + sig { params(type: ::String).returns(::String) } + def as_non_nilable_type(type); end + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#72 sig { params(name: ::String, type: ::String).returns(::RBI::TypedParam) } def create_block_param(name, type:); end @@ -2650,11 +2732,11 @@ module Tapioca::RBIHelper sig { params(sig_string: ::String).returns(::String) } def sanitize_signature_types(sig_string); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#100 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#109 sig { params(name: ::String).returns(T::Boolean) } def valid_method_name?(name); end - # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#114 + # source://tapioca//lib/tapioca/helpers/rbi_helper.rb#123 sig { params(name: ::String).returns(T::Boolean) } def valid_parameter_name?(name); end @@ -2864,7 +2946,7 @@ class Tapioca::Runtime::GenericTypeRegistry::GenericType < ::T::Types::Simple def initialize(raw_type, underlying_type); end # source://tapioca//lib/tapioca/runtime/generic_type_registry.rb#45 - sig { params(obj: T.untyped).returns(T::Boolean) } + sig { override.params(obj: T.untyped).returns(T::Boolean) } def valid?(obj); end end @@ -2873,7 +2955,7 @@ module Tapioca::Runtime::Reflection extend ::Tapioca::Runtime::AttachedClassOf extend ::Tapioca::Runtime::Reflection - # source://tapioca//lib/tapioca/runtime/reflection.rb#196 + # source://tapioca//lib/tapioca/runtime/reflection.rb#201 sig { params(constant: ::Module).returns(T.untyped) } def abstract_type_of(constant); end @@ -2917,7 +2999,7 @@ module Tapioca::Runtime::Reflection # class D < C; end # descendants_of(C) # => [B, A, D] # - # source://tapioca//lib/tapioca/runtime/reflection.rb#167 + # source://tapioca//lib/tapioca/runtime/reflection.rb#172 sig do type_parameters(:U) .params( @@ -2926,11 +3008,11 @@ module Tapioca::Runtime::Reflection end def descendants_of(klass); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#189 + # source://tapioca//lib/tapioca/runtime/reflection.rb#194 sig { params(constant: ::Module).returns(T::Set[::String]) } def file_candidates_for(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#202 + # source://tapioca//lib/tapioca/runtime/reflection.rb#207 sig { params(constant: ::Module).returns(T::Boolean) } def final_module?(constant); end @@ -2938,7 +3020,7 @@ module Tapioca::Runtime::Reflection sig { params(constant: ::Module).returns(T::Array[::Module]) } def inherited_ancestors_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#145 + # source://tapioca//lib/tapioca/runtime/reflection.rb#150 sig { params(constant: ::Module, method: ::Symbol).returns(::Method) } def method_of(constant, method); end @@ -2946,7 +3028,7 @@ module Tapioca::Runtime::Reflection sig { params(constant: ::Module).returns(T.nilable(::String)) } def name_of(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#140 + # source://tapioca//lib/tapioca/runtime/reflection.rb#145 sig { params(type: ::T::Types::Base).returns(::String) } def name_of_type(type); end @@ -2974,18 +3056,22 @@ module Tapioca::Runtime::Reflection # by searching for the label "". If none is found, it returns the location # labeled "
", which is the original call site. # - # source://tapioca//lib/tapioca/runtime/reflection.rb#179 + # source://tapioca//lib/tapioca/runtime/reflection.rb#184 sig { params(locations: T.nilable(T::Array[::Thread::Backtrace::Location])).returns(::String) } def resolve_loc(locations); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#207 + # source://tapioca//lib/tapioca/runtime/reflection.rb#212 sig { params(constant: ::Module).returns(T::Boolean) } def sealed_module?(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#133 + # source://tapioca//lib/tapioca/runtime/reflection.rb#138 sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } def signature_of(method); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#133 + sig { params(method: T.any(::Method, ::UnboundMethod)).returns(T.untyped) } + def signature_of!(method); end + # source://tapioca//lib/tapioca/runtime/reflection.rb#72 sig { params(constant: ::Module).returns(T::Class[T.anything]) } def singleton_class_of(constant); end @@ -2996,23 +3082,23 @@ module Tapioca::Runtime::Reflection private - # source://tapioca//lib/tapioca/runtime/reflection.rb#244 + # source://tapioca//lib/tapioca/runtime/reflection.rb#249 sig { params(parent: ::Module, name: ::String).returns(T.nilable(::Module)) } def child_module_for_parent_with_name(parent, name); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#260 + # source://tapioca//lib/tapioca/runtime/reflection.rb#265 sig { params(name: ::String).returns(T::Boolean) } def has_aliased_namespace?(name); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#255 + # source://tapioca//lib/tapioca/runtime/reflection.rb#260 sig { params(method: ::UnboundMethod).returns(T::Boolean) } def method_defined_by_forwardable_module?(method); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#230 + # source://tapioca//lib/tapioca/runtime/reflection.rb#235 sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } def methods_for(constant); end - # source://tapioca//lib/tapioca/runtime/reflection.rb#214 + # source://tapioca//lib/tapioca/runtime/reflection.rb#219 sig { params(constant: ::Module).returns(T::Array[::UnboundMethod]) } def relevant_methods_for(constant); end end @@ -3196,9 +3282,9 @@ end class Tapioca::Runtime::Trackers::Mixin::Type < ::T::Enum enums do - Prepend = new - Include = new Extend = new + Include = new + Prepend = new end end @@ -3244,10 +3330,10 @@ module Tapioca::Runtime::Trackers::Tracker end end -# source://tapioca//lib/tapioca.rb#33 +# source://tapioca//lib/tapioca.rb#35 Tapioca::SORBET_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#32 +# source://tapioca//lib/tapioca.rb#34 Tapioca::SORBET_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/helpers/sorbet_helper.rb#5 @@ -3340,8 +3426,9 @@ module Tapioca::Static::SymbolLoader private + # @return [Array] + # # source://tapioca//lib/tapioca/static/symbol_loader.rb#69 - sig { returns(T::Array[T.class_of(Rails::Engine)]) } def engines; end # source://tapioca//lib/tapioca/static/symbol_loader.rb#82 @@ -3378,10 +3465,10 @@ end # source://tapioca//lib/tapioca/static/symbol_table_parser.rb#9 Tapioca::Static::SymbolTableParser::SKIP_PARSE_KINDS = T.let(T.unsafe(nil), Array) -# source://tapioca//lib/tapioca.rb#35 +# source://tapioca//lib/tapioca.rb#37 Tapioca::TAPIOCA_CONFIG_FILE = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca.rb#34 +# source://tapioca//lib/tapioca.rb#36 Tapioca::TAPIOCA_DIR = T.let(T.unsafe(nil), String) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#108 @@ -3449,46 +3536,41 @@ Tapioca::TypeVariableModule::DEFAULT_BOUNDS_PROC = T.let(T.unsafe(nil), Proc) # source://tapioca//lib/tapioca/sorbet_ext/generic_name_patch.rb#125 class Tapioca::TypeVariableModule::Type < ::T::Enum enums do + HasAttachedClass = new Member = new Template = new - HasAttachedClass = new end end # source://tapioca//lib/tapioca/version.rb#5 Tapioca::VERSION = T.let(T.unsafe(nil), String) -# source://tapioca//lib/tapioca/helpers/source_uri.rb#6 -module URI - include ::URI::RFC2396_REGEXP -end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#7 class URI::Source < ::URI::File - # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#65 sig { params(v: T.nilable(::String)).returns(T::Boolean) } def check_host(v); end - # source://uri/0.13.0/uri/generic.rb#243 + # source://uri/0.13.0/lib/uri/generic.rb#243 def gem_name; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#25 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#32 sig { returns(T.nilable(::String)) } def gem_version; end - # source://uri/0.13.0/uri/generic.rb#283 + # source://uri/0.13.0/lib/uri/generic.rb#283 def line_number; end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#51 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#58 sig { params(v: T.nilable(::String)).void } def set_path(v); end - # source://tapioca//lib/tapioca/helpers/source_uri.rb#70 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#77 sig { returns(::String) } def to_s; end class << self - # source://tapioca//lib/tapioca/helpers/source_uri.rb#38 + # source://tapioca//lib/tapioca/helpers/source_uri.rb#45 sig do params( gem_name: ::String, @@ -3504,4 +3586,11 @@ end # source://tapioca//lib/tapioca/helpers/source_uri.rb#10 URI::Source::COMPONENT = T.let(T.unsafe(nil), Array) -class URI::WSS < ::URI::WS; end +# `uri` for Ruby 3.4 switched the default parser from RFC2396 to RFC3986. The new parser emits a deprecation +# warning on a few methods and delegates them to RFC2396, namely `extract`/`make_regexp`/`escape`/`unescape`. +# On earlier versions of the uri gem, the RFC2396_PARSER constant doesn't exist, so it needs some special +# handling to select a parser that doesn't emit deprecations. While it was backported to Ruby 3.1, users may +# have the uri gem in their own bundle and thus not use a compatible version. +# +# source://tapioca//lib/tapioca/helpers/source_uri.rb#26 +URI::Source::PARSER = T.let(T.unsafe(nil), URI::RFC2396_Parser) diff --git a/sorbet/rbi/gems/thor@1.3.1.rbi b/sorbet/rbi/gems/thor@1.3.2.rbi similarity index 98% rename from sorbet/rbi/gems/thor@1.3.1.rbi rename to sorbet/rbi/gems/thor@1.3.2.rbi index a806aa385..10202a5de 100644 --- a/sorbet/rbi/gems/thor@1.3.1.rbi +++ b/sorbet/rbi/gems/thor@1.3.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `thor` gem. # Please instead update this file by running `bin/tapioca gem thor`. + # source://thor//lib/thor/shell/lcs_diff.rb#1 module LCSDiff protected @@ -36,7 +37,7 @@ class Thor extend ::Thor::Base::ClassMethods extend ::Thor::Invocation::ClassMethods - # source://thor//lib/thor.rb#652 + # source://thor//lib/thor.rb#663 def help(command = T.unsafe(nil), subcommand = T.unsafe(nil)); end class << self @@ -95,6 +96,19 @@ class Thor # source://thor//lib/thor.rb#363 def check_unknown_options?(config); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor.rb#449 + def command_exists?(command_name); end + # Prints help information for the given command. # # ==== Parameters @@ -470,48 +484,48 @@ class Thor # the command that is going to be invoked and a boolean which indicates if # the namespace should be displayed as arguments. # - # source://thor//lib/thor.rb#535 + # source://thor//lib/thor.rb#546 def banner(command, namespace = T.unsafe(nil), subcommand = T.unsafe(nil)); end - # source://thor//lib/thor.rb#541 + # source://thor//lib/thor.rb#552 def baseclass; end - # source://thor//lib/thor.rb#549 + # source://thor//lib/thor.rb#560 def create_command(meth); end - # source://thor//lib/thor.rb#549 + # source://thor//lib/thor.rb#560 def create_task(meth); end # help command has the required check disabled by default. # - # source://thor//lib/thor.rb#467 + # source://thor//lib/thor.rb#478 def disable_required_check; end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor.rb#494 + # source://thor//lib/thor.rb#505 def dispatch(meth, given_args, given_opts, config); end - # source://thor//lib/thor.rb#545 + # source://thor//lib/thor.rb#556 def dynamic_command_class; end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#615 + # source://thor//lib/thor.rb#626 def find_command_possibilities(meth); end # this is the logic that takes the command name passed in by the user # and determines whether it is an unambiguous substrings of a command or # alias name. # - # source://thor//lib/thor.rb#615 + # source://thor//lib/thor.rb#626 def find_task_possibilities(meth); end - # source://thor//lib/thor.rb#575 + # source://thor//lib/thor.rb#586 def initialize_added; end # Returns this class at least one of required options array set. @@ -519,7 +533,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor.rb#458 + # source://thor//lib/thor.rb#469 def method_at_least_one_option_names; end # Returns this class exclusive options array set. @@ -527,7 +541,7 @@ class Thor # ==== Returns # Array[Array[Thor::Option.name]] # - # source://thor//lib/thor.rb#449 + # source://thor//lib/thor.rb#460 def method_exclusive_option_names; end # receives a (possibly nil) command name and returns a name that is in @@ -540,7 +554,7 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#594 + # source://thor//lib/thor.rb#605 def normalize_command_name(meth); end # receives a (possibly nil) command name and returns a name that is in @@ -553,23 +567,23 @@ class Thor # # @raise [AmbiguousTaskError] # - # source://thor//lib/thor.rb#594 + # source://thor//lib/thor.rb#605 def normalize_task_name(meth); end - # source://thor//lib/thor.rb#482 + # source://thor//lib/thor.rb#493 def print_at_least_one_required_options(shell, command = T.unsafe(nil)); end - # source://thor//lib/thor.rb#471 + # source://thor//lib/thor.rb#482 def print_exclusive_options(shell, command = T.unsafe(nil)); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#581 + # source://thor//lib/thor.rb#592 def retrieve_command_name(args); end # Retrieve the command name from given args. # - # source://thor//lib/thor.rb#581 + # source://thor//lib/thor.rb#592 def retrieve_task_name(args); end # Sort the commands, lexicographically by default. @@ -577,16 +591,16 @@ class Thor # Can be overridden in the subclass to change the display order of the # commands. # - # source://thor//lib/thor.rb#642 + # source://thor//lib/thor.rb#653 def sort_commands!(list); end - # source://thor//lib/thor.rb#462 + # source://thor//lib/thor.rb#473 def stop_on_unknown_option; end - # source://thor//lib/thor.rb#630 + # source://thor//lib/thor.rb#641 def subcommand_help(cmd); end - # source://thor//lib/thor.rb#630 + # source://thor//lib/thor.rb#641 def subtask_help(cmd); end end end @@ -2629,7 +2643,7 @@ class Thor::Group # Shortcut to invoke with padding and block handling. Use internally by # invoke and invoke_from_option class methods. # - # source://thor//lib/thor/group.rb#265 + # source://thor//lib/thor/group.rb#276 def _invoke_for_class_method(klass, command = T.unsafe(nil), *args, &block); end class << self @@ -2639,6 +2653,19 @@ class Thor::Group # source://thor//lib/thor/group.rb#161 def class_options_help(shell, groups = T.unsafe(nil)); end + # Checks if a specified command exists. + # + # ==== Parameters + # command_name:: The name of the command to check for existence. + # + # ==== Returns + # Boolean:: +true+ if the command exists, +false+ otherwise. + # + # @return [Boolean] + # + # source://thor//lib/thor/group.rb#221 + def command_exists?(command_name); end + # The description for this Thor::Group. If none is provided, but a source root # exists, tries to find the USAGE one folder above it, otherwise searches # in the superclass. @@ -2746,33 +2773,33 @@ class Thor::Group # The banner for this class. You can customize it if you are invoking the # thor class by another ways which is not the Thor::Runner. # - # source://thor//lib/thor/group.rb#238 + # source://thor//lib/thor/group.rb#249 def banner; end - # source://thor//lib/thor/group.rb#248 + # source://thor//lib/thor/group.rb#259 def baseclass; end - # source://thor//lib/thor/group.rb#252 + # source://thor//lib/thor/group.rb#263 def create_command(meth); end - # source://thor//lib/thor/group.rb#252 + # source://thor//lib/thor/group.rb#263 def create_task(meth); end # The method responsible for dispatching given the args. # # @yield [instance] # - # source://thor//lib/thor/group.rb#217 + # source://thor//lib/thor/group.rb#228 def dispatch(command, given_args, given_opts, config); end # Represents the whole class as a command. # - # source://thor//lib/thor/group.rb#243 + # source://thor//lib/thor/group.rb#254 def self_command; end # Represents the whole class as a command. # - # source://thor//lib/thor/group.rb#243 + # source://thor//lib/thor/group.rb#254 def self_task; end end end diff --git a/sorbet/rbi/gems/timecop@0.9.8.rbi b/sorbet/rbi/gems/timecop@0.9.10.rbi similarity index 66% rename from sorbet/rbi/gems/timecop@0.9.8.rbi rename to sorbet/rbi/gems/timecop@0.9.10.rbi index 4d34509e0..6422b4bd4 100644 --- a/sorbet/rbi/gems/timecop@0.9.8.rbi +++ b/sorbet/rbi/gems/timecop@0.9.10.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `timecop` gem. # Please instead update this file by running `bin/tapioca gem timecop`. + # source://timecop//lib/timecop/time_extensions.rb#31 class Date include ::Comparable @@ -44,7 +45,7 @@ class DateTime < ::Date # source://timecop//lib/timecop/time_extensions.rb#122 def mock_time; end - # source://timecop//lib/timecop/time_extensions.rb#156 + # source://timecop//lib/timecop/time_extensions.rb#165 def mocked_time_stack_item; end # source://timecop//lib/timecop/time_extensions.rb#126 @@ -61,6 +62,27 @@ class DateTime < ::Date end end +# source://timecop//lib/timecop/time_extensions.rb#172 +module Process + extend ::ActiveSupport::ForkTracker::ModernCoreExt + + class << self + # source://timecop//lib/timecop/time_extensions.rb#176 + def clock_gettime(clock_id, unit = T.unsafe(nil)); end + + # source://timecop//lib/timecop/time_extensions.rb#176 + def clock_gettime_mock_time(clock_id, unit = T.unsafe(nil)); end + + private + + # source://timecop//lib/timecop/time_extensions.rb#210 + def mock_time_monotonic; end + + # source://timecop//lib/timecop/time_extensions.rb#215 + def mock_time_realtime; end + end +end + # source://timecop//lib/timecop/time_extensions.rb#4 class Time include ::Comparable @@ -99,49 +121,49 @@ class Timecop # @return [Timecop] a new instance of Timecop # - # source://timecop//lib/timecop/timecop.rb#174 + # source://timecop//lib/timecop/timecop.rb#198 def initialize; end - # source://timecop//lib/timecop/timecop.rb#141 + # source://timecop//lib/timecop/timecop.rb#165 def baseline; end - # source://timecop//lib/timecop/timecop.rb#136 + # source://timecop//lib/timecop/timecop.rb#160 def baseline=(b); end - # source://timecop//lib/timecop/timecop.rb#209 + # source://timecop//lib/timecop/timecop.rb#233 def return(&block); end - # source://timecop//lib/timecop/timecop.rb#224 + # source://timecop//lib/timecop/timecop.rb#248 def return_to_baseline; end - # source://timecop//lib/timecop/timecop.rb#149 + # source://timecop//lib/timecop/timecop.rb#173 def set_baseline(b); end - # source://timecop//lib/timecop/timecop.rb#166 + # source://timecop//lib/timecop/timecop.rb#190 def set_stack(s); end - # source://timecop//lib/timecop/timecop.rb#157 + # source://timecop//lib/timecop/timecop.rb#181 def stack; end - # source://timecop//lib/timecop/timecop.rb#185 + # source://timecop//lib/timecop/timecop.rb#209 def thread_safe; end - # source://timecop//lib/timecop/timecop.rb#180 + # source://timecop//lib/timecop/timecop.rb#204 def thread_safe=(t); end # @raise [SafeModeException] # - # source://timecop//lib/timecop/timecop.rb#189 + # source://timecop//lib/timecop/timecop.rb#213 def travel(mock_type, *args, &block); end - # source://timecop//lib/timecop/timecop.rb#219 + # source://timecop//lib/timecop/timecop.rb#243 def unmock!; end class << self - # source://timecop//lib/timecop/timecop.rb#78 + # source://timecop//lib/timecop/timecop.rb#84 def baseline; end - # source://timecop//lib/timecop/timecop.rb#82 + # source://timecop//lib/timecop/timecop.rb#88 def baseline=(baseline); end # Allows you to run a block of code and "fake" a time throughout the execution of that block. @@ -167,6 +189,12 @@ class Timecop # previous values after the block has finished executing. This allows us to nest multiple # calls to Timecop.travel and have each block maintain it's concept of "now." # + # The Process.clock_gettime call mocks both CLOCK::MONOTIC and CLOCK::REALTIME + # + # CLOCK::MONOTONIC works slightly differently than other clocks. This clock cannot move to a + # particular date/time. So the only option that changes this clock is #4 which will move the + # clock the requested offset. Otherwise the clock is frozen to the current tick. + # # * Note: Timecop.freeze will actually freeze time. This can cause unanticipated problems if # benchmark or other timing calls are executed, which implicitly expect Time to actually move # forward. @@ -178,32 +206,40 @@ class Timecop # # Returns the value of the block if one is given, or the mocked time. # - # source://timecop//lib/timecop/timecop.rb#51 + # source://timecop//lib/timecop/timecop.rb#57 def freeze(*args, &block); end # Returns whether or not Timecop is currently frozen # # @return [Boolean] # - # source://timecop//lib/timecop/timecop.rb#125 + # source://timecop//lib/timecop/timecop.rb#131 def frozen?; end + # source://timecop//lib/timecop/timecop.rb#145 + def mock_process_clock=(mock); end + + # @return [Boolean] + # + # source://timecop//lib/timecop/timecop.rb#149 + def mock_process_clock?; end + # Reverts back to system's Time.now, Date.today and DateTime.now (if it exists) permamently when # no block argument is given, or temporarily reverts back to the system's time temporarily for # the given block. # - # source://timecop//lib/timecop/timecop.rb#89 + # source://timecop//lib/timecop/timecop.rb#95 def return(&block); end - # source://timecop//lib/timecop/timecop.rb#99 + # source://timecop//lib/timecop/timecop.rb#105 def return_to_baseline; end - # source://timecop//lib/timecop/timecop.rb#108 + # source://timecop//lib/timecop/timecop.rb#114 def safe_mode=(safe); end # @return [Boolean] # - # source://timecop//lib/timecop/timecop.rb#112 + # source://timecop//lib/timecop/timecop.rb#118 def safe_mode?; end # Allows you to run a block of code and "scale" a time throughout the execution of that block. @@ -215,16 +251,23 @@ class Timecop # # Returns the value of the block if one is given, or the mocked time. # - # source://timecop//lib/timecop/timecop.rb#74 + # source://timecop//lib/timecop/timecop.rb#80 def scale(*args, &block); end - # source://timecop//lib/timecop/timecop.rb#120 + # Returns whether or not Timecop is currently scaled + # + # @return [Boolean] + # + # source://timecop//lib/timecop/timecop.rb#141 + def scaled?; end + + # source://timecop//lib/timecop/timecop.rb#126 def thread_safe; end - # source://timecop//lib/timecop/timecop.rb#116 + # source://timecop//lib/timecop/timecop.rb#122 def thread_safe=(t); end - # source://timecop//lib/timecop/timecop.rb#104 + # source://timecop//lib/timecop/timecop.rb#110 def top_stack_item; end # Allows you to run a block of code and "fake" a time throughout the execution of that block. @@ -235,14 +278,21 @@ class Timecop # # Returns the value of the block if one is given, or the mocked time. # - # source://timecop//lib/timecop/timecop.rb#62 + # source://timecop//lib/timecop/timecop.rb#68 def travel(*args, &block); end + # Returns whether or not Timecop is currently travelled + # + # @return [Boolean] + # + # source://timecop//lib/timecop/timecop.rb#136 + def travelled?; end + # Reverts back to system's Time.now, Date.today and DateTime.now (if it exists) permamently when # no block argument is given, or temporarily reverts back to the system's time temporarily for # the given block. # - # source://timecop//lib/timecop/timecop.rb#89 + # source://timecop//lib/timecop/timecop.rb#95 def unfreeze(&block); end private @@ -254,16 +304,16 @@ class Timecop def new(*_arg0); end - # source://timecop//lib/timecop/timecop.rb#130 + # source://timecop//lib/timecop/timecop.rb#154 def send_travel(mock_type, *args, &block); end end end -# source://timecop//lib/timecop/timecop.rb#232 +# source://timecop//lib/timecop/timecop.rb#256 class Timecop::SafeModeException < ::StandardError # @return [SafeModeException] a new instance of SafeModeException # - # source://timecop//lib/timecop/timecop.rb#233 + # source://timecop//lib/timecop/timecop.rb#257 def initialize; end end @@ -277,69 +327,81 @@ class Timecop::TimeStackItem # source://timecop//lib/timecop/time_stack_item.rb#7 def initialize(mock_type, *args); end - # source://timecop//lib/timecop/time_stack_item.rb#77 + # source://timecop//lib/timecop/time_stack_item.rb#69 + def current_monotonic; end + + # source://timecop//lib/timecop/time_stack_item.rb#73 + def current_monotonic_with_mock; end + + # source://timecop//lib/timecop/time_stack_item.rb#98 def date(date_klass = T.unsafe(nil)); end - # source://timecop//lib/timecop/time_stack_item.rb#81 + # source://timecop//lib/timecop/time_stack_item.rb#102 def datetime(datetime_klass = T.unsafe(nil)); end - # source://timecop//lib/timecop/time_stack_item.rb#25 + # source://timecop//lib/timecop/time_stack_item.rb#26 def day; end - # source://timecop//lib/timecop/time_stack_item.rb#29 + # source://timecop//lib/timecop/time_stack_item.rb#30 def hour; end - # source://timecop//lib/timecop/time_stack_item.rb#33 + # source://timecop//lib/timecop/time_stack_item.rb#34 def min; end # source://timecop//lib/timecop/time_stack_item.rb#5 def mock_type; end - # source://timecop//lib/timecop/time_stack_item.rb#21 + # source://timecop//lib/timecop/time_stack_item.rb#59 + def monotonic; end + + # source://timecop//lib/timecop/time_stack_item.rb#22 def month; end - # source://timecop//lib/timecop/time_stack_item.rb#73 + # source://timecop//lib/timecop/time_stack_item.rb#94 def scaled_time; end - # source://timecop//lib/timecop/time_stack_item.rb#53 + # source://timecop//lib/timecop/time_stack_item.rb#54 def scaling_factor; end - # source://timecop//lib/timecop/time_stack_item.rb#37 + # source://timecop//lib/timecop/time_stack_item.rb#38 def sec; end - # source://timecop//lib/timecop/time_stack_item.rb#57 + # source://timecop//lib/timecop/time_stack_item.rb#78 def time(time_klass = T.unsafe(nil)); end - # source://timecop//lib/timecop/time_stack_item.rb#45 + # source://timecop//lib/timecop/time_stack_item.rb#46 def travel_offset; end - # source://timecop//lib/timecop/time_stack_item.rb#49 + # source://timecop//lib/timecop/time_stack_item.rb#50 def travel_offset_days; end - # source://timecop//lib/timecop/time_stack_item.rb#41 + # source://timecop//lib/timecop/time_stack_item.rb#42 def utc_offset; end - # source://timecop//lib/timecop/time_stack_item.rb#17 + # source://timecop//lib/timecop/time_stack_item.rb#18 def year; end private - # source://timecop//lib/timecop/time_stack_item.rb#128 + # source://timecop//lib/timecop/time_stack_item.rb#159 def compute_travel_offset; end - # source://timecop//lib/timecop/time_stack_item.rb#100 + # source://timecop//lib/timecop/time_stack_item.rb#121 + def parse_monotonic_time(*args); end + + # source://timecop//lib/timecop/time_stack_item.rb#131 def parse_time(*args); end - # source://timecop//lib/timecop/time_stack_item.rb#92 + # source://timecop//lib/timecop/time_stack_item.rb#113 def rational_to_utc_offset(rational); end - # source://timecop//lib/timecop/time_stack_item.rb#136 + # source://timecop//lib/timecop/time_stack_item.rb#167 def time_klass; end - # source://timecop//lib/timecop/time_stack_item.rb#132 + # source://timecop//lib/timecop/time_stack_item.rb#163 def times_are_equal_within_epsilon(t1, t2, epsilon_in_seconds); end - # source://timecop//lib/timecop/time_stack_item.rb#96 + # source://timecop//lib/timecop/time_stack_item.rb#117 def utc_offset_to_rational(utc_offset); end end diff --git a/sorbet/rbi/gems/timers@4.3.5.rbi b/sorbet/rbi/gems/timers@4.3.5.rbi deleted file mode 100644 index 2b0074b64..000000000 --- a/sorbet/rbi/gems/timers@4.3.5.rbi +++ /dev/null @@ -1,403 +0,0 @@ -# typed: true - -# DO NOT EDIT MANUALLY -# This is an autogenerated file for types exported from the `timers` gem. -# Please instead update this file by running `bin/tapioca gem timers`. - -# source://timers//lib/timers/version.rb#8 -module Timers; end - -# Maintains a PriorityHeap of events ordered on time, which can be cancelled. -# -# source://timers//lib/timers/events.rb#16 -class Timers::Events - # @return [Events] a new instance of Events - # - # source://timers//lib/timers/events.rb#51 - def initialize; end - - # Fire all handles for which Handle#time is less than the given time. - # - # source://timers//lib/timers/events.rb#85 - def fire(time); end - - # Returns the first non-cancelled handle. - # - # source://timers//lib/timers/events.rb#70 - def first; end - - # Add an event at the given time. - # - # source://timers//lib/timers/events.rb#59 - def schedule(time, callback); end - - # Returns the number of pending (possibly cancelled) events. - # - # source://timers//lib/timers/events.rb#80 - def size; end - - private - - # source://timers//lib/timers/events.rb#105 - def flush!; end - - # Move all non-cancelled timers from the pending queue to the priority heap - # - # source://timers//lib/timers/events.rb#97 - def merge!; end -end - -# Represents a cancellable handle for a specific timer event. -# -# source://timers//lib/timers/events.rb#18 -class Timers::Events::Handle - include ::Comparable - - # @return [Handle] a new instance of Handle - # - # source://timers//lib/timers/events.rb#21 - def initialize(time, callback); end - - # source://timers//lib/timers/events.rb#41 - def <=>(other); end - - # Cancel this timer, O(1). - # - # source://timers//lib/timers/events.rb#30 - def cancel!; end - - # Has this timer been cancelled? Cancelled timer's don't fire. - # - # @return [Boolean] - # - # source://timers//lib/timers/events.rb#37 - def cancelled?; end - - # Fire the callback if not cancelled with the given time parameter. - # - # source://timers//lib/timers/events.rb#46 - def fire(time); end - - # The absolute time that the handle should be fired at. - # - # source://timers//lib/timers/events.rb#27 - def time; end -end - -# A collection of timers which may fire at different times -# -# source://timers//lib/timers/group.rb#18 -class Timers::Group - include ::Enumerable - extend ::Forwardable - - # @return [Group] a new instance of Group - # - # source://timers//lib/timers/group.rb#24 - def initialize; end - - # Call the given block after the given interval. The first argument will be - # the time at which the group was asked to fire timers for. - # - # source://timers//lib/timers/group.rb#45 - def after(interval, &block); end - - # Cancel all timers. - # - # source://timers//lib/timers/group.rb#124 - def cancel; end - - # Resume all timers. - # - # source://timers//lib/timers/group.rb#110 - def continue; end - - # The group's current time. - # - # source://timers//lib/timers/group.rb#129 - def current_offset; end - - # Delay all timers. - # - # source://timers//lib/timers/group.rb#117 - def delay(seconds); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def each(*args, **_arg1, &block); end - - # source://forwardable/1.3.3/forwardable.rb#231 - def empty?(*args, **_arg1, &block); end - - # Scheduled events: - # - # source://timers//lib/timers/group.rb#35 - def events; end - - # Call the given block periodically at the given interval. The first - # argument will be the time at which the group was asked to fire timers for. - # - # source://timers//lib/timers/group.rb#58 - def every(interval, recur = T.unsafe(nil), &block); end - - # Fire all timers that are ready. - # - # source://timers//lib/timers/group.rb#100 - def fire(offset = T.unsafe(nil)); end - - # Call the given block immediately, and then after the given interval. The first - # argument will be the time at which the group was asked to fire timers for. - # - # source://timers//lib/timers/group.rb#51 - def now_and_after(interval, &block); end - - # Call the given block immediately, and then periodically at the given interval. The first - # argument will be the time at which the group was asked to fire timers for. - # - # source://timers//lib/timers/group.rb#64 - def now_and_every(interval, recur = T.unsafe(nil), &block); end - - # Pause all timers. - # - # source://timers//lib/timers/group.rb#105 - def pause; end - - # Paused timers: - # - # source://timers//lib/timers/group.rb#41 - def paused_timers; end - - # Resume all timers. - # - # source://timers//lib/timers/group.rb#110 - def resume; end - - # Active timers: - # - # source://timers//lib/timers/group.rb#38 - def timers; end - - # Wait for the next timer and fire it. Can take a block, which should behave - # like sleep(n), except that n may be nil (sleep forever) or a negative - # number (fire immediately after return). - # - # source://timers//lib/timers/group.rb#72 - def wait; end - - # Interval to wait until when the next timer will fire. - # - nil: no timers - # - -ve: timers expired already - # - 0: timers ready to fire - # - +ve: timers waiting to fire - # - # source://timers//lib/timers/group.rb#94 - def wait_interval(offset = T.unsafe(nil)); end -end - -# A collection of timers which may fire at different times -# -# source://timers//lib/timers/interval.rb#8 -class Timers::Interval - # Get the current elapsed monotonic time. - # - # @return [Interval] a new instance of Interval - # - # source://timers//lib/timers/interval.rb#10 - def initialize; end - - # source://timers//lib/timers/interval.rb#15 - def start; end - - # source://timers//lib/timers/interval.rb#21 - def stop; end - - # source://timers//lib/timers/interval.rb#29 - def to_f; end - - protected - - # source://timers//lib/timers/interval.rb#33 - def duration; end - - # source://timers//lib/timers/interval.rb#37 - def now; end -end - -# A priority queue implementation using a standard binary minheap. It uses straight comparison -# of its contents to determine priority. This works because a Handle from Timers::Events implements -# the '<' operation by comparing the expiry time. -# See for explanations of the main methods. -# -# source://timers//lib/timers/priority_heap.rb#12 -class Timers::PriorityHeap - # @return [PriorityHeap] a new instance of PriorityHeap - # - # source://timers//lib/timers/priority_heap.rb#13 - def initialize; end - - # Empties out the heap, discarding all elements - # - # source://timers//lib/timers/priority_heap.rb#74 - def clear!; end - - # Returns the earliest timer or nil if the heap is empty. - # - # source://timers//lib/timers/priority_heap.rb#21 - def peek; end - - # Returns the earliest timer if the heap is non-empty and removes it from the heap. - # Returns nil if the heap is empty. (and doesn't change the heap in that case) - # - # source://timers//lib/timers/priority_heap.rb#32 - def pop; end - - # Inserts a new timer into the heap, then rearranges elements until the heap invariant is true again. - # - # source://timers//lib/timers/priority_heap.rb#61 - def push(element); end - - # Returns the number of elements in the heap - # - # source://timers//lib/timers/priority_heap.rb#26 - def size; end - - # Validate the heap invariant. Every element except the root must not be smaller than - # its parent element. Note that it MAY be equal. - # - # @return [Boolean] - # - # source://timers//lib/timers/priority_heap.rb#80 - def valid?; end - - private - - # source://timers//lib/timers/priority_heap.rb#107 - def bubble_down(index); end - - # source://timers//lib/timers/priority_heap.rb#91 - def bubble_up(index); end - - # source://timers//lib/timers/priority_heap.rb#87 - def swap(i, j); end -end - -# An individual timer set to fire a given proc at a given time. A timer is -# always connected to a Timer::Group but it would ONLY be in @group.timers -# if it also has a @handle specified. Otherwise it is either PAUSED or has -# been FIRED and is not recurring. You can manually enter this state by -# calling #cancel and resume normal operation by calling #reset. -# -# source://timers//lib/timers/timer.rb#16 -class Timers::Timer - include ::Comparable - - # @return [Timer] a new instance of Timer - # - # source://timers//lib/timers/timer.rb#20 - def initialize(group, interval, recurring = T.unsafe(nil), offset = T.unsafe(nil), &block); end - - # Fire the block. - # - # source://timers//lib/timers/timer.rb#96 - def call(offset = T.unsafe(nil)); end - - # Cancel this timer. Do not call while paused. - # - # source://timers//lib/timers/timer.rb#69 - def cancel; end - - # source://timers//lib/timers/timer.rb#48 - def continue; end - - # Extend this timer - # - # source://timers//lib/timers/timer.rb#60 - def delay(seconds); end - - # Fire the block. - # - # source://timers//lib/timers/timer.rb#96 - def fire(offset = T.unsafe(nil)); end - - # Number of seconds until next fire / since last fire - # - # source://timers//lib/timers/timer.rb#114 - def fires_in; end - - # Inspect a timer - # - # source://timers//lib/timers/timer.rb#119 - def inspect; end - - # Returns the value of attribute interval. - # - # source://timers//lib/timers/timer.rb#18 - def interval; end - - # Returns the value of attribute offset. - # - # source://timers//lib/timers/timer.rb#18 - def offset; end - - # source://timers//lib/timers/timer.rb#38 - def pause; end - - # @return [Boolean] - # - # source://timers//lib/timers/timer.rb#34 - def paused?; end - - # Returns the value of attribute recurring. - # - # source://timers//lib/timers/timer.rb#18 - def recurring; end - - # Reset this timer. Do not call while paused. - # - # @param offset [Numeric] the duration to add to the timer. - # - # source://timers//lib/timers/timer.rb#81 - def reset(offset = T.unsafe(nil)); end - - # source://timers//lib/timers/timer.rb#48 - def resume; end -end - -# source://timers//lib/timers/version.rb#9 -Timers::VERSION = T.let(T.unsafe(nil), String) - -# An exclusive, monotonic timeout class. -# -# source://timers//lib/timers/wait.rb#13 -class Timers::Wait - # @return [Wait] a new instance of Wait - # - # source://timers//lib/timers/wait.rb#26 - def initialize(duration); end - - # Returns the value of attribute duration. - # - # source://timers//lib/timers/wait.rb#31 - def duration; end - - # Returns the value of attribute remaining. - # - # source://timers//lib/timers/wait.rb#32 - def remaining; end - - # Yields while time remains for work to be done: - # - # source://timers//lib/timers/wait.rb#35 - def while_time_remaining; end - - private - - # @return [Boolean] - # - # source://timers//lib/timers/wait.rb#47 - def time_remaining?; end - - class << self - # source://timers//lib/timers/wait.rb#14 - def for(duration, &block); end - end -end diff --git a/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi similarity index 99% rename from sorbet/rbi/gems/unicode-display_width@2.5.0.rbi rename to sorbet/rbi/gems/unicode-display_width@2.6.0.rbi index ccdfd066d..2aaad2329 100644 --- a/sorbet/rbi/gems/unicode-display_width@2.5.0.rbi +++ b/sorbet/rbi/gems/unicode-display_width@2.6.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `unicode-display_width` gem. # Please instead update this file by running `bin/tapioca gem unicode-display_width`. + # source://unicode-display_width//lib/unicode/display_width/constants.rb#3 module Unicode; end diff --git a/sorbet/rbi/gems/uri@0.13.0.rbi b/sorbet/rbi/gems/uri@0.13.0.rbi new file mode 100644 index 000000000..0816f0b4c --- /dev/null +++ b/sorbet/rbi/gems/uri@0.13.0.rbi @@ -0,0 +1,2429 @@ +# typed: true + +# DO NOT EDIT MANUALLY +# This is an autogenerated file for types exported from the `uri` gem. +# Please instead update this file by running `bin/tapioca gem uri`. + + +# module URI +# +# source://uri//lib/uri/common.rb#829 +module Kernel + private + + # Returns a \URI object derived from the given +uri+, + # which may be a \URI string or an existing \URI object: + # + # # Returns a new URI. + # uri = URI('http://github.com/ruby/ruby') + # # => # + # # Returns the given URI. + # URI(uri) + # # => # + # + # source://uri//lib/uri/common.rb#842 + def URI(uri); end + + class << self + # Returns a \URI object derived from the given +uri+, + # which may be a \URI string or an existing \URI object: + # + # # Returns a new URI. + # uri = URI('http://github.com/ruby/ruby') + # # => # + # # Returns the given URI. + # URI(uri) + # # => # + # + # source://uri//lib/uri/common.rb#842 + def URI(uri); end + end +end + +# source://uri//lib/uri.rb#90 +module URI + include ::URI::RFC2396_REGEXP + + class << self + # Like URI.decode_www_form_component, except that '+' is preserved. + # + # source://uri//lib/uri/common.rb#379 + def decode_uri_component(str, enc = T.unsafe(nil)); end + + # Returns name/value pairs derived from the given string +str+, + # which must be an ASCII string. + # + # The method may be used to decode the body of Net::HTTPResponse object +res+ + # for which res['Content-Type'] is 'application/x-www-form-urlencoded'. + # + # The returned data is an array of 2-element subarrays; + # each subarray is a name/value pair (both are strings). + # Each returned string has encoding +enc+, + # and has had invalid characters removed via + # {String#scrub}[https://docs.ruby-lang.org/en/master/String.html#method-i-scrub]. + # + # A simple example: + # + # URI.decode_www_form('foo=0&bar=1&baz') + # # => [["foo", "0"], ["bar", "1"], ["baz", ""]] + # + # The returned strings have certain conversions, + # similar to those performed in URI.decode_www_form_component: + # + # URI.decode_www_form('f%23o=%2F&b-r=%24&b+z=%40') + # # => [["f#o", "/"], ["b-r", "$"], ["b z", "@"]] + # + # The given string may contain consecutive separators: + # + # URI.decode_www_form('foo=0&&bar=1&&baz=2') + # # => [["foo", "0"], ["", ""], ["bar", "1"], ["", ""], ["baz", "2"]] + # + # A different separator may be specified: + # + # URI.decode_www_form('foo=0--bar=1--baz', separator: '--') + # # => [["foo", "0"], ["bar", "1"], ["baz", ""]] + # + # @raise [ArgumentError] + # + # source://uri//lib/uri/common.rb#554 + def decode_www_form(str, enc = T.unsafe(nil), separator: T.unsafe(nil), use__charset_: T.unsafe(nil), isindex: T.unsafe(nil)); end + + # Returns a string decoded from the given \URL-encoded string +str+. + # + # The given string is first encoded as Encoding::ASCII-8BIT (using String#b), + # then decoded (as below), and finally force-encoded to the given encoding +enc+. + # + # The returned string: + # + # - Preserves: + # + # - Characters '*', '.', '-', and '_'. + # - Character in ranges 'a'..'z', 'A'..'Z', + # and '0'..'9'. + # + # Example: + # + # URI.decode_www_form_component('*.-_azAZ09') + # # => "*.-_azAZ09" + # + # - Converts: + # + # - Character '+' to character ' '. + # - Each "percent notation" to an ASCII character. + # + # Example: + # + # URI.decode_www_form_component('Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A') + # # => "Here are some punctuation characters: ,;?:" + # + # Related: URI.decode_uri_component (preserves '+'). + # + # source://uri//lib/uri/common.rb#368 + def decode_www_form_component(str, enc = T.unsafe(nil)); end + + # Like URI.encode_www_form_component, except that ' ' (space) + # is encoded as '%20' (instead of '+'). + # + # source://uri//lib/uri/common.rb#374 + def encode_uri_component(str, enc = T.unsafe(nil)); end + + # Returns a URL-encoded string derived from the given + # {Enumerable}[https://docs.ruby-lang.org/en/master/Enumerable.html#module-Enumerable-label-Enumerable+in+Ruby+Classes] + # +enum+. + # + # The result is suitable for use as form data + # for an \HTTP request whose Content-Type is + # 'application/x-www-form-urlencoded'. + # + # The returned string consists of the elements of +enum+, + # each converted to one or more URL-encoded strings, + # and all joined with character '&'. + # + # Simple examples: + # + # URI.encode_www_form([['foo', 0], ['bar', 1], ['baz', 2]]) + # # => "foo=0&bar=1&baz=2" + # URI.encode_www_form({foo: 0, bar: 1, baz: 2}) + # # => "foo=0&bar=1&baz=2" + # + # The returned string is formed using method URI.encode_www_form_component, + # which converts certain characters: + # + # URI.encode_www_form('f#o': '/', 'b-r': '$', 'b z': '@') + # # => "f%23o=%2F&b-r=%24&b+z=%40" + # + # When +enum+ is Array-like, each element +ele+ is converted to a field: + # + # - If +ele+ is an array of two or more elements, + # the field is formed from its first two elements + # (and any additional elements are ignored): + # + # name = URI.encode_www_form_component(ele[0], enc) + # value = URI.encode_www_form_component(ele[1], enc) + # "#{name}=#{value}" + # + # Examples: + # + # URI.encode_www_form([%w[foo bar], %w[baz bat bah]]) + # # => "foo=bar&baz=bat" + # URI.encode_www_form([['foo', 0], ['bar', :baz, 'bat']]) + # # => "foo=0&bar=baz" + # + # - If +ele+ is an array of one element, + # the field is formed from ele[0]: + # + # URI.encode_www_form_component(ele[0]) + # + # Example: + # + # URI.encode_www_form([['foo'], [:bar], [0]]) + # # => "foo&bar&0" + # + # - Otherwise the field is formed from +ele+: + # + # URI.encode_www_form_component(ele) + # + # Example: + # + # URI.encode_www_form(['foo', :bar, 0]) + # # => "foo&bar&0" + # + # The elements of an Array-like +enum+ may be mixture: + # + # URI.encode_www_form([['foo', 0], ['bar', 1, 2], ['baz'], :bat]) + # # => "foo=0&bar=1&baz&bat" + # + # When +enum+ is Hash-like, + # each +key+/+value+ pair is converted to one or more fields: + # + # - If +value+ is + # {Array-convertible}[https://docs.ruby-lang.org/en/master/implicit_conversion_rdoc.html#label-Array-Convertible+Objects], + # each element +ele+ in +value+ is paired with +key+ to form a field: + # + # name = URI.encode_www_form_component(key, enc) + # value = URI.encode_www_form_component(ele, enc) + # "#{name}=#{value}" + # + # Example: + # + # URI.encode_www_form({foo: [:bar, 1], baz: [:bat, :bam, 2]}) + # # => "foo=bar&foo=1&baz=bat&baz=bam&baz=2" + # + # - Otherwise, +key+ and +value+ are paired to form a field: + # + # name = URI.encode_www_form_component(key, enc) + # value = URI.encode_www_form_component(value, enc) + # "#{name}=#{value}" + # + # Example: + # + # URI.encode_www_form({foo: 0, bar: 1, baz: 2}) + # # => "foo=0&bar=1&baz=2" + # + # The elements of a Hash-like +enum+ may be mixture: + # + # URI.encode_www_form({foo: [0, 1], bar: 2}) + # # => "foo=0&foo=1&bar=2" + # + # source://uri//lib/uri/common.rb#501 + def encode_www_form(enum, enc = T.unsafe(nil)); end + + # Returns a URL-encoded string derived from the given string +str+. + # + # The returned string: + # + # - Preserves: + # + # - Characters '*', '.', '-', and '_'. + # - Character in ranges 'a'..'z', 'A'..'Z', + # and '0'..'9'. + # + # Example: + # + # URI.encode_www_form_component('*.-_azAZ09') + # # => "*.-_azAZ09" + # + # - Converts: + # + # - Character ' ' to character '+'. + # - Any other character to "percent notation"; + # the percent notation for character c is '%%%X' % c.ord. + # + # Example: + # + # URI.encode_www_form_component('Here are some punctuation characters: ,;?:') + # # => "Here+are+some+punctuation+characters%3A+%2C%3B%3F%3A" + # + # Encoding: + # + # - If +str+ has encoding Encoding::ASCII_8BIT, argument +enc+ is ignored. + # - Otherwise +str+ is converted first to Encoding::UTF_8 + # (with suitable character replacements), + # and then to encoding +enc+. + # + # In either case, the returned string has forced encoding Encoding::US_ASCII. + # + # Related: URI.encode_uri_component (encodes ' ' as '%20'). + # + # source://uri//lib/uri/common.rb#335 + def encode_www_form_component(str, enc = T.unsafe(nil)); end + + # == Synopsis + # + # URI::extract(str[, schemes][,&blk]) + # + # == Args + # + # +str+:: + # String to extract URIs from. + # +schemes+:: + # Limit URI matching to specific schemes. + # + # == Description + # + # Extracts URIs from a string. If block given, iterates through all matched URIs. + # Returns nil if block given or array with matches. + # + # == Usage + # + # require "uri" + # + # URI.extract("text here http://foo.example.org/bla and here mailto:test@example.com and here also.") + # # => ["http://foo.example.com/bla", "mailto:test@example.com"] + # + # source://uri//lib/uri/common.rb#239 + def extract(str, schemes = T.unsafe(nil), &block); end + + # Returns a new object constructed from the given +scheme+, +arguments+, + # and +default+: + # + # - The new object is an instance of URI.scheme_list[scheme.upcase]. + # - The object is initialized by calling the class initializer + # using +scheme+ and +arguments+. + # See URI::Generic.new. + # + # Examples: + # + # values = ['john.doe', 'www.example.com', '123', nil, '/forum/questions/', nil, 'tag=networking&order=newest', 'top'] + # URI.for('https', *values) + # # => # + # URI.for('foo', *values, default: URI::HTTP) + # # => # + # + # source://uri//lib/uri/common.rb#123 + def for(scheme, *arguments, default: T.unsafe(nil)); end + + # return encoding or nil + # http://encoding.spec.whatwg.org/#concept-encoding-get + # + # source://uri//lib/uri/common.rb#824 + def get_encoding(label); end + + # Merges the given URI strings +str+ + # per {RFC 2396}[https://www.rfc-editor.org/rfc/rfc2396.html]. + # + # Each string in +str+ is converted to an + # {RFC3986 URI}[https://www.rfc-editor.org/rfc/rfc3986.html] before being merged. + # + # Examples: + # + # URI.join("http://example.com/","main.rbx") + # # => # + # + # URI.join('http://example.com', 'foo') + # # => # + # + # URI.join('http://example.com', '/foo', '/bar') + # # => # + # + # URI.join('http://example.com', '/foo', 'bar') + # # => # + # + # URI.join('http://example.com', '/foo/', 'bar') + # # => # + # + # source://uri//lib/uri/common.rb#211 + def join(*str); end + + # Returns a new \URI object constructed from the given string +uri+: + # + # URI.parse('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # # => # + # URI.parse('http://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # # => # + # + # It's recommended to first ::escape string +uri+ + # if it may contain invalid URI characters. + # + # source://uri//lib/uri/common.rb#184 + def parse(uri); end + + # == Synopsis + # + # URI::regexp([match_schemes]) + # + # == Args + # + # +match_schemes+:: + # Array of schemes. If given, resulting regexp matches to URIs + # whose scheme is one of the match_schemes. + # + # == Description + # + # Returns a Regexp object which matches to URI-like strings. + # The Regexp object returned by this method includes arbitrary + # number of capture group (parentheses). Never rely on its number. + # + # == Usage + # + # require 'uri' + # + # # extract first URI from html_string + # html_string.slice(URI.regexp) + # + # # remove ftp URIs + # html_string.sub(URI.regexp(['ftp']), '') + # + # # You should not rely on the number of parentheses + # html_string.scan(URI.regexp) do |*matches| + # p $& + # end + # + # source://uri//lib/uri/common.rb#276 + def regexp(schemes = T.unsafe(nil)); end + + # Registers the given +klass+ as the class to be instantiated + # when parsing a \URI with the given +scheme+: + # + # URI.register_scheme('MS_SEARCH', URI::Generic) # => URI::Generic + # URI.scheme_list['MS_SEARCH'] # => URI::Generic + # + # Note that after calling String#upcase on +scheme+, it must be a valid + # constant name. + # + # source://uri//lib/uri/common.rb#79 + def register_scheme(scheme, klass); end + + # Returns a hash of the defined schemes: + # + # URI.scheme_list + # # => + # {"MAILTO"=>URI::MailTo, + # "LDAPS"=>URI::LDAPS, + # "WS"=>URI::WS, + # "HTTP"=>URI::HTTP, + # "HTTPS"=>URI::HTTPS, + # "LDAP"=>URI::LDAP, + # "FILE"=>URI::File, + # "FTP"=>URI::FTP} + # + # Related: URI.register_scheme. + # + # source://uri//lib/uri/common.rb#97 + def scheme_list; end + + # Returns a 9-element array representing the parts of the \URI + # formed from the string +uri+; + # each array element is a string or +nil+: + # + # names = %w[scheme userinfo host port registry path opaque query fragment] + # values = URI.split('https://john.doe@www.example.com:123/forum/questions/?tag=networking&order=newest#top') + # names.zip(values) + # # => + # [["scheme", "https"], + # ["userinfo", "john.doe"], + # ["host", "www.example.com"], + # ["port", "123"], + # ["registry", nil], + # ["path", "/forum/questions/"], + # ["opaque", nil], + # ["query", "tag=networking&order=newest"], + # ["fragment", "top"]] + # + # source://uri//lib/uri/common.rb#170 + def split(uri); end + + private + + # @raise [ArgumentError] + # + # source://uri//lib/uri/common.rb#397 + def _decode_uri_component(regexp, str, enc); end + + # source://uri//lib/uri/common.rb#383 + def _encode_uri_component(regexp, table, str, enc); end + end +end + +# FTP URI syntax is defined by RFC1738 section 3.2. +# +# This class will be redesigned because of difference of implementations; +# the structure of its path. draft-hoffman-ftp-uri-04 is a draft but it +# is a good summary about the de facto spec. +# http://tools.ietf.org/html/draft-hoffman-ftp-uri-04 +# +# source://uri//lib/uri/ftp.rb#22 +class URI::FTP < ::URI::Generic + # == Description + # + # Creates a new URI::FTP object from generic URL components with no + # syntax checking. + # + # Unlike build(), this method does not escape the path component as + # required by RFC1738; instead it is treated as per RFC2396. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+, and +fragment+, in that order. + # + # @raise [InvalidURIError] + # @return [FTP] a new instance of FTP + # + # source://uri//lib/uri/ftp.rb#133 + def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end + + # source://uri//lib/uri/ftp.rb#214 + def merge(oth); end + + # Returns the path from an FTP URI. + # + # RFC 1738 specifically states that the path for an FTP URI does not + # include the / which separates the URI path from the URI host. Example: + # + # ftp://ftp.example.com/pub/ruby + # + # The above URI indicates that the client should connect to + # ftp.example.com then cd to pub/ruby from the initial login directory. + # + # If you want to cd to an absolute directory, you must include an + # escaped / (%2F) in the path. Example: + # + # ftp://ftp.example.com/%2Fpub/ruby + # + # This method will then return "/pub/ruby". + # + # source://uri//lib/uri/ftp.rb#240 + def path; end + + # Returns a String representation of the URI::FTP. + # + # source://uri//lib/uri/ftp.rb#251 + def to_s; end + + # typecode accessor. + # + # See URI::FTP::COMPONENT. + # + # source://uri//lib/uri/ftp.rb#161 + def typecode; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the typecode +v+ + # (with validation). + # + # See also URI::FTP.check_typecode. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("ftp://john@ftp.example.com/my_file.img") + # #=> # + # uri.typecode = "i" + # uri + # #=> # + # + # source://uri//lib/uri/ftp.rb#208 + def typecode=(typecode); end + + protected + + # Private setter for the path of the URI::FTP. + # + # source://uri//lib/uri/ftp.rb#245 + def set_path(v); end + + # Private setter for the typecode +v+. + # + # See also URI::FTP.typecode=. + # + # source://uri//lib/uri/ftp.rb#180 + def set_typecode(v); end + + private + + # Validates typecode +v+, + # returns +true+ or +false+. + # + # source://uri//lib/uri/ftp.rb#166 + def check_typecode(v); end + + class << self + # == Description + # + # Creates a new URI::FTP object from components, with syntax checking. + # + # The components accepted are +userinfo+, +host+, +port+, +path+, and + # +typecode+. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, typecode]. + # + # If the path supplied is absolute, it will be escaped in order to + # make it absolute in the URI. + # + # Examples: + # + # require 'uri' + # + # uri1 = URI::FTP.build(['user:password', 'ftp.example.com', nil, + # '/path/file.zip', 'i']) + # uri1.to_s # => "ftp://user:password@ftp.example.com/%2Fpath/file.zip;type=i" + # + # uri2 = URI::FTP.build({:host => 'ftp.example.com', + # :path => 'ruby/src'}) + # uri2.to_s # => "ftp://ftp.example.com/ruby/src" + # + # source://uri//lib/uri/ftp.rb#96 + def build(args); end + + # source://uri//lib/uri/ftp.rb#47 + def new2(user, password, host, port, path, typecode = T.unsafe(nil), arg_check = T.unsafe(nil)); end + end +end + +# The "file" URI is defined by RFC8089. +# +# source://uri//lib/uri/file.rb#10 +class URI::File < ::URI::Generic + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri//lib/uri/file.rb#82 + def check_password(user); end + + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri//lib/uri/file.rb#77 + def check_user(user); end + + # raise InvalidURIError + # + # @raise [URI::InvalidURIError] + # + # source://uri//lib/uri/file.rb#72 + def check_userinfo(user); end + + # Protected setter for the host component +v+. + # + # See also URI::Generic.host=. + # + # source://uri//lib/uri/file.rb#62 + def set_host(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#95 + def set_password(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#68 + def set_port(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#91 + def set_user(v); end + + # do nothing + # + # source://uri//lib/uri/file.rb#87 + def set_userinfo(v); end + + class << self + # == Description + # + # Creates a new URI::File object from components, with syntax checking. + # + # The components accepted are +host+ and +path+. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [host, path]. + # + # A path from e.g. the File class should be escaped before + # being passed. + # + # Examples: + # + # require 'uri' + # + # uri1 = URI::File.build(['host.example.com', '/path/file.zip']) + # uri1.to_s # => "file://host.example.com/path/file.zip" + # + # uri2 = URI::File.build({:host => 'host.example.com', + # :path => '/ruby/src'}) + # uri2.to_s # => "file://host.example.com/ruby/src" + # + # uri3 = URI::File.build({:path => URI::escape('/path/my file.txt')}) + # uri3.to_s # => "file:///path/my%20file.txt" + # + # source://uri//lib/uri/file.rb#53 + def build(args); end + end +end + +# An Array of the available components for URI::File. +# +# source://uri//lib/uri/file.rb#17 +URI::File::COMPONENT = T.let(T.unsafe(nil), Array) + +# A Default port of nil for URI::File. +# +# source://uri//lib/uri/file.rb#12 +URI::File::DEFAULT_PORT = T.let(T.unsafe(nil), T.untyped) + +class URI::GID < ::URI::Generic + # source://uri//lib/uri/generic.rb#243 + def app; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#107 + def deconstruct_keys(_keys); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#29 + def model_id; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#29 + def model_name; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#29 + def params; end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#102 + def to_s; end + + protected + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#118 + def query=(query); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#129 + def set_params(params); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#112 + def set_path(path); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#124 + def set_query(query); end + + private + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#136 + def check_host(host); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#141 + def check_path(path); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#146 + def check_scheme(scheme); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#195 + def parse_query_params(query); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#154 + def set_model_components(path, validate = T.unsafe(nil)); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#174 + def validate_component(component); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#188 + def validate_model_id(model_id_part); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#181 + def validate_model_id_section(model_id, model_name); end + + class << self + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#88 + def build(args); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#72 + def create(app, model, params = T.unsafe(nil)); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#64 + def parse(uri); end + + # source://globalid/1.2.1/lib/global_id/uri/gid.rb#48 + def validate_app(app); end + end +end + +# Base class for all URI classes. +# Implements generic URI syntax as per RFC 2396. +# +# source://uri//lib/uri/generic.rb#21 +class URI::Generic + include ::URI::RFC2396_REGEXP + include ::URI + + # == Args + # + # +scheme+:: + # Protocol scheme, i.e. 'http','ftp','mailto' and so on. + # +userinfo+:: + # User name and password, i.e. 'sdmitry:bla'. + # +host+:: + # Server host name. + # +port+:: + # Server port. + # +registry+:: + # Registry of naming authorities. + # +path+:: + # Path on server. + # +opaque+:: + # Opaque part. + # +query+:: + # Query data. + # +fragment+:: + # Part of the URI after '#' character. + # +parser+:: + # Parser for internal use [URI::DEFAULT_PARSER by default]. + # +arg_check+:: + # Check arguments [false by default]. + # + # == Description + # + # Creates a new URI::Generic instance from ``generic'' components without check. + # + # @return [Generic] a new instance of Generic + # + # source://uri//lib/uri/generic.rb#169 + def initialize(scheme, userinfo, host, port, registry, path, opaque, query, fragment, parser = T.unsafe(nil), arg_check = T.unsafe(nil)); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Merges two URIs. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge("/main.rbx?page=1") + # # => "http://my.example.com/main.rbx?page=1" + # merge + # + # source://uri//lib/uri/generic.rb#1109 + def +(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path from oth to self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # uri.route_from('http://my.example.com') + # #=> # + # + # source://uri//lib/uri/generic.rb#1262 + def -(oth); end + + # Compares two URIs. + # + # source://uri//lib/uri/generic.rb#1384 + def ==(oth); end + + # Returns true if URI has a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#972 + def absolute; end + + # Returns true if URI has a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#972 + def absolute?; end + + # == Args + # + # +v+:: + # URI or String + # + # == Description + # + # Attempts to parse other URI +oth+, + # returns [parsed_oth, self]. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.coerce("http://foo.com") + # #=> [#, #] + # + # source://uri//lib/uri/generic.rb#1474 + def coerce(oth); end + + # Components of the URI in the order. + # + # source://uri//lib/uri/generic.rb#313 + def component; end + + # Returns the password component after URI decoding. + # + # source://uri//lib/uri/generic.rb#583 + def decoded_password; end + + # Returns the user component after URI decoding. + # + # source://uri//lib/uri/generic.rb#578 + def decoded_user; end + + # Returns default port. + # + # source://uri//lib/uri/generic.rb#39 + def default_port; end + + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#1396 + def eql?(oth); end + + # Returns a proxy URI. + # The proxy URI is obtained from environment variables such as http_proxy, + # ftp_proxy, no_proxy, etc. + # If there is no proper proxy, nil is returned. + # + # If the optional parameter +env+ is specified, it is used instead of ENV. + # + # Note that capitalized variables (HTTP_PROXY, FTP_PROXY, NO_PROXY, etc.) + # are examined, too. + # + # But http_proxy and HTTP_PROXY is treated specially under CGI environment. + # It's because HTTP_PROXY may be set by Proxy: header. + # So HTTP_PROXY is not used. + # http_proxy is not used too if the variable is case insensitive. + # CGI_HTTP_PROXY can be used instead. + # + # @raise [BadURIError] + # + # source://uri//lib/uri/generic.rb#1500 + def find_proxy(env = T.unsafe(nil)); end + + # Returns the fragment component of the URI. + # + # URI("http://foo/bar/baz?search=FooBar#ponies").fragment #=> "ponies" + # + # source://uri//lib/uri/generic.rb#283 + def fragment; end + + # Checks the fragment +v+ component against the URI::Parser Regexp for :FRAGMENT. + # + # + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the fragment component +v+ + # (with validation). + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/?id=25#time=1305212049") + # uri.fragment = "time=1305212086" + # uri.to_s #=> "http://my.example.com/?id=25#time=1305212086" + # + # source://uri//lib/uri/generic.rb#929 + def fragment=(v); end + + # source://uri//lib/uri/generic.rb#1392 + def hash; end + + # Returns true if URI is hierarchical. + # + # == Description + # + # URI has components listed in order of decreasing significance from left to right, + # see RFC3986 https://tools.ietf.org/html/rfc3986 1.2.3. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/") + # uri.hierarchical? + # #=> true + # uri = URI.parse("mailto:joe@example.com") + # uri.hierarchical? + # #=> false + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#961 + def hierarchical?; end + + # Returns the host component of the URI. + # + # URI("http://foo/bar/baz").host #=> "foo" + # + # It returns nil if no host component exists. + # + # URI("mailto:foo@example.org").host #=> nil + # + # The component does not contain the port number. + # + # URI("http://foo:8080/bar/baz").host #=> "foo" + # + # Since IPv6 addresses are wrapped with brackets in URIs, + # this method returns IPv6 addresses wrapped with brackets. + # This form is not appropriate to pass to socket methods such as TCPSocket.open. + # If unwrapped host names are required, use the #hostname method. + # + # URI("http://[::1]/bar/baz").host #=> "[::1]" + # URI("http://[::1]/bar/baz").hostname #=> "::1" + # + # source://uri//lib/uri/generic.rb#243 + def host; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the host component +v+ + # (with validation). + # + # See also URI::Generic.check_host. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.host = "foo.com" + # uri.to_s #=> "http://foo.com" + # + # source://uri//lib/uri/generic.rb#639 + def host=(v); end + + # Extract the host part of the URI and unwrap brackets for IPv6 addresses. + # + # This method is the same as URI::Generic#host except + # brackets for IPv6 (and future IP) addresses are removed. + # + # uri = URI("http://[::1]/bar") + # uri.hostname #=> "::1" + # uri.host #=> "[::1]" + # + # source://uri//lib/uri/generic.rb#654 + def hostname; end + + # Sets the host part of the URI as the argument with brackets for IPv6 addresses. + # + # This method is the same as URI::Generic#host= except + # the argument can be a bare IPv6 address. + # + # uri = URI("http://foo/bar") + # uri.hostname = "::1" + # uri.to_s #=> "http://[::1]/bar" + # + # If the argument seems to be an IPv6 address, + # it is wrapped with brackets. + # + # source://uri//lib/uri/generic.rb#671 + def hostname=(v); end + + # source://uri//lib/uri/generic.rb#1451 + def inspect; end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Merges two URIs. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge("/main.rbx?page=1") + # # => "http://my.example.com/main.rbx?page=1" + # + # source://uri//lib/uri/generic.rb#1109 + def merge(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Destructive form of #merge. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.merge!("/main.rbx?page=1") + # uri.to_s # => "http://my.example.com/main.rbx?page=1" + # + # source://uri//lib/uri/generic.rb#1081 + def merge!(oth); end + + # Returns normalized URI. + # + # require 'uri' + # + # URI("HTTP://my.EXAMPLE.com").normalize + # #=> # + # + # Normalization here means: + # + # * scheme and host are converted to lowercase, + # * an empty path component is set to "/". + # + # source://uri//lib/uri/generic.rb#1319 + def normalize; end + + # Destructive version of #normalize. + # + # source://uri//lib/uri/generic.rb#1328 + def normalize!; end + + # Returns the opaque part of the URI. + # + # URI("mailto:foo@example.org").opaque #=> "foo@example.org" + # URI("http://foo/bar/baz").opaque #=> nil + # + # The portion of the path that does not make use of the slash '/'. + # The path typically refers to an absolute path or an opaque part. + # (See RFC2396 Section 3 and 5.2.) + # + # source://uri//lib/uri/generic.rb#277 + def opaque; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the opaque component +v+ + # (with validation). + # + # See also URI::Generic.check_opaque. + # + # source://uri//lib/uri/generic.rb#901 + def opaque=(v); end + + # Returns the parser to be used. + # + # Unless a URI::Parser is defined, DEFAULT_PARSER is used. + # + # source://uri//lib/uri/generic.rb#289 + def parser; end + + # Returns the password component (without URI decoding). + # + # source://uri//lib/uri/generic.rb#573 + def password; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the +password+ component + # (with validation). + # + # See also URI::Generic.check_password. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://john:S3nsit1ve@my.example.com") + # uri.password = "V3ry_S3nsit1ve" + # uri.to_s #=> "http://john:V3ry_S3nsit1ve@my.example.com" + # + # source://uri//lib/uri/generic.rb#498 + def password=(password); end + + # Returns the path component of the URI. + # + # URI("http://foo/bar/baz").path #=> "/bar/baz" + # + # source://uri//lib/uri/generic.rb#260 + def path; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the path component +v+ + # (with validation). + # + # See also URI::Generic.check_path. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/pub/files") + # uri.path = "/faq/" + # uri.to_s #=> "http://my.example.com/faq/" + # + # source://uri//lib/uri/generic.rb#815 + def path=(v); end + + # Returns the port component of the URI. + # + # URI("http://foo/bar/baz").port #=> 80 + # URI("http://foo:8080/bar/baz").port #=> 8080 + # + # source://uri//lib/uri/generic.rb#250 + def port; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the port component +v+ + # (with validation). + # + # See also URI::Generic.check_port. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.port = 8080 + # uri.to_s #=> "http://my.example.com:8080" + # + # source://uri//lib/uri/generic.rb#729 + def port=(v); end + + # Returns the query component of the URI. + # + # URI("http://foo/bar/baz?search=FooBar").query #=> "search=FooBar" + # + # source://uri//lib/uri/generic.rb#266 + def query; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the query component +v+. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com/?id=25") + # uri.query = "id=1" + # uri.to_s #=> "http://my.example.com/?id=1" + # + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#839 + def query=(v); end + + # source://uri//lib/uri/generic.rb#252 + def registry; end + + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#745 + def registry=(v); end + + # Returns true if URI does not have a scheme (e.g. http:// or https://) specified. + # + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#984 + def relative?; end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path from oth to self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com/main.rbx?page=1') + # uri.route_from('http://my.example.com') + # #=> # + # + # source://uri//lib/uri/generic.rb#1262 + def route_from(oth); end + + # == Args + # + # +oth+:: + # URI or String + # + # == Description + # + # Calculates relative path to oth from self. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://my.example.com') + # uri.route_to('http://my.example.com/main.rbx?page=1') + # #=> # + # + # source://uri//lib/uri/generic.rb#1302 + def route_to(oth); end + + # Returns the scheme component of the URI. + # + # URI("http://foo/bar/baz").scheme #=> "http" + # + # source://uri//lib/uri/generic.rb#221 + def scheme; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the scheme component +v+ + # (with validation). + # + # See also URI::Generic.check_scheme. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://my.example.com") + # uri.scheme = "https" + # uri.to_s #=> "https://my.example.com" + # + # source://uri//lib/uri/generic.rb#360 + def scheme=(v); end + + # == Args + # + # +components+:: + # Multiple Symbol arguments defined in URI::HTTP. + # + # == Description + # + # Selects specified components from URI. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse('http://myuser:mypass@my.example.com/test.rbx') + # uri.select(:userinfo, :host, :path) + # # => ["myuser:mypass", "my.example.com", "/test.rbx"] + # + # source://uri//lib/uri/generic.rb#1440 + def select(*components); end + + # Constructs String from URI. + # + # source://uri//lib/uri/generic.rb#1343 + def to_s; end + + # Constructs String from URI. + # + # source://uri//lib/uri/generic.rb#1343 + def to_str; end + + # Returns the user component (without URI decoding). + # + # source://uri//lib/uri/generic.rb#568 + def user; end + + # == Args + # + # +v+:: + # String + # + # == Description + # + # Public setter for the +user+ component + # (with validation). + # + # See also URI::Generic.check_user. + # + # == Usage + # + # require 'uri' + # + # uri = URI.parse("http://john:S3nsit1ve@my.example.com") + # uri.user = "sam" + # uri.to_s #=> "http://sam:V3ry_S3nsit1ve@my.example.com" + # + # source://uri//lib/uri/generic.rb#471 + def user=(user); end + + # Returns the userinfo, either as 'user' or 'user:password'. + # + # source://uri//lib/uri/generic.rb#557 + def userinfo; end + + # Sets userinfo, argument is string like 'name:pass'. + # + # source://uri//lib/uri/generic.rb#441 + def userinfo=(userinfo); end + + protected + + # Returns an Array of the components defined from the COMPONENT Array. + # + # source://uri//lib/uri/generic.rb#1416 + def component_ary; end + + # Protected setter for the host component +v+. + # + # See also URI::Generic.host=. + # + # source://uri//lib/uri/generic.rb#613 + def set_host(v); end + + # Protected setter for the opaque component +v+. + # + # See also URI::Generic.opaque=. + # + # source://uri//lib/uri/generic.rb#883 + def set_opaque(v); end + + # Protected setter for the password component +v+. + # + # See also URI::Generic.password=. + # + # source://uri//lib/uri/generic.rb#534 + def set_password(v); end + + # Protected setter for the path component +v+. + # + # See also URI::Generic.path=. + # + # source://uri//lib/uri/generic.rb#789 + def set_path(v); end + + # Protected setter for the port component +v+. + # + # See also URI::Generic.port=. + # + # source://uri//lib/uri/generic.rb#702 + def set_port(v); end + + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#740 + def set_registry(v); end + + # Protected setter for the scheme component +v+. + # + # See also URI::Generic.scheme=. + # + # source://uri//lib/uri/generic.rb#334 + def set_scheme(v); end + + # Protected setter for the user component +v+. + # + # See also URI::Generic.user=. + # + # source://uri//lib/uri/generic.rb#524 + def set_user(v); end + + # Protected setter for the +user+ component, and +password+ if available + # (with validation). + # + # See also URI::Generic.userinfo=. + # + # source://uri//lib/uri/generic.rb#509 + def set_userinfo(user, password = T.unsafe(nil)); end + + private + + # Checks the host +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :HOST. + # + # Can not have a registry or opaque component defined, + # with a host component defined. + # + # source://uri//lib/uri/generic.rb#594 + def check_host(v); end + + # Checks the opaque +v+ component for RFC2396 compliance and + # against the URI::Parser Regexp for :OPAQUE. + # + # Can not have a host, port, user, or path component defined, + # with an opaque component defined. + # + # source://uri//lib/uri/generic.rb#861 + def check_opaque(v); end + + # Checks the password +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :USERINFO. + # + # Can not have a registry or opaque component defined, + # with a user component defined. + # + # source://uri//lib/uri/generic.rb#417 + def check_password(v, user = T.unsafe(nil)); end + + # Checks the path +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp + # for :ABS_PATH and :REL_PATH. + # + # Can not have a opaque component defined, + # with a path component defined. + # + # source://uri//lib/uri/generic.rb#757 + def check_path(v); end + + # Checks the port +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :PORT. + # + # Can not have a registry or opaque component defined, + # with a port component defined. + # + # source://uri//lib/uri/generic.rb#683 + def check_port(v); end + + # @raise [InvalidURIError] + # + # source://uri//lib/uri/generic.rb#735 + def check_registry(v); end + + # Checks the scheme +v+ component against the URI::Parser Regexp for :SCHEME. + # + # source://uri//lib/uri/generic.rb#320 + def check_scheme(v); end + + # Checks the user +v+ component for RFC2396 compliance + # and against the URI::Parser Regexp for :USERINFO. + # + # Can not have a registry or opaque component defined, + # with a user component defined. + # + # source://uri//lib/uri/generic.rb#393 + def check_user(v); end + + # Checks the +user+ and +password+. + # + # If +password+ is not provided, then +user+ is + # split, using URI::Generic.split_userinfo, to + # pull +user+ and +password. + # + # See also URI::Generic.check_user, URI::Generic.check_password. + # + # source://uri//lib/uri/generic.rb#375 + def check_userinfo(user, password = T.unsafe(nil)); end + + # Escapes 'user:password' +v+ based on RFC 1738 section 3.1. + # + # source://uri//lib/uri/generic.rb#551 + def escape_userpass(v); end + + # Merges a base path +base+, with relative path +rel+, + # returns a modified base path. + # + # source://uri//lib/uri/generic.rb#1000 + def merge_path(base, rel); end + + # Replaces self by other URI object. + # + # source://uri//lib/uri/generic.rb#299 + def replace!(oth); end + + # :stopdoc: + # + # source://uri//lib/uri/generic.rb#1194 + def route_from0(oth); end + + # :stopdoc: + # + # source://uri//lib/uri/generic.rb#1155 + def route_from_path(src, dst); end + + # Returns an Array of the path split on '/'. + # + # source://uri//lib/uri/generic.rb#991 + def split_path(path); end + + # Returns the userinfo +ui+ as [user, password] + # if properly formatted as 'user:password'. + # + # source://uri//lib/uri/generic.rb#542 + def split_userinfo(ui); end + + class << self + # == Synopsis + # + # See ::new. + # + # == Description + # + # Creates a new URI::Generic instance from components of URI::Generic + # with check. Components are: scheme, userinfo, host, port, registry, path, + # opaque, query, and fragment. You can provide arguments either by an Array or a Hash. + # See ::new for hash keys to use or for order of array items. + # + # source://uri//lib/uri/generic.rb#116 + def build(args); end + + # == Synopsis + # + # See ::new. + # + # == Description + # + # At first, tries to create a new URI::Generic instance using + # URI::Generic::build. But, if exception URI::InvalidComponentError is raised, + # then it does URI::Escape.escape all URI components and tries again. + # + # source://uri//lib/uri/generic.rb#78 + def build2(args); end + + # Components of the URI in the order. + # + # source://uri//lib/uri/generic.rb#57 + def component; end + + # Returns default port. + # + # source://uri//lib/uri/generic.rb#32 + def default_port; end + + # @return [Boolean] + # + # source://uri//lib/uri/generic.rb#1566 + def use_proxy?(hostname, addr, port, no_proxy); end + + # source://uri//lib/uri/generic.rb#63 + def use_registry; end + end +end + +# The syntax of HTTP URIs is defined in RFC1738 section 3.3. +# +# Note that the Ruby URI library allows HTTP URLs containing usernames and +# passwords. This is not legal as per the RFC, but used to be +# supported in Internet Explorer 5 and 6, before the MS04-004 security +# update. See . +# +# source://uri//lib/uri/http.rb#22 +class URI::HTTP < ::URI::Generic + # == Description + # + # Returns the authority for an HTTP uri, as defined in + # https://datatracker.ietf.org/doc/html/rfc3986/#section-3.2. + # + # + # Example: + # + # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').authority #=> "www.example.com" + # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').authority #=> "www.example.com:8000" + # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').authority #=> "www.example.com" + # + # source://uri//lib/uri/http.rb#97 + def authority; end + + # == Description + # + # Returns the origin for an HTTP uri, as defined in + # https://datatracker.ietf.org/doc/html/rfc6454. + # + # + # Example: + # + # URI::HTTP.build(host: 'www.example.com', path: '/foo/bar').origin #=> "http://www.example.com" + # URI::HTTP.build(host: 'www.example.com', port: 8000, path: '/foo/bar').origin #=> "http://www.example.com:8000" + # URI::HTTP.build(host: 'www.example.com', port: 80, path: '/foo/bar').origin #=> "http://www.example.com" + # URI::HTTPS.build(host: 'www.example.com', path: '/foo/bar').origin #=> "https://www.example.com" + # + # source://uri//lib/uri/http.rb#119 + def origin; end + + # == Description + # + # Returns the full path for an HTTP request, as required by Net::HTTP::Get. + # + # If the URI contains a query, the full path is URI#path + '?' + URI#query. + # Otherwise, the path is simply URI#path. + # + # Example: + # + # uri = URI::HTTP.build(path: '/foo/bar', query: 'test=true') + # uri.request_uri # => "/foo/bar?test=true" + # + # source://uri//lib/uri/http.rb#77 + def request_uri; end + + class << self + # == Description + # + # Creates a new URI::HTTP object from components, with syntax checking. + # + # The components accepted are userinfo, host, port, path, query, and + # fragment. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, query, fragment]. + # + # Example: + # + # uri = URI::HTTP.build(host: 'www.example.com', path: '/foo/bar') + # + # uri = URI::HTTP.build([nil, "www.example.com", nil, "/path", + # "query", 'fragment']) + # + # Currently, if passed userinfo components this method generates + # invalid HTTP URIs as per RFC 1738. + # + # source://uri//lib/uri/http.rb#59 + def build(args); end + end +end + +# source://uri//lib/uri/common.rb#103 +URI::INITIAL_SCHEMES = T.let(T.unsafe(nil), Hash) + +# LDAP URI SCHEMA (described in RFC2255). +# -- +# ldap:///[?[?[?[?]]]] +# ++ +# +# source://uri//lib/uri/ldap.rb#23 +class URI::LDAP < ::URI::Generic + # == Description + # + # Creates a new URI::LDAP object from generic URI components as per + # RFC 2396. No LDAP-specific syntax checking is performed. + # + # Arguments are +scheme+, +userinfo+, +host+, +port+, +registry+, +path+, + # +opaque+, +query+, and +fragment+, in that order. + # + # Example: + # + # uri = URI::LDAP.new("ldap", nil, "ldap.example.com", nil, nil, + # "/dc=example;dc=com", nil, "query", nil) + # + # See also URI::Generic.new. + # + # @return [LDAP] a new instance of LDAP + # + # source://uri//lib/uri/ldap.rb#108 + def initialize(*arg); end + + # Returns attributes. + # + # source://uri//lib/uri/ldap.rb#178 + def attributes; end + + # Setter for attributes +val+. + # + # source://uri//lib/uri/ldap.rb#191 + def attributes=(val); end + + # Returns dn. + # + # source://uri//lib/uri/ldap.rb#159 + def dn; end + + # Setter for dn +val+. + # + # source://uri//lib/uri/ldap.rb#172 + def dn=(val); end + + # Returns extensions. + # + # source://uri//lib/uri/ldap.rb#235 + def extensions; end + + # Setter for extensions +val+. + # + # source://uri//lib/uri/ldap.rb#248 + def extensions=(val); end + + # Returns filter. + # + # source://uri//lib/uri/ldap.rb#216 + def filter; end + + # Setter for filter +val+. + # + # source://uri//lib/uri/ldap.rb#229 + def filter=(val); end + + # Checks if URI has a path. + # For URI::LDAP this will return +false+. + # + # @return [Boolean] + # + # source://uri//lib/uri/ldap.rb#255 + def hierarchical?; end + + # Returns scope. + # + # source://uri//lib/uri/ldap.rb#197 + def scope; end + + # Setter for scope +val+. + # + # source://uri//lib/uri/ldap.rb#210 + def scope=(val); end + + protected + + # Private setter for attributes +val+. + # + # source://uri//lib/uri/ldap.rb#183 + def set_attributes(val); end + + # Private setter for dn +val+. + # + # source://uri//lib/uri/ldap.rb#164 + def set_dn(val); end + + # Private setter for extensions +val+. + # + # source://uri//lib/uri/ldap.rb#240 + def set_extensions(val); end + + # Private setter for filter +val+. + # + # source://uri//lib/uri/ldap.rb#221 + def set_filter(val); end + + # Private setter for scope +val+. + # + # source://uri//lib/uri/ldap.rb#202 + def set_scope(val); end + + private + + # Private method to assemble +query+ from +attributes+, +scope+, +filter+, and +extensions+. + # + # source://uri//lib/uri/ldap.rb#146 + def build_path_query; end + + # Private method to cleanup +dn+ from using the +path+ component attribute. + # + # @raise [InvalidURIError] + # + # source://uri//lib/uri/ldap.rb#120 + def parse_dn; end + + # Private method to cleanup +attributes+, +scope+, +filter+, and +extensions+ + # from using the +query+ component attribute. + # + # source://uri//lib/uri/ldap.rb#128 + def parse_query; end + + class << self + # == Description + # + # Creates a new URI::LDAP object from components, with syntax checking. + # + # The components accepted are host, port, dn, attributes, + # scope, filter, and extensions. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [host, port, dn, attributes, scope, filter, extensions]. + # + # Example: + # + # uri = URI::LDAP.build({:host => 'ldap.example.com', + # :dn => '/dc=example'}) + # + # uri = URI::LDAP.build(["ldap.example.com", nil, + # "/dc=example;dc=com", "query", nil, nil, nil]) + # + # source://uri//lib/uri/ldap.rb#74 + def build(args); end + end +end + +# RFC6068, the mailto URL scheme. +# +# source://uri//lib/uri/mailto.rb#17 +class URI::MailTo < ::URI::Generic + # == Description + # + # Creates a new URI::MailTo object from generic URL components with + # no syntax checking. + # + # This method is usually called from URI::parse, which checks + # the validity of each component. + # + # @return [MailTo] a new instance of MailTo + # + # source://uri//lib/uri/mailto.rb#132 + def initialize(*arg); end + + # E-mail headers set by the URL, as an Array of Arrays. + # + # source://uri//lib/uri/mailto.rb#166 + def headers; end + + # Setter for headers +v+. + # + # source://uri//lib/uri/mailto.rb#232 + def headers=(v); end + + # The primary e-mail address of the URL, as a String. + # + # source://uri//lib/uri/mailto.rb#163 + def to; end + + # Setter for to +v+. + # + # source://uri//lib/uri/mailto.rb#200 + def to=(v); end + + # Returns the RFC822 e-mail text equivalent of the URL, as a String. + # + # Example: + # + # require 'uri' + # + # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") + # uri.to_mailtext + # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" + # + # source://uri//lib/uri/mailto.rb#268 + def to_mailtext; end + + # Returns the RFC822 e-mail text equivalent of the URL, as a String. + # + # Example: + # + # require 'uri' + # + # uri = URI.parse("mailto:ruby-list@ruby-lang.org?Subject=subscribe&cc=myaddr") + # uri.to_mailtext + # # => "To: ruby-list@ruby-lang.org\nSubject: subscribe\nCc: myaddr\n\n\n" + # + # source://uri//lib/uri/mailto.rb#268 + def to_rfc822text; end + + # Constructs String from URI. + # + # source://uri//lib/uri/mailto.rb#239 + def to_s; end + + protected + + # Private setter for headers +v+. + # + # source://uri//lib/uri/mailto.rb#221 + def set_headers(v); end + + # Private setter for to +v+. + # + # source://uri//lib/uri/mailto.rb#194 + def set_to(v); end + + private + + # Checks the headers +v+ component against either + # * HEADER_REGEXP + # + # source://uri//lib/uri/mailto.rb#208 + def check_headers(v); end + + # Checks the to +v+ component. + # + # source://uri//lib/uri/mailto.rb#169 + def check_to(v); end + + class << self + # == Description + # + # Creates a new URI::MailTo object from components, with syntax checking. + # + # Components can be provided as an Array or Hash. If an Array is used, + # the components must be supplied as [to, headers]. + # + # If a Hash is used, the keys are the component names preceded by colons. + # + # The headers can be supplied as a pre-encoded string, such as + # "subject=subscribe&cc=address", or as an Array of Arrays + # like [['subject', 'subscribe'], ['cc', 'address']]. + # + # Examples: + # + # require 'uri' + # + # m1 = URI::MailTo.build(['joe@example.com', 'subject=Ruby']) + # m1.to_s # => "mailto:joe@example.com?subject=Ruby" + # + # m2 = URI::MailTo.build(['john@example.com', [['Subject', 'Ruby'], ['Cc', 'jack@example.com']]]) + # m2.to_s # => "mailto:john@example.com?Subject=Ruby&Cc=jack@example.com" + # + # m3 = URI::MailTo.build({:to => 'listman@example.com', :headers => [['subject', 'subscribe']]}) + # m3.to_s # => "mailto:listman@example.com?subject=subscribe" + # + # source://uri//lib/uri/mailto.rb#85 + def build(args); end + end +end + +# Class that parses String's into URI's. +# +# It contains a Hash set of patterns and Regexp's that match and validate. +# +# source://uri//lib/uri/rfc2396_parser.rb#64 +class URI::RFC2396_Parser + include ::URI::RFC2396_REGEXP + + # == Synopsis + # + # URI::Parser.new([opts]) + # + # == Args + # + # The constructor accepts a hash as options for parser. + # Keys of options are pattern names of URI components + # and values of options are pattern strings. + # The constructor generates set of regexps for parsing URIs. + # + # You can use the following keys: + # + # * :ESCAPED (URI::PATTERN::ESCAPED in default) + # * :UNRESERVED (URI::PATTERN::UNRESERVED in default) + # * :DOMLABEL (URI::PATTERN::DOMLABEL in default) + # * :TOPLABEL (URI::PATTERN::TOPLABEL in default) + # * :HOSTNAME (URI::PATTERN::HOSTNAME in default) + # + # == Examples + # + # p = URI::Parser.new(:ESCAPED => "(?:%[a-fA-F0-9]{2}|%u[a-fA-F0-9]{4})") + # u = p.parse("http://example.jp/%uABCD") #=> # + # URI.parse(u.to_s) #=> raises URI::InvalidURIError + # + # s = "http://example.com/ABCD" + # u1 = p.parse(s) #=> # + # u2 = URI.parse(s) #=> # + # u1 == u2 #=> true + # u1.eql?(u2) #=> false + # + # @return [RFC2396_Parser] a new instance of RFC2396_Parser + # + # source://uri//lib/uri/rfc2396_parser.rb#99 + def initialize(opts = T.unsafe(nil)); end + + # :call-seq: + # escape( str ) + # escape( str, unsafe ) + # + # == Args + # + # +str+:: + # String to make safe + # +unsafe+:: + # Regexp to apply. Defaults to +self.regexp[:UNSAFE]+ + # + # == Description + # + # Constructs a safe String from +str+, removing unsafe characters, + # replacing them with codes. + # + # source://uri//lib/uri/rfc2396_parser.rb#287 + def escape(str, unsafe = T.unsafe(nil)); end + + # :call-seq: + # extract( str ) + # extract( str, schemes ) + # extract( str, schemes ) {|item| block } + # + # == Args + # + # +str+:: + # String to search + # +schemes+:: + # Patterns to apply to +str+ + # + # == Description + # + # Attempts to parse and merge a set of URIs. + # If no +block+ given, then returns the result, + # else it calls +block+ for each element in result. + # + # See also URI::Parser.make_regexp. + # + # source://uri//lib/uri/rfc2396_parser.rb#249 + def extract(str, schemes = T.unsafe(nil)); end + + # source://uri//lib/uri/rfc2396_parser.rb#326 + def inspect; end + + # == Args + # + # +uris+:: + # an Array of Strings + # + # == Description + # + # Attempts to parse and merge a set of URIs. + # + # source://uri//lib/uri/rfc2396_parser.rb#223 + def join(*uris); end + + # Returns Regexp that is default +self.regexp[:ABS_URI_REF]+, + # unless +schemes+ is provided. Then it is a Regexp.union with +self.pattern[:X_ABS_URI]+. + # + # source://uri//lib/uri/rfc2396_parser.rb#262 + def make_regexp(schemes = T.unsafe(nil)); end + + # == Args + # + # +uri+:: + # String + # + # == Description + # + # Parses +uri+ and constructs either matching URI scheme object + # (File, FTP, HTTP, HTTPS, LDAP, LDAPS, or MailTo) or URI::Generic. + # + # == Usage + # + # p = URI::Parser.new + # p.parse("ldap://ldap.example.com/dc=example?user=john") + # #=> # + # + # source://uri//lib/uri/rfc2396_parser.rb#209 + def parse(uri); end + + # The Hash of patterns. + # + # See also URI::Parser.initialize_pattern. + # + # source://uri//lib/uri/rfc2396_parser.rb#112 + def pattern; end + + # The Hash of Regexp. + # + # See also URI::Parser.initialize_regexp. + # + # source://uri//lib/uri/rfc2396_parser.rb#117 + def regexp; end + + # Returns a split URI against +regexp[:ABS_URI]+. + # + # source://uri//lib/uri/rfc2396_parser.rb#120 + def split(uri); end + + # :call-seq: + # unescape( str ) + # unescape( str, escaped ) + # + # == Args + # + # +str+:: + # String to remove escapes from + # +escaped+:: + # Regexp to apply. Defaults to +self.regexp[:ESCAPED]+ + # + # == Description + # + # Removes escapes from +str+. + # + # source://uri//lib/uri/rfc2396_parser.rb#318 + def unescape(str, escaped = T.unsafe(nil)); end + + private + + # source://uri//lib/uri/rfc2396_parser.rb#527 + def convert_to_uri(uri); end + + # Constructs the default Hash of patterns. + # + # source://uri//lib/uri/rfc2396_parser.rb#338 + def initialize_pattern(opts = T.unsafe(nil)); end + + # Constructs the default Hash of Regexp's. + # + # source://uri//lib/uri/rfc2396_parser.rb#496 + def initialize_regexp(pattern); end +end + +# source://uri//lib/uri/rfc3986_parser.rb#3 +class URI::RFC3986_Parser + # @return [RFC3986_Parser] a new instance of RFC3986_Parser + # + # source://uri//lib/uri/rfc3986_parser.rb#73 + def initialize; end + + # source://uri//lib/uri/rfc3986_parser.rb#146 + def inspect; end + + # source://uri//lib/uri/rfc3986_parser.rb#139 + def join(*uris); end + + # source://uri//lib/uri/rfc3986_parser.rb#134 + def parse(uri); end + + # Returns the value of attribute regexp. + # + # source://uri//lib/uri/rfc3986_parser.rb#71 + def regexp; end + + # source://uri//lib/uri/rfc3986_parser.rb#77 + def split(uri); end + + private + + # source://uri//lib/uri/rfc3986_parser.rb#171 + def convert_to_uri(uri); end + + # source://uri//lib/uri/rfc3986_parser.rb#157 + def default_regexp; end +end + +# source://uri//lib/uri/rfc3986_parser.rb#33 +URI::RFC3986_Parser::FRAGMENT = T.let(T.unsafe(nil), String) + +# URI defined in RFC3986 +# +# source://uri//lib/uri/rfc3986_parser.rb#5 +URI::RFC3986_Parser::HOST = T.let(T.unsafe(nil), Regexp) + +# source://uri//lib/uri/rfc3986_parser.rb#54 +URI::RFC3986_Parser::RFC3986_relative_ref = T.let(T.unsafe(nil), Regexp) + +# source://uri//lib/uri/rfc3986_parser.rb#30 +URI::RFC3986_Parser::SCHEME = T.let(T.unsafe(nil), String) + +# source://uri//lib/uri/rfc3986_parser.rb#31 +URI::RFC3986_Parser::SEG = T.let(T.unsafe(nil), String) + +# source://uri//lib/uri/rfc3986_parser.rb#32 +URI::RFC3986_Parser::SEG_NC = T.let(T.unsafe(nil), String) + +# source://uri//lib/uri/rfc3986_parser.rb#28 +URI::RFC3986_Parser::USERINFO = T.let(T.unsafe(nil), Regexp) + +# source://uri//lib/uri/common.rb#67 +module URI::Schemes; end + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::FILE = URI::File + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::FTP = URI::FTP + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::GID = URI::GID + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::HTTP = URI::HTTP + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::HTTPS = URI::HTTPS + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::LDAP = URI::LDAP + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::LDAPS = URI::LDAPS + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::MAILTO = URI::MailTo + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::SOURCE = URI::Source + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::WS = URI::WS + +# source://uri//lib/uri/common.rb#80 +URI::Schemes::WSS = URI::WSS + +class URI::Source < ::URI::File + # source://tapioca/0.16.3/lib/tapioca/helpers/source_uri.rb#65 + sig { params(v: T.nilable(::String)).returns(T::Boolean) } + def check_host(v); end + + # source://uri//lib/uri/generic.rb#243 + def gem_name; end + + # source://tapioca/0.16.3/lib/tapioca/helpers/source_uri.rb#32 + sig { returns(T.nilable(::String)) } + def gem_version; end + + # source://uri//lib/uri/generic.rb#283 + def line_number; end + + # source://tapioca/0.16.3/lib/tapioca/helpers/source_uri.rb#58 + sig { params(v: T.nilable(::String)).void } + def set_path(v); end + + # source://tapioca/0.16.3/lib/tapioca/helpers/source_uri.rb#77 + sig { returns(::String) } + def to_s; end + + class << self + # source://tapioca/0.16.3/lib/tapioca/helpers/source_uri.rb#45 + sig do + params( + gem_name: ::String, + gem_version: T.nilable(::String), + path: ::String, + line_number: T.nilable(::String) + ).returns(::URI::Source) + end + def build(gem_name:, gem_version:, path:, line_number:); end + end +end + +# source://uri//lib/uri/common.rb#285 +URI::TBLENCURICOMP_ = T.let(T.unsafe(nil), Hash) + +# source://uri//lib/uri/common.rb#35 +module URI::Util + private + + # source://uri//lib/uri/common.rb#36 + def make_components_hash(klass, array_hash); end + + class << self + # source://uri//lib/uri/common.rb#36 + def make_components_hash(klass, array_hash); end + end +end + +# The syntax of WS URIs is defined in RFC6455 section 3. +# +# Note that the Ruby URI library allows WS URLs containing usernames and +# passwords. This is not legal as per the RFC, but used to be +# supported in Internet Explorer 5 and 6, before the MS04-004 security +# update. See . +# +# source://uri//lib/uri/ws.rb#22 +class URI::WS < ::URI::Generic + # == Description + # + # Returns the full path for a WS URI, as required by Net::HTTP::Get. + # + # If the URI contains a query, the full path is URI#path + '?' + URI#query. + # Otherwise, the path is simply URI#path. + # + # Example: + # + # uri = URI::WS.build(path: '/foo/bar', query: 'test=true') + # uri.request_uri # => "/foo/bar?test=true" + # + # source://uri//lib/uri/ws.rb#74 + def request_uri; end + + class << self + # == Description + # + # Creates a new URI::WS object from components, with syntax checking. + # + # The components accepted are userinfo, host, port, path, and query. + # + # The components should be provided either as an Array, or as a Hash + # with keys formed by preceding the component names with a colon. + # + # If an Array is used, the components must be passed in the + # order [userinfo, host, port, path, query]. + # + # Example: + # + # uri = URI::WS.build(host: 'www.example.com', path: '/foo/bar') + # + # uri = URI::WS.build([nil, "www.example.com", nil, "/path", "query"]) + # + # Currently, if passed userinfo components this method generates + # invalid WS URIs as per RFC 1738. + # + # source://uri//lib/uri/ws.rb#56 + def build(args); end + end +end + +# The default port for WSS URIs is 443, and the scheme is 'wss:' rather +# than 'ws:'. Other than that, WSS URIs are identical to WS URIs; +# see URI::WS. +# +# source://uri//lib/uri/wss.rb#17 +class URI::WSS < ::URI::WS; end + +# A Default port of 443 for URI::WSS +# +# source://uri//lib/uri/wss.rb#19 +URI::WSS::DEFAULT_PORT = T.let(T.unsafe(nil), Integer) diff --git a/sorbet/rbi/gems/webrick@1.8.1.rbi b/sorbet/rbi/gems/webrick@1.8.2.rbi similarity index 94% rename from sorbet/rbi/gems/webrick@1.8.1.rbi rename to sorbet/rbi/gems/webrick@1.8.2.rbi index 3f6a1bc6f..1133eaa1e 100644 --- a/sorbet/rbi/gems/webrick@1.8.1.rbi +++ b/sorbet/rbi/gems/webrick@1.8.2.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `webrick` gem. # Please instead update this file by running `bin/tapioca gem webrick`. + # AccessLog provides logging to various files in various formats. # # Multiple logs may be written to at the same time: @@ -1000,7 +1001,7 @@ class WEBrick::HTTPRequest # This method provides the metavariables defined by the revision 3 # of "The WWW Common Gateway Interface Version 1.1" # To browse the current document of CGI Version 1.1, see below: - # http://tools.ietf.org/html/rfc3875 + # https://www.rfc-editor.org/rfc/rfc3875 # # source://webrick//lib/webrick/httprequest.rb#407 def meta_vars; end @@ -1130,34 +1131,34 @@ class WEBrick::HTTPRequest private - # source://webrick//lib/webrick/httprequest.rb#566 + # source://webrick//lib/webrick/httprequest.rb#594 def _read_data(io, method, *arg); end - # source://webrick//lib/webrick/httprequest.rb#506 + # source://webrick//lib/webrick/httprequest.rb#527 def parse_host_request_line(host); end - # source://webrick//lib/webrick/httprequest.rb#586 + # source://webrick//lib/webrick/httprequest.rb#614 def parse_query; end - # source://webrick//lib/webrick/httprequest.rb#484 + # source://webrick//lib/webrick/httprequest.rb#503 def parse_uri(str, scheme = T.unsafe(nil)); end - # source://webrick//lib/webrick/httprequest.rb#511 + # source://webrick//lib/webrick/httprequest.rb#531 def read_body(socket, block); end - # source://webrick//lib/webrick/httprequest.rb#535 + # source://webrick//lib/webrick/httprequest.rb#559 def read_chunk_size(socket); end - # source://webrick//lib/webrick/httprequest.rb#546 + # source://webrick//lib/webrick/httprequest.rb#570 def read_chunked(socket, block); end - # source://webrick//lib/webrick/httprequest.rb#582 + # source://webrick//lib/webrick/httprequest.rb#610 def read_data(io, size); end # source://webrick//lib/webrick/httprequest.rb#471 def read_header(socket); end - # source://webrick//lib/webrick/httprequest.rb#578 + # source://webrick//lib/webrick/httprequest.rb#606 def read_line(io, size = T.unsafe(nil)); end # @raise [HTTPStatus::EOFError] @@ -1171,10 +1172,13 @@ class WEBrick::HTTPRequest # the initial(first) value. (apr_table_mergen() adds new value after the # existing value with ", " prefix) # - # source://webrick//lib/webrick/httprequest.rb#614 + # source://webrick//lib/webrick/httprequest.rb#642 def setup_forwarded_info; end end +# source://webrick//lib/webrick/httprequest.rb#526 +WEBrick::HTTPRequest::HOST_PATTERN = T.let(T.unsafe(nil), Regexp) + # same as Mongrel, Thin and Puma # # source://webrick//lib/webrick/httprequest.rb#449 @@ -2135,54 +2139,54 @@ end module WEBrick::HTTPUtils private - # source://webrick//lib/webrick/httputils.rb#454 + # source://webrick//lib/webrick/httputils.rb#474 def _escape(str, regex); end # :stopdoc: # - # source://webrick//lib/webrick/httputils.rb#452 + # source://webrick//lib/webrick/httputils.rb#472 def _make_regex(str); end - # source://webrick//lib/webrick/httputils.rb#453 + # source://webrick//lib/webrick/httputils.rb#473 def _make_regex!(str); end - # source://webrick//lib/webrick/httputils.rb#460 + # source://webrick//lib/webrick/httputils.rb#480 def _unescape(str, regex); end # Removes quotes and escapes from +str+ # - # source://webrick//lib/webrick/httputils.rb#234 + # source://webrick//lib/webrick/httputils.rb#254 def dequote(str); end # Escapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#478 + # source://webrick//lib/webrick/httputils.rb#498 def escape(str); end # Escapes 8 bit characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#519 + # source://webrick//lib/webrick/httputils.rb#539 def escape8bit(str); end # Escapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#492 + # source://webrick//lib/webrick/httputils.rb#512 def escape_form(str); end # Escapes path +str+ # - # source://webrick//lib/webrick/httputils.rb#508 + # source://webrick//lib/webrick/httputils.rb#528 def escape_path(str); end # Loads Apache-compatible mime.types in +file+. # - # source://webrick//lib/webrick/httputils.rb#123 + # source://webrick//lib/webrick/httputils.rb#122 def load_mime_types(file); end # Returns the mime type of +filename+ from the list in +mime_tab+. If no # mime type was found application/octet-stream is returned. # - # source://webrick//lib/webrick/httputils.rb#145 + # source://webrick//lib/webrick/httputils.rb#144 def mime_type(filename, mime_tab); end # Normalizes a request path. Raises an exception if the path cannot be @@ -2193,99 +2197,96 @@ module WEBrick::HTTPUtils # Parses form data in +io+ with the given +boundary+ # - # source://webrick//lib/webrick/httputils.rb#406 + # source://webrick//lib/webrick/httputils.rb#426 def parse_form_data(io, boundary); end - # Parses an HTTP header +raw+ into a hash of header fields with an Array - # of values. - # - # source://webrick//lib/webrick/httputils.rb#156 + # source://webrick//lib/webrick/httputils.rb#171 def parse_header(raw); end # Parses the query component of a URI in +str+ # - # source://webrick//lib/webrick/httputils.rb#382 + # source://webrick//lib/webrick/httputils.rb#402 def parse_query(str); end # Parses q values in +value+ as used in Accept headers. # - # source://webrick//lib/webrick/httputils.rb#213 + # source://webrick//lib/webrick/httputils.rb#233 def parse_qvalues(value); end # Parses a Range header value +ranges_specifier+ # - # source://webrick//lib/webrick/httputils.rb#195 + # source://webrick//lib/webrick/httputils.rb#215 def parse_range_header(ranges_specifier); end # Quotes and escapes quotes in +str+ # - # source://webrick//lib/webrick/httputils.rb#244 + # source://webrick//lib/webrick/httputils.rb#264 def quote(str); end # Splits a header value +str+ according to HTTP specification. # - # source://webrick//lib/webrick/httputils.rb#186 + # source://webrick//lib/webrick/httputils.rb#206 def split_header_value(str); end # Unescapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#485 + # source://webrick//lib/webrick/httputils.rb#505 def unescape(str); end # Unescapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#501 + # source://webrick//lib/webrick/httputils.rb#521 def unescape_form(str); end class << self - # source://webrick//lib/webrick/httputils.rb#454 + # source://webrick//lib/webrick/httputils.rb#474 def _escape(str, regex); end # :stopdoc: # - # source://webrick//lib/webrick/httputils.rb#452 + # source://webrick//lib/webrick/httputils.rb#472 def _make_regex(str); end - # source://webrick//lib/webrick/httputils.rb#453 + # source://webrick//lib/webrick/httputils.rb#473 def _make_regex!(str); end - # source://webrick//lib/webrick/httputils.rb#460 + # source://webrick//lib/webrick/httputils.rb#480 def _unescape(str, regex); end # Removes quotes and escapes from +str+ # - # source://webrick//lib/webrick/httputils.rb#234 + # source://webrick//lib/webrick/httputils.rb#254 def dequote(str); end # Escapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#478 + # source://webrick//lib/webrick/httputils.rb#498 def escape(str); end # Escapes 8 bit characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#519 + # source://webrick//lib/webrick/httputils.rb#539 def escape8bit(str); end # Escapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#492 + # source://webrick//lib/webrick/httputils.rb#512 def escape_form(str); end # Escapes path +str+ # - # source://webrick//lib/webrick/httputils.rb#508 + # source://webrick//lib/webrick/httputils.rb#528 def escape_path(str); end # Loads Apache-compatible mime.types in +file+. # - # source://webrick//lib/webrick/httputils.rb#123 + # source://webrick//lib/webrick/httputils.rb#122 def load_mime_types(file); end # Returns the mime type of +filename+ from the list in +mime_tab+. If no # mime type was found application/octet-stream is returned. # - # source://webrick//lib/webrick/httputils.rb#145 + # source://webrick//lib/webrick/httputils.rb#144 def mime_type(filename, mime_tab); end # Normalizes a request path. Raises an exception if the path cannot be @@ -2296,56 +2297,59 @@ module WEBrick::HTTPUtils # Parses form data in +io+ with the given +boundary+ # - # source://webrick//lib/webrick/httputils.rb#406 + # source://webrick//lib/webrick/httputils.rb#426 def parse_form_data(io, boundary); end - # Parses an HTTP header +raw+ into a hash of header fields with an Array - # of values. - # - # source://webrick//lib/webrick/httputils.rb#156 + # source://webrick//lib/webrick/httputils.rb#171 def parse_header(raw); end # Parses the query component of a URI in +str+ # - # source://webrick//lib/webrick/httputils.rb#382 + # source://webrick//lib/webrick/httputils.rb#402 def parse_query(str); end # Parses q values in +value+ as used in Accept headers. # - # source://webrick//lib/webrick/httputils.rb#213 + # source://webrick//lib/webrick/httputils.rb#233 def parse_qvalues(value); end # Parses a Range header value +ranges_specifier+ # - # source://webrick//lib/webrick/httputils.rb#195 + # source://webrick//lib/webrick/httputils.rb#215 def parse_range_header(ranges_specifier); end # Quotes and escapes quotes in +str+ # - # source://webrick//lib/webrick/httputils.rb#244 + # source://webrick//lib/webrick/httputils.rb#264 def quote(str); end # Splits a header value +str+ according to HTTP specification. # - # source://webrick//lib/webrick/httputils.rb#186 + # source://webrick//lib/webrick/httputils.rb#206 def split_header_value(str); end # Unescapes HTTP reserved and unwise characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#485 + # source://webrick//lib/webrick/httputils.rb#505 def unescape(str); end # Unescapes form reserved characters in +str+ # - # source://webrick//lib/webrick/httputils.rb#501 + # source://webrick//lib/webrick/httputils.rb#521 def unescape_form(str); end end end +# source://webrick//lib/webrick/httputils.rb#161 +class WEBrick::HTTPUtils::CookieHeader < ::Array + # source://webrick//lib/webrick/httputils.rb#162 + def join(separator = T.unsafe(nil)); end +end + # Stores multipart form data. FormData objects are created when # WEBrick::HTTPUtils.parse_form_data is called. # -# source://webrick//lib/webrick/httputils.rb#253 +# source://webrick//lib/webrick/httputils.rb#273 class WEBrick::HTTPUtils::FormData < ::String # Creates a new FormData object. # @@ -2356,7 +2360,7 @@ class WEBrick::HTTPUtils::FormData < ::String # # @return [FormData] a new instance of FormData # - # source://webrick//lib/webrick/httputils.rb#278 + # source://webrick//lib/webrick/httputils.rb#298 def initialize(*args); end # Adds +str+ to this FormData which may be the body, a header or a @@ -2364,72 +2368,84 @@ class WEBrick::HTTPUtils::FormData < ::String # # This is called by WEBrick::HTTPUtils.parse_form_data for you # - # source://webrick//lib/webrick/httputils.rb#311 + # source://webrick//lib/webrick/httputils.rb#331 def <<(str); end # Retrieves the header at the first entry in +key+ # - # source://webrick//lib/webrick/httputils.rb#297 + # source://webrick//lib/webrick/httputils.rb#317 def [](*key); end # Adds +data+ at the end of the chain of entries # # This is called by WEBrick::HTTPUtils.parse_form_data for you. # - # source://webrick//lib/webrick/httputils.rb#331 + # source://webrick//lib/webrick/httputils.rb#351 def append_data(data); end # Yields each entry in this FormData # - # source://webrick//lib/webrick/httputils.rb#346 + # source://webrick//lib/webrick/httputils.rb#366 def each_data; end # The filename of the form data part # - # source://webrick//lib/webrick/httputils.rb#265 + # source://webrick//lib/webrick/httputils.rb#285 def filename; end # The filename of the form data part # - # source://webrick//lib/webrick/httputils.rb#265 + # source://webrick//lib/webrick/httputils.rb#285 def filename=(_arg0); end # Returns all the FormData as an Array # - # source://webrick//lib/webrick/httputils.rb#358 + # source://webrick//lib/webrick/httputils.rb#378 def list; end # The name of the form data part # - # source://webrick//lib/webrick/httputils.rb#260 + # source://webrick//lib/webrick/httputils.rb#280 def name; end # The name of the form data part # - # source://webrick//lib/webrick/httputils.rb#260 + # source://webrick//lib/webrick/httputils.rb#280 def name=(_arg0); end - # source://webrick//lib/webrick/httputils.rb#267 + # source://webrick//lib/webrick/httputils.rb#287 def next_data=(_arg0); end # Returns all the FormData as an Array # # A FormData will behave like an Array # - # source://webrick//lib/webrick/httputils.rb#358 + # source://webrick//lib/webrick/httputils.rb#378 def to_ary; end # This FormData's body # - # source://webrick//lib/webrick/httputils.rb#374 + # source://webrick//lib/webrick/httputils.rb#394 def to_s; end protected - # source://webrick//lib/webrick/httputils.rb#267 + # source://webrick//lib/webrick/httputils.rb#287 def next_data; end end +# source://webrick//lib/webrick/httputils.rb#167 +WEBrick::HTTPUtils::HEADER_CLASSES = T.let(T.unsafe(nil), Hash) + +# Parses an HTTP header +raw+ into a hash of header fields with an Array +# of values. +# +# source://webrick//lib/webrick/httputils.rb#155 +class WEBrick::HTTPUtils::SplitHeader < ::Array + # source://webrick//lib/webrick/httputils.rb#156 + def join(separator = T.unsafe(nil)); end +end + # source://webrick//lib/webrick/utils.rb#17 module WEBrick::Utils private diff --git a/sorbet/rbi/gems/websocket@1.2.10.rbi b/sorbet/rbi/gems/websocket@1.2.11.rbi similarity index 99% rename from sorbet/rbi/gems/websocket@1.2.10.rbi rename to sorbet/rbi/gems/websocket@1.2.11.rbi index 6e2300b9e..6fb984a3b 100644 --- a/sorbet/rbi/gems/websocket@1.2.10.rbi +++ b/sorbet/rbi/gems/websocket@1.2.11.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `websocket` gem. # Please instead update this file by running `bin/tapioca gem websocket`. + # WebSocket protocol implementation in Ruby # This module does not provide a WebSocket server or client, but is made for using # in http servers or clients to provide WebSocket support. @@ -1078,12 +1079,12 @@ class WebSocket::Handshake::Handler::Client01 < ::WebSocket::Handshake::Handler: def handshake_keys; end end -# source://websocket//lib/websocket/handshake/handler/client04.rb#9 +# source://websocket//lib/websocket/handshake/handler/client04.rb#8 class WebSocket::Handshake::Handler::Client04 < ::WebSocket::Handshake::Handler::Client # @return [Boolean] # @see WebSocket::Handshake::Base#valid? # - # source://websocket//lib/websocket/handshake/handler/client04.rb#11 + # source://websocket//lib/websocket/handshake/handler/client04.rb#10 def valid?; end private @@ -1092,25 +1093,25 @@ class WebSocket::Handshake::Handler::Client04 < ::WebSocket::Handshake::Handler: # # @return [Sering] accept # - # source://websocket//lib/websocket/handshake/handler/client04.rb#42 + # source://websocket//lib/websocket/handshake/handler/client04.rb#41 def accept; end # @see WebSocket::Handshake::Handler::Base#handshake_keys # - # source://websocket//lib/websocket/handshake/handler/client04.rb#18 + # source://websocket//lib/websocket/handshake/handler/client04.rb#17 def handshake_keys; end # Sec-WebSocket-Key value # # @return [String] key # - # source://websocket//lib/websocket/handshake/handler/client04.rb#36 + # source://websocket//lib/websocket/handshake/handler/client04.rb#35 def key; end - # source://websocket//lib/websocket/handshake/handler/client04.rb#57 + # source://websocket//lib/websocket/handshake/handler/client04.rb#56 def provided_protocols; end - # source://websocket//lib/websocket/handshake/handler/client04.rb#53 + # source://websocket//lib/websocket/handshake/handler/client04.rb#52 def supported_protocols; end # Verify if received header Sec-WebSocket-Accept matches generated one. @@ -1118,7 +1119,7 @@ class WebSocket::Handshake::Handler::Client04 < ::WebSocket::Handshake::Handler: # @raise [WebSocket::Error::Handshake::InvalidAuthentication] # @return [Boolean] True if accept is matching. False otherwise(appropriate error is set) # - # source://websocket//lib/websocket/handshake/handler/client04.rb#48 + # source://websocket//lib/websocket/handshake/handler/client04.rb#47 def verify_accept; end end @@ -1238,42 +1239,42 @@ WebSocket::Handshake::Handler::Client76::NOISE_CHARS = T.let(T.unsafe(nil), Arra # source://websocket//lib/websocket/handshake/handler/server.rb#6 class WebSocket::Handshake::Handler::Server < ::WebSocket::Handshake::Handler::Base; end -# source://websocket//lib/websocket/handshake/handler/server04.rb#9 +# source://websocket//lib/websocket/handshake/handler/server04.rb#8 class WebSocket::Handshake::Handler::Server04 < ::WebSocket::Handshake::Handler::Server # @return [Boolean] # @see WebSocket::Handshake::Base#valid? # - # source://websocket//lib/websocket/handshake/handler/server04.rb#11 + # source://websocket//lib/websocket/handshake/handler/server04.rb#10 def valid?; end private # @see WebSocket::Handshake::Handler::Base#handshake_keys # - # source://websocket//lib/websocket/handshake/handler/server04.rb#23 + # source://websocket//lib/websocket/handshake/handler/server04.rb#22 def handshake_keys; end # @see WebSocket::Handshake::Handler::Base#header_line # - # source://websocket//lib/websocket/handshake/handler/server04.rb#18 + # source://websocket//lib/websocket/handshake/handler/server04.rb#17 def header_line; end - # source://websocket//lib/websocket/handshake/handler/server04.rb#44 + # source://websocket//lib/websocket/handshake/handler/server04.rb#43 def key; end - # source://websocket//lib/websocket/handshake/handler/server04.rb#48 + # source://websocket//lib/websocket/handshake/handler/server04.rb#47 def protocol; end # Signature of response, created from client request Sec-WebSocket-Key # # @return [String] signature # - # source://websocket//lib/websocket/handshake/handler/server04.rb#33 + # source://websocket//lib/websocket/handshake/handler/server04.rb#32 def signature; end # @raise [WebSocket::Error::Handshake::InvalidAuthentication] # - # source://websocket//lib/websocket/handshake/handler/server04.rb#39 + # source://websocket//lib/websocket/handshake/handler/server04.rb#38 def verify_key; end end diff --git a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi similarity index 90% rename from sorbet/rbi/gems/yard-sorbet@0.8.1.rbi rename to sorbet/rbi/gems/yard-sorbet@0.9.0.rbi index caa6b3720..6f4dddf04 100644 --- a/sorbet/rbi/gems/yard-sorbet@0.8.1.rbi +++ b/sorbet/rbi/gems/yard-sorbet@0.9.0.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `yard-sorbet` gem. # Please instead update this file by running `bin/tapioca gem yard-sorbet`. + class YARD::Handlers::Ruby::ClassHandler < ::YARD::Handlers::Ruby::Base include ::YARDSorbet::Handlers::StructClassHandler end @@ -35,7 +36,7 @@ end # source://yard-sorbet//lib/yard-sorbet/handlers.rb#7 module YARDSorbet::Handlers; end -# Apllies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). +# Applies an `@abstract` tag to `abstract!`/`interface!` modules (if not alerady present). # # source://yard-sorbet//lib/yard-sorbet/handlers/abstract_dsl_handler.rb#7 class YARDSorbet::Handlers::AbstractDSLHandler < ::YARD::Handlers::Ruby::Base @@ -94,7 +95,7 @@ end # # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#9 class YARDSorbet::Handlers::MixesInClassMethodsHandler < ::YARD::Handlers::Ruby::Base - # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#23 + # source://yard-sorbet//lib/yard-sorbet/handlers/mixes_in_class_methods_handler.rb#21 sig { void } def process; end @@ -120,7 +121,7 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#73 sig { params(method_objects: T::Array[::YARD::CodeObjects::MethodObject]).void } - def document_attr_methods(method_objects); end + def document_attrs(method_objects); end # An attr* sig can be merged into a previous attr* docstring if it is the only parameter passed to the attr* # declaration. This is to avoid needing to rewrite the source code to separate merged and unmerged attr* @@ -130,7 +131,7 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Boolean) } def merged_into_attr?(attr_node); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#78 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#76 sig do params( attach_to: T.any(::YARD::CodeObjects::MethodObject, ::YARD::Parser::Ruby::MethodCallNode, ::YARD::Parser::Ruby::MethodDefinitionNode), @@ -140,15 +141,15 @@ class YARDSorbet::Handlers::SigHandler < ::YARD::Handlers::Ruby::Base end def parse_node(attach_to, docstring, include_params: T.unsafe(nil)); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#99 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#97 sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } def parse_params(node, docstring); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#109 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#107 sig { params(node: ::YARD::Parser::Ruby::AstNode, docstring: ::YARD::Docstring).void } def parse_return(node, docstring); end - # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#87 + # source://yard-sorbet//lib/yard-sorbet/handlers/sig_handler.rb#85 sig { params(docstring: ::YARD::Docstring, include_params: T::Boolean).void } def parse_sig(docstring, include_params: T.unsafe(nil)); end @@ -222,27 +223,27 @@ class YARDSorbet::Handlers::StructPropHandler < ::YARD::Handlers::Ruby::Base sig { returns(T::Boolean) } def immutable?; end - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#44 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#42 sig { params(kwd: ::String).returns(T.nilable(::String)) } def kw_arg(kwd); end - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#49 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#45 sig { params(name: ::String).returns(::YARDSorbet::TStructProp) } def make_prop(name); end - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#56 sig { returns(T::Array[::YARD::Parser::Ruby::AstNode]) } def params; end # Register the field explicitly as an attribute. # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#66 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#60 sig { params(object: ::YARD::CodeObjects::MethodObject, name: ::String).void } def register_attrs(object, name); end # Store the prop for use in the constructor definition # - # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#74 + # source://yard-sorbet//lib/yard-sorbet/handlers/struct_prop_handler.rb#68 sig { params(prop: ::YARDSorbet::TStructProp).void } def update_state(prop); end end @@ -266,13 +267,19 @@ module YARDSorbet::NodeUtils end def bfs_traverse(node, &_blk); end - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#32 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#31 sig { params(node: ::YARD::Parser::Ruby::AstNode).void } def delete_node(node); end + # Enqueue the eligible children of a node in the BFS queue + # + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#35 + sig { params(queue: ::Thread::Queue, node: ::YARD::Parser::Ruby::AstNode).void } + def enqueue_children(queue, node); end + # Gets the node that a sorbet `sig` can be attached do, bypassing visisbility modifiers and the like # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#38 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#48 sig do params( node: ::YARD::Parser::Ruby::AstNode @@ -284,17 +291,17 @@ module YARDSorbet::NodeUtils # # @raise [IndexError] if the node does not have an adjacent sibling (ascending) # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#45 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#53 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::YARD::Parser::Ruby::AstNode) } def sibling_node(node); end - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#52 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#60 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Boolean) } def sigable_node?(node); end # @see https://github.com/lsegal/yard/blob/main/lib/yard/handlers/ruby/attribute_handler.rb YARD::Handlers::Ruby::AttributeHandler.validated_attribute_names # - # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#63 + # source://yard-sorbet//lib/yard-sorbet/node_utils.rb#71 sig { params(attr_node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } def validated_attribute_names(attr_node); end end @@ -328,43 +335,43 @@ module YARDSorbet::SigToYARD private - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#61 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#58 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(::String) } def build_generic_type(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#70 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#67 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_aref(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#82 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#79 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_array(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#90 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#87 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_collection(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#97 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#94 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_hash(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#105 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#102 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_list(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#31 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#28 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_node(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#43 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#40 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns(T::Array[::String]) } def convert_node_type(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#110 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#107 sig { params(node: ::YARD::Parser::Ruby::MethodCallNode).returns(T::Array[::String]) } def convert_t_method(node); end - # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#121 + # source://yard-sorbet//lib/yard-sorbet/sig_to_yard.rb#118 sig { params(node: ::YARD::Parser::Ruby::AstNode).returns([::String]) } def convert_unknown(node); end end @@ -381,7 +388,7 @@ class YARDSorbet::TStructProp < ::T::Struct const :types, T::Array[::String] class << self - # source://sorbet-runtime/0.5.11288/lib/types/struct.rb#13 + # source://sorbet-runtime/0.5.11600/lib/types/struct.rb#13 def inherited(s); end end end @@ -403,7 +410,7 @@ module YARDSorbet::TagUtils # Create or update a `YARD` tag with type information # - # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#30 + # source://yard-sorbet//lib/yard-sorbet/tag_utils.rb#28 sig do params( docstring: ::YARD::Docstring, diff --git a/sorbet/rbi/gems/yard@0.9.36.rbi b/sorbet/rbi/gems/yard@0.9.37.rbi similarity index 97% rename from sorbet/rbi/gems/yard@0.9.36.rbi rename to sorbet/rbi/gems/yard@0.9.37.rbi index a8148bcc6..f1fc1dc5c 100644 --- a/sorbet/rbi/gems/yard@0.9.36.rbi +++ b/sorbet/rbi/gems/yard@0.9.37.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `yard` gem. # Please instead update this file by running `bin/tapioca gem yard`. + # source://yard//lib/yard.rb#61 ::RUBY18 = T.let(T.unsafe(nil), FalseClass) @@ -490,19 +491,19 @@ RUBY19 = T.let(T.unsafe(nil), TrueClass) # # source://yard//lib/yard/server/rack_adapter.rb#93 class Rack::Request - # source://rack/2.2.8.1/lib/rack/request.rb#26 + # source://rack/2.2.9/lib/rack/request.rb#26 def initialize(env); end - # source://rack/2.2.8.1/lib/rack/request.rb#40 + # source://rack/2.2.9/lib/rack/request.rb#40 def delete_param(k); end - # source://rack/2.2.8.1/lib/rack/request.rb#31 + # source://rack/2.2.9/lib/rack/request.rb#31 def params; end - # source://rack/2.2.8.1/lib/rack/request.rb#31 + # source://rack/2.2.9/lib/rack/request.rb#31 def query; end - # source://rack/2.2.8.1/lib/rack/request.rb#35 + # source://rack/2.2.9/lib/rack/request.rb#35 def update_param(k, v); end # Returns the value of attribute version_supplied. @@ -523,10 +524,10 @@ class Rack::Request def xhr?; end class << self - # source://rack/2.2.8.1/lib/rack/request.rb#16 + # source://rack/2.2.9/lib/rack/request.rb#16 def ip_filter; end - # source://rack/2.2.8.1/lib/rack/request.rb#16 + # source://rack/2.2.9/lib/rack/request.rb#16 def ip_filter=(_arg0); end end end @@ -3331,11 +3332,11 @@ YARD::CodeObjects::METHODNAMEMATCH = T.let(T.unsafe(nil), Regexp) # # Extra data added to docstring # property :bar # -# source://yard//lib/yard/code_objects/macro_object.rb#30 +# source://yard//lib/yard/code_objects/macro_object.rb#29 class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [Boolean] whether this macro is attached to a method # - # source://yard//lib/yard/code_objects/macro_object.rb#149 + # source://yard//lib/yard/code_objects/macro_object.rb#148 def attached?; end # Expands the macro using @@ -3350,39 +3351,39 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # call, if there is a block. # @see expand # - # source://yard//lib/yard/code_objects/macro_object.rb#167 + # source://yard//lib/yard/code_objects/macro_object.rb#166 def expand(call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # @return [String] the macro data stored on the object # - # source://yard//lib/yard/code_objects/macro_object.rb#142 + # source://yard//lib/yard/code_objects/macro_object.rb#141 def macro_data; end # @return [String] the macro data stored on the object # - # source://yard//lib/yard/code_objects/macro_object.rb#142 + # source://yard//lib/yard/code_objects/macro_object.rb#141 def macro_data=(_arg0); end # @return [CodeObjects::Base] the method object that this macro is # attached to. # - # source://yard//lib/yard/code_objects/macro_object.rb#146 + # source://yard//lib/yard/code_objects/macro_object.rb#145 def method_object; end # @return [CodeObjects::Base] the method object that this macro is # attached to. # - # source://yard//lib/yard/code_objects/macro_object.rb#146 + # source://yard//lib/yard/code_objects/macro_object.rb#145 def method_object=(_arg0); end # Overrides {Base#path} so the macro path is ".macro.MACRONAME" # - # source://yard//lib/yard/code_objects/macro_object.rb#152 + # source://yard//lib/yard/code_objects/macro_object.rb#151 def path; end # Overrides the separator to be '.' # - # source://yard//lib/yard/code_objects/macro_object.rb#155 + # source://yard//lib/yard/code_objects/macro_object.rb#154 def sep; end class << self @@ -3400,7 +3401,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [String] the expanded macro data # @see find_or_create # - # source://yard//lib/yard/code_objects/macro_object.rb#120 + # source://yard//lib/yard/code_objects/macro_object.rb#119 def apply(docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil), _method_object = T.unsafe(nil)); end # Applies a macro to a docstring, interpolating the macro's data on the @@ -3416,7 +3417,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # interpolating the block data as a variable. # @return [String] the expanded macro data # - # source://yard//lib/yard/code_objects/macro_object.rb#136 + # source://yard//lib/yard/code_objects/macro_object.rb#135 def apply_macro(macro, docstring, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # Creates a new macro and fills in the relevant properties. @@ -3427,7 +3428,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # macro to. If supplied, {#attached?} will be true # @return [MacroObject] the newly created object # - # source://yard//lib/yard/code_objects/macro_object.rb#40 + # source://yard//lib/yard/code_objects/macro_object.rb#39 def create(macro_name, data, method_object = T.unsafe(nil)); end # Parses a given docstring and determines if the macro is "new" or @@ -3447,7 +3448,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [nil] if the +data+ has no macro tag or if the macro is # not new and no macro by the macro name is found. # - # source://yard//lib/yard/code_objects/macro_object.rb#71 + # source://yard//lib/yard/code_objects/macro_object.rb#70 def create_docstring(macro_name, data, method_object = T.unsafe(nil)); end # Expands +macro_data+ using the interpolation parameters. @@ -3460,7 +3461,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # # @param macro_data [String] the macro data to expand (taken from {#macro_data}) # - # source://yard//lib/yard/code_objects/macro_object.rb#93 + # source://yard//lib/yard/code_objects/macro_object.rb#92 def expand(macro_data, call_params = T.unsafe(nil), full_source = T.unsafe(nil), block_source = T.unsafe(nil)); end # Finds a macro using +macro_name+ @@ -3469,7 +3470,7 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [MacroObject] if a macro is found # @return [nil] if there is no registered macro by that name # - # source://yard//lib/yard/code_objects/macro_object.rb#51 + # source://yard//lib/yard/code_objects/macro_object.rb#50 def find(macro_name); end # Parses a given docstring and determines if the macro is "new" or @@ -3489,12 +3490,12 @@ class YARD::CodeObjects::MacroObject < ::YARD::CodeObjects::Base # @return [nil] if the +data+ has no macro tag or if the macro is # not new and no macro by the macro name is found. # - # source://yard//lib/yard/code_objects/macro_object.rb#71 + # source://yard//lib/yard/code_objects/macro_object.rb#70 def find_or_create(macro_name, data, method_object = T.unsafe(nil)); end end end -# source://yard//lib/yard/code_objects/macro_object.rb#31 +# source://yard//lib/yard/code_objects/macro_object.rb#30 YARD::CodeObjects::MacroObject::MACRO_MATCH = T.let(T.unsafe(nil), Regexp) # Represents a Ruby method in source @@ -4829,7 +4830,7 @@ YARD::Docstring::META_MATCH = T.let(T.unsafe(nil), Regexp) # @see #parse_content # @since 0.8.0 # -# source://yard//lib/yard/docstring_parser.rb#30 +# source://yard//lib/yard/docstring_parser.rb#29 class YARD::DocstringParser # Creates a new parser to parse docstring data # @@ -4838,7 +4839,7 @@ class YARD::DocstringParser # @return [DocstringParser] a new instance of DocstringParser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#81 + # source://yard//lib/yard/docstring_parser.rb#80 def initialize(library = T.unsafe(nil)); end # Creates a new directive using the registered {#library} @@ -4846,14 +4847,14 @@ class YARD::DocstringParser # @return [Tags::Directive] the directive object that is created # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#232 + # source://yard//lib/yard/docstring_parser.rb#231 def create_directive(tag_name, tag_buf); end # Creates a {Tags::RefTag} # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#226 + # source://yard//lib/yard/docstring_parser.rb#225 def create_ref_tag(tag_name, name, object_name); end # Creates a tag from the {Tags::DefaultFactory tag factory}. @@ -4865,7 +4866,7 @@ class YARD::DocstringParser # @return [Tags::Tag, Tags::RefTag] a tag # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#209 + # source://yard//lib/yard/docstring_parser.rb#208 def create_tag(tag_name, tag_buf = T.unsafe(nil)); end # @return [Array] a list of directives identified @@ -4873,7 +4874,7 @@ class YARD::DocstringParser # Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#45 + # source://yard//lib/yard/docstring_parser.rb#44 def directives; end # @return [Array] a list of directives identified @@ -4881,7 +4882,7 @@ class YARD::DocstringParser # Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#45 + # source://yard//lib/yard/docstring_parser.rb#44 def directives=(_arg0); end # @return [Handlers::Base, nil] the handler parsing this @@ -4889,7 +4890,7 @@ class YARD::DocstringParser # initialized through # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#66 + # source://yard//lib/yard/docstring_parser.rb#65 def handler; end # @return [Handlers::Base, nil] the handler parsing this @@ -4897,21 +4898,21 @@ class YARD::DocstringParser # initialized through # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#66 + # source://yard//lib/yard/docstring_parser.rb#65 def handler=(_arg0); end # @return [Tags::Library] the tag library being used to # identify registered tags in the docstring. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#70 + # source://yard//lib/yard/docstring_parser.rb#69 def library; end # @return [Tags::Library] the tag library being used to # identify registered tags in the docstring. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#70 + # source://yard//lib/yard/docstring_parser.rb#69 def library=(_arg0); end # @return [CodeObjects::Base, nil] the object associated with @@ -4919,7 +4920,7 @@ class YARD::DocstringParser # not attached to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#56 + # source://yard//lib/yard/docstring_parser.rb#55 def object; end # @return [CodeObjects::Base, nil] the object associated with @@ -4927,7 +4928,7 @@ class YARD::DocstringParser # not attached to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#56 + # source://yard//lib/yard/docstring_parser.rb#55 def object=(_arg0); end # Parses all content and returns itself. @@ -4944,7 +4945,7 @@ class YARD::DocstringParser # @see #to_docstring # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#113 + # source://yard//lib/yard/docstring_parser.rb#112 def parse(content, object = T.unsafe(nil), handler = T.unsafe(nil)); end # Parses a given block of text. @@ -4954,7 +4955,7 @@ class YARD::DocstringParser # @param content [String] the content to parse # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#129 + # source://yard//lib/yard/docstring_parser.rb#128 def parse_content(content); end # Call post processing callbacks on parser. @@ -4964,19 +4965,19 @@ class YARD::DocstringParser # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#196 + # source://yard//lib/yard/docstring_parser.rb#195 def post_process; end # @return [String] the complete input string to the parser. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#36 + # source://yard//lib/yard/docstring_parser.rb#35 def raw_text; end # @return [String] the complete input string to the parser. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#36 + # source://yard//lib/yard/docstring_parser.rb#35 def raw_text=(_arg0); end # @return [CodeObjects::Base, nil] the object referenced by @@ -4984,7 +4985,7 @@ class YARD::DocstringParser # refer to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#61 + # source://yard//lib/yard/docstring_parser.rb#60 def reference; end # @return [CodeObjects::Base, nil] the object referenced by @@ -4992,7 +4993,7 @@ class YARD::DocstringParser # refer to any object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#61 + # source://yard//lib/yard/docstring_parser.rb#60 def reference=(_arg0); end # @return [OpenStruct] any arbitrary state to be passed between @@ -5001,7 +5002,7 @@ class YARD::DocstringParser # used in a docstring). # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#51 + # source://yard//lib/yard/docstring_parser.rb#50 def state; end # @return [OpenStruct] any arbitrary state to be passed between @@ -5010,7 +5011,7 @@ class YARD::DocstringParser # used in a docstring). # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#51 + # source://yard//lib/yard/docstring_parser.rb#50 def state=(_arg0); end # Backward compatibility to detect old tags that should be specified @@ -5019,42 +5020,42 @@ class YARD::DocstringParser # @return [Boolean] # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#252 + # source://yard//lib/yard/docstring_parser.rb#251 def tag_is_directive?(tag_name); end # @return [Array] the list of meta-data tags identified # by the parser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#40 + # source://yard//lib/yard/docstring_parser.rb#39 def tags; end # @return [Array] the list of meta-data tags identified # by the parser # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#40 + # source://yard//lib/yard/docstring_parser.rb#39 def tags=(_arg0); end # @return [String] the parsed text portion of the docstring, # with tags removed. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#33 + # source://yard//lib/yard/docstring_parser.rb#32 def text; end # @return [String] the parsed text portion of the docstring, # with tags removed. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#33 + # source://yard//lib/yard/docstring_parser.rb#32 def text=(_arg0); end # @return [Docstring] translates parsed text into # a Docstring object. # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#95 + # source://yard//lib/yard/docstring_parser.rb#94 def to_docstring; end private @@ -5063,7 +5064,7 @@ class YARD::DocstringParser # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#324 + # source://yard//lib/yard/docstring_parser.rb#323 def call_after_parse_callbacks; end # Calls the {Tags::Directive#after_parse} callback on all the @@ -5071,17 +5072,17 @@ class YARD::DocstringParser # # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#319 + # source://yard//lib/yard/docstring_parser.rb#318 def call_directives_after_parse; end # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#305 + # source://yard//lib/yard/docstring_parser.rb#304 def detect_reference(content); end # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#301 + # source://yard//lib/yard/docstring_parser.rb#300 def namespace; end class << self @@ -5096,13 +5097,13 @@ class YARD::DocstringParser # with all directives and tags created. # @yieldreturn [void] # - # source://yard//lib/yard/docstring_parser.rb#266 + # source://yard//lib/yard/docstring_parser.rb#265 def after_parse(&block); end # @return [Array] the {after_parse} callback proc objects # @since 0.8.0 # - # source://yard//lib/yard/docstring_parser.rb#271 + # source://yard//lib/yard/docstring_parser.rb#270 def after_parse_callbacks; end end end @@ -5111,7 +5112,7 @@ end # # @since 0.8.0 # -# source://yard//lib/yard/docstring_parser.rb#73 +# source://yard//lib/yard/docstring_parser.rb#72 YARD::DocstringParser::META_MATCH = T.let(T.unsafe(nil), Regexp) # source://yard//lib/yard/gem_index.rb#6 @@ -6020,14 +6021,14 @@ end # # @see Handlers::Base # -# source://yard//lib/yard/handlers/processor.rb#20 +# source://yard//lib/yard/handlers/processor.rb#19 class YARD::Handlers::Processor # Creates a new Processor for a +file+. # # @param parser [Parser::SourceParser] the parser used to initialize the processor # @return [Processor] a new instance of Processor # - # source://yard//lib/yard/handlers/processor.rb#92 + # source://yard//lib/yard/handlers/processor.rb#91 def initialize(parser); end # Share state across different handlers inside of a file. @@ -6040,7 +6041,7 @@ class YARD::Handlers::Processor # @return [OpenStruct] an open structure that can store arbitrary data # @see #globals # - # source://yard//lib/yard/handlers/processor.rb#88 + # source://yard//lib/yard/handlers/processor.rb#87 def extra_state; end # Share state across different handlers inside of a file. @@ -6053,17 +6054,17 @@ class YARD::Handlers::Processor # @return [OpenStruct] an open structure that can store arbitrary data # @see #globals # - # source://yard//lib/yard/handlers/processor.rb#88 + # source://yard//lib/yard/handlers/processor.rb#87 def extra_state=(_arg0); end # @return [String] the filename # - # source://yard//lib/yard/handlers/processor.rb#41 + # source://yard//lib/yard/handlers/processor.rb#40 def file; end # @return [String] the filename # - # source://yard//lib/yard/handlers/processor.rb#41 + # source://yard//lib/yard/handlers/processor.rb#40 def file=(_arg0); end # Searches for all handlers in {Base.subclasses} that match the +statement+ @@ -6071,7 +6072,7 @@ class YARD::Handlers::Processor # @param statement the statement object to match. # @return [Array] a list of handlers to process the statement with. # - # source://yard//lib/yard/handlers/processor.rb#151 + # source://yard//lib/yard/handlers/processor.rb#150 def find_handlers(statement); end # Handlers can share state for the entire post processing stage through @@ -6091,7 +6092,7 @@ class YARD::Handlers::Processor # @return [OpenStruct] global shared state for post-processing stage # @see #extra_state # - # source://yard//lib/yard/handlers/processor.rb#77 + # source://yard//lib/yard/handlers/processor.rb#76 def globals; end # Handlers can share state for the entire post processing stage through @@ -6111,17 +6112,17 @@ class YARD::Handlers::Processor # @return [OpenStruct] global shared state for post-processing stage # @see #extra_state # - # source://yard//lib/yard/handlers/processor.rb#77 + # source://yard//lib/yard/handlers/processor.rb#76 def globals=(_arg0); end # @return [CodeObjects::NamespaceObject] the current namespace # - # source://yard//lib/yard/handlers/processor.rb#44 + # source://yard//lib/yard/handlers/processor.rb#43 def namespace; end # @return [CodeObjects::NamespaceObject] the current namespace # - # source://yard//lib/yard/handlers/processor.rb#44 + # source://yard//lib/yard/handlers/processor.rb#43 def namespace=(_arg0); end # @return [CodeObjects::Base, nil] unlike the namespace, the owner @@ -6129,7 +6130,7 @@ class YARD::Handlers::Processor # For instance, when parsing a method body, the {CodeObjects::MethodObject} # is set as the owner, in case any extra method information is processed. # - # source://yard//lib/yard/handlers/processor.rb#56 + # source://yard//lib/yard/handlers/processor.rb#55 def owner; end # @return [CodeObjects::Base, nil] unlike the namespace, the owner @@ -6137,7 +6138,7 @@ class YARD::Handlers::Processor # For instance, when parsing a method body, the {CodeObjects::MethodObject} # is set as the owner, in case any extra method information is processed. # - # source://yard//lib/yard/handlers/processor.rb#56 + # source://yard//lib/yard/handlers/processor.rb#55 def owner=(_arg0); end # Continue parsing the remainder of the files in the +globals.ordered_parser+ @@ -6147,17 +6148,17 @@ class YARD::Handlers::Processor # @return [void] # @see Parser::OrderedParser # - # source://yard//lib/yard/handlers/processor.rb#140 + # source://yard//lib/yard/handlers/processor.rb#139 def parse_remaining_files; end # @return [Symbol] the parser type (:ruby, :ruby18, :c) # - # source://yard//lib/yard/handlers/processor.rb#59 + # source://yard//lib/yard/handlers/processor.rb#58 def parser_type; end # @return [Symbol] the parser type (:ruby, :ruby18, :c) # - # source://yard//lib/yard/handlers/processor.rb#59 + # source://yard//lib/yard/handlers/processor.rb#58 def parser_type=(_arg0); end # Processes a list of statements by finding handlers to process each @@ -6166,27 +6167,27 @@ class YARD::Handlers::Processor # @param statements [Array] a list of statements # @return [void] # - # source://yard//lib/yard/handlers/processor.rb#110 + # source://yard//lib/yard/handlers/processor.rb#109 def process(statements); end # @return [Symbol] the current scope (class, instance) # - # source://yard//lib/yard/handlers/processor.rb#50 + # source://yard//lib/yard/handlers/processor.rb#49 def scope; end # @return [Symbol] the current scope (class, instance) # - # source://yard//lib/yard/handlers/processor.rb#50 + # source://yard//lib/yard/handlers/processor.rb#49 def scope=(_arg0); end # @return [Symbol] the current visibility (public, private, protected) # - # source://yard//lib/yard/handlers/processor.rb#47 + # source://yard//lib/yard/handlers/processor.rb#46 def visibility; end # @return [Symbol] the current visibility (public, private, protected) # - # source://yard//lib/yard/handlers/processor.rb#47 + # source://yard//lib/yard/handlers/processor.rb#46 def visibility=(_arg0); end private @@ -6195,7 +6196,7 @@ class YARD::Handlers::Processor # # @return [Base] the base class # - # source://yard//lib/yard/handlers/processor.rb#172 + # source://yard//lib/yard/handlers/processor.rb#171 def handler_base_class; end # The module holding the handlers to be loaded @@ -6203,12 +6204,12 @@ class YARD::Handlers::Processor # @return [Module] the module containing the handlers depending on # {#parser_type}. # - # source://yard//lib/yard/handlers/processor.rb#180 + # source://yard//lib/yard/handlers/processor.rb#179 def handler_base_namespace; end # @return [Boolean] # - # source://yard//lib/yard/handlers/processor.rb#161 + # source://yard//lib/yard/handlers/processor.rb#160 def handles?(handler, statement); end # Loads handlers from {#handler_base_namespace}. This ensures that @@ -6217,7 +6218,7 @@ class YARD::Handlers::Processor # # @return [void] # - # source://yard//lib/yard/handlers/processor.rb#188 + # source://yard//lib/yard/handlers/processor.rb#187 def load_handlers; end class << self @@ -6225,14 +6226,14 @@ class YARD::Handlers::Processor # @return [Hash] a list of registered parser type extensions # @since 0.6.0 # - # source://yard//lib/yard/handlers/processor.rb#33 + # source://yard//lib/yard/handlers/processor.rb#32 def namespace_for_handler; end # Registers a new namespace for handlers of the given type. # # @since 0.6.0 # - # source://yard//lib/yard/handlers/processor.rb#24 + # source://yard//lib/yard/handlers/processor.rb#23 def register_handler_namespace(type, ns); end end end @@ -7065,6 +7066,11 @@ end # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#3 class YARD::Handlers::Ruby::VisibilityHandler < ::YARD::Handlers::Ruby::Base include ::YARD::Handlers::Ruby::DecoratorHandlerMethods + + # @return [Boolean] + # + # source://yard//lib/yard/handlers/ruby/visibility_handler.rb#31 + def is_attribute_method?(node); end end # Handles 'yield' calls @@ -7473,13 +7479,13 @@ class YARD::I18n::Text # block separated by one or more empty lines. Empty line is a # line that contains only zero or more whitespaces. It may # called many times. - # @yieldparam text [String] the text of extracted paragraph. - # @yieldparam start_line_no [Integer] the start line number of - # extracted paragraph. # @yieldparam name [String] the name of extracted attribute. # @yieldparam value [String] the value of extracted attribute. # @yieldparam line_no [Integer] the defined line number of extracted # attribute. + # @yieldparam text [String] the text of extracted paragraph. + # @yieldparam start_line_no [Integer] the start line number of + # extracted paragraph. # # source://yard//lib/yard/i18n/text.rb#35 def extract_messages; end @@ -7527,13 +7533,16 @@ end # Handles console logging for info, warnings and errors. # Uses the stdlib Logger class in Ruby for all the backend logic. # -# source://yard//lib/yard/logging.rb#9 -class YARD::Logger < ::Logger +# source://yard//lib/yard/logging.rb#8 +class YARD::Logger + include ::YARD::Logger::Severity + # Creates a new logger # + # @private # @return [Logger] a new instance of Logger # - # source://yard//lib/yard/logging.rb#43 + # source://yard//lib/yard/logging.rb#82 def initialize(pipe, *args); end # Displays an unformatted line to the logger output stream. @@ -7542,7 +7551,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#143 + # source://yard//lib/yard/logging.rb#205 def <<(msg = T.unsafe(nil)); end # Prints the backtrace +exc+ to the logger as error data. @@ -7551,7 +7560,7 @@ class YARD::Logger < ::Logger # @param level_meth [Symbol] the level to log backtrace at # @return [void] # - # source://yard//lib/yard/logging.rb#154 + # source://yard//lib/yard/logging.rb#216 def backtrace(exc, level_meth = T.unsafe(nil)); end # Captures the duration of a block of code for benchmark analysis. Also @@ -7564,7 +7573,7 @@ class YARD::Logger < ::Logger # @todo Implement capture storage for reporting of benchmarks # @yield a block of arbitrary code to benchmark # - # source://yard//lib/yard/logging.rb#80 + # source://yard//lib/yard/logging.rb#234 def capture(msg, nontty_log = T.unsafe(nil)); end # Clears the progress indicator in the TTY display. @@ -7572,14 +7581,18 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#121 + # source://yard//lib/yard/logging.rb#186 def clear_progress; end - # Changes the debug level to DEBUG if $DEBUG is set - # and writes a debugging message. + # Changes the debug level to DEBUG if $DEBUG is set and writes a debugging message. + # Logs a message with the debug severity level. # - # source://yard//lib/yard/logging.rb#59 - def debug(*args); end + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def debug(message); end # Sets the logger level for the duration of the block # @@ -7591,17 +7604,65 @@ class YARD::Logger < ::Logger # values can be found in Ruby's Logger class. # @yield the block with the logger temporarily set to +new_level+ # - # source://yard//lib/yard/logging.rb#179 + # source://yard//lib/yard/logging.rb#142 def enter_level(new_level = T.unsafe(nil)); end + # Logs a message with the error severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def error(message); end + + # Logs a message with the fatal severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def fatal(message); end + + # Logs a message with the info severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def info(message); end + # @return [IO] the IO object being logged to # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#17 + # source://yard//lib/yard/logging.rb#49 def io; end - # source://yard//lib/yard/logging.rb#18 - def io=(pipe); end + # @return [IO] the IO object being logged to + # @since 0.8.2 + # + # source://yard//lib/yard/logging.rb#49 + def io=(_arg0); end + + # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level + # + # source://yard//lib/yard/logging.rb#57 + def level; end + + # @return [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the logging level + # + # source://yard//lib/yard/logging.rb#57 + def level=(_arg0); end + + # Logs a message with a given severity + # + # @param severity [DEBUG, INFO, WARN, ERROR, FATAL, UNKNOWN] the severity level + # @param message [String] the message to log + # + # source://yard//lib/yard/logging.rb#122 + def log(severity, message); end # Displays an unformatted line to the logger output stream. # @@ -7609,7 +7670,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#143 + # source://yard//lib/yard/logging.rb#205 def print(msg = T.unsafe(nil)); end # Displays a progress indicator for a given message. This progress report @@ -7622,7 +7683,7 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#96 + # source://yard//lib/yard/logging.rb#161 def progress(msg, nontty_log = T.unsafe(nil)); end # Displays an unformatted line to the logger output stream, adding @@ -7632,86 +7693,91 @@ class YARD::Logger < ::Logger # @return [void] # @since 0.8.2 # - # source://yard//lib/yard/logging.rb#132 + # source://yard//lib/yard/logging.rb#197 def puts(msg = T.unsafe(nil)); end # @return [Boolean] whether backtraces should be shown (by default # this is on). # - # source://yard//lib/yard/logging.rb#22 + # source://yard//lib/yard/logging.rb#53 def show_backtraces; end # Sets the attribute show_backtraces # # @param value the value to set the attribute show_backtraces to. # - # source://yard//lib/yard/logging.rb#23 + # source://yard//lib/yard/logging.rb#54 def show_backtraces=(_arg0); end # @return [Boolean] whether progress indicators should be shown when # logging CLIs (by default this is off). # - # source://yard//lib/yard/logging.rb#27 + # source://yard//lib/yard/logging.rb#64 def show_progress; end # Sets the attribute show_progress # # @param value the value to set the attribute show_progress to. # - # source://yard//lib/yard/logging.rb#34 + # source://yard//lib/yard/logging.rb#70 def show_progress=(_arg0); end + # Logs a message with the unknown severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log + # + # source://yard//lib/yard/logging.rb#103 + def unknown(message); end + # Remembers when a warning occurs and writes a warning message. + # Logs a message with the warn severity level. + # + # @param message [String] the message to log + # @return [void] + # @see #log # - # source://yard//lib/yard/logging.rb#65 - def warn(*args); end + # source://yard//lib/yard/logging.rb#103 + def warn(message); end # Warns that the Ruby environment does not support continuations. Applies # to JRuby, Rubinius and MacRuby. This warning will only display once # per Ruby process. # # @deprecated Continuations are no longer needed by YARD 0.8.0+. + # @private # @return [void] # - # source://yard//lib/yard/logging.rb#167 + # source://yard//lib/yard/logging.rb#250 def warn_no_continuations; end - # Returns the value of attribute warned. + # @return [Boolean] whether a warn message has been emitted. Used for status tracking. # - # source://yard//lib/yard/logging.rb#69 + # source://yard//lib/yard/logging.rb#60 def warned; end - # Sets the attribute warned + # @return [Boolean] whether a warn message has been emitted. Used for status tracking. # - # @param value the value to set the attribute warned to. - # - # source://yard//lib/yard/logging.rb#69 + # source://yard//lib/yard/logging.rb#60 def warned=(_arg0); end private - # Override this internal Logger method to clear line - # - # source://yard//lib/yard/logging.rb#190 - def add(*args); end - - # source://yard//lib/yard/logging.rb#195 + # source://yard//lib/yard/logging.rb#255 def clear_line; end - # Log format (from Logger implementation). Used by Logger internally - # - # source://yard//lib/yard/logging.rb#201 - def format_log(sev, _time, _prog, msg); end - - # source://logger/1.6.0/logger.rb#684 - def print_no_newline(msg); end - class << self + # @private + # + # source://yard//lib/yard/logging.rb#101 + def create_log_method(name); end + # The logger instance # # @return [Logger] the logger instance # - # source://yard//lib/yard/logging.rb#38 + # source://yard//lib/yard/logging.rb#76 def instance(pipe = T.unsafe(nil)); end end end @@ -7721,9 +7787,97 @@ end # # @since 0.8.2 # -# source://yard//lib/yard/logging.rb#13 +# source://yard//lib/yard/logging.rb#45 YARD::Logger::PROGRESS_INDICATORS = T.let(T.unsafe(nil), Array) +# Log severity levels +# +# source://yard//lib/yard/logging.rb#10 +module YARD::Logger::Severity; end + +# Debugging log level +# +# source://yard//lib/yard/logging.rb#12 +YARD::Logger::Severity::DEBUG = T.let(T.unsafe(nil), Integer) + +# Error log level +# +# source://yard//lib/yard/logging.rb#21 +YARD::Logger::Severity::ERROR = T.let(T.unsafe(nil), Integer) + +# Fatal log level +# +# source://yard//lib/yard/logging.rb#24 +YARD::Logger::Severity::FATAL = T.let(T.unsafe(nil), Integer) + +# Information log level +# +# source://yard//lib/yard/logging.rb#15 +YARD::Logger::Severity::INFO = T.let(T.unsafe(nil), Integer) + +# @private +# +# source://yard//lib/yard/logging.rb#30 +YARD::Logger::Severity::SEVERITIES = T.let(T.unsafe(nil), Hash) + +# Unknown log level +# +# source://yard//lib/yard/logging.rb#27 +YARD::Logger::Severity::UNKNOWN = T.let(T.unsafe(nil), Integer) + +# Warning log level +# +# source://yard//lib/yard/logging.rb#18 +YARD::Logger::Severity::WARN = T.let(T.unsafe(nil), Integer) + +# An OpenStruct compatible struct class that allows for basic access of attributes +# via +struct.attr_name+ and +struct.attr_name = value+. +# +# source://yard//lib/yard/open_struct.rb#4 +class YARD::OpenStruct + # @return [OpenStruct] a new instance of OpenStruct + # + # source://yard//lib/yard/open_struct.rb#5 + def initialize(hash = T.unsafe(nil)); end + + # source://yard//lib/yard/open_struct.rb#25 + def ==(other); end + + # source://yard//lib/yard/open_struct.rb#41 + def [](key); end + + # source://yard//lib/yard/open_struct.rb#37 + def []=(key, value); end + + # source://yard//lib/yard/open_struct.rb#33 + def dig(*keys); end + + # source://yard//lib/yard/open_struct.rb#45 + def each_pair(&block); end + + # source://yard//lib/yard/open_struct.rb#29 + def hash; end + + # source://yard//lib/yard/open_struct.rb#49 + def marshal_dump; end + + # source://yard//lib/yard/open_struct.rb#53 + def marshal_load(data); end + + # @private + # + # source://yard//lib/yard/open_struct.rb#10 + def method_missing(name, *args); end + + # source://yard//lib/yard/open_struct.rb#21 + def to_h; end + + private + + # source://yard//lib/yard/open_struct.rb#59 + def __cache_lookup__(name); end +end + # Generalized options class for passing around large amounts of options between objects. # # The options class exists for better visibility and documentability of options being @@ -8275,7 +8429,7 @@ end # # @see Processor#parse_remaining_files # -# source://yard//lib/yard/parser/source_parser.rb#21 +# source://yard//lib/yard/parser/source_parser.rb#20 class YARD::Parser::OrderedParser # Creates a new OrderedParser with the global state and a list # of files to parse. @@ -8287,30 +8441,30 @@ class YARD::Parser::OrderedParser # @param files [Array] the list of files to parse # @return [OrderedParser] a new instance of OrderedParser # - # source://yard//lib/yard/parser/source_parser.rb#33 + # source://yard//lib/yard/parser/source_parser.rb#32 def initialize(global_state, files); end # @return [Array] the list of remaining files to parse # - # source://yard//lib/yard/parser/source_parser.rb#23 + # source://yard//lib/yard/parser/source_parser.rb#22 def files; end # @return [Array] the list of remaining files to parse # - # source://yard//lib/yard/parser/source_parser.rb#23 + # source://yard//lib/yard/parser/source_parser.rb#22 def files=(_arg0); end # Parses the remainder of the {#files} list. # # @see Processor#parse_remaining_files # - # source://yard//lib/yard/parser/source_parser.rb#42 + # source://yard//lib/yard/parser/source_parser.rb#41 def parse; end end # Raised when the parser sees a Ruby syntax error # -# source://yard//lib/yard/parser/source_parser.rb#13 +# source://yard//lib/yard/parser/source_parser.rb#12 class YARD::Parser::ParserSyntaxError < ::YARD::Parser::UndocumentableError; end # Ruby parsing components. @@ -8755,6 +8909,9 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#430 def continue; end + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1116 + def dedent(str); end + # Returns the value of attribute exception_on_syntax_error. # # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#463 @@ -8779,7 +8936,7 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#488 def gets; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1272 def identify_comment; end # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#945 @@ -8791,13 +8948,13 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#980 def identify_identifier; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1130 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1145 def identify_number(start); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1111 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1126 def identify_quotation(initial_char); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1192 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1207 def identify_string(ltype, quoted = T.unsafe(nil), opener = T.unsafe(nil), initial_char = T.unsafe(nil)); end # Returns the value of attribute indent. @@ -8844,10 +9001,10 @@ class YARD::Parser::Ruby::Legacy::RubyLex # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#462 def read_auto_clean_up=(_arg0); end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1280 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1295 def read_escape; end - # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1242 + # source://yard//lib/yard/parser/ruby/legacy/ruby_lex.rb#1257 def skip_inner_expression; end # Returns the value of attribute skip_space. @@ -11036,7 +11193,7 @@ end # @see Handlers::Base # @see CodeObjects::Base # -# source://yard//lib/yard/parser/source_parser.rb#64 +# source://yard//lib/yard/parser/source_parser.rb#63 class YARD::Parser::SourceParser # @overload initialize # @return [SourceParser] a new instance of SourceParser @@ -11196,10 +11353,6 @@ class YARD::Parser::SourceParser # To register a callback that is called before the entire list of files # is processed, see {before_parse_list}. # - # @example Cancel parsing of any test_*.rb files - # SourceParser.before_parse_file do |parser| - # return false if parser.file =~ /^test_.+\.rb$/ - # end # @example Installing a simple callback # SourceParser.before_parse_file do |parser| # puts "I'm parsing #{parser.file}" @@ -11209,9 +11362,13 @@ class YARD::Parser::SourceParser # "I'm parsing lib/foo.rb" # "I'm parsing lib/foo_bar.rb" # "I'm parsing lib/last_file.rb" + # @example Cancel parsing of any test_*.rb files + # SourceParser.before_parse_file do |parser| + # return false if parser.file =~ /^test_.+\.rb$/ + # end # @return [Proc] the yielded block - # @see before_parse_list # @see after_parse_file + # @see before_parse_list # @since 0.7.0 # @yield [parser] the yielded block is called once before each # file that is parsed. This might happen many times for a single @@ -11235,6 +11392,12 @@ class YARD::Parser::SourceParser # via {parse}. The block passed to this method will be called on # subsequent parse calls. # + # @example Installing a simple callback + # SourceParser.before_parse_list do |files, globals| + # puts "Starting to parse..." + # end + # YARD.parse('lib/**/*.rb') + # # prints "Starting to parse..." # @example Setting global state # SourceParser.before_parse_list do |files, globals| # globals.method_count = 0 @@ -11248,12 +11411,6 @@ class YARD::Parser::SourceParser # end # YARD.parse # # Prints: "Found 37 methods" - # @example Installing a simple callback - # SourceParser.before_parse_list do |files, globals| - # puts "Starting to parse..." - # end - # YARD.parse('lib/**/*.rb') - # # prints "Starting to parse..." # @example Using a global callback to cancel parsing # SourceParser.before_parse_list do |files, globals| # return false if files.include?('foo.rb') @@ -11262,8 +11419,8 @@ class YARD::Parser::SourceParser # YARD.parse(['foo.rb', 'bar.rb']) # callback cancels this method # YARD.parse('bar.rb') # parses normally # @return [Proc] the yielded block - # @see before_parse_file # @see after_parse_list + # @see before_parse_file # @since 0.7.0 # @yield [files, globals] the yielded block is called once before # parsing all files @@ -11292,7 +11449,7 @@ class YARD::Parser::SourceParser # {YARD::Logger} # @return [void] # - # source://yard//lib/yard/parser/source_parser.rb#100 + # source://yard//lib/yard/parser/source_parser.rb#99 def parse(paths = T.unsafe(nil), excluded = T.unsafe(nil), level = T.unsafe(nil)); end # Parses a string +content+ @@ -11306,10 +11463,10 @@ class YARD::Parser::SourceParser # @return [Symbol] the default parser type (defaults to :ruby) # - # source://yard//lib/yard/parser/source_parser.rb#86 + # source://yard//lib/yard/parser/source_parser.rb#85 def parser_type; end - # source://yard//lib/yard/parser/source_parser.rb#88 + # source://yard//lib/yard/parser/source_parser.rb#87 def parser_type=(value); end # @private @@ -11390,30 +11547,30 @@ end # # @since 0.9.0 # -# source://yard//lib/yard/parser/source_parser.rb#71 +# source://yard//lib/yard/parser/source_parser.rb#70 YARD::Parser::SourceParser::DEFAULT_PATH_GLOB = T.let(T.unsafe(nil), Array) # Byte order marks for various encodings # # @since 0.7.0 # -# source://yard//lib/yard/parser/source_parser.rb#75 +# source://yard//lib/yard/parser/source_parser.rb#74 YARD::Parser::SourceParser::ENCODING_BYTE_ORDER_MARKS = T.let(T.unsafe(nil), Hash) -# source://yard//lib/yard/parser/source_parser.rb#66 +# source://yard//lib/yard/parser/source_parser.rb#65 YARD::Parser::SourceParser::ENCODING_LINE = T.let(T.unsafe(nil), Regexp) -# source://yard//lib/yard/parser/source_parser.rb#67 +# source://yard//lib/yard/parser/source_parser.rb#66 YARD::Parser::SourceParser::FROZEN_STRING_LINE = T.let(T.unsafe(nil), Regexp) -# source://yard//lib/yard/parser/source_parser.rb#65 +# source://yard//lib/yard/parser/source_parser.rb#64 YARD::Parser::SourceParser::SHEBANG_LINE = T.let(T.unsafe(nil), Regexp) # Raised when an object is recognized but cannot be documented. This # generally occurs when the Ruby syntax used to declare an object is # too dynamic in nature. # -# source://yard//lib/yard/parser/source_parser.rb#10 +# source://yard//lib/yard/parser/source_parser.rb#9 class YARD::Parser::UndocumentableError < ::RuntimeError; end # The root path for YARD source libraries @@ -11790,22 +11947,22 @@ module YARD::Registry # Attempts to find an object by name starting at +namespace+, performing # a lookup similar to Ruby's method of resolving a constant in a namespace. # + # @example Looks for instance method #reverse starting from A::B::C + # Registry.resolve(P("A::B::C"), "#reverse") # @example Looks for a constant in the root namespace # Registry.resolve(nil, 'CONSTANT') # @example Looks for a class method respecting the inheritance tree # Registry.resolve(myclass, 'mymethod', true) - # @example Looks for instance method #reverse starting from A::B::C - # Registry.resolve(P("A::B::C"), "#reverse") # @example Looks for a constant but returns a proxy if not found # Registry.resolve(P('A::B::C'), 'D', false, true) # => # # @example Looks for a complex path from a namespace # Registry.resolve(P('A::B'), 'B::D') # => # - # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) - # when performing name resolution if set to +true+. # @param namespace [CodeObjects::NamespaceObject, nil] the starting namespace # (module or class). If +nil+ or +:root+, starts from the {root} object. # @param name [String, Symbol] the name (or complex path) to look for from # +namespace+. + # @param inheritance [Boolean] Follows inheritance chain (mixins, superclass) + # when performing name resolution if set to +true+. # @param proxy_fallback [Boolean] If +true+, returns a proxy representing # the unresolved path (namespace + name) if no object is found. # @param type [Symbol, nil] the {CodeObjects::Base#type} that the resolved @@ -11963,12 +12120,12 @@ class YARD::RegistryResolver # object can be returned if the lookup fails for future resolution. The # proxy will be type hinted with the +type+ used in the original lookup. # - # @example A lookup on a method through the inheritance tree - # resolver.lookup_by_math("A::B#foo", inheritance: true) # @example A lookup from root # resolver.lookup_by_path("A::B::C") # @example A lookup from the A::B namespace # resolver.lookup_by_path("C", namespace: P("A::B")) + # @example A lookup on a method through the inheritance tree + # resolver.lookup_by_math("A::B#foo", inheritance: true) # @option opts # @option opts # @option opts @@ -14800,42 +14957,42 @@ module YARD::Tags; end # @see tag:!method # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#461 +# source://yard//lib/yard/tags/directives.rb#460 class YARD::Tags::AttributeDirective < ::YARD::Tags::MethodDirective # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#462 + # source://yard//lib/yard/tags/directives.rb#461 def after_parse; end protected # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#470 + # source://yard//lib/yard/tags/directives.rb#469 def method_name; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#476 + # source://yard//lib/yard/tags/directives.rb#475 def method_signature; end private # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#486 + # source://yard//lib/yard/tags/directives.rb#485 def create_attribute_data(object); end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#516 + # source://yard//lib/yard/tags/directives.rb#515 def readable?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#512 + # source://yard//lib/yard/tags/directives.rb#511 def writable?; end end @@ -14969,14 +15126,14 @@ end # @see Library.define_directive # @since 0.8.0 # -# source://yard//lib/yard/tags/directives.rb#23 +# source://yard//lib/yard/tags/directives.rb#22 class YARD::Tags::Directive # @param tag [Tag] the meta-data tag containing all input to the docstring # @param parser [DocstringParser] the docstring parser object # @return [Directive] a new instance of Directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#55 + # source://yard//lib/yard/tags/directives.rb#54 def initialize(tag, parser); end # Called after parsing all directives and tags in the docstring. Used @@ -14985,7 +15142,7 @@ class YARD::Tags::Directive # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#74 + # source://yard//lib/yard/tags/directives.rb#73 def after_parse; end # Called when processing the directive. Subclasses should implement @@ -14997,7 +15154,7 @@ class YARD::Tags::Directive # @return [void] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#69 + # source://yard//lib/yard/tags/directives.rb#68 def call; end # Set this field to replace the directive definition inside of a docstring @@ -15009,7 +15166,7 @@ class YARD::Tags::Directive # @return [nil] if no expansion should take place for this directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#34 + # source://yard//lib/yard/tags/directives.rb#33 def expanded_text; end # Set this field to replace the directive definition inside of a docstring @@ -15021,7 +15178,7 @@ class YARD::Tags::Directive # @return [nil] if no expansion should take place for this directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#34 + # source://yard//lib/yard/tags/directives.rb#33 def expanded_text=(_arg0); end # @return [Handlers::Base, nil] the handler object the docstring parser @@ -15029,33 +15186,33 @@ class YARD::Tags::Directive # through {Parser::SourceParser}. # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#49 + # source://yard//lib/yard/tags/directives.rb#48 def handler; end # @return [CodeObjects::Base, nil] the object the parent docstring is # attached to. May be nil. # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#43 + # source://yard//lib/yard/tags/directives.rb#42 def object; end # @return [DocstringParser] the parser that is parsing all tag # information out of the docstring # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#38 + # source://yard//lib/yard/tags/directives.rb#37 def parser=(_arg0); end # @return [Tag] the meta-data tag containing data input to the directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#25 + # source://yard//lib/yard/tags/directives.rb#24 def tag; end # @return [Tag] the meta-data tag containing data input to the directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#25 + # source://yard//lib/yard/tags/directives.rb#24 def tag=(_arg0); end protected @@ -15063,14 +15220,14 @@ class YARD::Tags::Directive # @return [Boolean] # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#80 + # source://yard//lib/yard/tags/directives.rb#79 def inside_directive?; end # @return [DocstringParser] the parser that is parsing all tag # information out of the docstring # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#38 + # source://yard//lib/yard/tags/directives.rb#37 def parser; end end @@ -15094,11 +15251,11 @@ end # @see tag:!group # @since 0.6.0 # -# source://yard//lib/yard/tags/directives.rb#105 +# source://yard//lib/yard/tags/directives.rb#104 class YARD::Tags::EndGroupDirective < ::YARD::Tags::Directive # @since 0.6.0 # - # source://yard//lib/yard/tags/directives.rb#106 + # source://yard//lib/yard/tags/directives.rb#105 def call; end end @@ -15119,11 +15276,11 @@ end # @see tag:!endgroup # @since 0.6.0 # -# source://yard//lib/yard/tags/directives.rb#128 +# source://yard//lib/yard/tags/directives.rb#127 class YARD::Tags::GroupDirective < ::YARD::Tags::Directive # @since 0.6.0 # - # source://yard//lib/yard/tags/directives.rb#129 + # source://yard//lib/yard/tags/directives.rb#128 def call; end end @@ -15888,12 +16045,12 @@ end # end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#258 +# source://yard//lib/yard/tags/directives.rb#257 class YARD::Tags::MacroDirective < ::YARD::Tags::Directive # @raise [TagFormatError] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#259 + # source://yard//lib/yard/tags/directives.rb#258 def call; end private @@ -15901,40 +16058,40 @@ class YARD::Tags::MacroDirective < ::YARD::Tags::Directive # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#288 + # source://yard//lib/yard/tags/directives.rb#287 def anonymous?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#277 + # source://yard//lib/yard/tags/directives.rb#276 def attach?; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#283 + # source://yard//lib/yard/tags/directives.rb#282 def class_method?; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#292 + # source://yard//lib/yard/tags/directives.rb#291 def expand(macro_data); end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#308 + # source://yard//lib/yard/tags/directives.rb#307 def find_or_create; end # @return [Boolean] # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#272 + # source://yard//lib/yard/tags/directives.rb#271 def new?; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#332 + # source://yard//lib/yard/tags/directives.rb#331 def warn; end end @@ -15967,49 +16124,49 @@ end # @see tag:!attribute # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#368 +# source://yard//lib/yard/tags/directives.rb#367 class YARD::Tags::MethodDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#373 + # source://yard//lib/yard/tags/directives.rb#372 def after_parse; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#371 + # source://yard//lib/yard/tags/directives.rb#370 def call; end protected # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#413 + # source://yard//lib/yard/tags/directives.rb#412 def create_object; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#381 + # source://yard//lib/yard/tags/directives.rb#380 def method_name; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#390 + # source://yard//lib/yard/tags/directives.rb#389 def method_signature; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#394 + # source://yard//lib/yard/tags/directives.rb#393 def sanitized_tag_signature; end # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#403 + # source://yard//lib/yard/tags/directives.rb#402 def use_indented_text; end end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#369 +# source://yard//lib/yard/tags/directives.rb#368 YARD::Tags::MethodDirective::SCOPE_MATCH = T.let(T.unsafe(nil), Regexp) # source://yard//lib/yard/tags/option_tag.rb#4 @@ -16121,11 +16278,11 @@ end # # } # @since 0.8.0 # -# source://yard//lib/yard/tags/directives.rb#545 +# source://yard//lib/yard/tags/directives.rb#544 class YARD::Tags::ParseDirective < ::YARD::Tags::Directive # @since 0.8.0 # - # source://yard//lib/yard/tags/directives.rb#546 + # source://yard//lib/yard/tags/directives.rb#545 def call; end end @@ -16209,11 +16366,11 @@ end # def method2; end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#579 +# source://yard//lib/yard/tags/directives.rb#578 class YARD::Tags::ScopeDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#580 + # source://yard//lib/yard/tags/directives.rb#579 def call; end end @@ -16244,7 +16401,7 @@ class YARD::Tags::Tag # @param name [String] optional key name which the tag refers to # @return [Tag] a new instance of Tag # - # source://yard//lib/yard/tags/tag.rb#44 + # source://yard//lib/yard/tags/tag.rb#45 def initialize(tag_name, text, types = T.unsafe(nil), name = T.unsafe(nil)); end # Provides a plain English summary of the type specification, or nil @@ -16253,27 +16410,29 @@ class YARD::Tags::Tag # @return [String] a plain English description of the associated types # @return [nil] if no types are provided or not parsable # - # source://yard//lib/yard/tags/tag.rb#65 + # source://yard//lib/yard/tags/tag.rb#66 def explain_types; end # @return [String] a name associated with the tag + # @return [nil] if no tag name is supplied # - # source://yard//lib/yard/tags/tag.rb#26 + # source://yard//lib/yard/tags/tag.rb#27 def name; end # @return [String] a name associated with the tag + # @return [nil] if no tag name is supplied # - # source://yard//lib/yard/tags/tag.rb#26 + # source://yard//lib/yard/tags/tag.rb#27 def name=(_arg0); end # @return [CodeObjects::Base] the associated object # - # source://yard//lib/yard/tags/tag.rb#29 + # source://yard//lib/yard/tags/tag.rb#30 def object; end # @return [CodeObjects::Base] the associated object # - # source://yard//lib/yard/tags/tag.rb#29 + # source://yard//lib/yard/tags/tag.rb#30 def object=(_arg0); end # @return [String] the name of the tag @@ -16304,7 +16463,7 @@ class YARD::Tags::Tag # @return [String] the first of the list of specified types # @see #types # - # source://yard//lib/yard/tags/tag.rb#56 + # source://yard//lib/yard/tags/tag.rb#57 def type; end # @return [Array] a list of types associated with the tag @@ -16495,11 +16654,11 @@ end # def method2; end # @since 0.7.0 # -# source://yard//lib/yard/tags/directives.rb#611 +# source://yard//lib/yard/tags/directives.rb#610 class YARD::Tags::VisibilityDirective < ::YARD::Tags::Directive # @since 0.7.0 # - # source://yard//lib/yard/tags/directives.rb#612 + # source://yard//lib/yard/tags/directives.rb#611 def call; end end @@ -16515,7 +16674,7 @@ module YARD::Templates; end # * To render a template, call {render}. # * To register a template path in the lookup paths, call {register_template_path}. # -# source://yard//lib/yard/templates/engine.rb#12 +# source://yard//lib/yard/templates/engine.rb#11 module YARD::Templates::Engine class << self # Passes a set of objects to the +:fulldoc+ template for full documentation generation. @@ -16527,7 +16686,7 @@ module YARD::Templates::Engine # @param options [Hash] (see {render}) # @return [void] # - # source://yard//lib/yard/templates/engine.rb#101 + # source://yard//lib/yard/templates/engine.rb#100 def generate(objects, options = T.unsafe(nil)); end # Registers a new template path in {template_paths} @@ -16535,7 +16694,7 @@ module YARD::Templates::Engine # @param path [String] a new template path # @return [void] # - # source://yard//lib/yard/templates/engine.rb#21 + # source://yard//lib/yard/templates/engine.rb#20 def register_template_path(path); end # Renders a template on a {CodeObjects::Base code object} using @@ -16556,7 +16715,7 @@ module YARD::Templates::Engine # @param options [Hash] the options hash # @return [String] the rendered template # - # source://yard//lib/yard/templates/engine.rb#82 + # source://yard//lib/yard/templates/engine.rb#81 def render(options = T.unsafe(nil)); end # Creates a template module representing the path. Searches on disk @@ -16570,7 +16729,7 @@ module YARD::Templates::Engine # {template_paths} on disk. # @return [Template] the module representing the template # - # source://yard//lib/yard/templates/engine.rb#35 + # source://yard//lib/yard/templates/engine.rb#34 def template(*path); end # Forces creation of a template at +path+ within a +full_path+. @@ -16579,17 +16738,17 @@ module YARD::Templates::Engine # @param full_paths [Array] the full path on disk of the template # @return [Template] the template module representing the +path+ # - # source://yard//lib/yard/templates/engine.rb#53 + # source://yard//lib/yard/templates/engine.rb#52 def template!(path, full_paths = T.unsafe(nil)); end # @return [Array] the list of registered template paths # - # source://yard//lib/yard/templates/engine.rb#15 + # source://yard//lib/yard/templates/engine.rb#14 def template_paths; end # @return [Array] the list of registered template paths # - # source://yard//lib/yard/templates/engine.rb#15 + # source://yard//lib/yard/templates/engine.rb#14 def template_paths=(_arg0); end # Serializes the results of a block with a +serializer+ object. @@ -16600,7 +16759,7 @@ module YARD::Templates::Engine # @yield a block whose result will be serialize # @yieldreturn [String] the contents to serialize # - # source://yard//lib/yard/templates/engine.rb#115 + # source://yard//lib/yard/templates/engine.rb#114 def with_serializer(object, serializer); end private @@ -16615,7 +16774,7 @@ module YARD::Templates::Engine # @return [Array] a list of full paths that are existing # candidates for a template module # - # source://yard//lib/yard/templates/engine.rb#161 + # source://yard//lib/yard/templates/engine.rb#160 def find_template_paths(from_template, path); end # Sets default options on the options hash @@ -16626,7 +16785,7 @@ module YARD::Templates::Engine # @param options [Hash] the options hash # @return [void] # - # source://yard//lib/yard/templates/engine.rb#141 + # source://yard//lib/yard/templates/engine.rb#140 def set_default_options(options = T.unsafe(nil)); end # The name of the module that represents a +path+ @@ -16634,7 +16793,7 @@ module YARD::Templates::Engine # @param path [String] the path to generate a module name for # @return [String] the module name # - # source://yard//lib/yard/templates/engine.rb#176 + # source://yard//lib/yard/templates/engine.rb#175 def template_module_name(path); end end end @@ -18045,7 +18204,7 @@ end # # @see CLI::YardocOptions # -# source://yard//lib/yard/templates/template_options.rb#10 +# source://yard//lib/yard/templates/template_options.rb#9 class YARD::Templates::TemplateOptions < ::YARD::Options # @return [OpenStruct] an open struct containing any global state across all # generated objects in a template. @@ -18088,7 +18247,7 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Boolean] whether a mixin matches the embed_mixins list # @return [nil] if the mixin is not a module object # - # source://yard//lib/yard/templates/template_options.rb#78 + # source://yard//lib/yard/templates/template_options.rb#77 def embed_mixins_match?(mixin); end # @return [Symbol] the template output format @@ -18135,12 +18294,12 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Boolean] whether the page is the "index" # - # source://yard//lib/yard/templates/template_options.rb#64 + # source://yard//lib/yard/templates/template_options.rb#63 def index; end # @return [Boolean] whether the page is the "index" # - # source://yard//lib/yard/templates/template_options.rb#64 + # source://yard//lib/yard/templates/template_options.rb#63 def index=(_arg0); end # @return [Symbol] the markup format to use when parsing docstrings @@ -18155,51 +18314,51 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Class] the markup provider class for the markup format # - # source://yard//lib/yard/templates/template_options.rb#30 + # source://yard//lib/yard/templates/template_options.rb#29 def markup_provider; end # @return [Class] the markup provider class for the markup format # - # source://yard//lib/yard/templates/template_options.rb#30 + # source://yard//lib/yard/templates/template_options.rb#29 def markup_provider=(_arg0); end # @deprecated use {#highlight} instead. # @return [Boolean] whether highlighting should be ignored # - # source://yard//lib/yard/templates/template_options.rb#57 + # source://yard//lib/yard/templates/template_options.rb#56 def no_highlight; end - # source://yard//lib/yard/templates/template_options.rb#58 + # source://yard//lib/yard/templates/template_options.rb#57 def no_highlight=(value); end # @return [CodeObjects::Base] the main object being generated in the template # - # source://yard//lib/yard/templates/template_options.rb#38 + # source://yard//lib/yard/templates/template_options.rb#37 def object; end # @return [CodeObjects::Base] the main object being generated in the template # - # source://yard//lib/yard/templates/template_options.rb#38 + # source://yard//lib/yard/templates/template_options.rb#37 def object=(_arg0); end # @return [CodeObjects::Base] the owner of the generated object # - # source://yard//lib/yard/templates/template_options.rb#41 + # source://yard//lib/yard/templates/template_options.rb#40 def owner; end # @return [CodeObjects::Base] the owner of the generated object # - # source://yard//lib/yard/templates/template_options.rb#41 + # source://yard//lib/yard/templates/template_options.rb#40 def owner=(_arg0); end # @return [String] the title of a given page # - # source://yard//lib/yard/templates/template_options.rb#61 + # source://yard//lib/yard/templates/template_options.rb#60 def page_title; end # @return [String] the title of a given page # - # source://yard//lib/yard/templates/template_options.rb#61 + # source://yard//lib/yard/templates/template_options.rb#60 def page_title=(_arg0); end # @return [Boolean] whether serialization should be performed @@ -18215,13 +18374,13 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Serializers::Base] the serializer used to generate links and serialize # output. Serialization output only occurs if {#serialize} is +true+. # - # source://yard//lib/yard/templates/template_options.rb#51 + # source://yard//lib/yard/templates/template_options.rb#50 def serializer; end # @return [Serializers::Base] the serializer used to generate links and serialize # output. Serialization output only occurs if {#serialize} is +true+. # - # source://yard//lib/yard/templates/template_options.rb#51 + # source://yard//lib/yard/templates/template_options.rb#50 def serializer=(_arg0); end # @return [Symbol] the template name used to render output @@ -18236,22 +18395,22 @@ class YARD::Templates::TemplateOptions < ::YARD::Options # @return [Symbol] the template type used to generate output # - # source://yard//lib/yard/templates/template_options.rb#44 + # source://yard//lib/yard/templates/template_options.rb#43 def type; end # @return [Symbol] the template type used to generate output # - # source://yard//lib/yard/templates/template_options.rb#44 + # source://yard//lib/yard/templates/template_options.rb#43 def type=(_arg0); end # @return [Verifier] the verifier object # - # source://yard//lib/yard/templates/template_options.rb#89 + # source://yard//lib/yard/templates/template_options.rb#88 def verifier; end # @return [Verifier] the verifier object # - # source://yard//lib/yard/templates/template_options.rb#89 + # source://yard//lib/yard/templates/template_options.rb#88 def verifier=(_arg0); end end diff --git a/sorbet/rbi/gems/zeitwerk@2.6.13.rbi b/sorbet/rbi/gems/zeitwerk@2.6.16.rbi similarity index 83% rename from sorbet/rbi/gems/zeitwerk@2.6.13.rbi rename to sorbet/rbi/gems/zeitwerk@2.6.16.rbi index e6a936cb0..61686311d 100644 --- a/sorbet/rbi/gems/zeitwerk@2.6.13.rbi +++ b/sorbet/rbi/gems/zeitwerk@2.6.16.rbi @@ -4,6 +4,7 @@ # This is an autogenerated file for types exported from the `zeitwerk` gem. # Please instead update this file by running `bin/tapioca gem zeitwerk`. + # source://zeitwerk//lib/zeitwerk/kernel.rb#3 module Kernel private @@ -22,11 +23,69 @@ module Zeitwerk class << self # This is a dangerous method. # - # source://zeitwerk//lib/zeitwerk.rb#21 + # source://zeitwerk//lib/zeitwerk.rb#22 def with_loader; end end end +# This private class encapsulates pairs (mod, cname). +# +# Objects represent the constant cname in the class or module object mod, and +# have API to manage them that encapsulates the constants API. Examples: +# +# cref.path +# cref.set(value) +# cref.get +# +# The constant may or may not exist in mod. +# +# source://zeitwerk//lib/zeitwerk/cref.rb#13 +class Zeitwerk::Cref + include ::Zeitwerk::RealModName + + # The type of the first argument is Module because Class < Module, class + # objects are also valid. + # + # @return [Cref] a new instance of Cref + # + # source://zeitwerk//lib/zeitwerk/cref.rb#23 + def initialize(mod, cname); end + + # source://zeitwerk//lib/zeitwerk/cref.rb#74 + def autoload(abspath); end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#68 + def autoload?; end + + # Returns the value of attribute cname. + # + # source://zeitwerk//lib/zeitwerk/cref.rb#17 + def cname; end + + # @return [Boolean] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#79 + def defined?; end + + # @raise [NameError] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#90 + def get; end + + # source://zeitwerk//lib/zeitwerk/cref.rb#34 + def path; end + + # @raise [NameError] + # + # source://zeitwerk//lib/zeitwerk/cref.rb#96 + def remove; end + + # source://zeitwerk//lib/zeitwerk/cref.rb#84 + def set(value); end +end + # source://zeitwerk//lib/zeitwerk/error.rb#4 class Zeitwerk::Error < ::StandardError; end @@ -185,30 +244,36 @@ class Zeitwerk::Loader # @return [Loader] a new instance of Loader # - # source://zeitwerk//lib/zeitwerk/loader.rb#99 + # source://zeitwerk//lib/zeitwerk/loader.rb#100 def initialize; end - # source://zeitwerk//lib/zeitwerk/loader.rb#43 + # source://zeitwerk//lib/zeitwerk/loader.rb#42 def __autoloaded_dirs; end - # source://zeitwerk//lib/zeitwerk/loader.rb#33 + # source://zeitwerk//lib/zeitwerk/loader.rb#32 def __autoloads; end - # source://zeitwerk//lib/zeitwerk/loader.rb#77 + # source://zeitwerk//lib/zeitwerk/loader.rb#78 def __namespace_dirs; end - # source://zeitwerk//lib/zeitwerk/loader.rb#310 + # source://zeitwerk//lib/zeitwerk/loader.rb#344 def __shadowed_file?(file); end - # source://zeitwerk//lib/zeitwerk/loader.rb#88 + # source://zeitwerk//lib/zeitwerk/loader.rb#89 def __shadowed_files; end - # source://zeitwerk//lib/zeitwerk/loader.rb#59 + # source://zeitwerk//lib/zeitwerk/loader.rb#60 def __to_unload; end + # Returns a hash that maps the absolute paths of the managed files and + # directories to their respective expected constant paths. + # + # source://zeitwerk//lib/zeitwerk/loader.rb#238 + def all_expected_cpaths; end + # @raise [Zeitwerk::Error] # - # source://zeitwerk//lib/zeitwerk/loader.rb#234 + # source://zeitwerk//lib/zeitwerk/loader.rb#268 def cpath_expected_at(path); end # Unloads all loaded code, and calls setup again so that the loader is able @@ -219,12 +284,12 @@ class Zeitwerk::Loader # # @raise [Zeitwerk::Error] # - # source://zeitwerk//lib/zeitwerk/loader.rb#223 + # source://zeitwerk//lib/zeitwerk/loader.rb#224 def reload; end # Sets autoloads in the root namespaces. # - # source://zeitwerk//lib/zeitwerk/loader.rb#119 + # source://zeitwerk//lib/zeitwerk/loader.rb#120 def setup; end # Removes loaded constants and configured autoloads. @@ -238,7 +303,7 @@ class Zeitwerk::Loader # means `unload` + `setup`. This one is available to be used together with # `unregister`, which is undocumented too. # - # source://zeitwerk//lib/zeitwerk/loader.rb#145 + # source://zeitwerk//lib/zeitwerk/loader.rb#146 def unload; end # Says if the given constant path would be unloaded on reload. This @@ -246,32 +311,32 @@ class Zeitwerk::Loader # # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader.rb#285 + # source://zeitwerk//lib/zeitwerk/loader.rb#319 def unloadable_cpath?(cpath); end # Returns an array with the constant paths that would be unloaded on reload. # This predicate returns an empty array if reloading is disabled. # - # source://zeitwerk//lib/zeitwerk/loader.rb#293 + # source://zeitwerk//lib/zeitwerk/loader.rb#327 def unloadable_cpaths; end # This is a dangerous method. # - # source://zeitwerk//lib/zeitwerk/loader.rb#301 + # source://zeitwerk//lib/zeitwerk/loader.rb#335 def unregister; end private - # source://zeitwerk//lib/zeitwerk/loader.rb#456 - def autoload_file(parent, cname, file); end + # source://zeitwerk//lib/zeitwerk/loader.rb#491 + def autoload_file(cref, file); end # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader.rb#514 - def autoload_path_set_by_me_for?(parent, cname); end + # source://zeitwerk//lib/zeitwerk/loader.rb#544 + def autoload_path_set_by_me_for?(cref); end - # source://zeitwerk//lib/zeitwerk/loader.rb#426 - def autoload_subdir(parent, cname, subdir); end + # source://zeitwerk//lib/zeitwerk/loader.rb#462 + def autoload_subdir(cref, subdir); end # We keep track of autoloaded directories to remove them from the registry # at the end of eager loading. @@ -279,34 +344,33 @@ class Zeitwerk::Loader # Files are removed as they are autoloaded, but directories need to wait due # to concurrency (see why in Zeitwerk::Loader::Callbacks#on_dir_autoloaded). # - # source://zeitwerk//lib/zeitwerk/loader.rb#43 + # source://zeitwerk//lib/zeitwerk/loader.rb#42 def autoloaded_dirs; end # Maps absolute paths for which an autoload has been set ---and not - # executed--- to their corresponding parent class or module and constant - # name. + # executed--- to their corresponding Zeitwerk::Cref object. # - # "/Users/fxn/blog/app/models/user.rb" => [Object, :User], - # "/Users/fxn/blog/app/models/hotel/pricing.rb" => [Hotel, :Pricing] + # "/Users/fxn/blog/app/models/user.rb" => #, + # "/Users/fxn/blog/app/models/hotel/pricing.rb" => #, # ... # - # source://zeitwerk//lib/zeitwerk/loader.rb#33 + # source://zeitwerk//lib/zeitwerk/loader.rb#32 def autoloads; end - # source://zeitwerk//lib/zeitwerk/loader.rb#493 - def define_autoload(parent, cname, abspath); end + # source://zeitwerk//lib/zeitwerk/loader.rb#523 + def define_autoload(cref, abspath); end - # source://zeitwerk//lib/zeitwerk/loader.rb#410 + # source://zeitwerk//lib/zeitwerk/loader.rb#444 def define_autoloads_for_dir(dir, parent); end # Returns the value of attribute dirs_autoload_monitor. # - # source://zeitwerk//lib/zeitwerk/loader.rb#96 + # source://zeitwerk//lib/zeitwerk/loader.rb#97 def dirs_autoload_monitor; end # Returns the value of attribute mutex. # - # source://zeitwerk//lib/zeitwerk/loader.rb#92 + # source://zeitwerk//lib/zeitwerk/loader.rb#93 def mutex; end # Maps namespace constant paths to their respective directories. @@ -323,25 +387,25 @@ class Zeitwerk::Loader # and that its children are spread over those directories. We'll visit them # to set up the corresponding autoloads. # - # source://zeitwerk//lib/zeitwerk/loader.rb#77 + # source://zeitwerk//lib/zeitwerk/loader.rb#78 def namespace_dirs; end # `dir` is the directory that would have autovivified a namespace. `file` is # the file where we've found the namespace is explicitly defined. # - # source://zeitwerk//lib/zeitwerk/loader.rb#482 - def promote_namespace_from_implicit_to_explicit(dir:, file:, parent:, cname:); end + # source://zeitwerk//lib/zeitwerk/loader.rb#512 + def promote_namespace_from_implicit_to_explicit(dir:, file:, cref:); end - # source://zeitwerk//lib/zeitwerk/loader.rb#528 + # source://zeitwerk//lib/zeitwerk/loader.rb#558 def raise_if_conflicting_directory(dir); end - # source://zeitwerk//lib/zeitwerk/loader.rb#523 + # source://zeitwerk//lib/zeitwerk/loader.rb#553 def register_explicit_namespace(cpath); end - # source://zeitwerk//lib/zeitwerk/loader.rb#552 + # source://zeitwerk//lib/zeitwerk/loader.rb#582 def run_on_unload_callbacks(cpath, value, abspath); end - # source://zeitwerk//lib/zeitwerk/loader.rb#310 + # source://zeitwerk//lib/zeitwerk/loader.rb#344 def shadowed_file?(file); end # A shadowed file is a file managed by this loader that is ignored when @@ -351,59 +415,61 @@ class Zeitwerk::Loader # has only scanned the top-level, `shadowed_files` does not have shadowed # files that may exist deep in the project tree yet. # - # source://zeitwerk//lib/zeitwerk/loader.rb#88 + # source://zeitwerk//lib/zeitwerk/loader.rb#89 def shadowed_files; end # Stores metadata needed for unloading. Its entries look like this: # - # "Admin::Role" => [".../admin/role.rb", [Admin, :Role]] + # "Admin::Role" => [ + # ".../admin/role.rb", + # # + # ] # # The cpath as key helps implementing unloadable_cpath? The file name is # stored in order to be able to delete it from $LOADED_FEATURES, and the - # pair [Module, Symbol] is used to remove_const the constant from the class - # or module object. + # cref is used to remove the constant from the parent class or module. # # If reloading is enabled, this hash is filled as constants are autoloaded # or eager loaded. Otherwise, the collection remains empty. # - # source://zeitwerk//lib/zeitwerk/loader.rb#59 + # source://zeitwerk//lib/zeitwerk/loader.rb#60 def to_unload; end - # source://zeitwerk//lib/zeitwerk/loader.rb#559 - def unload_autoload(parent, cname); end + # source://zeitwerk//lib/zeitwerk/loader.rb#589 + def unload_autoload(cref); end - # source://zeitwerk//lib/zeitwerk/loader.rb#565 - def unload_cref(parent, cname); end + # source://zeitwerk//lib/zeitwerk/loader.rb#595 + def unload_cref(cref); end class << self # Returns an array with the absolute paths of the root directories of all # registered loaders. This is a read-only collection. # - # source://zeitwerk//lib/zeitwerk/loader.rb#404 + # source://zeitwerk//lib/zeitwerk/loader.rb#438 def all_dirs; end # Returns the value of attribute default_logger. # - # source://zeitwerk//lib/zeitwerk/loader.rb#320 + # source://zeitwerk//lib/zeitwerk/loader.rb#354 def default_logger; end # Sets the attribute default_logger # # @param value the value to set the attribute default_logger to. # - # source://zeitwerk//lib/zeitwerk/loader.rb#320 + # source://zeitwerk//lib/zeitwerk/loader.rb#354 def default_logger=(_arg0); end # Broadcasts `eager_load` to all loaders. Those that have not been setup # are skipped. # - # source://zeitwerk//lib/zeitwerk/loader.rb#376 + # source://zeitwerk//lib/zeitwerk/loader.rb#410 def eager_load_all; end # Broadcasts `eager_load_namespace` to all loaders. Those that have not # been setup are skipped. # - # source://zeitwerk//lib/zeitwerk/loader.rb#390 + # source://zeitwerk//lib/zeitwerk/loader.rb#424 def eager_load_namespace(mod); end # This is a shortcut for @@ -421,7 +487,7 @@ class Zeitwerk::Loader # This method returns a subclass of Zeitwerk::Loader, but the exact type # is private, client code can only rely on the interface. # - # source://zeitwerk//lib/zeitwerk/loader.rb#338 + # source://zeitwerk//lib/zeitwerk/loader.rb#372 def for_gem(warn_on_extra_files: T.unsafe(nil)); end # This is a shortcut for @@ -439,7 +505,7 @@ class Zeitwerk::Loader # This method returns a subclass of Zeitwerk::Loader, but the exact type # is private, client code can only rely on the interface. # - # source://zeitwerk//lib/zeitwerk/loader.rb#359 + # source://zeitwerk//lib/zeitwerk/loader.rb#393 def for_gem_extension(namespace); end end end @@ -449,7 +515,7 @@ module Zeitwerk::Loader::Callbacks include ::Zeitwerk::RealModName extend ::Zeitwerk::Internal - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#40 def __on_dir_autoloaded(dir); end # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10 @@ -461,18 +527,18 @@ module Zeitwerk::Loader::Callbacks # # @private # - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#81 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#80 def on_namespace_loaded(namespace); end private - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#41 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#40 def on_dir_autoloaded(dir); end # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#10 def on_file_autoloaded(file); end - # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#92 + # source://zeitwerk//lib/zeitwerk/loader/callbacks.rb#91 def run_on_load_callbacks(cpath, value, abspath); end end @@ -771,7 +837,7 @@ module Zeitwerk::Loader::EagerLoad # In order to invoke this method, the caller has to ensure `child` is a # strict namespace descendant of `root_namespace`. # - # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#195 + # source://zeitwerk//lib/zeitwerk/loader/eager_load.rb#193 def eager_load_child_namespace(child, child_name, root_dir, root_namespace); end end @@ -779,45 +845,28 @@ end module Zeitwerk::Loader::Helpers private - # @return [Boolean] - # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#128 - def cdef?(parent, cname); end - - # @raise [NameError] - # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#134 - def cget(parent, cname); end - # @raise [Zeitwerk::NameError] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#149 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#110 def cname_for(basename, abspath); end - # Symbol#name was introduced in Ruby 3.0. It returns always the same - # frozen object, so we may save a few string allocations. - # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#118 - def cpath(parent, cname); end - - # @raise [NameError] - # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#140 - def crem(parent, cname); end - # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#67 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#85 def dir?(path); end + # Looks for a Ruby file using breadth-first search. This type of search is + # important to list as less directories as possible and return fast in the + # common case in which there are Ruby files. + # # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#45 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#56 def has_at_least_one_ruby_file?(dir); end # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#72 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#90 def hidden?(basename); end # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#7 @@ -828,17 +877,16 @@ module Zeitwerk::Loader::Helpers # @return [Boolean] # - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#62 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#80 def ruby?(path); end - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#109 - def strict_autoload_path(parent, cname); end - - # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#77 + # source://zeitwerk//lib/zeitwerk/loader/helpers.rb#95 def walk_up(abspath); end end -# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#144 +# --- Inflection -------------------------------------------------------------------------------- +# +# source://zeitwerk//lib/zeitwerk/loader/helpers.rb#105 module Zeitwerk::Loader::Helpers::CNAME_VALIDATOR; end # source://zeitwerk//lib/zeitwerk/loader.rb#21